npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

commandtron7

v1.0.0

Published

Project automates finding and fixing of sqlite database issues.

Readme

Sqlite Inspector

Project automates finding and fixing of sqlite database issues.

HOW TO USE

  • Install Dependencies: npm install
  • Build: npm run build
  • Run For Help: node commandtron-build sqlite --help

Deployment

To deploy this project run

Install Dependencies

  npm install

Build

  npm run build

Run For Help

  node commandtron-build sqlite --help

Commands

  1. compare - To compare user db schema with Vyapar Db
  2. integrity - to perform integrity check on User Db
  3. drop-index - to delete indexes on user db and to perform vacuum optimization
  4. fix-table - to fix the corrrupted tables on user db

Run for help for each command name

  node commandtron-build sqlite <command-name> --help 

Note - create a folder named database inside commandtron, copy user db inside that folder (rename with some easy name say user.vyp or test.vyp)

and copy latest Vyapar Db inside databse folder and rename it with master.vyp

eg - commandtron/database/user.vyp , commandtron/database/master.vyp.

Example compare

 node commandtron-build sqlite compare --db User.vyp -cm Vyapar
  • Response:

MESSAGE: => Missing Table

        {
        "tables": [
            "kb_firms",
            "kb_closed_link_txn_table",
            "audit_trails"
        ]
        }

MESSAGE: => Missing Columns

        {
        "columns": [
            {
            "table": "kb_names",
            "name": "name_expense_type"
            },
            {
            "table": "kb_linked_transactions",
            "name": "txn_destination_id",
            "type": "NUMERIC",
            "expectedType": "INTEGER"
            }
        ]
        }

Example integrity

  node commandtron-build sqlite integrity --db test.vyp

-Response: MESSAGE: => DB foreign key integrity test result

        {
          "foreignKeyCheckData": []
        }

MESSAGE: => DB integrity test result

        {
          "integrityCheckData": [
            {
              "integrity_check": "*** in database main ***\nPage 3930: never used"
            },
            {
              "integrity_check": "row 55524 missing from index LINEITEM_ITEM"
            },
            {
              "integrity_check": "row 55527 missing from index LINEITEM_ITEM"
            }, ]
        }

Example drop-index

  node commandtron-build sqlite drop-index --db test.vyp --indexes lineitem_txn_id_index TXN_NAME

-Response: MESSAGE: => Drop Index Query has been exceuted succeessfully

        {
          "info": "The List of dropped indexes",
          "indexArray": [
            "lineitem_txn_id_index",
            "TXN_NAME"
          ]
        }

MESSAGE: => vacuum command has been executed successfully

         {}

Example fix-table

  node commandtron-build sqlite fix-table --db  test.vyp -t  kb_settings

-Response: MESSAGE: => table fixed successfully

        {
          "tableName": "kb_settings"
        }

Release Deployment

Run For Help

  node commandtron-build release --help

Commands

  1. upload [options] To upload the necessary files on S3 bucket
  2. cache-clean [options] To clean the Cache
  3. revert [options] To revert the S3 files to the previous version
  4. list-versions [options] To list the versions of the file on S3

Run for help for each command name

  node commandtron-build release <command-name> --help 

Command options For Upload command

Options: -bt, --build-type <buildType...> set build type as qa or prod (choices: "qa", "prod") -p, --platform <platform...> set platform as windows or mac or both (choices: "win", "mac") -rt, --release-type <releaseType...> set release type as new or update or nsis (choices: "new", "update", "nsis") -v --version version of the app -h, --help display help for command

Example For Uploads

To upload windows file for new downloads

  node commandtron-build release upload -bt prod -rt new -p win -v 10.15.4 

To upload mac files for new downloads

  node commandtron-build release upload -bt prod -rt new -p mac -v 10.15.4 

To upload windows file for update

  node commandtron-build release upload -bt prod -rt update -p win -v 10.15.4 

To upload mac file for update

  node commandtron-build release upload -bt prod -rt update -p mac -v 10.15.4 

To upload nsis files

  node commandtron-build release upload -bt prod -rt nsis -p win -v 10.15.4 

Command options for cache-clean command

Options: -bt, --build-type <buildType...> set build type as qa or prod (choices: "qa", "prod", default: default build type for cache-clean is prod) -p, --platform <platform...> set platform as windows or mac or both (choices: "win", "mac") -rt, --release-type <releaseType...> set release type as new or update or nsis (choices: "new", "update", "nsis") -v --version version of the app -h, --help display help for command

Example For cache-clean

To clean-cache of windows file for new downloads

  node commandtron-build release cache-clean -bt prod -rt new -p win -v 10.15.4 

To clean-cache of mac files for new downloads

  node commandtron-build release cache-clean -bt prod -rt new -p mac -v 10.15.4 

