@gitlab/duo-cli 8.62.1 → 8.63.0
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/README.md +29 -91
- package/dist/index.js +597 -600
- package/dist/index.js.map +44 -40
- package/dist/version-guard.cjs +17 -2
- package/package.json +2 -2
package/dist/version-guard.cjs
CHANGED
|
@@ -9,6 +9,7 @@ const version = process.version;
|
|
|
9
9
|
const versionParts = version.slice(1).split('.');
|
|
10
10
|
const majorVersion = parseInt(versionParts[0], 10);
|
|
11
11
|
const minorVersion = parseInt(versionParts[1], 10);
|
|
12
|
+
const patchVersion = parseInt(versionParts[2], 10);
|
|
12
13
|
|
|
13
14
|
const isVersionTooOld = majorVersion < 20 || (majorVersion === 20 && minorVersion < 17);
|
|
14
15
|
|
|
@@ -21,9 +22,23 @@ if (isVersionTooOld) {
|
|
|
21
22
|
process.exit(1);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
// Run the actual CLI
|
|
25
25
|
const cliPath = join(__dirname, 'index.js');
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
const nodeArgs = ['--no-deprecation'];
|
|
28
|
+
|
|
29
|
+
// Add --use-system-ca flag only for Node.js version 22.20.0 or above
|
|
30
|
+
const supportsSystemCA =
|
|
31
|
+
majorVersion > 22 ||
|
|
32
|
+
(majorVersion === 22 && minorVersion > 20) ||
|
|
33
|
+
(majorVersion === 22 && minorVersion === 20 && patchVersion >= 0);
|
|
34
|
+
|
|
35
|
+
if (supportsSystemCA) {
|
|
36
|
+
nodeArgs.push('--use-system-ca');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
nodeArgs.push(cliPath, ...process.argv.slice(2));
|
|
40
|
+
|
|
41
|
+
const result = spawnSync(process.execPath, nodeArgs, {
|
|
27
42
|
stdio: 'inherit',
|
|
28
43
|
});
|
|
29
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/duo-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.63.0",
|
|
4
4
|
"description": "GitLab Duo for your command line",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dev:watch": "bun --watch ./src/index.tsx",
|
|
14
14
|
"debug:built": "npm run build:debug && node --inspect-brk=127.0.0.1:9229 dist/index.js",
|
|
15
15
|
"debug:terminal": "npm run build:debug && bun ./scripts/launch_debug_terminal.ts",
|
|
16
|
-
"start": "npm run build:bundle && node dist/index.js",
|
|
16
|
+
"start": "npm run build:bundle && node --use-system-ca dist/index.js",
|
|
17
17
|
"dev:watch-tools": "bun ./scripts/dev_with_tools.ts",
|
|
18
18
|
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
19
19
|
"test:debug": "NODE_OPTIONS='--experimental-vm-modules --inspect-brk' jest --runInBand --no-cache",
|