ts-node-client

npm / node module to transfer dependency information to TrustSource server.

Usage no npm install needed!

<script type="module">
  import tsNodeClient from 'https://cdn.skypack.dev/ts-node-client';
</script>

README

TrustSource ts-node-client

Version Downloads Downloads Apache-2.0 License

npm package

TrustSource node client

node module to transfer dependency information to TrustSource server.

Requirements

  • node >= 8.9.0
  • if you are using npm < 8.0.0 we recommend switch to ts-node-client version 1.5.2 until we provide more elegant solution

Installation

Run: npm install --save-dev ts-node-client or yarn add --dev ts-node-client

You can add install_and_scan script to the package.json file to install and transfer dependency information using one command npm run install_and_scan:

"scripts": {
  "install_and_scan": "npm install && ts-node-client -k apiKey -p Project"
},

To store your credentials for automated transfer you may create .tsrc.json in your project directory or in your home directory to set credentials globally (not recommended!)

.tsrc.json example:

{
  "apiKey": "apiKey",
  "url": "https://app.trustsource.io",
  "project": "Project Description"
}

Usage

You also may initiate transfer to TrustSource server manually by executing following command via terminal:

node_modules/.bin/ts-node-client
node_modules/.bin/ts-node-client -k apiKey -p Project
node_modules/.bin/ts-node-client -c config.json
npm / node module to transfer dependency information to TrustSource server.

Options:
  --apiKey, -k    apiKey                                             [default: null]
  --project, -p   Project name                                       [default: null]
  --branch, -b    Scan branch                                        [default: null]
  --tag, -t       Scan tag                                           [default: null]
  --binaryLinks   Binary links separated by comma                    [default: null]
  --url           url                                                [default: null]
  --config, -c    Config path                                        [default: null]
  --proxy         Proxy url like 'https://user:password@host:port'    [default: null]
  --version, -v   Prints a version                                   [default: false]
  --debug                                                            [default: null]
  --simulate                                                         [default: null]
  --includeDevDependencies                                           [default: null]
  --meteor                                                           [default: null]
  --brakeOnWarnings                                                  [default: null]
  --brakeOnViolations                                                [default: null]
  --help          Prints a usage statement                           [boolean]

Changelog

2.0.0

if you are using npm < 8.0.0 we recommend switch to ts-node-client version 1.5.2 until we provide more elegant solution

  • Stop usage of global-npm until we find new resolution
  • Get back npm as local dependency

1.5.2

  • Describe Error: The programmatic API was removed in npm v8.0.0

1.5.1

  • Bump devDependencies
  • Introduce sonarjs

1.4.3

  • Bump glob-parent from 5.1.1 to 5.1.2
  • Bump path-parse from 1.0.6 to 1.0.7

1.4.2

  • Bump lodash from 4.17.19 to 4.17.21

1.4.1

  • Bump y18n from 4.0.0 to 4.0.1

1.4.0

  • Added:
    • option --includeDevDependencies. It is allow to scan dev dependencies

1.3.1

  • Use global-npm (meaning npm is no longer a dependency of ts-node-client)

1.2.3

  • Added:
    • option --brakeOnViolations. It is fail build in case any violations after scan transferred.
    • option --brakeOnWarnings. It is fail build in case any warning after scan transferred.

1.1.2

  • userName is not required param for scans
  • Support usage of scan meta param binaryLinks inside Options definition

1.0.0

  • Node JS and dependencies updates "node": ">= 8.12.0"

0.3.4 - 0.3.6

  • Improve variable usage and tasks migration

0.3.3

  • Support usage of scan meta params: branch and tag inside Options definition

0.3.2

  • Skip npmDependency without names

0.3.1

  • Update travis config

0.3.0

  • Update dependency to resolve vulnerabilities

0.2.5

  • Added proxy support and config

0.2.4

  • Update travis config

0.2.3

  • Updated README.md with app.trustsource.io

0.2.2

  • Updated default url to app.trustsource.io

0.2.1

  • Added windows support
  • Fixed json

0.2.0

  • Removed:
    • options: --credentials and --credentialsFile instead you should use --config.
    • option --baseUrl instead you should use --url.
  • Added:
    • option --config. It is similar to credentials, but it will contain any config information.
    • option --url. It is similar to baseUrl.
    • option --apiKey and --userName so it will be unnecessary to create .tsrc.json file.
    • options --version and --help.
    • options shortcut.

License

Apache-2.0