ts-node-client 3.4.2 → 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 +120 -0
- package/README.md +1 -85
- 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,14 @@ 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
|
+
|
|
11
19
|
## 3.4.2 - 2024-08-20
|
|
12
20
|
|
|
13
21
|
### Changed
|
|
@@ -123,3 +131,115 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
123
131
|
|
|
124
132
|
### Changed
|
|
125
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
|
@@ -77,6 +77,7 @@ Options:
|
|
|
77
77
|
--tag, -t Scan tag [default: null]
|
|
78
78
|
--binaryLinks Binary links separated by comma [default: null]
|
|
79
79
|
--url url [default: null]
|
|
80
|
+
--fullUrl fullUrl [default: null]
|
|
80
81
|
--config, -c Config path [default: null]
|
|
81
82
|
--proxy Proxy url like 'https://user:password@host:port' [default: null]
|
|
82
83
|
--version Prints a version [default: null]
|
|
@@ -107,90 +108,5 @@ You should upgrade to 2.* versions of ts-node-client
|
|
|
107
108
|
|
|
108
109
|
## Changelog available inside `CHANGELOG.md`
|
|
109
110
|
|
|
110
|
-
## [DEPRECATED] Changelog
|
|
111
|
-
|
|
112
|
-
#### 3.0.*
|
|
113
|
-
- `npm.ls` cli -> `package-lock.json` parse
|
|
114
|
-
- npm removed
|
|
115
|
-
- updated dependencies
|
|
116
|
-
|
|
117
|
-
#### 2.1.*
|
|
118
|
-
- Migrate 1.6.* - 1.8.* changes to version 2.1
|
|
119
|
-
- Bump dependencies
|
|
120
|
-
|
|
121
|
-
#### 2.0.*
|
|
122
|
-
- Support new scan tool and fix problem with programmatic API for >= npm@8.0.0
|
|
123
|
-
- Stop usage of [`global-npm`](https://github.com/dracupid/global-npm) until we find new resolution
|
|
124
|
-
- Get back `npm` as local dependency
|
|
125
|
-
|
|
126
|
-
#### 1.8.*
|
|
127
|
-
- SBOM
|
|
128
|
-
- **--saveAs** and **--saveAsFormat**
|
|
129
|
-
- Bump minimist from 1.2.5 to 1.2.6
|
|
130
|
-
- Bump urijs from 1.19.10 to 1.19.11
|
|
131
|
-
- replace packageurl-js with simple local function
|
|
132
|
-
- improve docs
|
|
133
|
-
|
|
134
|
-
#### 1.7.*
|
|
135
|
-
- request -> axios
|
|
136
|
-
- fix dependencies
|
|
137
|
-
- doc fixes
|
|
138
|
-
|
|
139
|
-
#### 1.6.*
|
|
140
|
-
- **--breakOnWarnings** and **--breakOnViolations**
|
|
141
|
-
- Bump devDependencies
|
|
142
|
-
|
|
143
|
-
#### 1.5.*
|
|
144
|
-
- Describe `Error: The programmatic API was removed in npm v8.0.0`
|
|
145
|
-
- Bump devDependencies
|
|
146
|
-
- Introduce sonarjs
|
|
147
|
-
|
|
148
|
-
#### 1.4.*
|
|
149
|
-
- Bump glob-parent from 5.1.1 to 5.1.2
|
|
150
|
-
- Bump path-parse from 1.0.6 to 1.0.7
|
|
151
|
-
- Bump lodash from 4.17.19 to 4.17.21
|
|
152
|
-
- Bump y18n from 4.0.0 to 4.0.1
|
|
153
|
-
- Added:
|
|
154
|
-
- option **--includeDevDependencies**. It is allow to scan dev dependencies
|
|
155
|
-
|
|
156
|
-
#### 1.3.*
|
|
157
|
-
- Use [`global-npm`](https://github.com/dracupid/global-npm) (meaning `npm` is no longer a dependency of `ts-node-client`)
|
|
158
|
-
|
|
159
|
-
#### 1.2.*
|
|
160
|
-
- Added:
|
|
161
|
-
- option **--brakeOnViolations**. It is fail build in case any violations after scan transferred.
|
|
162
|
-
- option **--brakeOnWarnings**. It is fail build in case any warning after scan transferred.
|
|
163
|
-
|
|
164
|
-
#### 1.1.*
|
|
165
|
-
- userName is not required param for scans
|
|
166
|
-
- Support usage of scan meta param binaryLinks inside Options definition
|
|
167
|
-
|
|
168
|
-
#### 1.0.*
|
|
169
|
-
- Node JS and dependencies updates "node": ">= 8.12.0"
|
|
170
|
-
|
|
171
|
-
#### 0.3.*
|
|
172
|
-
- Improve variable usage and tasks migration
|
|
173
|
-
- Support usage of scan meta params: branch and tag inside Options definition
|
|
174
|
-
- Skip npmDependency without names
|
|
175
|
-
- Update travis config
|
|
176
|
-
- Update dependency to resolve vulnerabilities
|
|
177
|
-
|
|
178
|
-
#### 0.2.*
|
|
179
|
-
- Added proxy support and config
|
|
180
|
-
- Update travis config
|
|
181
|
-
- Updated README.md with `app.trustsource.io`
|
|
182
|
-
- Updated default url to `app.trustsource.io`
|
|
183
|
-
- Added windows support
|
|
184
|
-
- Fixed json
|
|
185
|
-
- **Removed:**
|
|
186
|
-
- options: **--credentials** and **--credentialsFile** instead you should use **--config**.
|
|
187
|
-
- option **--baseUrl** instead you should use **--url**.
|
|
188
|
-
- Added:
|
|
189
|
-
- option **--config**. It is similar to credentials, but it will contain any config information.
|
|
190
|
-
- option **--url**. It is similar to baseUrl.
|
|
191
|
-
- option **--apiKey** and **--userName** so it will be unnecessary to create `.tsrc.json` file.
|
|
192
|
-
- options **--version** and **--help**.
|
|
193
|
-
- options shortcut.
|
|
194
|
-
|
|
195
111
|
## License
|
|
196
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
|
}
|