We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the @shabados/database.knex.destroy function in @shabados/database

To help you get started, we’ve selected a few @shabados/database examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ShabadOS / desktop / app / lib / Updater.js View on Github external
async updateDatabase() {
    // Download and extract the database package from npm
    logger.info( `Downloading database update to ${this.tempFolder}` )
    await remove( this.tempFolder )
    await extract( databasePackage, this.tempFolder )

    logger.info( 'Hot-patching database module' )
    // Disconnect the Shabad OS database connection
    await knex.destroy()
    // Move across the updated npm database module
    await move( this.tempFolder, DATABASE_FOLDER, { overwrite: true } )
    // Reimport the database
    //! Relies on knex being reinitialised globally
    importFresh( '@shabados/database' )
  }

@shabados/database

A digital representation of Sikh Bani and other Panthic texts.

MIT
Latest version published 8 months ago

Package Health Score

70 / 100
Full package analysis