ts-node-client 3.4.3 → 3.4.4

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 CHANGED
@@ -8,7 +8,13 @@ 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
11
+ ## 3.4.4 - 2025-07-22
12
+
13
+ ### Fixed
14
+ * 403 request error
15
+
16
+
17
+ ## 3.4.3 - 2025-07-22
12
18
 
13
19
  ### Changed
14
20
  * bump dependencies
@@ -83,16 +83,20 @@ RestClient.prototype.transfer = function transfer(scan, cb) {
83
83
 
84
84
  const reqOpts = options.requestOptions || {};
85
85
  reqOpts.method = 'post';
86
- reqOpts.url = options.fullUrl ? options.fullUrl : `${options.url}/v2/core/scans`;
86
+ reqOpts.url = `${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,
94
- 'x-apikey': options.apiKey
93
+ 'x-api-key': options.apiKey
95
94
  };
95
+ if (options.fullUrl) {
96
+ reqOpts.url = options.fullUrl;
97
+ delete reqOpts.headers['x-api-key'];
98
+ reqOpts.headers['x-apikey'] = options.apiKey;
99
+ }
96
100
  reqOpts.json = true;
97
101
  reqOpts.data = scan;
98
102
  if (options.branch) {
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.3",
4
+ "version": "3.4.4",
5
5
  "homepage": "https://app.trustsource.io/",
6
6
  "author": {
7
7
  "name": "Oleksandr Dmukhovskyi",