ts-node-client 3.4.1 → 3.4.3
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/CHANGELOG.md +126 -0
- package/README.md +4 -86
- package/bin/ts-node-client.js +1 -0
- package/lib/rest-client.js +3 -2
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
## 3.5.0 - 2025-07-22
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
* bump dependencies
|
|
15
|
+
* full url optional param
|
|
16
|
+
* changelog moved
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 3.4.2 - 2024-08-20
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
* docs update
|
|
23
|
+
|
|
24
|
+
|
|
11
25
|
## 3.4.1 - 2024-08-13
|
|
12
26
|
|
|
13
27
|
### Fixed
|
|
@@ -117,3 +131,115 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
117
131
|
|
|
118
132
|
### Changed
|
|
119
133
|
* Migrate versions of dependencies
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## 2.0.*
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
* Support new scan tool and fix problem with programmatic API for >= npm@8.0.0
|
|
140
|
+
* Stop usage of [`global-npm`](https://github.com/dracupid/global-npm) until we find new resolution
|
|
141
|
+
* Get back `npm` as local dependency
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## 1.8.*
|
|
145
|
+
|
|
146
|
+
### Changed
|
|
147
|
+
* SBOM
|
|
148
|
+
* **--saveAs** and **--saveAsFormat**
|
|
149
|
+
* Bump minimist from 1.2.5 to 1.2.6
|
|
150
|
+
* Bump urijs from 1.19.10 to 1.19.11
|
|
151
|
+
* replace packageurl-js with simple local function
|
|
152
|
+
* improve docs
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## 1.7.*
|
|
156
|
+
|
|
157
|
+
### Changed
|
|
158
|
+
* request -> axios
|
|
159
|
+
* fix dependencies
|
|
160
|
+
* doc fixes
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## 1.6.*
|
|
164
|
+
|
|
165
|
+
### Changed
|
|
166
|
+
* **--breakOnWarnings** and **--breakOnViolations**
|
|
167
|
+
* Bump devDependencies
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## 1.5.*
|
|
171
|
+
|
|
172
|
+
### Changed
|
|
173
|
+
* Describe `Error: The programmatic API was removed in npm v8.0.0`
|
|
174
|
+
* Bump devDependencies
|
|
175
|
+
* Introduce sonarjs
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## 1.4.*
|
|
179
|
+
|
|
180
|
+
### Changed
|
|
181
|
+
* Bump glob-parent from 5.1.1 to 5.1.2
|
|
182
|
+
* Bump path-parse from 1.0.6 to 1.0.7
|
|
183
|
+
* Bump lodash from 4.17.19 to 4.17.21
|
|
184
|
+
* Bump y18n from 4.0.0 to 4.0.1
|
|
185
|
+
|
|
186
|
+
### Added
|
|
187
|
+
* option **--includeDevDependencies**. It is allow to scan dev dependencies
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 1.3.*
|
|
191
|
+
|
|
192
|
+
### Changed
|
|
193
|
+
* Use [`global-npm`](https://github.com/dracupid/global-npm) (meaning `npm` is no longer a dependency of `ts-node-client`)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## 1.2.*
|
|
197
|
+
|
|
198
|
+
### Added
|
|
199
|
+
* option **--brakeOnViolations**. It is fail build in case any violations after scan transferred.
|
|
200
|
+
* option **--brakeOnWarnings**. It is fail build in case any warning after scan transferred.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
## 1.1.*
|
|
204
|
+
|
|
205
|
+
### Changed
|
|
206
|
+
* userName is not required param for scans
|
|
207
|
+
* Support usage of scan meta param binaryLinks inside Options definition
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## 1.0.*
|
|
211
|
+
|
|
212
|
+
### Changed
|
|
213
|
+
* Node JS and dependencies updates "node": ">= 8.12.0"
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## 0.3.*
|
|
217
|
+
|
|
218
|
+
### Changed
|
|
219
|
+
* Improve variable usage and tasks migration
|
|
220
|
+
* Support usage of scan meta params: branch and tag inside Options definition
|
|
221
|
+
* Skip npmDependency without names
|
|
222
|
+
* Update travis config
|
|
223
|
+
* Update dependency to resolve vulnerabilities
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## 0.2.*
|
|
227
|
+
|
|
228
|
+
### Changed
|
|
229
|
+
* Added proxy support and config
|
|
230
|
+
* Update travis config
|
|
231
|
+
* Updated README.md with `app.trustsource.io`
|
|
232
|
+
* Updated default url to `app.trustsource.io`
|
|
233
|
+
* Added windows support
|
|
234
|
+
* Fixed json
|
|
235
|
+
|
|
236
|
+
### Removed
|
|
237
|
+
* options: **--credentials** and **--credentialsFile** instead you should use **--config**.
|
|
238
|
+
* option **--baseUrl** instead you should use **--url**.
|
|
239
|
+
|
|
240
|
+
### Added
|
|
241
|
+
* option **--config**. It is similar to credentials, but it will contain any config information.
|
|
242
|
+
* option **--url**. It is similar to baseUrl.
|
|
243
|
+
* option **--apiKey** and **--userName** so it will be unnecessary to create `.tsrc.json` file.
|
|
244
|
+
* options **--version** and **--help**.
|
|
245
|
+
* options shortcut.
|
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
> TrustSource node client - node module to transfer dependency information to TrustSource server.
|
|
11
11
|
|
|
12
12
|
## Release 3.4.0
|
|
13
|
-
Migrated to TrustSource API v2
|
|
13
|
+
Migrated to TrustSource API v2. Please ensure your `url` is updated to `https://api.trustsource.io`.
|
|
14
|
+
|
|
15
|
+
> PLEASE NOTE: API v1 is meanwhile deprecated. We plan to seize its functionality in September 30th, 2024. Starting from June, users of APIv1 will receive a deprecation notice. If you feel that this timeframe is too tough for you, please reach out to your engagement manager as soon as possible to clarify further proceedings.
|
|
14
16
|
|
|
15
17
|
## Release 3.2.0
|
|
16
18
|
Package now support package-lock.json v.3
|
|
@@ -75,6 +77,7 @@ Options:
|
|
|
75
77
|
--tag, -t Scan tag [default: null]
|
|
76
78
|
--binaryLinks Binary links separated by comma [default: null]
|
|
77
79
|
--url url [default: null]
|
|
80
|
+
--fullUrl fullUrl [default: null]
|
|
78
81
|
--config, -c Config path [default: null]
|
|
79
82
|
--proxy Proxy url like 'https://user:password@host:port' [default: null]
|
|
80
83
|
--version Prints a version [default: null]
|
|
@@ -105,90 +108,5 @@ You should upgrade to 2.* versions of ts-node-client
|
|
|
105
108
|
|
|
106
109
|
## Changelog available inside `CHANGELOG.md`
|
|
107
110
|
|
|
108
|
-
## [DEPRECATED] Changelog
|
|
109
|
-
|
|
110
|
-
#### 3.0.*
|
|
111
|
-
- `npm.ls` cli -> `package-lock.json` parse
|
|
112
|
-
- npm removed
|
|
113
|
-
- updated dependencies
|
|
114
|
-
|
|
115
|
-
#### 2.1.*
|
|
116
|
-
- Migrate 1.6.* - 1.8.* changes to version 2.1
|
|
117
|
-
- Bump dependencies
|
|
118
|
-
|
|
119
|
-
#### 2.0.*
|
|
120
|
-
- Support new scan tool and fix problem with programmatic API for >= npm@8.0.0
|
|
121
|
-
- Stop usage of [`global-npm`](https://github.com/dracupid/global-npm) until we find new resolution
|
|
122
|
-
- Get back `npm` as local dependency
|
|
123
|
-
|
|
124
|
-
#### 1.8.*
|
|
125
|
-
- SBOM
|
|
126
|
-
- **--saveAs** and **--saveAsFormat**
|
|
127
|
-
- Bump minimist from 1.2.5 to 1.2.6
|
|
128
|
-
- Bump urijs from 1.19.10 to 1.19.11
|
|
129
|
-
- replace packageurl-js with simple local function
|
|
130
|
-
- improve docs
|
|
131
|
-
|
|
132
|
-
#### 1.7.*
|
|
133
|
-
- request -> axios
|
|
134
|
-
- fix dependencies
|
|
135
|
-
- doc fixes
|
|
136
|
-
|
|
137
|
-
#### 1.6.*
|
|
138
|
-
- **--breakOnWarnings** and **--breakOnViolations**
|
|
139
|
-
- Bump devDependencies
|
|
140
|
-
|
|
141
|
-
#### 1.5.*
|
|
142
|
-
- Describe `Error: The programmatic API was removed in npm v8.0.0`
|
|
143
|
-
- Bump devDependencies
|
|
144
|
-
- Introduce sonarjs
|
|
145
|
-
|
|
146
|
-
#### 1.4.*
|
|
147
|
-
- Bump glob-parent from 5.1.1 to 5.1.2
|
|
148
|
-
- Bump path-parse from 1.0.6 to 1.0.7
|
|
149
|
-
- Bump lodash from 4.17.19 to 4.17.21
|
|
150
|
-
- Bump y18n from 4.0.0 to 4.0.1
|
|
151
|
-
- Added:
|
|
152
|
-
- option **--includeDevDependencies**. It is allow to scan dev dependencies
|
|
153
|
-
|
|
154
|
-
#### 1.3.*
|
|
155
|
-
- Use [`global-npm`](https://github.com/dracupid/global-npm) (meaning `npm` is no longer a dependency of `ts-node-client`)
|
|
156
|
-
|
|
157
|
-
#### 1.2.*
|
|
158
|
-
- Added:
|
|
159
|
-
- option **--brakeOnViolations**. It is fail build in case any violations after scan transferred.
|
|
160
|
-
- option **--brakeOnWarnings**. It is fail build in case any warning after scan transferred.
|
|
161
|
-
|
|
162
|
-
#### 1.1.*
|
|
163
|
-
- userName is not required param for scans
|
|
164
|
-
- Support usage of scan meta param binaryLinks inside Options definition
|
|
165
|
-
|
|
166
|
-
#### 1.0.*
|
|
167
|
-
- Node JS and dependencies updates "node": ">= 8.12.0"
|
|
168
|
-
|
|
169
|
-
#### 0.3.*
|
|
170
|
-
- Improve variable usage and tasks migration
|
|
171
|
-
- Support usage of scan meta params: branch and tag inside Options definition
|
|
172
|
-
- Skip npmDependency without names
|
|
173
|
-
- Update travis config
|
|
174
|
-
- Update dependency to resolve vulnerabilities
|
|
175
|
-
|
|
176
|
-
#### 0.2.*
|
|
177
|
-
- Added proxy support and config
|
|
178
|
-
- Update travis config
|
|
179
|
-
- Updated README.md with `app.trustsource.io`
|
|
180
|
-
- Updated default url to `app.trustsource.io`
|
|
181
|
-
- Added windows support
|
|
182
|
-
- Fixed json
|
|
183
|
-
- **Removed:**
|
|
184
|
-
- options: **--credentials** and **--credentialsFile** instead you should use **--config**.
|
|
185
|
-
- option **--baseUrl** instead you should use **--url**.
|
|
186
|
-
- Added:
|
|
187
|
-
- option **--config**. It is similar to credentials, but it will contain any config information.
|
|
188
|
-
- option **--url**. It is similar to baseUrl.
|
|
189
|
-
- option **--apiKey** and **--userName** so it will be unnecessary to create `.tsrc.json` file.
|
|
190
|
-
- options **--version** and **--help**.
|
|
191
|
-
- options shortcut.
|
|
192
|
-
|
|
193
111
|
## License
|
|
194
112
|
[Apache-2.0](https://github.com/TrustSource/ts-node-client/blob/master/LICENSE)
|
package/bin/ts-node-client.js
CHANGED
|
@@ -164,6 +164,7 @@ if (options.debug) {
|
|
|
164
164
|
console.log(`${FILL}tag = %s`, options.tag);
|
|
165
165
|
console.log(`${FILL}binaryLinks = %s`, options.binaryLinks);
|
|
166
166
|
console.log(`${FILL}url = %s`, options.url);
|
|
167
|
+
console.log(`${FILL}fullUrl = %s`, options.fullUrl);
|
|
167
168
|
console.log(`${FILL}proxy = %s`, options.proxy);
|
|
168
169
|
}
|
|
169
170
|
|
package/lib/rest-client.js
CHANGED
|
@@ -83,14 +83,15 @@ RestClient.prototype.transfer = function transfer(scan, cb) {
|
|
|
83
83
|
|
|
84
84
|
const reqOpts = options.requestOptions || {};
|
|
85
85
|
reqOpts.method = 'post';
|
|
86
|
-
reqOpts.url = `${options.url}/v2/core/scans`;
|
|
86
|
+
reqOpts.url = options.fullUrl ? options.fullUrl : `${options.url}/v2/core/scans`;
|
|
87
87
|
if (options.proxy) {
|
|
88
88
|
reqOpts.proxy = options.proxy;
|
|
89
89
|
}
|
|
90
90
|
reqOpts.headers = {
|
|
91
91
|
'Content-Type': 'application/json',
|
|
92
92
|
'User-Agent': `${pckgJson.name}/${pckgJson.version}`,
|
|
93
|
-
'x-api-key': options.apiKey
|
|
93
|
+
'x-api-key': options.apiKey,
|
|
94
|
+
'x-apikey': options.apiKey
|
|
94
95
|
};
|
|
95
96
|
reqOpts.json = true;
|
|
96
97
|
reqOpts.data = scan;
|
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": "3.4.
|
|
4
|
+
"version": "3.4.3",
|
|
5
5
|
"homepage": "https://app.trustsource.io/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Oleksandr Dmukhovskyi",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"main": "./lib/cli.js",
|
|
19
19
|
"bin": "./bin/ts-node-client.js",
|
|
20
20
|
"scripts": {
|
|
21
|
-
"scan": "yarn node ./bin/ts-node-client.js",
|
|
21
|
+
"scan": "yarn node ./bin/ts-node-client.js --debug true",
|
|
22
22
|
"scan-with-brakes": "yarn node ./bin/ts-node-client.js --breakOnViolations true --breakOnWarnings false",
|
|
23
23
|
"scan-to-file": "yarn node ./bin/ts-node-client.js --saveAs test --saveAsFormat scan --includeDevDependencies false",
|
|
24
24
|
"lint": "eslint bin lib test",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@yarnpkg/lockfile": "1.1.0",
|
|
31
|
-
"axios": "1.
|
|
31
|
+
"axios": "1.10.0",
|
|
32
32
|
"debuglog": "1.0.1",
|
|
33
33
|
"js-yaml": "4.1.0",
|
|
34
34
|
"packageurl-js": "1.2.1",
|
|
35
|
-
"semver": "7.
|
|
35
|
+
"semver": "7.7.2",
|
|
36
36
|
"yargs": "17.7.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"eslint": "8.57.0",
|
|
40
40
|
"eslint-config-airbnb-base": "15.0.0",
|
|
41
|
-
"eslint-plugin-import": "2.
|
|
41
|
+
"eslint-plugin-import": "2.32.0",
|
|
42
42
|
"eslint-plugin-sonarjs": "0.25.1",
|
|
43
|
-
"mocha": "10.
|
|
44
|
-
"nock": "13.5.
|
|
43
|
+
"mocha": "10.8.2",
|
|
44
|
+
"nock": "13.5.6"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"node",
|
|
@@ -52,5 +52,6 @@
|
|
|
52
52
|
"cydx",
|
|
53
53
|
"spdx",
|
|
54
54
|
"dependency-analysis"
|
|
55
|
-
]
|
|
55
|
+
],
|
|
56
|
+
"packageManager": "yarn@3.5.0+sha512.2dc70be5fce9f66756d25b00a888f3ca66f86b502b76750e72ba54cec89da767b938c54124595e26f868825688e0fe3552c26c76a330673343057acadd5cfcf2"
|
|
56
57
|
}
|