@sap-ux/nodejs-utils 0.2.9 → 0.2.11
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/dist/commandRunner.d.ts +1 -1
- package/dist/commandRunner.js +2 -2
- package/dist/httpsUtils.js +5 -5
- package/package.json +5 -5
package/dist/commandRunner.d.ts
CHANGED
package/dist/commandRunner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandRunner = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
@@ -23,7 +23,7 @@ class CommandRunner {
|
|
|
23
23
|
return new Promise((resolve, reject) => {
|
|
24
24
|
const stack = [];
|
|
25
25
|
const spawnOpts = process.platform === 'win32' ? { ...opts, shell: true } : opts;
|
|
26
|
-
const spawnedCmd = (0,
|
|
26
|
+
const spawnedCmd = (0, node_child_process_1.spawn)(cmd, args, spawnOpts);
|
|
27
27
|
spawnedCmd.stdout.setEncoding('utf8');
|
|
28
28
|
let response;
|
|
29
29
|
spawnedCmd.stdout.on('data', (data) => {
|
package/dist/httpsUtils.js
CHANGED
|
@@ -4,20 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setGlobalRejectUnauthorized = setGlobalRejectUnauthorized;
|
|
7
|
-
const
|
|
7
|
+
const node_https_1 = __importDefault(require("node:https"));
|
|
8
8
|
/**
|
|
9
9
|
* Set the rejectUnauthorized option of the global https agent.
|
|
10
10
|
*
|
|
11
11
|
* @param rejectUnauthorized - true to reject unauthorized certificates, false to accept them
|
|
12
12
|
*/
|
|
13
13
|
function setGlobalRejectUnauthorized(rejectUnauthorized) {
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (node_https_1.default.globalAgent.options) {
|
|
15
|
+
node_https_1.default.globalAgent.options.rejectUnauthorized = rejectUnauthorized;
|
|
16
16
|
}
|
|
17
17
|
//@ts-expect-error - fallbackAgent is only present in BoundHttpsProxyAgent implementation and is not part of the Node.js API
|
|
18
|
-
if (
|
|
18
|
+
if (node_https_1.default.globalAgent.fallbackAgent?.options) {
|
|
19
19
|
//@ts-expect-error - fallbackAgent is not typed in Node.js API
|
|
20
|
-
|
|
20
|
+
node_https_1.default.globalAgent.fallbackAgent.options.rejectUnauthorized = rejectUnauthorized;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=httpsUtils.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/nodejs-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Nodejs utility wrappers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"fast-glob": "3.3.1",
|
|
18
18
|
"read-pkg-up": "7.0.1",
|
|
19
19
|
"semver": "7.5.4",
|
|
20
|
-
"@sap-ux/btp-utils": "1.1.
|
|
20
|
+
"@sap-ux/btp-utils": "1.1.6"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/semver": "7.5.2",
|
|
24
24
|
"@types/vscode": "1.73.1",
|
|
25
25
|
"mock-spawn": "0.2.6",
|
|
26
|
-
"@sap-ux/logger": "0.7.
|
|
26
|
+
"@sap-ux/logger": "0.7.3"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"watch": "tsc --watch",
|
|
40
40
|
"clean": "rimraf --glob dist coverage *.tsbuildinfo",
|
|
41
41
|
"format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
|
|
42
|
-
"lint": "eslint
|
|
43
|
-
"lint:fix": "eslint
|
|
42
|
+
"lint": "eslint",
|
|
43
|
+
"lint:fix": "eslint --fix",
|
|
44
44
|
"test": "jest --ci --forceExit --detectOpenHandles --colors --silent",
|
|
45
45
|
"test-u": "jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
46
46
|
"link": "pnpm link --global",
|