To clean-cache of windows file for update

  node commandtron-build release cache-clean -bt prod -rt update -p win -v 10.15.4 

To clean-cache of mac file for update

  node commandtron-build release cache-clean -bt prod -rt update -p mac -v 10.15.4 

To clean-cache of nsis files

  node commandtron-build release cache-clean -bt prod -rt nsis -p win -v 10.15.4 

Command options for revert command

Options: -bt, --build-type <buildType...> set build type as qa or prod (choices: "qa", "prod", default: default build type for revert is prod) -p, --platform <platform...> set platform as windows or mac or both (choices: "win", "mac") -rt, --release-type <releaseType...> set release type as new or update or nsis (choices: "new", "update", "nsis") -vi, --version-index move to the specified version index (default: by default files will be reverted to previous version index) -v --version version of the app

Example for revert command ( please clean-cache after successful execution of revert command )

Note - here version given by -v flag is not the version to which the files would be reverted, files would be reverted to previous version or to the specified version only , instead this version given by -v flag would be used as a meta-data for the reverted file.

To revert windows file for new downloads to previous version on S3

  node commandtron-build release revert -bt prod -rt new -p win -v 10.15.4 

To revert mac files for new downloads to previous version on S3

  node commandtron-build release revert -bt prod -rt new -p mac -v 10.15.4 

To revert windows file for new downloads to a specified version .

  node commandtron-build release revert -bt prod -rt new -p win -v 10.15.2 -vi 2 
  ## this will revert files to 2 versions before the latest version , i.e one version older than the previous version

To revert mac file for new downloads to a specified version .

  node commandtron-build release revert -bt prod -rt new -p mac -v 10.15.4 -vi 2 
  ## this will revert files to 2 versions before the latest version , i.e one version older than the previous version

Sample Response received by the revert command and few key pointers -

MESSAGE: => revert for file was successfull, please clean the cache explicitly after the revert

{
  "filePath": "desktop.vyaparapp.in/v2/VyaparApp.exe", 
  "tagData": [
    {
      "Key": "version",
      "Value": "10.16.0"  // NOTE - This tag info shows the vyapar app version of the file to which the revert was pointed. 
    }
  ],
  "copyObjectRespone": {
    "$metadata": {
      "httpStatusCode": 200,
      "requestId": "00A2SNDAJ9XG9EAZ",
      "extendedRequestId": "BzQB+sSqvjydLCObk1oRnfKXmUZusFWrg6eGh9VbtNtwqkwUvASNuq1+UQzXDBmgzdkH+j2nxrE=",
      "attempts": 1,
      "totalRetryDelay": 0
    },
    "CopySourceVersionId": "65M96wYWTjbApurkrq2OJ6gYSvzKYsBN", // NOTE - This is the version id of the file, which we wanted to set as the latest ( or say revert ).
    "VersionId": "LIygUgXb1j_jjUgwPS5Iyx.hxtSRP8v0",           
    "ServerSideEncryption": "AES256",
    "CopyObjectResult": {
      "ETag": "\"f95aa2bbf94abc5e5703367b981ed803\"",
      "LastModified": "2024-06-11T13:44:50.000Z"
    }
  }
}

Command options for list-versions command

Options: -bt, --build-type <buildType...> set build type as qa or prod (choices: "qa", "prod", default: default build type for revert is prod) -p, --platform <platform...> set platform as windows or mac or both (choices: "win", "mac") -rt, --release-type <releaseType...> set release type as new or update or nsis (choices: "new", "update", "nsis") -v --version version of the app, only needed in case of update files as their names contain versions. -h, --help display help for commandlp for command

Example for list-versions command

To list version of all windows file for new downloads

  node commandtron-build release list-versions -bt prod -rt new -p win 

To list version of all mac file for new downloads

  node commandtron-build release list-versions -bt prod -rt mac -p win  

Note - Examples for all combinations of options of platform (win, mac) , build-type (prod , qa ) , release-type ( new , update , nsis) has not been given for all the commands.

However the developer may use different choices of options to perform the desired avaialble action respective to upload , cache-clean , revert and list-versions.

Upload Source Maps to senty

Note: Make sure the source-map files are already created and stored in Vyapar_desktop/src folder.

To upload source maps on sentry 1- create a .sentryclirc file in Vyapar_desktop/commandtron folder and copy and paste the content of .sentryclirc.template file in it. 2- Add your sentry auth-token in the .sentryclirc file. 3- Run the upload-sourcemaps.sh script at path Vyapar_desktop/commandtron 4- Provide release-version and project name as arguments.

Example for upload-sourcemaps

./upload-sourcemaps.sh 10.16.5 electron22-staging