ts-node-client 1.8.6 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # TrustSource ts-node-client
2
2
 
3
- [![Travis build status](https://travis-ci.org/TrustSource/ts-node-client.svg?branch=master)](https://travis-ci.org/TrustSource/ts-node-client)
4
3
  [![Version](https://img.shields.io/npm/v/ts-node-client.svg)](http://npm.im/ts-node-client)
5
4
  [![Downloads](https://img.shields.io/npm/dm/ts-node-client.svg)](http://npm-stat.com/charts.html?package=ts-node-client)
6
5
  [![Downloads](https://img.shields.io/npm/dt/ts-node-client.svg)](http://npm-stat.com/charts.html?package=ts-node-client)
@@ -8,14 +7,12 @@
8
7
 
9
8
  [![npm package](https://nodei.co/npm/ts-node-client.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/ts-node-client/)
10
9
 
11
- TrustSource node client
12
-
13
- > node module to transfer dependency information to TrustSource server.
10
+ > TrustSource node client - node module to transfer dependency information to TrustSource server.
14
11
 
15
12
  ## Requirements
16
-
17
13
  * node >= 8.9.0
18
- * npm < 8.0.0
14
+ * npm < 8.0.0 use **ts-node-client@1.***
15
+ * npm >= 8.0.0 use **ts-node-client@2.***
19
16
 
20
17
  ## Installation
21
18
  Run: `npm install --save-dev ts-node-client` or `yarn add --dev ts-node-client`
@@ -63,9 +60,9 @@ Options:
63
60
  --url url [default: null]
64
61
  --config, -c Config path [default: null]
65
62
  --proxy Proxy url like 'https://user:password@host:port' [default: null]
66
- --version, -v Prints a version [default: false]
63
+ --version Prints a version [default: null]
67
64
  --saveAs, -o Save as file (file name prefix) [default: null]
68
- --saveAsFormat, -of Save as format (scan / cydx / spdx) [default: null]
65
+ --saveAsFormat, -f Save as format (scan / cydx / spdx) [default: null]
69
66
  --debug [default: null]
70
67
  --simulate [default: null]
71
68
  --includeDevDependencies [default: null]
@@ -77,105 +74,87 @@ Options:
77
74
  ```
78
75
  PLEASE NOTE: if you want to pass param into function
79
76
  you should add value, for example:
77
+
80
78
  `--breakOnViolations true` or `--saveAs sbom`
81
79
 
82
80
  ## Software bill of materials
83
81
 
84
82
  [View SBOM <img alt="TrustSource" src="https://app.trustsource.io/logo.png" width="70"/>](https://app.trustsource.io/api/v1/public-BoM/ae0832c6-5a55-4aa8-8c45-75528d0833fb)
85
83
 
86
-
87
84
  ## Known problems
88
85
 
89
86
  #### Error: The programmatic API was removed in npm v8.0.0
90
- You should upgrade to later versions of ts-node-client
87
+ You should upgrade to 2.* versions of ts-node-client
91
88
 
92
89
  ## Changelog
93
90
 
91
+ #### 2.1.*
92
+ - Migrate 1.6.* - 1.8.* changes to version 2.1
93
+
94
+ #### 2.0.*
95
+ - Support new scan tool and fix problem with programmatic API for >= npm@8.0.0
96
+ - Stop usage of [`global-npm`](https://github.com/dracupid/global-npm) until we find new resolution
97
+ - Get back `npm` as local dependency
98
+
94
99
  #### 1.8.*
95
100
  - SBOM
96
101
  - **--saveAs** and **--saveAsFormat**
97
102
  - Bump minimist from 1.2.5 to 1.2.6
98
103
  - Bump urijs from 1.19.10 to 1.19.11
99
104
  - replace packageurl-js with simple local function
105
+ - improve docs
100
106
 
101
107
  #### 1.7.*
102
108
  - request -> axios
103
109
  - fix dependencies
104
110
  - doc fixes
105
111
 
106
- #### 1.6.0
112
+ #### 1.6.*
107
113
  - **--breakOnWarnings** and **--breakOnViolations**
108
114
  - Bump devDependencies
109
115
 
110
- #### 1.5.2
116
+ #### 1.5.*
111
117
  - Describe `Error: The programmatic API was removed in npm v8.0.0`
112
-
113
- #### 1.5.1
114
118
  - Bump devDependencies
115
119
  - Introduce sonarjs
116
120
 
117
- #### 1.4.3
121
+ #### 1.4.*
118
122
  - Bump glob-parent from 5.1.1 to 5.1.2
119
123
  - Bump path-parse from 1.0.6 to 1.0.7
120
-
121
- #### 1.4.2
122
124
  - Bump lodash from 4.17.19 to 4.17.21
123
-
124
- #### 1.4.1
125
125
  - Bump y18n from 4.0.0 to 4.0.1
126
-
127
- #### 1.4.0
128
126
  - Added:
129
127
  - option **--includeDevDependencies**. It is allow to scan dev dependencies
130
128
 
131
- #### 1.3.1
129
+ #### 1.3.*
132
130
  - Use [`global-npm`](https://github.com/dracupid/global-npm) (meaning `npm` is no longer a dependency of `ts-node-client`)
133
131
 
134
- #### 1.2.3
132
+ #### 1.2.*
135
133
  - Added:
136
134
  - option **--brakeOnViolations**. It is fail build in case any violations after scan transferred.
137
135
  - option **--brakeOnWarnings**. It is fail build in case any warning after scan transferred.
138
136
 
139
- #### 1.1.2
137
+ #### 1.1.*
140
138
  - userName is not required param for scans
141
139
  - Support usage of scan meta param binaryLinks inside Options definition
142
140
 
143
-
144
- #### 1.0.0
141
+ #### 1.0.*
145
142
  - Node JS and dependencies updates "node": ">= 8.12.0"
146
143
 
147
- #### 0.3.4 - 0.3.6
144
+ #### 0.3.*
148
145
  - Improve variable usage and tasks migration
149
-
150
- #### 0.3.3
151
146
  - Support usage of scan meta params: branch and tag inside Options definition
152
-
153
- #### 0.3.2
154
147
  - Skip npmDependency without names
155
-
156
- #### 0.3.1
157
148
  - Update travis config
158
-
159
- #### 0.3.0
160
149
  - Update dependency to resolve vulnerabilities
161
150
 
162
- #### 0.2.5
151
+ #### 0.2.*
163
152
  - Added proxy support and config
164
-
165
- #### 0.2.4
166
153
  - Update travis config
167
-
168
- #### 0.2.3
169
154
  - Updated README.md with `app.trustsource.io`
170
-
171
- #### 0.2.2
172
155
  - Updated default url to `app.trustsource.io`
173
-
174
- #### 0.2.1
175
156
  - Added windows support
176
157
  - Fixed json
177
-
178
- #### 0.2.0
179
158
  - **Removed:**
180
159
  - options: **--credentials** and **--credentialsFile** instead you should use **--config**.
181
160
  - option **--baseUrl** instead you should use **--url**.
@@ -56,18 +56,13 @@ const getOptions = () => {
56
56
  default: null,
57
57
  describe: 'Proxy url like \'https://user:password@host:port\''
58
58
  },
59
- version: {
60
- alias: 'v',
61
- default: false,
62
- describe: 'Prints a version'
63
- },
64
59
  saveAs: {
65
60
  alias: 'o',
66
61
  default: null,
67
62
  describe: 'Save as file (file name prefix)'
68
63
  },
69
64
  saveAsFormat: {
70
- alias: 'of',
65
+ alias: 'f',
71
66
  default: null,
72
67
  describe: 'Save as format (scan / cydx / spdx)'
73
68
  },
@@ -96,6 +91,7 @@ const getOptions = () => {
96
91
  describe: 'includeDevDependencies'
97
92
  }
98
93
  })
94
+ .version()
99
95
  .usage(pckgJson.description)
100
96
  .help('help', 'Prints a usage statement')
101
97
  .fail((msg, err, yargsObject) => {
@@ -6,7 +6,7 @@
6
6
  *********************************************************/
7
7
  /* eslint-enable */
8
8
 
9
- const npm = require('global-npm');
9
+ const npm = require('npm');
10
10
  const debuglog = (require('debuglog'))('ts-npm-scanner');
11
11
  const ScanResult = require('./scanresult');
12
12
  const { RestClient } = require('./rest-client');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ts-node-client",
3
3
  "description": "npm / node module to transfer dependency information to TrustSource server.",
4
- "version": "1.8.6",
4
+ "version": "2.1.0",
5
5
  "private": false,
6
6
  "homepage": "https://app.trustsource.io/",
7
7
  "author": {
@@ -14,8 +14,7 @@
14
14
  },
15
15
  "license": "Apache-2.0",
16
16
  "engines": {
17
- "node": ">= 8.9.0",
18
- "npm": "< 8.0.0"
17
+ "node": ">= 8.9.0"
19
18
  },
20
19
  "main": "./lib/cli.js",
21
20
  "bin": {
@@ -23,20 +22,19 @@
23
22
  },
24
23
  "scripts": {
25
24
  "scan": "node ./bin/ts-node-client.js",
26
- "scan-with-brakes": "node ./bin/ts-node-client.js --breakOnViolations true --breakOnWarnings true",
27
- "scan-to-file": "node ./bin/ts-node-client.js --saveAsFormat cydx --saveAs test",
28
- "scan-prod": "node ./bin/ts-node-client.js --debug true",
25
+ "scan-with-brakes": "node ./bin/ts-node-client.js --breakOnViolations true --breakOnWarnings false",
26
+ "scan-to-file": "node ./bin/ts-node-client.js --saveAs test --saveAsFormat cydx",
29
27
  "lint": "eslint bin lib test",
30
28
  "lint-fix": "eslint bin lib test --fix",
31
29
  "test": "mocha test",
32
30
  "precommit": "npm run lint && npm run test"
33
31
  },
34
32
  "dependencies": {
33
+ "npm": "6.14.17",
35
34
  "axios": "0.26.1",
36
35
  "debuglog": "1.0.1",
37
- "global-npm": "0.5.0",
38
36
  "semver": "7.3.5",
39
- "yargs": "^15.4.1"
37
+ "yargs": "^17.5.0"
40
38
  },
41
39
  "devDependencies": {
42
40
  "eslint": "^7.32.0",
@@ -52,6 +50,8 @@
52
50
  "meteor",
53
51
  "plugin",
54
52
  "opensource",
53
+ "cydx",
54
+ "spdx",
55
55
  "dependency-analysis"
56
56
  ]
57
57
  }