-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roy Razon
committed
Jan 9, 2024
1 parent
f2b1f88
commit 65dd9da
Showing
4 changed files
with
218 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
diff --git a/node_modules/oclif/lib/tarballs/bin.d.ts b/node_modules/oclif/lib/tarballs/bin.d.ts | ||
index f8bc8c5..47111b8 100644 | ||
--- a/node_modules/oclif/lib/tarballs/bin.d.ts | ||
+++ b/node_modules/oclif/lib/tarballs/bin.d.ts | ||
@@ -1,6 +1,7 @@ | ||
import { Interfaces } from '@oclif/core'; | ||
-export declare function writeBinScripts({ baseWorkspace, config, nodeVersion, }: { | ||
+export declare function writeBinScripts({ baseWorkspace, config, nodeOptions, nodeVersion, }: { | ||
baseWorkspace: string; | ||
config: Interfaces.Config; | ||
+ nodeOptions: string[]; | ||
nodeVersion: string; | ||
}): Promise<void>; | ||
diff --git a/node_modules/oclif/lib/tarballs/bin.js b/node_modules/oclif/lib/tarballs/bin.js | ||
index f05f8a1..5f84952 100644 | ||
--- a/node_modules/oclif/lib/tarballs/bin.js | ||
+++ b/node_modules/oclif/lib/tarballs/bin.js | ||
@@ -6,7 +6,7 @@ const fs = require("node:fs"); | ||
const path = require("node:path"); | ||
const node_util_1 = require("node:util"); | ||
const exec = (0, node_util_1.promisify)(node_child_process_1.exec); | ||
-async function writeBinScripts({ baseWorkspace, config, nodeVersion, }) { | ||
+async function writeBinScripts({ baseWorkspace, config, nodeOptions, nodeVersion, }) { | ||
const binPathEnvVar = config.scopedEnvVarKey('BINPATH'); | ||
const redirectedEnvVar = config.scopedEnvVarKey('REDIRECTED'); | ||
const clientHomeEnvVar = config.scopedEnvVarKey('OCLIF_CLIENT_HOME'); | ||
@@ -21,12 +21,13 @@ if not "%${redirectedEnvVar}%"=="1" if exist "%LOCALAPPDATA%\\${bin}\\client\\bi | ||
) | ||
|
||
if not defined ${binPathEnvVar} set ${binPathEnvVar}="%~dp0${bin}.cmd" | ||
+ | ||
if exist "%~dp0..\\bin\\node.exe" ( | ||
- "%~dp0..\\bin\\node.exe" "%~dp0..\\bin\\run" %* | ||
+ "%~dp0..\\bin\\node.exe" ${`${nodeOptions.join(' ')} `}"%~dp0..\\bin\\run" %* | ||
) else if exist "%LOCALAPPDATA%\\oclif\\node\\node-${nodeVersion}.exe" ( | ||
- "%LOCALAPPDATA%\\oclif\\node\\node-${nodeVersion}.exe" "%~dp0..\\bin\\run" %* | ||
+ "%LOCALAPPDATA%\\oclif\\node\\node-${nodeVersion}.exe" ${`${nodeOptions.join(' ')} `}"%~dp0..\\bin\\run" %* | ||
) else ( | ||
- node "%~dp0..\\bin\\run" %* | ||
+ node ${`${nodeOptions.join(' ')} `}"%~dp0..\\bin\\run" %* | ||
) | ||
`); | ||
}; | ||
@@ -73,9 +74,9 @@ else | ||
exit 1 | ||
fi | ||
if [ "\$DEBUG" == "*" ]; then | ||
- echoerr ${binPathEnvVar}="\$${binPathEnvVar}" "\$NODE" "\$DIR/run" "\$@" | ||
+ echoerr ${binPathEnvVar}="\$${binPathEnvVar}" "\$NODE" ${`${nodeOptions.join(' ')} `}"\$DIR/run" "\$@" | ||
fi | ||
- "\$NODE" "\$DIR/run" "\$@" | ||
+ "\$NODE" ${`${nodeOptions.join(' ')} `}"\$DIR/run" "\$@" | ||
fi | ||
`, { mode: 0o755 }); | ||
}; | ||
diff --git a/node_modules/oclif/lib/tarballs/build.js b/node_modules/oclif/lib/tarballs/build.js | ||
index 89d6b65..874f27b 100644 | ||
--- a/node_modules/oclif/lib/tarballs/build.js | ||
+++ b/node_modules/oclif/lib/tarballs/build.js | ||
@@ -201,7 +201,7 @@ async function build(c, options = {}) { | ||
await extractCLI(options.tarball ?? (await packCLI())); | ||
await updatePJSON(); | ||
await addDependencies(); | ||
- await (0, bin_1.writeBinScripts)({ baseWorkspace: c.workspace(), config, nodeVersion: c.nodeVersion }); | ||
+ await (0, bin_1.writeBinScripts)({ baseWorkspace: c.workspace(), config, nodeOptions: c.nodeOptions, nodeVersion: c.nodeVersion }); | ||
await pretarball(); | ||
const targetsToBuild = c.targets.filter((t) => !options.platform || options.platform === t.platform); | ||
if (options.parallel) { | ||
diff --git a/node_modules/oclif/lib/tarballs/config.d.ts b/node_modules/oclif/lib/tarballs/config.d.ts | ||
index 5523aa2..ed24112 100644 | ||
--- a/node_modules/oclif/lib/tarballs/config.d.ts | ||
+++ b/node_modules/oclif/lib/tarballs/config.d.ts | ||
@@ -4,6 +4,7 @@ export interface BuildConfig { | ||
config: Interfaces.Config; | ||
dist(input: string): string; | ||
gitSha: string; | ||
+ nodeOptions: string[]; | ||
nodeVersion: string; | ||
root: string; | ||
s3Config: BuildConfig['updateConfig']['s3'] & { | ||
diff --git a/node_modules/oclif/lib/tarballs/config.js b/node_modules/oclif/lib/tarballs/config.js | ||
index d567378..a1c19cf 100644 | ||
--- a/node_modules/oclif/lib/tarballs/config.js | ||
+++ b/node_modules/oclif/lib/tarballs/config.js | ||
@@ -31,6 +31,7 @@ async function buildConfig(root, options = {}) { | ||
const updateConfig = config.pjson.oclif.update || {}; | ||
updateConfig.s3 = updateConfig.s3 || {}; | ||
const nodeVersion = updateConfig.node.version || process.versions.node; | ||
+ const nodeOptions = (0, util_1.castArray)(updateConfig.node.options ?? []); | ||
const targets = (0, util_1.compact)(options.targets || updateConfig.node.targets || exports.TARGETS) | ||
.filter((t) => { | ||
if (t === 'darwin-arm64' && semver.lt(nodeVersion, '16.0.0')) { | ||
@@ -47,6 +48,7 @@ async function buildConfig(root, options = {}) { | ||
config, | ||
dist: (...args) => path.join(config.root, 'dist', ...args), | ||
gitSha: _gitSha, | ||
+ nodeOptions, | ||
nodeVersion, | ||
root, | ||
s3Config: updateConfig.s3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2577,7 +2577,7 @@ | |
resolved "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.2.6.tgz#07fde42a0fe1f8f103aa7afd1db83cb76a72951f" | ||
integrity sha512-LrJySMWrO5oWMrP4VOWM1hr3c4rtxHGCcRy19VwqvaAPDrnsg0qfPjv4q1C9YyIU8sj+T3oJs1yZdnNntlN8ew== | ||
|
||
"@oclif/core@^2.15.0", "@oclif/core@^3.0.4", "@oclif/core@^3.11.0", "@oclif/core@^3.15.1": | ||
"@oclif/core@^2.15.0", "@oclif/core@^3.15.1", "@oclif/core@^3.16.0": | ||
version "3.15.1" | ||
resolved "https://registry.npmjs.org/@oclif/core/-/core-3.15.1.tgz#e03fa775d658e76056150ac0c7b8097b6f51ab9c" | ||
integrity sha512-d4457zVo2agLoJG97CmdY6M3BeP5sogBP3BtP65hUvJH6wA6Us1hdY3UiPPtD/ZzZImq7cATVMABuCF9tM+rWA== | ||
|
@@ -2610,28 +2610,35 @@ | |
wordwrap "^1.0.0" | ||
wrap-ansi "^7.0.0" | ||
|
||
"@oclif/plugin-help@^5", "@oclif/plugin-help@^5.2.14": | ||
"@oclif/plugin-help@^5": | ||
version "5.2.20" | ||
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.2.20.tgz#4035a0ac231f95fb8e334da342175e3ca00f6abc" | ||
integrity sha512-u+GXX/KAGL9S10LxAwNUaWdzbEBARJ92ogmM7g3gDVud2HioCmvWQCDohNRVZ9GYV9oKwZ/M8xwd6a1d95rEKQ== | ||
dependencies: | ||
"@oclif/core" "^2.15.0" | ||
|
||
"@oclif/plugin-not-found@^2.3.32": | ||
version "2.4.3" | ||
resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-2.4.3.tgz#3d24095adb0f3876cb4bcfdfdcb775086cf6d4b5" | ||
integrity sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg== | ||
"@oclif/plugin-help@^6.0.9": | ||
version "6.0.10" | ||
resolved "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.0.10.tgz#3a38e94a3f431a2b398679a433ace76a2d0c320d" | ||
integrity sha512-vgAcEVtwsI49H/TllBL/7YlQvUSjR3+nVxb0ipSmbHbEUw5p5q6fcNc3R+N9JHvaa4tc8tjyg35APZAKSaM6xw== | ||
dependencies: | ||
"@oclif/core" "^2.15.0" | ||
chalk "^4" | ||
"@oclif/core" "^3.16.0" | ||
|
||
"@oclif/plugin-not-found@^3.0.7": | ||
version "3.0.8" | ||
resolved "https://registry.npmjs.org/@oclif/plugin-not-found/-/plugin-not-found-3.0.8.tgz#d694a9308993703a1cbacbab7f5625315f0169ea" | ||
integrity sha512-sfh7jFc+1vFsF/+9ghF3pVul9xFJ4Hu1JI+KzkDjgWkfVSyPSEE+s6Hfn2z6lCXkwSKQ5lJATuZmafnGes7NGg== | ||
dependencies: | ||
"@oclif/core" "^3.16.0" | ||
chalk "^5.3.0" | ||
fast-levenshtein "^3.0.0" | ||
|
||
"@oclif/plugin-warn-if-update-available@^3.0.0": | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.0.3.tgz#0609096a5272ffc97124111453825a33e899ae6f" | ||
integrity sha512-p9Ai5olqj52NTndtntFbVreRCtJg9dgnfAl5Zi6hmIpgzVtPYDxLwa3PnMufKFc3fUkno5xnJ0TsKfxt0QruDw== | ||
"@oclif/plugin-warn-if-update-available@^3.0.8": | ||
version "3.0.9" | ||
resolved "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.0.9.tgz#f4346f4040adf71d0a120381de2fe4c8411896fd" | ||
integrity sha512-6XjYNJWWu6B4LyW73hzuM9Ihb23WamrABZhwYVJTVMBHdU30pRa1i3rvHCPfmn5c4iv8ZXudS/0zCNuhR121ng== | ||
dependencies: | ||
"@oclif/core" "^3.11.0" | ||
"@oclif/core" "^3.16.0" | ||
chalk "^5.3.0" | ||
debug "^4.1.0" | ||
http-call "^5.2.2" | ||
|
@@ -5448,7 +5455,7 @@ [email protected]: | |
ansi-styles "^4.1.0" | ||
supports-color "^7.1.0" | ||
|
||
[email protected], chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: | ||
[email protected], chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: | ||
version "4.1.2" | ||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" | ||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== | ||
|
@@ -10985,15 +10992,15 @@ obliterator@^2.0.1: | |
resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" | ||
integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== | ||
|
||
oclif@^4.1.0: | ||
version "4.1.0" | ||
resolved "https://registry.npmjs.org/oclif/-/oclif-4.1.0.tgz#486004caf6da8af9f5bdda681a616b5b2c180b45" | ||
integrity sha512-4E6z1HOdUYXHu/cbbSv0gnbFJfR9BGc9Oa+e9l8SkRoicGnrEPMpuZyY2vxWPGwMndN6ijxxuFlVmw1/j+MJpg== | ||
oclif@^4.1.3: | ||
version "4.1.3" | ||
resolved "https://registry.npmjs.org/oclif/-/oclif-4.1.3.tgz#07d3a6b16ff7e2e7c3fd06117fd745655c44abce" | ||
integrity sha512-9OmzHaOmn58BZZt8S2USh1gW5RFfa69cDfOtXCWUyYrcRdO4wIJ3DPb0xZ3UxHHbPZKsDImuP/A54weFMH2izw== | ||
dependencies: | ||
"@oclif/core" "^3.0.4" | ||
"@oclif/plugin-help" "^5.2.14" | ||
"@oclif/plugin-not-found" "^2.3.32" | ||
"@oclif/plugin-warn-if-update-available" "^3.0.0" | ||
"@oclif/core" "^3.16.0" | ||
"@oclif/plugin-help" "^6.0.9" | ||
"@oclif/plugin-not-found" "^3.0.7" | ||
"@oclif/plugin-warn-if-update-available" "^3.0.8" | ||
async-retry "^1.3.3" | ||
aws-sdk "^2.1231.0" | ||
change-case "^4" | ||
|