1.1.1 • Published 2 years ago

ag-audit-pkg-upload v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

ag-audit-pkg-upload

CLI tool used to upload package.json and package-lock.json files to Google Cloud Storage and update DataStore with locations. Meant to be used in conjunction with the ag-audit library in order to run security scans and look for outdated packages.


Prerequisites

  • access to a Google Cloud Platform project that has the Cloud Datastore API enabled
  • gcloud CLI installed on your system
  • logged into gcloud with a user account that has the write permissions for DataStore and Cloud Storage on the GCP project that you wish to upload to

Running via installed package

Install the library

npm install ag-audit-pkg-upload

Run the command

ag-audit-pkg-upload --bucket=INSERT_NAME_OF_YOUR_GCS_BUCKET --appId=INSERT_UNIQUE_NAME_FOR_YOUR_APP --pkgDir=INSERT_LOCATION_OF_PACKAGE.JSON --projectId=INSERT_GCP_PROJECT_ID

You can optionally pass a timeZone flag as well (Ex: --timeZone=America/New_York) to be used for the folder names created in GCS, otherwise it defaults to America/Chicago.

Note: It may be easier to add this command to your npm scripts object within your package.json.


Running via npx

npx ag-audit-pkg-upload --bucket=INSERT_NAME_OF_YOUR_GCS_BUCKET --appId=INSERT_UNIQUE_NAME_FOR_YOUR_APP --pkgDir=INSERT_LOCATION_OF_PACKAGE.JSON --projectId=INSERT_GCP_PROJECT_ID