ts-node-client 3.1.0 → 3.2.1
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/.editorconfig +10 -10
- package/.gitattributes +4 -4
- package/.yarnrc.yml +1 -1
- package/CHANGELOG.md +52 -37
- package/README.md +191 -188
- package/lib/npm-scanner.js +334 -327
- package/package-lock_dev_test.json +47 -0
- package/package-lock_v1.json +863 -0
- package/package-lock_v2.json +5147 -0
- package/package-lock_v3.json +3014 -0
- package/package.json +55 -56
- package/.pnp.cjs +0 -14233
- package/.pnp.loader.mjs +0 -2042
package/.editorconfig
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
end_of_line = lf
|
|
5
|
-
insert_final_newline = true
|
|
6
|
-
|
|
7
|
-
[*.{js,json,yml}]
|
|
8
|
-
charset = utf-8
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
end_of_line = lf
|
|
5
|
+
insert_final_newline = true
|
|
6
|
+
|
|
7
|
+
[*.{js,json,yml}]
|
|
8
|
+
charset = utf-8
|
|
9
|
+
indent_style = space
|
|
10
|
+
indent_size = 2
|
package/.gitattributes
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/.yarn/** linguist-vendored
|
|
2
|
-
/.yarn/releases/* binary
|
|
3
|
-
/.yarn/plugins/**/* binary
|
|
4
|
-
/.pnp.* binary linguist-generated
|
|
1
|
+
/.yarn/** linguist-vendored
|
|
2
|
+
/.yarn/releases/* binary
|
|
3
|
+
/.yarn/plugins/**/* binary
|
|
4
|
+
/.pnp.* binary linguist-generated
|
package/.yarnrc.yml
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
nodeLinker: node-modules
|
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,52 @@
|
|
|
1
|
-
# ts-node-client
|
|
2
|
-
|
|
3
|
-
## Changelog
|
|
4
|
-
|
|
5
|
-
All notable changes to this project will be documented in this file.
|
|
6
|
-
|
|
7
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## 3.1
|
|
12
|
-
|
|
13
|
-
###
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Changed
|
|
23
|
-
*
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## 3.
|
|
27
|
-
|
|
28
|
-
###
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
# ts-node-client
|
|
2
|
+
|
|
3
|
+
## Changelog
|
|
4
|
+
|
|
5
|
+
All notable changes to this project will be documented in this file.
|
|
6
|
+
|
|
7
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## 3.2.1 - 2023-08-14
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
* --includeDevDependencies false now properly disable devDependencies
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 3.2.0 - 2023-08-01
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
* support package-lock.json v.3
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
* bump dependencies
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 3.1.0 - 2023-04-20
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
* support for yarn v2+ lock files
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
* project migrated to yarn 3.5
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## 3.0.1 - 2023-02-08
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
* docs updated
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## 3.0.0 - 2023-02-08
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
* `npm.ls` cli -> `package-lock.json` or `package.json` or `yarn.lock` parse
|
|
45
|
+
* npm removed
|
|
46
|
+
* updated dependencies
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## 2.1.3 - 2022-12-26
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
* Migrate versions of dependencies
|
package/README.md
CHANGED
|
@@ -1,188 +1,191 @@
|
|
|
1
|
-
# TrustSource ts-node-client
|
|
2
|
-
|
|
3
|
-
[](http://npm.im/ts-node-client)
|
|
4
|
-
[](http://npm-stat.com/charts.html?package=ts-node-client)
|
|
5
|
-
[](http://npm-stat.com/charts.html?package=ts-node-client)
|
|
6
|
-
[](http://opensource.org/licenses/Apache-2.0)
|
|
7
|
-
|
|
8
|
-
[](https://nodei.co/npm/ts-node-client/)
|
|
9
|
-
|
|
10
|
-
> TrustSource node client - node module to transfer dependency information to TrustSource server.
|
|
11
|
-
|
|
12
|
-
## Release 3.
|
|
13
|
-
Package now support
|
|
14
|
-
|
|
15
|
-
## Release 3.
|
|
16
|
-
Package now
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
##
|
|
24
|
-
* node >=
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
74
|
-
--
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- Bump
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
#### 1.
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
#### 0
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
- option **--
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
1
|
+
# TrustSource ts-node-client
|
|
2
|
+
|
|
3
|
+
[](http://npm.im/ts-node-client)
|
|
4
|
+
[](http://npm-stat.com/charts.html?package=ts-node-client)
|
|
5
|
+
[](http://npm-stat.com/charts.html?package=ts-node-client)
|
|
6
|
+
[](http://opensource.org/licenses/Apache-2.0)
|
|
7
|
+
|
|
8
|
+
[](https://nodei.co/npm/ts-node-client/)
|
|
9
|
+
|
|
10
|
+
> TrustSource node client - node module to transfer dependency information to TrustSource server.
|
|
11
|
+
|
|
12
|
+
## Release 3.2.0
|
|
13
|
+
Package now support package-lock.json v.3
|
|
14
|
+
|
|
15
|
+
## Release 3.1.0
|
|
16
|
+
Package now support yarn v.2+
|
|
17
|
+
|
|
18
|
+
## Release 3.0.0
|
|
19
|
+
Package now is not including `npm` anymore. The addition has been done due to missing programmatic API in npm >= 8.0.0 and in order to skip deprecated dependencies
|
|
20
|
+
|
|
21
|
+
This change affects the structure of scans slightly, but it heavily improves the scanner.
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
* node >= 12.0.0 use **ts-node-client@3.1.+***
|
|
25
|
+
|
|
26
|
+
## Older versions
|
|
27
|
+
* node >= 8.9.0
|
|
28
|
+
* npm < 8.0.0 use **ts-node-client@1.***
|
|
29
|
+
* npm >= 8.0.0 use **ts-node-client@2.***
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
Run: `npm install --save-dev ts-node-client` or `yarn add --dev ts-node-client`
|
|
33
|
+
|
|
34
|
+
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`:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
"scripts": {
|
|
38
|
+
"install_and_scan": "npm install && ts-node-client -k apiKey -p Project"
|
|
39
|
+
},
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
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!)
|
|
43
|
+
|
|
44
|
+
`.tsrc.json` example:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
{
|
|
48
|
+
"apiKey": "apiKey",
|
|
49
|
+
"url": "https://app.trustsource.io",
|
|
50
|
+
"project": "Project Description"
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Usage
|
|
56
|
+
=====
|
|
57
|
+
|
|
58
|
+
You also may initiate transfer to TrustSource server manually by executing following command via terminal:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
node_modules/.bin/ts-node-client
|
|
62
|
+
node_modules/.bin/ts-node-client -k apiKey -p Project --breakOnWarnings false --breakOnViolations true
|
|
63
|
+
node_modules/.bin/ts-node-client -c config.json
|
|
64
|
+
```
|
|
65
|
+
```
|
|
66
|
+
npm / node module to transfer dependency information to TrustSource server.
|
|
67
|
+
|
|
68
|
+
Options:
|
|
69
|
+
--apiKey, -k apiKey [default: null]
|
|
70
|
+
--project, -p Project name [default: null]
|
|
71
|
+
--branch, -b Scan branch [default: null]
|
|
72
|
+
--tag, -t Scan tag [default: null]
|
|
73
|
+
--binaryLinks Binary links separated by comma [default: null]
|
|
74
|
+
--url url [default: null]
|
|
75
|
+
--config, -c Config path [default: null]
|
|
76
|
+
--proxy Proxy url like 'https://user:password@host:port' [default: null]
|
|
77
|
+
--version Prints a version [default: null]
|
|
78
|
+
--saveAs, -o Save as file (file name prefix) [default: null]
|
|
79
|
+
--saveAsFormat, -f Save as format (scan / cydx / spdx) [default: null]
|
|
80
|
+
--debug [default: null]
|
|
81
|
+
--simulate [default: null]
|
|
82
|
+
--includeDevDependencies [default: null]
|
|
83
|
+
--meteor [default: null]
|
|
84
|
+
--breakOnWarnings [default: null]
|
|
85
|
+
--breakOnViolations [default: null]
|
|
86
|
+
--help Prints a usage statement [boolean]
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
PLEASE NOTE: if you want to pass param into function
|
|
90
|
+
you should add value, for example:
|
|
91
|
+
|
|
92
|
+
`--breakOnViolations true` or `--saveAs sbom`
|
|
93
|
+
|
|
94
|
+
## Software bill of materials
|
|
95
|
+
|
|
96
|
+
[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)
|
|
97
|
+
|
|
98
|
+
## Known problems
|
|
99
|
+
|
|
100
|
+
#### Error: The programmatic API was removed in npm v8.0.0
|
|
101
|
+
You should upgrade to 2.* versions of ts-node-client
|
|
102
|
+
|
|
103
|
+
## Changelog available inside `CHANGELOG.md`
|
|
104
|
+
|
|
105
|
+
## [DEPRECATED] Changelog
|
|
106
|
+
|
|
107
|
+
#### 3.0.*
|
|
108
|
+
- `npm.ls` cli -> `package-lock.json` parse
|
|
109
|
+
- npm removed
|
|
110
|
+
- updated dependencies
|
|
111
|
+
|
|
112
|
+
#### 2.1.*
|
|
113
|
+
- Migrate 1.6.* - 1.8.* changes to version 2.1
|
|
114
|
+
- Bump dependencies
|
|
115
|
+
|
|
116
|
+
#### 2.0.*
|
|
117
|
+
- Support new scan tool and fix problem with programmatic API for >= npm@8.0.0
|
|
118
|
+
- Stop usage of [`global-npm`](https://github.com/dracupid/global-npm) until we find new resolution
|
|
119
|
+
- Get back `npm` as local dependency
|
|
120
|
+
|
|
121
|
+
#### 1.8.*
|
|
122
|
+
- SBOM
|
|
123
|
+
- **--saveAs** and **--saveAsFormat**
|
|
124
|
+
- Bump minimist from 1.2.5 to 1.2.6
|
|
125
|
+
- Bump urijs from 1.19.10 to 1.19.11
|
|
126
|
+
- replace packageurl-js with simple local function
|
|
127
|
+
- improve docs
|
|
128
|
+
|
|
129
|
+
#### 1.7.*
|
|
130
|
+
- request -> axios
|
|
131
|
+
- fix dependencies
|
|
132
|
+
- doc fixes
|
|
133
|
+
|
|
134
|
+
#### 1.6.*
|
|
135
|
+
- **--breakOnWarnings** and **--breakOnViolations**
|
|
136
|
+
- Bump devDependencies
|
|
137
|
+
|
|
138
|
+
#### 1.5.*
|
|
139
|
+
- Describe `Error: The programmatic API was removed in npm v8.0.0`
|
|
140
|
+
- Bump devDependencies
|
|
141
|
+
- Introduce sonarjs
|
|
142
|
+
|
|
143
|
+
#### 1.4.*
|
|
144
|
+
- Bump glob-parent from 5.1.1 to 5.1.2
|
|
145
|
+
- Bump path-parse from 1.0.6 to 1.0.7
|
|
146
|
+
- Bump lodash from 4.17.19 to 4.17.21
|
|
147
|
+
- Bump y18n from 4.0.0 to 4.0.1
|
|
148
|
+
- Added:
|
|
149
|
+
- option **--includeDevDependencies**. It is allow to scan dev dependencies
|
|
150
|
+
|
|
151
|
+
#### 1.3.*
|
|
152
|
+
- Use [`global-npm`](https://github.com/dracupid/global-npm) (meaning `npm` is no longer a dependency of `ts-node-client`)
|
|
153
|
+
|
|
154
|
+
#### 1.2.*
|
|
155
|
+
- Added:
|
|
156
|
+
- option **--brakeOnViolations**. It is fail build in case any violations after scan transferred.
|
|
157
|
+
- option **--brakeOnWarnings**. It is fail build in case any warning after scan transferred.
|
|
158
|
+
|
|
159
|
+
#### 1.1.*
|
|
160
|
+
- userName is not required param for scans
|
|
161
|
+
- Support usage of scan meta param binaryLinks inside Options definition
|
|
162
|
+
|
|
163
|
+
#### 1.0.*
|
|
164
|
+
- Node JS and dependencies updates "node": ">= 8.12.0"
|
|
165
|
+
|
|
166
|
+
#### 0.3.*
|
|
167
|
+
- Improve variable usage and tasks migration
|
|
168
|
+
- Support usage of scan meta params: branch and tag inside Options definition
|
|
169
|
+
- Skip npmDependency without names
|
|
170
|
+
- Update travis config
|
|
171
|
+
- Update dependency to resolve vulnerabilities
|
|
172
|
+
|
|
173
|
+
#### 0.2.*
|
|
174
|
+
- Added proxy support and config
|
|
175
|
+
- Update travis config
|
|
176
|
+
- Updated README.md with `app.trustsource.io`
|
|
177
|
+
- Updated default url to `app.trustsource.io`
|
|
178
|
+
- Added windows support
|
|
179
|
+
- Fixed json
|
|
180
|
+
- **Removed:**
|
|
181
|
+
- options: **--credentials** and **--credentialsFile** instead you should use **--config**.
|
|
182
|
+
- option **--baseUrl** instead you should use **--url**.
|
|
183
|
+
- Added:
|
|
184
|
+
- option **--config**. It is similar to credentials, but it will contain any config information.
|
|
185
|
+
- option **--url**. It is similar to baseUrl.
|
|
186
|
+
- option **--apiKey** and **--userName** so it will be unnecessary to create `.tsrc.json` file.
|
|
187
|
+
- options **--version** and **--help**.
|
|
188
|
+
- options shortcut.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
[Apache-2.0](https://github.com/TrustSource/ts-node-client/blob/master/LICENSE)
|