node-install-release 1.14.11 → 1.14.12

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.
@@ -8,14 +8,14 @@ Object.defineProperty(exports, "default", {
8
8
  return getTarget;
9
9
  }
10
10
  });
11
+ var _cpuarch = /*#__PURE__*/ _interop_require_default(require("cpu-arch"));
11
12
  var _constantsts = require("../constants.js");
12
- var _archcjs = /*#__PURE__*/ _interop_require_default(require("../machine/arch.cjs"));
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
16
16
  };
17
17
  }
18
- var archMachine;
18
+ var archCPU = (0, _cpuarch.default)();
19
19
  function getTarget(options) {
20
20
  var platform = options.platform;
21
21
  var arch = options.arch;
@@ -25,10 +25,7 @@ function getTarget(options) {
25
25
  arch = options.filename.split('-')[1];
26
26
  }
27
27
  if (!platform) platform = process.platform;
28
- if (!arch) {
29
- if (!archMachine) archMachine = (0, _archcjs.default)(); // call first time needed
30
- arch = archMachine;
31
- }
28
+ if (!arch) arch = archCPU;
32
29
  return {
33
30
  platform: platform,
34
31
  arch: arch
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/getTarget.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILE_PLATFORMS } from '../constants.ts';\nimport machineArch from '../machine/arch.cjs';\n\nlet archMachine: NodeJS.Architecture;\n\nimport type { InstallOptions, Target } from '../types.ts';\n\nexport default function getTarget(options: InstallOptions): Target {\n let platform = options.platform;\n let arch = options.arch;\n if (options.filename) {\n const filePlatform = options.filename.split('-')[0];\n if (FILE_PLATFORMS.indexOf(filePlatform) >= 0) platform = FILE_PLATFORM_MAP[filePlatform] || filePlatform;\n arch = options.filename.split('-')[1] as NodeJS.Architecture;\n }\n if (!platform) platform = process.platform;\n if (!arch) {\n if (!archMachine) archMachine = machineArch() as NodeJS.Architecture; // call first time needed\n arch = archMachine;\n }\n return { platform, arch };\n}\n"],"names":["getTarget","archMachine","options","platform","arch","filename","filePlatform","split","FILE_PLATFORMS","indexOf","FILE_PLATFORM_MAP","process","machineArch"],"mappings":";;;;+BAOA;;;eAAwBA;;;2BAP0B;8DAC1B;;;;;;AAExB,IAAIC;AAIW,SAASD,UAAUE,OAAuB;IACvD,IAAIC,WAAWD,QAAQC,QAAQ;IAC/B,IAAIC,OAAOF,QAAQE,IAAI;IACvB,IAAIF,QAAQG,QAAQ,EAAE;QACpB,IAAMC,eAAeJ,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;QACnD,IAAIC,2BAAc,CAACC,OAAO,CAACH,iBAAiB,GAAGH,WAAWO,8BAAiB,CAACJ,aAAa,IAAIA;QAC7FF,OAAOF,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;IACvC;IACA,IAAI,CAACJ,UAAUA,WAAWQ,QAAQR,QAAQ;IAC1C,IAAI,CAACC,MAAM;QACT,IAAI,CAACH,aAAaA,cAAcW,IAAAA,gBAAW,KAA2B,yBAAyB;QAC/FR,OAAOH;IACT;IACA,OAAO;QAAEE,UAAAA;QAAUC,MAAAA;IAAK;AAC1B"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/getTarget.ts"],"sourcesContent":["import cpuArch from 'cpu-arch';\nimport { FILE_PLATFORM_MAP, FILE_PLATFORMS } from '../constants.ts';\n\nimport type { InstallOptions, Target } from '../types.ts';\n\nconst archCPU = cpuArch();\n\nexport default function getTarget(options: InstallOptions): Target {\n let platform = options.platform;\n let arch = options.arch;\n if (options.filename) {\n const filePlatform = options.filename.split('-')[0];\n if (FILE_PLATFORMS.indexOf(filePlatform) >= 0) platform = FILE_PLATFORM_MAP[filePlatform] || filePlatform;\n arch = options.filename.split('-')[1] as NodeJS.Architecture;\n }\n if (!platform) platform = process.platform;\n if (!arch) arch = archCPU as NodeJS.Architecture;\n return { platform, arch };\n}\n"],"names":["getTarget","archCPU","cpuArch","options","platform","arch","filename","filePlatform","split","FILE_PLATFORMS","indexOf","FILE_PLATFORM_MAP","process"],"mappings":";;;;+BAOA;;;eAAwBA;;;8DAPJ;2BAC8B;;;;;;AAIlD,IAAMC,UAAUC,IAAAA,gBAAO;AAER,SAASF,UAAUG,OAAuB;IACvD,IAAIC,WAAWD,QAAQC,QAAQ;IAC/B,IAAIC,OAAOF,QAAQE,IAAI;IACvB,IAAIF,QAAQG,QAAQ,EAAE;QACpB,IAAMC,eAAeJ,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;QACnD,IAAIC,2BAAc,CAACC,OAAO,CAACH,iBAAiB,GAAGH,WAAWO,8BAAiB,CAACJ,aAAa,IAAIA;QAC7FF,OAAOF,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;IACvC;IACA,IAAI,CAACJ,UAAUA,WAAWQ,QAAQR,QAAQ;IAC1C,IAAI,CAACC,MAAMA,OAAOJ;IAClB,OAAO;QAAEG,UAAAA;QAAUC,MAAAA;IAAK;AAC1B"}
@@ -1,6 +1,6 @@
1
+ import cpuArch from 'cpu-arch';
1
2
  import { FILE_PLATFORM_MAP, FILE_PLATFORMS } from '../constants.js';
2
- import machineArch from '../machine/arch.cjs';
3
- let archMachine;
3
+ const archCPU = cpuArch();
4
4
  export default function getTarget(options) {
5
5
  let platform = options.platform;
6
6
  let arch = options.arch;
@@ -10,10 +10,7 @@ export default function getTarget(options) {
10
10
  arch = options.filename.split('-')[1];
11
11
  }
12
12
  if (!platform) platform = process.platform;
13
- if (!arch) {
14
- if (!archMachine) archMachine = machineArch(); // call first time needed
15
- arch = archMachine;
16
- }
13
+ if (!arch) arch = archCPU;
17
14
  return {
18
15
  platform,
19
16
  arch
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/getTarget.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILE_PLATFORMS } from '../constants.ts';\nimport machineArch from '../machine/arch.cjs';\n\nlet archMachine: NodeJS.Architecture;\n\nimport type { InstallOptions, Target } from '../types.ts';\n\nexport default function getTarget(options: InstallOptions): Target {\n let platform = options.platform;\n let arch = options.arch;\n if (options.filename) {\n const filePlatform = options.filename.split('-')[0];\n if (FILE_PLATFORMS.indexOf(filePlatform) >= 0) platform = FILE_PLATFORM_MAP[filePlatform] || filePlatform;\n arch = options.filename.split('-')[1] as NodeJS.Architecture;\n }\n if (!platform) platform = process.platform;\n if (!arch) {\n if (!archMachine) archMachine = machineArch() as NodeJS.Architecture; // call first time needed\n arch = archMachine;\n }\n return { platform, arch };\n}\n"],"names":["FILE_PLATFORM_MAP","FILE_PLATFORMS","machineArch","archMachine","getTarget","options","platform","arch","filename","filePlatform","split","indexOf","process"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,cAAc,QAAQ,kBAAkB;AACpE,OAAOC,iBAAiB,sBAAsB;AAE9C,IAAIC;AAIJ,eAAe,SAASC,UAAUC,OAAuB;IACvD,IAAIC,WAAWD,QAAQC,QAAQ;IAC/B,IAAIC,OAAOF,QAAQE,IAAI;IACvB,IAAIF,QAAQG,QAAQ,EAAE;QACpB,MAAMC,eAAeJ,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;QACnD,IAAIT,eAAeU,OAAO,CAACF,iBAAiB,GAAGH,WAAWN,iBAAiB,CAACS,aAAa,IAAIA;QAC7FF,OAAOF,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;IACvC;IACA,IAAI,CAACJ,UAAUA,WAAWM,QAAQN,QAAQ;IAC1C,IAAI,CAACC,MAAM;QACT,IAAI,CAACJ,aAAaA,cAAcD,eAAsC,yBAAyB;QAC/FK,OAAOJ;IACT;IACA,OAAO;QAAEG;QAAUC;IAAK;AAC1B"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/getTarget.ts"],"sourcesContent":["import cpuArch from 'cpu-arch';\nimport { FILE_PLATFORM_MAP, FILE_PLATFORMS } from '../constants.ts';\n\nimport type { InstallOptions, Target } from '../types.ts';\n\nconst archCPU = cpuArch();\n\nexport default function getTarget(options: InstallOptions): Target {\n let platform = options.platform;\n let arch = options.arch;\n if (options.filename) {\n const filePlatform = options.filename.split('-')[0];\n if (FILE_PLATFORMS.indexOf(filePlatform) >= 0) platform = FILE_PLATFORM_MAP[filePlatform] || filePlatform;\n arch = options.filename.split('-')[1] as NodeJS.Architecture;\n }\n if (!platform) platform = process.platform;\n if (!arch) arch = archCPU as NodeJS.Architecture;\n return { platform, arch };\n}\n"],"names":["cpuArch","FILE_PLATFORM_MAP","FILE_PLATFORMS","archCPU","getTarget","options","platform","arch","filename","filePlatform","split","indexOf","process"],"mappings":"AAAA,OAAOA,aAAa,WAAW;AAC/B,SAASC,iBAAiB,EAAEC,cAAc,QAAQ,kBAAkB;AAIpE,MAAMC,UAAUH;AAEhB,eAAe,SAASI,UAAUC,OAAuB;IACvD,IAAIC,WAAWD,QAAQC,QAAQ;IAC/B,IAAIC,OAAOF,QAAQE,IAAI;IACvB,IAAIF,QAAQG,QAAQ,EAAE;QACpB,MAAMC,eAAeJ,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;QACnD,IAAIR,eAAeS,OAAO,CAACF,iBAAiB,GAAGH,WAAWL,iBAAiB,CAACQ,aAAa,IAAIA;QAC7FF,OAAOF,QAAQG,QAAQ,CAACE,KAAK,CAAC,IAAI,CAAC,EAAE;IACvC;IACA,IAAI,CAACJ,UAAUA,WAAWM,QAAQN,QAAQ;IAC1C,IAAI,CAACC,MAAMA,OAAOJ;IAClB,OAAO;QAAEG;QAAUC;IAAK;AAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.14.11",
3
+ "version": "1.14.12",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -36,15 +36,16 @@
36
36
  "scripts": {
37
37
  "build": "tsds build",
38
38
  "format": "biome check --write --unsafe",
39
+ "prepublishOnly": "tsds validate",
39
40
  "test": "mocha --no-timeouts test/**/*.test.*",
40
41
  "test:engines": "nvu 0.8,0.10,0.12,4,12,16,lts,stable tsds test:node --no-timeouts",
41
42
  "version": "tsds version"
42
43
  },
43
44
  "dependencies": {
45
+ "cpu-arch": "^0.1.0",
44
46
  "cross-spawn-cb": "*",
45
47
  "exit": "*",
46
48
  "fast-extract": "*",
47
- "function-exec-sync": "*",
48
49
  "get-remote": "*",
49
50
  "getopts-compat": "*",
50
51
  "homedir-polyfill": "*",
@@ -1,72 +0,0 @@
1
- // <<<<****************************>>>>
2
- // Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js
3
- // <<<<****************************>>>>
4
- "use strict";
5
- require('./execSync/polyfill.cjs');
6
- /*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var cp = require('child_process');
7
- var fs = require('fs');
8
- var path = require('path');
9
- // <<<<****************************>>>>
10
- var isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);
11
- // <<<<****************************>>>>
12
- /**
13
- * Returns the operating system's CPU architecture. This is different than
14
- * `process.arch` or `os.arch()` which returns the architecture the Node.js (or
15
- * Electron) binary was compiled for.
16
- */ module.exports = function arch() {
17
- /**
18
- * On macOS, we need to detect if x64 Node is running because the CPU is truly
19
- * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:
20
- * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
21
- */ if (process.platform === 'darwin') {
22
- var nativeArm = process.arch === 'arm64';
23
- var rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', {
24
- encoding: 'utf8'
25
- }) === '1\n';
26
- return nativeArm || rosettaArm ? 'arm64' : 'x64';
27
- }
28
- /**
29
- * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit
30
- * app is based on the presence of a WOW64 file: %SystemRoot%\SysNative.
31
- * See: https://twitter.com/feross/status/776949077208510464
32
- */ // <<<<****************************>>>>
33
- if (isWindows) {
34
- // <<<<****************************>>>>
35
- var useEnv = false;
36
- try {
37
- useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));
38
- } catch (_err) {}
39
- var sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\Windows';
40
- // If %SystemRoot%\SysNative exists, we are in a WOW64 FS Redirected application.
41
- var isWOW64 = false;
42
- try {
43
- isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));
44
- } catch (_err) {}
45
- return isWOW64 ? 'x64' : 'x86';
46
- }
47
- /**
48
- * On Linux, use the `getconf` command to get the architecture.
49
- */ if (process.platform === 'linux') {
50
- try {
51
- var output1 = cp.execSync('uname -a', {
52
- encoding: 'utf8'
53
- });
54
- if (~output1.indexOf('raspberrypi')) return 'arm-pi';
55
- } catch (_err) {}
56
- var output = cp.execSync('getconf LONG_BIT', {
57
- encoding: 'utf8'
58
- });
59
- return output === '64\n' ? 'x64' : 'x86';
60
- }
61
- // <<<<****************************>>>>
62
- /**
63
- * The running binary is 64-bit, so the OS is clearly 64-bit.
64
- */ if (process.arch === 'x64') {
65
- return 'x64';
66
- }
67
- // <<<<****************************>>>>
68
- /**
69
- * If none of the above, assume the architecture is 32-bit.
70
- */ return 'x86';
71
- };
72
- /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/arch.cjs"],"sourcesContent":["// <<<<****************************>>>>\n// Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js\n// <<<<****************************>>>>\nrequire('./execSync/polyfill.cjs');\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\n\n// <<<<****************************>>>>\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\n// <<<<****************************>>>>\n\n/**\n * Returns the operating system's CPU architecture. This is different than\n * `process.arch` or `os.arch()` which returns the architecture the Node.js (or\n * Electron) binary was compiled for.\n */\nmodule.exports = function arch() {\n /**\n * On macOS, we need to detect if x64 Node is running because the CPU is truly\n * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:\n * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment\n */\n if (process.platform === 'darwin') {\n const nativeArm = process.arch === 'arm64';\n const rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', { encoding: 'utf8' }) === '1\\n';\n\n return nativeArm || rosettaArm ? 'arm64' : 'x64';\n }\n\n /**\n * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit\n * app is based on the presence of a WOW64 file: %SystemRoot%\\SysNative.\n * See: https://twitter.com/feross/status/776949077208510464\n */\n // <<<<****************************>>>>\n if (isWindows) {\n // <<<<****************************>>>>\n let useEnv = false;\n try {\n useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));\n } catch (_err) {}\n\n const sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\\\Windows';\n\n // If %SystemRoot%\\SysNative exists, we are in a WOW64 FS Redirected application.\n let isWOW64 = false;\n try {\n isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));\n } catch (_err) {}\n\n return isWOW64 ? 'x64' : 'x86';\n }\n\n /**\n * On Linux, use the `getconf` command to get the architecture.\n */\n if (process.platform === 'linux') {\n try {\n const output1 = cp.execSync('uname -a', { encoding: 'utf8' });\n if (~output1.indexOf('raspberrypi')) return 'arm-pi';\n } catch (_err) {}\n\n const output = cp.execSync('getconf LONG_BIT', { encoding: 'utf8' });\n return output === '64\\n' ? 'x64' : 'x86';\n }\n\n // <<<<****************************>>>>\n /**\n * The running binary is 64-bit, so the OS is clearly 64-bit.\n */\n if (process.arch === 'x64') {\n return 'x64';\n }\n // <<<<****************************>>>>\n\n /**\n * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["require","cp","fs","path","isWindows","process","platform","test","env","OSTYPE","module","exports","arch","nativeArm","rosettaArm","execSync","encoding","useEnv","SYSTEMROOT","statSync","_err","sysRoot","isWOW64","join","output1","indexOf","output"],"mappings":"AAAA,uCAAuC;AACvC,mFAAmF;AACnF,uCAAuC;;AACvCA,QAAQ;AAER,2EAA2E,GAC3E,IAAMC,KAAKD,QAAQ;AACnB,IAAME,KAAKF,QAAQ;AACnB,IAAMG,OAAOH,QAAQ;AAErB,uCAAuC;AACvC,IAAMI,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAC3F,uCAAuC;AAEvC;;;;CAIC,GACDC,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIP,QAAQC,QAAQ,KAAK,UAAU;QACjC,IAAMO,YAAYR,QAAQO,IAAI,KAAK;QACnC,IAAME,aAAab,GAAGc,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,uCAAuC;IACvC,IAAIV,WAAW;QACb,uCAAuC;QACvC,IAAIa,SAAS;QACb,IAAI;YACFA,SAAS,CAAC,CAAEZ,CAAAA,QAAQG,GAAG,CAACU,UAAU,IAAIhB,GAAGiB,QAAQ,CAACd,QAAQG,GAAG,CAACU,UAAU,CAAA;QAC1E,EAAE,OAAOE,MAAM,CAAC;QAEhB,IAAMC,UAAUJ,SAASZ,QAAQG,GAAG,CAACU,UAAU,GAAG;QAElD,iFAAiF;QACjF,IAAII,UAAU;QACd,IAAI;YACFA,UAAU,CAAC,CAACpB,GAAGiB,QAAQ,CAAChB,KAAKoB,IAAI,CAACF,SAAS;QAC7C,EAAE,OAAOD,MAAM,CAAC;QAEhB,OAAOE,UAAU,QAAQ;IAC3B;IAEA;;GAEC,GACD,IAAIjB,QAAQC,QAAQ,KAAK,SAAS;QAChC,IAAI;YACF,IAAMkB,UAAUvB,GAAGc,QAAQ,CAAC,YAAY;gBAAEC,UAAU;YAAO;YAC3D,IAAI,CAACQ,QAAQC,OAAO,CAAC,gBAAgB,OAAO;QAC9C,EAAE,OAAOL,MAAM,CAAC;QAEhB,IAAMM,SAASzB,GAAGc,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOU,WAAW,SAAS,QAAQ;IACrC;IAEA,uCAAuC;IACvC;;GAEC,GACD,IAAIrB,QAAQO,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IACA,uCAAuC;IAEvC;;GAEC,GACD,OAAO;AACT"}
@@ -1,2 +0,0 @@
1
- declare function _exports(): "arm64" | "x64" | "x86" | "arm-pi";
2
- export = _exports;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var cp = require('child_process');
3
- if (!cp.execSync) {
4
- var path = require('path');
5
- var workerPath = path.join(__dirname, 'worker.cjs');
6
- var functionExec = null; // break dependencies
7
- cp.execSync = function execSyncPolyfill(cmd) {
8
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
9
- if (!functionExec) functionExec = require('function-exec-sync');
10
- return functionExec({
11
- callbacks: true
12
- }, workerPath, cmd, options);
13
- };
14
- }
15
- /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const workerPath = path.join(__dirname, 'worker.cjs');\n\n let functionExec = null; // break dependencies\n cp.execSync = function execSyncPolyfill(cmd, options = {}) {\n if (!functionExec) functionExec = require('function-exec-sync');\n return functionExec({ callbacks: true }, workerPath, cmd, options);\n };\n}\n"],"names":["cp","require","execSync","path","workerPath","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,IAAMC,OAAOF,QAAQ;IACrB,IAAMG,aAAaD,KAAKE,IAAI,CAACC,WAAW;IAExC,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG;YAAEC,UAAAA,iEAAU,CAAC;QACtD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,aAAa;YAAEI,WAAW;QAAK,GAAGP,YAAYK,KAAKC;IAC5D;AACF"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- "use strict";
2
- var cp = require('child_process');
3
- module.exports = function execCallback(cmd, options, callback) {
4
- return cp.exec(cmd, options, callback);
5
- };
6
- /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/worker.cjs"],"sourcesContent":["const cp = require('child_process');\n\nmodule.exports = function execCallback(cmd, options, callback) {\n return cp.exec(cmd, options, callback);\n};\n"],"names":["cp","require","module","exports","execCallback","cmd","options","callback","exec"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AAEnBC,OAAOC,OAAO,GAAG,SAASC,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,OAAOP,GAAGQ,IAAI,CAACH,KAAKC,SAASC;AAC/B"}
@@ -1,3 +0,0 @@
1
- declare function _exports(cmd: any, options: any, callback: any): cp.ChildProcess;
2
- export = _exports;
3
- import cp = require("child_process");
@@ -1,70 +0,0 @@
1
- // <<<<****************************>>>>
2
- // Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js
3
- // <<<<****************************>>>>
4
- require('./execSync/polyfill.cjs');
5
- /*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ const cp = require('child_process');
6
- const fs = require('fs');
7
- const path = require('path');
8
- // <<<<****************************>>>>
9
- const isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);
10
- // <<<<****************************>>>>
11
- /**
12
- * Returns the operating system's CPU architecture. This is different than
13
- * `process.arch` or `os.arch()` which returns the architecture the Node.js (or
14
- * Electron) binary was compiled for.
15
- */ module.exports = function arch() {
16
- /**
17
- * On macOS, we need to detect if x64 Node is running because the CPU is truly
18
- * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:
19
- * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
20
- */ if (process.platform === 'darwin') {
21
- const nativeArm = process.arch === 'arm64';
22
- const rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', {
23
- encoding: 'utf8'
24
- }) === '1\n';
25
- return nativeArm || rosettaArm ? 'arm64' : 'x64';
26
- }
27
- /**
28
- * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit
29
- * app is based on the presence of a WOW64 file: %SystemRoot%\SysNative.
30
- * See: https://twitter.com/feross/status/776949077208510464
31
- */ // <<<<****************************>>>>
32
- if (isWindows) {
33
- // <<<<****************************>>>>
34
- let useEnv = false;
35
- try {
36
- useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));
37
- } catch (_err) {}
38
- const sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\Windows';
39
- // If %SystemRoot%\SysNative exists, we are in a WOW64 FS Redirected application.
40
- let isWOW64 = false;
41
- try {
42
- isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));
43
- } catch (_err) {}
44
- return isWOW64 ? 'x64' : 'x86';
45
- }
46
- /**
47
- * On Linux, use the `getconf` command to get the architecture.
48
- */ if (process.platform === 'linux') {
49
- try {
50
- const output1 = cp.execSync('uname -a', {
51
- encoding: 'utf8'
52
- });
53
- if (~output1.indexOf('raspberrypi')) return 'arm-pi';
54
- } catch (_err) {}
55
- const output = cp.execSync('getconf LONG_BIT', {
56
- encoding: 'utf8'
57
- });
58
- return output === '64\n' ? 'x64' : 'x86';
59
- }
60
- // <<<<****************************>>>>
61
- /**
62
- * The running binary is 64-bit, so the OS is clearly 64-bit.
63
- */ if (process.arch === 'x64') {
64
- return 'x64';
65
- }
66
- // <<<<****************************>>>>
67
- /**
68
- * If none of the above, assume the architecture is 32-bit.
69
- */ return 'x86';
70
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/arch.cjs"],"sourcesContent":["// <<<<****************************>>>>\n// Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js\n// <<<<****************************>>>>\nrequire('./execSync/polyfill.cjs');\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\n\n// <<<<****************************>>>>\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\n// <<<<****************************>>>>\n\n/**\n * Returns the operating system's CPU architecture. This is different than\n * `process.arch` or `os.arch()` which returns the architecture the Node.js (or\n * Electron) binary was compiled for.\n */\nmodule.exports = function arch() {\n /**\n * On macOS, we need to detect if x64 Node is running because the CPU is truly\n * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:\n * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment\n */\n if (process.platform === 'darwin') {\n const nativeArm = process.arch === 'arm64';\n const rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', { encoding: 'utf8' }) === '1\\n';\n\n return nativeArm || rosettaArm ? 'arm64' : 'x64';\n }\n\n /**\n * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit\n * app is based on the presence of a WOW64 file: %SystemRoot%\\SysNative.\n * See: https://twitter.com/feross/status/776949077208510464\n */\n // <<<<****************************>>>>\n if (isWindows) {\n // <<<<****************************>>>>\n let useEnv = false;\n try {\n useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));\n } catch (_err) {}\n\n const sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\\\Windows';\n\n // If %SystemRoot%\\SysNative exists, we are in a WOW64 FS Redirected application.\n let isWOW64 = false;\n try {\n isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));\n } catch (_err) {}\n\n return isWOW64 ? 'x64' : 'x86';\n }\n\n /**\n * On Linux, use the `getconf` command to get the architecture.\n */\n if (process.platform === 'linux') {\n try {\n const output1 = cp.execSync('uname -a', { encoding: 'utf8' });\n if (~output1.indexOf('raspberrypi')) return 'arm-pi';\n } catch (_err) {}\n\n const output = cp.execSync('getconf LONG_BIT', { encoding: 'utf8' });\n return output === '64\\n' ? 'x64' : 'x86';\n }\n\n // <<<<****************************>>>>\n /**\n * The running binary is 64-bit, so the OS is clearly 64-bit.\n */\n if (process.arch === 'x64') {\n return 'x64';\n }\n // <<<<****************************>>>>\n\n /**\n * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["require","cp","fs","path","isWindows","process","platform","test","env","OSTYPE","module","exports","arch","nativeArm","rosettaArm","execSync","encoding","useEnv","SYSTEMROOT","statSync","_err","sysRoot","isWOW64","join","output1","indexOf","output"],"mappings":"AAAA,uCAAuC;AACvC,mFAAmF;AACnF,uCAAuC;AACvCA,QAAQ;AAER,2EAA2E,GAC3E,MAAMC,KAAKD,QAAQ;AACnB,MAAME,KAAKF,QAAQ;AACnB,MAAMG,OAAOH,QAAQ;AAErB,uCAAuC;AACvC,MAAMI,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAC3F,uCAAuC;AAEvC;;;;CAIC,GACDC,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIP,QAAQC,QAAQ,KAAK,UAAU;QACjC,MAAMO,YAAYR,QAAQO,IAAI,KAAK;QACnC,MAAME,aAAab,GAAGc,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,uCAAuC;IACvC,IAAIV,WAAW;QACb,uCAAuC;QACvC,IAAIa,SAAS;QACb,IAAI;YACFA,SAAS,CAAC,CAAEZ,CAAAA,QAAQG,GAAG,CAACU,UAAU,IAAIhB,GAAGiB,QAAQ,CAACd,QAAQG,GAAG,CAACU,UAAU,CAAA;QAC1E,EAAE,OAAOE,MAAM,CAAC;QAEhB,MAAMC,UAAUJ,SAASZ,QAAQG,GAAG,CAACU,UAAU,GAAG;QAElD,iFAAiF;QACjF,IAAII,UAAU;QACd,IAAI;YACFA,UAAU,CAAC,CAACpB,GAAGiB,QAAQ,CAAChB,KAAKoB,IAAI,CAACF,SAAS;QAC7C,EAAE,OAAOD,MAAM,CAAC;QAEhB,OAAOE,UAAU,QAAQ;IAC3B;IAEA;;GAEC,GACD,IAAIjB,QAAQC,QAAQ,KAAK,SAAS;QAChC,IAAI;YACF,MAAMkB,UAAUvB,GAAGc,QAAQ,CAAC,YAAY;gBAAEC,UAAU;YAAO;YAC3D,IAAI,CAACQ,QAAQC,OAAO,CAAC,gBAAgB,OAAO;QAC9C,EAAE,OAAOL,MAAM,CAAC;QAEhB,MAAMM,SAASzB,GAAGc,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOU,WAAW,SAAS,QAAQ;IACrC;IAEA,uCAAuC;IACvC;;GAEC,GACD,IAAIrB,QAAQO,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IACA,uCAAuC;IAEvC;;GAEC,GACD,OAAO;AACT"}
@@ -1,2 +0,0 @@
1
- declare function _exports(): "arm64" | "x64" | "x86" | "arm-pi";
2
- export = _exports;
@@ -1,12 +0,0 @@
1
- const cp = require('child_process');
2
- if (!cp.execSync) {
3
- const path = require('path');
4
- const workerPath = path.join(__dirname, 'worker.cjs');
5
- let functionExec = null; // break dependencies
6
- cp.execSync = function execSyncPolyfill(cmd, options = {}) {
7
- if (!functionExec) functionExec = require('function-exec-sync');
8
- return functionExec({
9
- callbacks: true
10
- }, workerPath, cmd, options);
11
- };
12
- }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const workerPath = path.join(__dirname, 'worker.cjs');\n\n let functionExec = null; // break dependencies\n cp.execSync = function execSyncPolyfill(cmd, options = {}) {\n if (!functionExec) functionExec = require('function-exec-sync');\n return functionExec({ callbacks: true }, workerPath, cmd, options);\n };\n}\n"],"names":["cp","require","execSync","path","workerPath","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":"AAAA,MAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,MAAMC,OAAOF,QAAQ;IACrB,MAAMG,aAAaD,KAAKE,IAAI,CAACC,WAAW;IAExC,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG,EAAEC,UAAU,CAAC,CAAC;QACvD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,aAAa;YAAEI,WAAW;QAAK,GAAGP,YAAYK,KAAKC;IAC5D;AACF"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- const cp = require('child_process');
2
- module.exports = function execCallback(cmd, options, callback) {
3
- return cp.exec(cmd, options, callback);
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/worker.cjs"],"sourcesContent":["const cp = require('child_process');\n\nmodule.exports = function execCallback(cmd, options, callback) {\n return cp.exec(cmd, options, callback);\n};\n"],"names":["cp","require","module","exports","execCallback","cmd","options","callback","exec"],"mappings":"AAAA,MAAMA,KAAKC,QAAQ;AAEnBC,OAAOC,OAAO,GAAG,SAASC,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,OAAOP,GAAGQ,IAAI,CAACH,KAAKC,SAASC;AAC/B"}
@@ -1,3 +0,0 @@
1
- declare function _exports(cmd: any, options: any, callback: any): cp.ChildProcess;
2
- export = _exports;
3
- import cp = require("child_process");