node-install-release 1.5.0 → 1.5.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["arch.js"],"sourcesContent":["// Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\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 if (isWindows) {\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 * 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 * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["cp","require","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,mFAAmF;AAEnF,2EAA2E;AAC3E,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AACrB,IAAMG,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAE3F;;;;CAIC,GACDC,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIP,QAAQC,QAAQ,KAAK,UAAU;QACjC,IAAMO,YAAYR,QAAQO,IAAI,KAAK;QACnC,IAAME,aAAad,GAAGe,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,IAAIV,WAAW;QACb,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,UAAUxB,GAAGe,QAAQ,CAAC,YAAY;gBAAEC,UAAU;YAAO;YAC3D,IAAI,CAACQ,QAAQC,OAAO,CAAC,gBAAgB,OAAO;QAC9C,EAAE,OAAOL,MAAM,CAAC;QAEhB,IAAMM,SAAS1B,GAAGe,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOU,WAAW,SAAS,QAAQ;IACrC;IAEA;;GAEC,GACD,IAAIrB,QAAQO,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IAEA;;GAEC,GACD,OAAO;AACT"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/arch.js"],"sourcesContent":["// Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\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 if (isWindows) {\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 * 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 * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["cp","require","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,mFAAmF;AAEnF,2EAA2E;AAC3E,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AACrB,IAAMG,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAE3F;;;;CAIC,GACDC,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIP,QAAQC,QAAQ,KAAK,UAAU;QACjC,IAAMO,YAAYR,QAAQO,IAAI,KAAK;QACnC,IAAME,aAAad,GAAGe,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,IAAIV,WAAW;QACb,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,UAAUxB,GAAGe,QAAQ,CAAC,YAAY;gBAAEC,UAAU;YAAO;YAC3D,IAAI,CAACQ,QAAQC,OAAO,CAAC,gBAAgB,OAAO;QAC9C,EAAE,OAAOL,MAAM,CAAC;QAEhB,IAAMM,SAAS1B,GAAGe,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOU,WAAW,SAAS,QAAQ;IACrC;IAEA;;GAEC,GACD,IAAIrB,QAAQO,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IAEA;;GAEC,GACD,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["checkMissing.js"],"sourcesContent":["const path = require('path');\nconst fs = require('fs');\nconst keys = require('lodash.keys');\n\nconst PLATFORM_FILES = {\n win32: {\n node: ['node.exe'],\n npm: ['npm', 'npm.cmd'],\n },\n posix: {\n node: ['node'],\n npm: ['npm'],\n },\n};\n\nmodule.exports = function checkMissing(dest, options, callback) {\n const platform = options.platform || process.platform;\n const files = PLATFORM_FILES[platform] || PLATFORM_FILES.posix;\n const binPath = platform === 'win32' ? dest : path.join(dest, 'bin');\n\n fs.readdir(binPath, (err, names) => {\n if (err || !names.length) return callback(null, keys(files));\n\n const missing = [];\n for (const key in files) {\n const needed = files[key];\n for (let index = 0; index < needed.length; index++) {\n if (!~names.indexOf(needed[index])) {\n missing.push(key);\n break;\n }\n }\n }\n return callback(null, missing);\n });\n};\n"],"names":["path","require","fs","keys","PLATFORM_FILES","win32","node","npm","posix","module","exports","checkMissing","dest","options","callback","platform","process","files","binPath","join","readdir","err","names","length","missing","key","needed","index","indexOf","push"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AAErB,IAAMG,iBAAiB;IACrBC,OAAO;QACLC,MAAM;YAAC;SAAW;QAClBC,KAAK;YAAC;YAAO;SAAU;IACzB;IACAC,OAAO;QACLF,MAAM;YAAC;SAAO;QACdC,KAAK;YAAC;SAAM;IACd;AACF;AAEAE,OAAOC,OAAO,GAAG,SAASC,aAAaC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC5D,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,QAAQb,cAAc,CAACW,SAAS,IAAIX,eAAeI,KAAK;IAC9D,IAAMU,UAAUH,aAAa,UAAUH,OAAOZ,KAAKmB,IAAI,CAACP,MAAM;IAE9DV,GAAGkB,OAAO,CAACF,SAAS,SAACG,KAAKC;QACxB,IAAID,OAAO,CAACC,MAAMC,MAAM,EAAE,OAAOT,SAAS,MAAMX,KAAKc;QAErD,IAAMO,UAAU,EAAE;QAClB,IAAK,IAAMC,OAAOR,MAAO;YACvB,IAAMS,SAAST,KAAK,CAACQ,IAAI;YACzB,IAAK,IAAIE,QAAQ,GAAGA,QAAQD,OAAOH,MAAM,EAAEI,QAAS;gBAClD,IAAI,CAAC,CAACL,MAAMM,OAAO,CAACF,MAAM,CAACC,MAAM,GAAG;oBAClCH,QAAQK,IAAI,CAACJ;oBACb;gBACF;YACF;QACF;QACA,OAAOX,SAAS,MAAMU;IACxB;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/checkMissing.js"],"sourcesContent":["const path = require('path');\nconst fs = require('fs');\nconst keys = require('lodash.keys');\n\nconst PLATFORM_FILES = {\n win32: {\n node: ['node.exe'],\n npm: ['npm', 'npm.cmd'],\n },\n posix: {\n node: ['node'],\n npm: ['npm'],\n },\n};\n\nmodule.exports = function checkMissing(dest, options, callback) {\n const platform = options.platform || process.platform;\n const files = PLATFORM_FILES[platform] || PLATFORM_FILES.posix;\n const binPath = platform === 'win32' ? dest : path.join(dest, 'bin');\n\n fs.readdir(binPath, (err, names) => {\n if (err || !names.length) return callback(null, keys(files));\n\n const missing = [];\n for (const key in files) {\n const needed = files[key];\n for (let index = 0; index < needed.length; index++) {\n if (!~names.indexOf(needed[index])) {\n missing.push(key);\n break;\n }\n }\n }\n return callback(null, missing);\n });\n};\n"],"names":["path","require","fs","keys","PLATFORM_FILES","win32","node","npm","posix","module","exports","checkMissing","dest","options","callback","platform","process","files","binPath","join","readdir","err","names","length","missing","key","needed","index","indexOf","push"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AAErB,IAAMG,iBAAiB;IACrBC,OAAO;QACLC,MAAM;YAAC;SAAW;QAClBC,KAAK;YAAC;YAAO;SAAU;IACzB;IACAC,OAAO;QACLF,MAAM;YAAC;SAAO;QACdC,KAAK;YAAC;SAAM;IACd;AACF;AAEAE,OAAOC,OAAO,GAAG,SAASC,aAAaC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC5D,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,QAAQb,cAAc,CAACW,SAAS,IAAIX,eAAeI,KAAK;IAC9D,IAAMU,UAAUH,aAAa,UAAUH,OAAOZ,KAAKmB,IAAI,CAACP,MAAM;IAE9DV,GAAGkB,OAAO,CAACF,SAAS,SAACG,KAAKC;QACxB,IAAID,OAAO,CAACC,MAAMC,MAAM,EAAE,OAAOT,SAAS,MAAMX,KAAKc;QAErD,IAAMO,UAAU,EAAE;QAClB,IAAK,IAAMC,OAAOR,MAAO;YACvB,IAAMS,SAAST,KAAK,CAACQ,IAAI;YACzB,IAAK,IAAIE,QAAQ,GAAGA,QAAQD,OAAOH,MAAM,EAAEI,QAAS;gBAClD,IAAI,CAAC,CAACL,MAAMM,OAAO,CAACF,MAAM,CAACC,MAAM,GAAG;oBAClCH,QAAQK,IAAI,CAACJ;oBACb;gBACF;YACF;QACF;QACA,OAAOX,SAAS,MAAMU;IACxB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nir from './index.js';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', cacheDirectory: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n // define.option('-p, --platform [platform]', 'Platform like darwin');\n // define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');\n // define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');\n // define.option('-c, --cacheDirectory [cacheDirectory]', 'Cache directory');\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(-1);\n }\n\n const installPath = args.length > 1 ? args[1] : null;\n nir(args[0], installPath, { stdio: 'inherit', ...options }, (err, results) => {\n if (err) {\n console.log(err.message);\n return exit(err.code || -1);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n for (let index = 0; index < results.length; index++) {\n const result = results[index];\n if (result.error) console.log(`${result.version} not installed. Error: ${result.error.message}`);\n else console.log(`${result.version} installed in: ${result.fullPath}`);\n }\n console.log('======================');\n }\n\n exit(errors.length ? -1 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","cacheDirectory","silent","boolean","args","concat","_","length","console","log","exit","installPath","nir","stdio","err","results","message","code","errors","filter","result","error","index","version","fullPath"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhB,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,gBAAgB;YAAKC,QAAQ;QAAI;QACnFC,SAAS;YAAC;SAAS;IACrB;IAEA,sEAAsE;IACtE,sEAAsE;IACtE,+GAA+G;IAC/G,6EAA6E;IAE7E,IAAMC,OAAOX,KAAKG,KAAK,CAAC,GAAG,GAAGS,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC,CAAC;IACf;IAEA,IAAMC,cAAcP,KAAKG,MAAM,GAAG,IAAIH,IAAI,CAAC,EAAE,GAAG;IAChDQ,IAAAA,cAAG,EAACR,IAAI,CAAC,EAAE,EAAEO,aAAa;QAAEE,OAAO;OAAcnB,UAAW,SAACoB,KAAKC;QAChE,IAAID,KAAK;YACPN,QAAQC,GAAG,CAACK,IAAIE,OAAO;YACvB,OAAON,IAAAA,aAAI,EAACI,IAAIG,IAAI,IAAI,CAAC;QAC3B;QACA,IAAMC,SAASH,QAAQI,MAAM,CAAC,SAACC;mBAAW,CAAC,CAACA,OAAOC,KAAK;;QAExD,IAAI,CAAC3B,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAK,IAAIa,QAAQ,GAAGA,QAAQP,QAAQR,MAAM,EAAEe,QAAS;gBACnD,IAAMF,SAASL,OAAO,CAACO,MAAM;gBAC7B,IAAIF,OAAOC,KAAK,EAAEb,QAAQC,GAAG,CAAC,AAAC,GAA0CW,OAAxCA,OAAOG,OAAO,EAAC,2BAA8C,OAArBH,OAAOC,KAAK,CAACL,OAAO;qBACxFR,QAAQC,GAAG,CAAC,AAAC,GAAkCW,OAAhCA,OAAOG,OAAO,EAAC,mBAAiC,OAAhBH,OAAOI,QAAQ;YACrE;YACAhB,QAAQC,GAAG,CAAC;QACd;QAEAC,IAAAA,aAAI,EAACQ,OAAOX,MAAM,GAAG,CAAC,IAAI;IAC5B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nir from './index.js';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', cacheDirectory: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n // define.option('-p, --platform [platform]', 'Platform like darwin');\n // define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');\n // define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');\n // define.option('-c, --cacheDirectory [cacheDirectory]', 'Cache directory');\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(-1);\n }\n\n const installPath = args.length > 1 ? args[1] : null;\n nir(args[0], installPath, { stdio: 'inherit', ...options }, (err, results) => {\n if (err) {\n console.log(err.message);\n return exit(err.code || -1);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n for (let index = 0; index < results.length; index++) {\n const result = results[index];\n if (result.error) console.log(`${result.version} not installed. Error: ${result.error.message}`);\n else console.log(`${result.version} installed in: ${result.fullPath}`);\n }\n console.log('======================');\n }\n\n exit(errors.length ? -1 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","cacheDirectory","silent","boolean","args","concat","_","length","console","log","exit","installPath","nir","stdio","err","results","message","code","errors","filter","result","error","index","version","fullPath"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhB,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,gBAAgB;YAAKC,QAAQ;QAAI;QACnFC,SAAS;YAAC;SAAS;IACrB;IAEA,sEAAsE;IACtE,sEAAsE;IACtE,+GAA+G;IAC/G,6EAA6E;IAE7E,IAAMC,OAAOX,KAAKG,KAAK,CAAC,GAAG,GAAGS,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC,CAAC;IACf;IAEA,IAAMC,cAAcP,KAAKG,MAAM,GAAG,IAAIH,IAAI,CAAC,EAAE,GAAG;IAChDQ,IAAAA,cAAG,EAACR,IAAI,CAAC,EAAE,EAAEO,aAAa;QAAEE,OAAO;OAAcnB,UAAW,SAACoB,KAAKC;QAChE,IAAID,KAAK;YACPN,QAAQC,GAAG,CAACK,IAAIE,OAAO;YACvB,OAAON,IAAAA,aAAI,EAACI,IAAIG,IAAI,IAAI,CAAC;QAC3B;QACA,IAAMC,SAASH,QAAQI,MAAM,CAAC,SAACC;mBAAW,CAAC,CAACA,OAAOC,KAAK;;QAExD,IAAI,CAAC3B,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAK,IAAIa,QAAQ,GAAGA,QAAQP,QAAQR,MAAM,EAAEe,QAAS;gBACnD,IAAMF,SAASL,OAAO,CAACO,MAAM;gBAC7B,IAAIF,OAAOC,KAAK,EAAEb,QAAQC,GAAG,CAAC,AAAC,GAA0CW,OAAxCA,OAAOG,OAAO,EAAC,2BAA8C,OAArBH,OAAOC,KAAK,CAACL,OAAO;qBACxFR,QAAQC,GAAG,CAAC,AAAC,GAAkCW,OAAhCA,OAAOG,OAAO,EAAC,mBAAiC,OAAhBH,OAAOI,QAAQ;YACrE;YACAhB,QAAQC,GAAG,CAAC;QACd;QAEAC,IAAAA,aAAI,EAACQ,OAAOX,MAAM,GAAG,CAAC,IAAI;IAC5B;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["conditionalCache.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCache(endpoint, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n\n get(endpoint, { filename: path.basename(dest), progress: progress, time: 1000, ...options }).file(path.dirname(dest), (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","get","access","progress","ensureDestinationParent","module","exports","conditionalCache","endpoint","dest","options","callback","err","filename","basename","time","file","dirname","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AACpB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,WAAWH,QAAQ;AACzB,IAAMI,0BAA0BJ,QAAQ;AAExCK,OAAOC,OAAO,GAAG,SAASC,iBAAiBC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC1E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBR,OAAOO,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YAEzBX,IAAIO,UAAU;gBAAEK,UAAUd,KAAKe,QAAQ,CAACL;gBAAON,UAAUA;gBAAUY,MAAM;eAASL,UAAWM,IAAI,CAACjB,KAAKkB,OAAO,CAACR,OAAO,SAACG;gBACrHM,QAAQC,GAAG,CAAC;gBACZR,SAASC;YACX;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/conditionalCache.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCache(endpoint, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n\n get(endpoint, { filename: path.basename(dest), progress: progress, time: 1000, ...options }).file(path.dirname(dest), (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","get","access","progress","ensureDestinationParent","module","exports","conditionalCache","endpoint","dest","options","callback","err","filename","basename","time","file","dirname","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AACpB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,WAAWH,QAAQ;AACzB,IAAMI,0BAA0BJ,QAAQ;AAExCK,OAAOC,OAAO,GAAG,SAASC,iBAAiBC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC1E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBR,OAAOO,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YAEzBX,IAAIO,UAAU;gBAAEK,UAAUd,KAAKe,QAAQ,CAACL;gBAAON,UAAUA;gBAAUY,MAAM;eAASL,UAAWM,IAAI,CAACjB,KAAKkB,OAAO,CAACR,OAAO,SAACG;gBACrHM,QAAQC,GAAG,CAAC;gBACZR,SAASC;YACX;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["conditionalCopy.js"],"sourcesContent":["const access = require('fs-access-compat');\n\nconst copyFile = require('./copyFile');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCopy(src, dest, optional, callback) {\n if (typeof optional === 'function') {\n callback = optional;\n optional = false;\n }\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n if (!optional) return copyFile(src, dest, callback);\n\n access(src, (err) => {\n if (err) return callback(); // optional file missing\n copyFile(src, dest, callback);\n });\n });\n });\n};\n"],"names":["access","require","copyFile","ensureDestinationParent","module","exports","conditionalCopy","src","dest","optional","callback","err"],"mappings":";AAAA,IAAMA,SAASC,QAAQ;AAEvB,IAAMC,WAAWD,QAAQ;AACzB,IAAME,0BAA0BF,QAAQ;AAExCG,OAAOC,OAAO,GAAG,SAASC,gBAAgBC,GAAG,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IACrE,IAAI,OAAOD,aAAa,YAAY;QAClCC,WAAWD;QACXA,WAAW;IACb;IAEAT,OAAOQ,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YACzB,IAAI,CAACF,UAAU,OAAOP,SAASK,KAAKC,MAAME;YAE1CV,OAAOO,KAAK,SAACI;gBACX,IAAIA,KAAK,OAAOD,YAAY,wBAAwB;gBACpDR,SAASK,KAAKC,MAAME;YACtB;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/conditionalCopy.js"],"sourcesContent":["const access = require('fs-access-compat');\n\nconst copyFile = require('./copyFile');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCopy(src, dest, optional, callback) {\n if (typeof optional === 'function') {\n callback = optional;\n optional = false;\n }\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n if (!optional) return copyFile(src, dest, callback);\n\n access(src, (err) => {\n if (err) return callback(); // optional file missing\n copyFile(src, dest, callback);\n });\n });\n });\n};\n"],"names":["access","require","copyFile","ensureDestinationParent","module","exports","conditionalCopy","src","dest","optional","callback","err"],"mappings":";AAAA,IAAMA,SAASC,QAAQ;AAEvB,IAAMC,WAAWD,QAAQ;AACzB,IAAME,0BAA0BF,QAAQ;AAExCG,OAAOC,OAAO,GAAG,SAASC,gBAAgBC,GAAG,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IACrE,IAAI,OAAOD,aAAa,YAAY;QAClCC,WAAWD;QACXA,WAAW;IACb;IAEAT,OAAOQ,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YACzB,IAAI,CAACF,UAAU,OAAOP,SAASK,KAAKC,MAAME;YAE1CV,OAAOO,KAAK,SAACI;gBACX,IAAIA,KAAK,OAAOD,YAAY,wBAAwB;gBACpDR,SAASK,KAAKC,MAAME;YACtB;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["conditionalExtract.js"],"sourcesContent":["const path = require('path');\nconst extract = require('fast-extract').default;\nconst mkdirp = require('mkdirp-classic');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\n\nmodule.exports = function conditionalExtract(src, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n mkdirp(path.dirname(dest), () => {\n extract(src, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","extract","default","mkdirp","access","progress","module","exports","conditionalExtract","src","dest","options","callback","err","dirname","strip","time","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,UAAUD,QAAQ,gBAAgBE,OAAO;AAC/C,IAAMC,SAASH,QAAQ;AACvB,IAAMI,SAASJ,QAAQ;AAEvB,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,mBAAmBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBP,OAAOM,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CT,OAAOJ,KAAKe,OAAO,CAACJ,OAAO;YACzBT,QAAQQ,KAAKC,MAAM;gBAAEK,OAAO;gBAAGV,UAAUA;gBAAUW,MAAM;eAASL,UAAW,SAACE;gBAC5EI,QAAQC,GAAG,CAAC;gBACZN,SAASC;YACX;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/conditionalExtract.js"],"sourcesContent":["const path = require('path');\nconst extract = require('fast-extract').default;\nconst mkdirp = require('mkdirp-classic');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\n\nmodule.exports = function conditionalExtract(src, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n mkdirp(path.dirname(dest), () => {\n extract(src, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","extract","default","mkdirp","access","progress","module","exports","conditionalExtract","src","dest","options","callback","err","dirname","strip","time","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,UAAUD,QAAQ,gBAAgBE,OAAO;AAC/C,IAAMC,SAASH,QAAQ;AACvB,IAAMI,SAASJ,QAAQ;AAEvB,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,mBAAmBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBP,OAAOM,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CT,OAAOJ,KAAKe,OAAO,CAACJ,OAAO;YACzBT,QAAQQ,KAAKC,MAAM;gBAAEK,OAAO;gBAAGV,UAAUA;gBAAUW,MAAM;eAASL,UAAW,SAACE;gBAC5EI,QAAQC,GAAG,CAAC;gBACZN,SAASC;YACX;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["copyFile.js"],"sourcesContent":["const fs = require('fs');\nconst rimraf2 = require('rimraf2');\nconst pump = require('pump');\nconst Queue = require('queue-cb');\n\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nfunction streamCopyFile(src, dest, callback) {\n fs.stat(src, (err) => {\n if (err) return callback(err);\n pump(fs.createReadStream(src), fs.createWriteStream(dest), callback);\n });\n}\n\nconst copyFile = fs.copyFile || streamCopyFile;\n\nmodule.exports = function safeCopyFile(src, dest, callback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n rimraf2(dest, { disableGlob: true }, (err) => {\n err && err.code !== 'EEXIST' ? callback(err) : callback();\n });\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n};\n"],"names":["fs","require","rimraf2","pump","Queue","ensureDestinationParent","streamCopyFile","src","dest","callback","stat","err","createReadStream","createWriteStream","copyFile","module","exports","safeCopyFile","queue","defer","bind","disableGlob","code","await"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,UAAUD,QAAQ;AACxB,IAAME,OAAOF,QAAQ;AACrB,IAAMG,QAAQH,QAAQ;AAEtB,IAAMI,0BAA0BJ,QAAQ;AAExC,SAASK,eAAeC,GAAG,EAAEC,IAAI,EAAEC,QAAQ;IACzCT,GAAGU,IAAI,CAACH,KAAK,SAACI;QACZ,IAAIA,KAAK,OAAOF,SAASE;QACzBR,KAAKH,GAAGY,gBAAgB,CAACL,MAAMP,GAAGa,iBAAiB,CAACL,OAAOC;IAC7D;AACF;AAEA,IAAMK,WAAWd,GAAGc,QAAQ,IAAIR;AAEhCS,OAAOC,OAAO,GAAG,SAASC,aAAaV,GAAG,EAAEC,IAAI,EAAEC,QAAQ;IACxD,IAAMS,QAAQ,IAAId,MAAM;IAExBc,MAAMC,KAAK,CAACd,wBAAwBe,IAAI,CAAC,MAAMZ;IAC/CU,MAAMC,KAAK,CAAC,SAACV;QACXP,QAAQM,MAAM;YAAEa,aAAa;QAAK,GAAG,SAACV;YACpCA,OAAOA,IAAIW,IAAI,KAAK,WAAWb,SAASE,OAAOF;QACjD;IACF;IACAS,MAAMC,KAAK,CAACL,SAASM,IAAI,CAAC,MAAMb,KAAKC;IACrCU,MAAMK,KAAK,CAACd;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/copyFile.js"],"sourcesContent":["const fs = require('fs');\nconst rimraf2 = require('rimraf2');\nconst pump = require('pump');\nconst Queue = require('queue-cb');\n\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nfunction streamCopyFile(src, dest, callback) {\n fs.stat(src, (err) => {\n if (err) return callback(err);\n pump(fs.createReadStream(src), fs.createWriteStream(dest), callback);\n });\n}\n\nconst copyFile = fs.copyFile || streamCopyFile;\n\nmodule.exports = function safeCopyFile(src, dest, callback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n rimraf2(dest, { disableGlob: true }, (err) => {\n err && err.code !== 'EEXIST' ? callback(err) : callback();\n });\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n};\n"],"names":["fs","require","rimraf2","pump","Queue","ensureDestinationParent","streamCopyFile","src","dest","callback","stat","err","createReadStream","createWriteStream","copyFile","module","exports","safeCopyFile","queue","defer","bind","disableGlob","code","await"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,UAAUD,QAAQ;AACxB,IAAME,OAAOF,QAAQ;AACrB,IAAMG,QAAQH,QAAQ;AAEtB,IAAMI,0BAA0BJ,QAAQ;AAExC,SAASK,eAAeC,GAAG,EAAEC,IAAI,EAAEC,QAAQ;IACzCT,GAAGU,IAAI,CAACH,KAAK,SAACI;QACZ,IAAIA,KAAK,OAAOF,SAASE;QACzBR,KAAKH,GAAGY,gBAAgB,CAACL,MAAMP,GAAGa,iBAAiB,CAACL,OAAOC;IAC7D;AACF;AAEA,IAAMK,WAAWd,GAAGc,QAAQ,IAAIR;AAEhCS,OAAOC,OAAO,GAAG,SAASC,aAAaV,GAAG,EAAEC,IAAI,EAAEC,QAAQ;IACxD,IAAMS,QAAQ,IAAId,MAAM;IAExBc,MAAMC,KAAK,CAACd,wBAAwBe,IAAI,CAAC,MAAMZ;IAC/CU,MAAMC,KAAK,CAAC,SAACV;QACXP,QAAQM,MAAM;YAAEa,aAAa;QAAK,GAAG,SAACV;YACpCA,OAAOA,IAAIW,IAAI,KAAK,WAAWb,SAASE,OAAOF;QACjD;IACF;IACAS,MAAMC,KAAK,CAACL,SAASM,IAAI,CAAC,MAAMb,KAAKC;IACrCU,MAAMK,KAAK,CAACd;AACd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["endsWithFn.js"],"sourcesContent":["const isArray = require('isarray');\nconst endsWith = require('end-with');\n\nmodule.exports = function endsWithFn(endings) {\n if (!isArray(endings)) endings = [endings];\n return (string) => {\n for (let index = 0; index < endings.length; index++) {\n if (endsWith(string, endings[index])) return true;\n }\n return false;\n };\n};\n"],"names":["isArray","require","endsWith","module","exports","endsWithFn","endings","string","index","length"],"mappings":";AAAA,IAAMA,UAAUC,QAAQ;AACxB,IAAMC,WAAWD,QAAQ;AAEzBE,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO;IAC1C,IAAI,CAACN,QAAQM,UAAUA,UAAU;QAACA;KAAQ;IAC1C,OAAO,SAACC;QACN,IAAK,IAAIC,QAAQ,GAAGA,QAAQF,QAAQG,MAAM,EAAED,QAAS;YACnD,IAAIN,SAASK,QAAQD,OAAO,CAACE,MAAM,GAAG,OAAO;QAC/C;QACA,OAAO;IACT;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/endsWithFn.js"],"sourcesContent":["const isArray = require('isarray');\nconst endsWith = require('end-with');\n\nmodule.exports = function endsWithFn(endings) {\n if (!isArray(endings)) endings = [endings];\n return (string) => {\n for (let index = 0; index < endings.length; index++) {\n if (endsWith(string, endings[index])) return true;\n }\n return false;\n };\n};\n"],"names":["isArray","require","endsWith","module","exports","endsWithFn","endings","string","index","length"],"mappings":";AAAA,IAAMA,UAAUC,QAAQ;AACxB,IAAMC,WAAWD,QAAQ;AAEzBE,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO;IAC1C,IAAI,CAACN,QAAQM,UAAUA,UAAU;QAACA;KAAQ;IAC1C,OAAO,SAACC;QACN,IAAK,IAAIC,QAAQ,GAAGA,QAAQF,QAAQG,MAAM,EAAED,QAAS;YACnD,IAAIN,SAASK,QAAQD,OAAO,CAACE,MAAM,GAAG,OAAO;QAC/C;QACA,OAAO;IACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ensureDestinationParent.js"],"sourcesContent":["const path = require('path');\nconst mkdirp = require('mkdirp-classic');\n\nmodule.exports = function ensureDestinationParent(dest, callback) {\n const parent = path.dirname(dest);\n if (parent === '.' || parent === '/') return callback();\n mkdirp(parent, (err) => {\n callback(err);\n });\n};\n"],"names":["path","require","mkdirp","module","exports","ensureDestinationParent","dest","callback","parent","dirname","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvBE,OAAOC,OAAO,GAAG,SAASC,wBAAwBC,IAAI,EAAEC,QAAQ;IAC9D,IAAMC,SAASR,KAAKS,OAAO,CAACH;IAC5B,IAAIE,WAAW,OAAOA,WAAW,KAAK,OAAOD;IAC7CL,OAAOM,QAAQ,SAACE;QACdH,SAASG;IACX;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/ensureDestinationParent.js"],"sourcesContent":["const path = require('path');\nconst mkdirp = require('mkdirp-classic');\n\nmodule.exports = function ensureDestinationParent(dest, callback) {\n const parent = path.dirname(dest);\n if (parent === '.' || parent === '/') return callback();\n mkdirp(parent, (err) => {\n callback(err);\n });\n};\n"],"names":["path","require","mkdirp","module","exports","ensureDestinationParent","dest","callback","parent","dirname","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvBE,OAAOC,OAAO,GAAG,SAASC,wBAAwBC,IAAI,EAAEC,QAAQ;IAC9D,IAAMC,SAASR,KAAKS,OAAO,CAACH;IAC5B,IAAIE,WAAW,OAAOA,WAAW,KAAK,OAAOD;IAC7CL,OAAOM,QAAQ,SAACE;QACdH,SAASG;IACX;AACF"}
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
2
1
  "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
3
  value: true
@@ -9,7 +8,6 @@ Object.defineProperty(exports, "default", {
9
8
  return installRelease;
10
9
  }
11
10
  });
12
- var _pinkiepromise = /*#__PURE__*/ _interop_require_default(require("pinkie-promise"));
13
11
  require("./polyfills.js");
14
12
  var _install = /*#__PURE__*/ _interop_require_default(require("./install"));
15
13
  function _interop_require_default(obj) {
@@ -24,7 +22,7 @@ function installRelease(versionDetails, dest, options, callback) {
24
22
  }
25
23
  options = options || {};
26
24
  if (typeof callback === 'function') return (0, _install.default)(versionDetails, dest, options, callback);
27
- return new _pinkiepromise.default(function(resolve, reject) {
25
+ return new Promise(function(resolve, reject) {
28
26
  installRelease(versionDetails, dest, options, function installCallback(err, result) {
29
27
  err ? reject(err) : resolve(result);
30
28
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["index.mjs"],"sourcesContent":["// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>\nimport Promise from 'pinkie-promise';\nimport './polyfills.cjs';\nimport install from './install';\n\nexport default function installRelease(versionDetails, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n if (typeof callback === 'function') return install(versionDetails, dest, options, callback);\n return new Promise((resolve, reject) => {\n installRelease(versionDetails, dest, options, function installCallback(err, result) {\n err ? reject(err) : resolve(result);\n });\n });\n}\n"],"names":["installRelease","versionDetails","dest","options","callback","install","Promise","resolve","reject","installCallback","err","result"],"mappings":"AAAA,sEAAsE;;;;;+BAKtE;;;eAAwBA;;;oEAJJ;QACb;8DACa;;;;;;AAEL,SAASA,eAAeC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC5E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,gBAAO,EAACJ,gBAAgBC,MAAMC,SAASC;IAClF,OAAO,IAAIE,sBAAO,CAAC,SAACC,SAASC;QAC3BR,eAAeC,gBAAgBC,MAAMC,SAAS,SAASM,gBAAgBC,GAAG,EAAEC,MAAM;YAChFD,MAAMF,OAAOE,OAAOH,QAAQI;QAC9B;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/index.mjs"],"sourcesContent":["import './polyfills.cjs';\nimport install from './install';\n\nexport default function installRelease(versionDetails, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n if (typeof callback === 'function') return install(versionDetails, dest, options, callback);\n return new Promise((resolve, reject) => {\n installRelease(versionDetails, dest, options, function installCallback(err, result) {\n err ? reject(err) : resolve(result);\n });\n });\n}\n"],"names":["installRelease","versionDetails","dest","options","callback","install","Promise","resolve","reject","installCallback","err","result"],"mappings":";;;;+BAGA;;;eAAwBA;;;QAHjB;8DACa;;;;;;AAEL,SAASA,eAAeC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC5E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,gBAAO,EAACJ,gBAAgBC,MAAMC,SAASC;IAClF,OAAO,IAAIE,QAAQ,SAACC,SAASC;QAC3BR,eAAeC,gBAAgBC,MAAMC,SAAS,SAASM,gBAAgBC,GAAG,EAAEC,MAAM;YAChFD,MAAMF,OAAOE,OAAOH,QAAQI;QAC9B;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["install.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst mkdirp = require('mkdirp-classic');\n\nconst resolveVersions = require('node-resolve-versions');\n\nconst installVersion = require('./installVersion');\n\nconst NIR_DIR = path.join(require('homedir-polyfill')(), '.nir');\nconst DEFAULT_OPTIONS = {\n cacheDirectory: path.join(NIR_DIR, 'cache'),\n buildDirectory: path.join(NIR_DIR, 'build'),\n downloadURL: function downloadURL(relativePath) {\n return `https://nodejs.org/dist/${relativePath}`;\n },\n};\n\nmodule.exports = function install(versionDetails, dest, options, callback) {\n options = { ...DEFAULT_OPTIONS, ...options, path: 'raw' };\n resolveVersions(versionDetails, options, (err, versions) => {\n if (err) return callback(err);\n if (!versions.length) return callback(new Error(`Could not resolve versions for: ${JSON.stringify(versionDetails)}`));\n\n const results = [];\n const queue = new Queue(1);\n queue.defer((callback) => {\n mkdirp(options.cacheDirectory, callback.bind(null, null));\n });\n for (let index = 0; index < versions.length; index++) {\n ((version) => {\n queue.defer((callback) => {\n const installDirectory = dest && versions.length > 1 ? path.join(dest, version.version) : dest;\n installVersion(version, installDirectory, options, (err, fullPath) => {\n if (err) return callback(err);\n results.push({ version: version.version, error: err, fullPath: fullPath });\n callback();\n });\n });\n })(versions[index]);\n }\n queue.await((err) => {\n err ? callback(err) : callback(null, results);\n });\n });\n};\n"],"names":["path","require","Queue","mkdirp","resolveVersions","installVersion","NIR_DIR","join","DEFAULT_OPTIONS","cacheDirectory","buildDirectory","downloadURL","relativePath","module","exports","install","versionDetails","dest","options","callback","err","versions","length","Error","JSON","stringify","results","queue","defer","bind","index","version","installDirectory","fullPath","push","error","await"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,kBAAkBH,QAAQ;AAEhC,IAAMI,iBAAiBJ,QAAQ;AAE/B,IAAMK,UAAUN,KAAKO,IAAI,CAACN,QAAQ,uBAAuB;AACzD,IAAMO,kBAAkB;IACtBC,gBAAgBT,KAAKO,IAAI,CAACD,SAAS;IACnCI,gBAAgBV,KAAKO,IAAI,CAACD,SAAS;IACnCK,aAAa,SAASA,YAAYC,YAAY;QAC5C,OAAO,AAAC,2BAAuC,OAAbA;IACpC;AACF;AAEAC,OAAOC,OAAO,GAAG,SAASC,QAAQC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvED,UAAU,wCAAKV,iBAAoBU;QAASlB,MAAM;;IAClDI,gBAAgBY,gBAAgBE,SAAS,SAACE,KAAKC;QAC7C,IAAID,KAAK,OAAOD,SAASC;QACzB,IAAI,CAACC,SAASC,MAAM,EAAE,OAAOH,SAAS,IAAII,MAAM,AAAC,mCAAiE,OAA/BC,KAAKC,SAAS,CAACT;QAElG,IAAMU,UAAU,EAAE;QAClB,IAAMC,QAAQ,IAAIzB,MAAM;QACxByB,MAAMC,KAAK,CAAC,SAACT;YACXhB,OAAOe,QAAQT,cAAc,EAAEU,SAASU,IAAI,CAAC,MAAM;QACrD;QACA,IAAK,IAAIC,QAAQ,GAAGA,QAAQT,SAASC,MAAM,EAAEQ,QAAS;YACnD,CAAA,SAACC;gBACAJ,MAAMC,KAAK,CAAC,SAACT;oBACX,IAAMa,mBAAmBf,QAAQI,SAASC,MAAM,GAAG,IAAItB,KAAKO,IAAI,CAACU,MAAMc,QAAQA,OAAO,IAAId;oBAC1FZ,eAAe0B,SAASC,kBAAkBd,SAAS,SAACE,KAAKa;wBACvD,IAAIb,KAAK,OAAOD,SAASC;wBACzBM,QAAQQ,IAAI,CAAC;4BAAEH,SAASA,QAAQA,OAAO;4BAAEI,OAAOf;4BAAKa,UAAUA;wBAAS;wBACxEd;oBACF;gBACF;YACF,CAAA,EAAGE,QAAQ,CAACS,MAAM;QACpB;QACAH,MAAMS,KAAK,CAAC,SAAChB;YACXA,MAAMD,SAASC,OAAOD,SAAS,MAAMO;QACvC;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/install.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst mkdirp = require('mkdirp-classic');\n\nconst resolveVersions = require('node-resolve-versions');\n\nconst installVersion = require('./installVersion');\n\nconst NIR_DIR = path.join(require('homedir-polyfill')(), '.nir');\nconst DEFAULT_OPTIONS = {\n cacheDirectory: path.join(NIR_DIR, 'cache'),\n buildDirectory: path.join(NIR_DIR, 'build'),\n downloadURL: function downloadURL(relativePath) {\n return `https://nodejs.org/dist/${relativePath}`;\n },\n};\n\nmodule.exports = function install(versionDetails, dest, options, callback) {\n options = { ...DEFAULT_OPTIONS, ...options, path: 'raw' };\n resolveVersions(versionDetails, options, (err, versions) => {\n if (err) return callback(err);\n if (!versions.length) return callback(new Error(`Could not resolve versions for: ${JSON.stringify(versionDetails)}`));\n\n const results = [];\n const queue = new Queue(1);\n queue.defer((callback) => {\n mkdirp(options.cacheDirectory, callback.bind(null, null));\n });\n for (let index = 0; index < versions.length; index++) {\n ((version) => {\n queue.defer((callback) => {\n const installDirectory = dest && versions.length > 1 ? path.join(dest, version.version) : dest;\n installVersion(version, installDirectory, options, (err, fullPath) => {\n if (err) return callback(err);\n results.push({ version: version.version, error: err, fullPath: fullPath });\n callback();\n });\n });\n })(versions[index]);\n }\n queue.await((err) => {\n err ? callback(err) : callback(null, results);\n });\n });\n};\n"],"names":["path","require","Queue","mkdirp","resolveVersions","installVersion","NIR_DIR","join","DEFAULT_OPTIONS","cacheDirectory","buildDirectory","downloadURL","relativePath","module","exports","install","versionDetails","dest","options","callback","err","versions","length","Error","JSON","stringify","results","queue","defer","bind","index","version","installDirectory","fullPath","push","error","await"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,kBAAkBH,QAAQ;AAEhC,IAAMI,iBAAiBJ,QAAQ;AAE/B,IAAMK,UAAUN,KAAKO,IAAI,CAACN,QAAQ,uBAAuB;AACzD,IAAMO,kBAAkB;IACtBC,gBAAgBT,KAAKO,IAAI,CAACD,SAAS;IACnCI,gBAAgBV,KAAKO,IAAI,CAACD,SAAS;IACnCK,aAAa,SAASA,YAAYC,YAAY;QAC5C,OAAO,AAAC,2BAAuC,OAAbA;IACpC;AACF;AAEAC,OAAOC,OAAO,GAAG,SAASC,QAAQC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvED,UAAU,wCAAKV,iBAAoBU;QAASlB,MAAM;;IAClDI,gBAAgBY,gBAAgBE,SAAS,SAACE,KAAKC;QAC7C,IAAID,KAAK,OAAOD,SAASC;QACzB,IAAI,CAACC,SAASC,MAAM,EAAE,OAAOH,SAAS,IAAII,MAAM,AAAC,mCAAiE,OAA/BC,KAAKC,SAAS,CAACT;QAElG,IAAMU,UAAU,EAAE;QAClB,IAAMC,QAAQ,IAAIzB,MAAM;QACxByB,MAAMC,KAAK,CAAC,SAACT;YACXhB,OAAOe,QAAQT,cAAc,EAAEU,SAASU,IAAI,CAAC,MAAM;QACrD;QACA,IAAK,IAAIC,QAAQ,GAAGA,QAAQT,SAASC,MAAM,EAAEQ,QAAS;YACnD,CAAA,SAACC;gBACAJ,MAAMC,KAAK,CAAC,SAACT;oBACX,IAAMa,mBAAmBf,QAAQI,SAASC,MAAM,GAAG,IAAItB,KAAKO,IAAI,CAACU,MAAMc,QAAQA,OAAO,IAAId;oBAC1FZ,eAAe0B,SAASC,kBAAkBd,SAAS,SAACE,KAAKa;wBACvD,IAAIb,KAAK,OAAOD,SAASC;wBACzBM,QAAQQ,IAAI,CAAC;4BAAEH,SAASA,QAAQA,OAAO;4BAAEI,OAAOf;4BAAKa,UAAUA;wBAAS;wBACxEd;oBACF;gBACF;YACF,CAAA,EAAGE,QAAQ,CAACS,MAAM;QACpB;QACAH,MAAMS,KAAK,CAAC,SAAChB;YACXA,MAAMD,SAASC,OAAOD,SAAS,MAAMO;QACvC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["const installBin = require('./installBin');\nconst installLib = require('./installLib');\n\nmodule.exports = function install(version, dest, options, callback) {\n installLib(version, dest, options, (err) => {\n if (err) return callback(err);\n installBin(version, dest, options, callback);\n });\n};\n"],"names":["installBin","require","installLib","module","exports","install","version","dest","options","callback","err"],"mappings":";AAAA,IAAMA,aAAaC,QAAQ;AAC3B,IAAMC,aAAaD,QAAQ;AAE3BE,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChEP,WAAWI,SAASC,MAAMC,SAAS,SAACE;QAClC,IAAIA,KAAK,OAAOD,SAASC;QACzBV,WAAWM,SAASC,MAAMC,SAASC;IACrC;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/index.js"],"sourcesContent":["const installBin = require('./installBin');\nconst installLib = require('./installLib');\n\nmodule.exports = function install(version, dest, options, callback) {\n installLib(version, dest, options, (err) => {\n if (err) return callback(err);\n installBin(version, dest, options, callback);\n });\n};\n"],"names":["installBin","require","installLib","module","exports","install","version","dest","options","callback","err"],"mappings":";AAAA,IAAMA,aAAaC,QAAQ;AAC3B,IAAMC,aAAaD,QAAQ;AAE3BE,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChEP,WAAWI,SAASC,MAAMC,SAAS,SAACE;QAClC,IAAIA,KAAK,OAAOD,SAASC;QACzBV,WAAWM,SAASC,MAAMC,SAASC;IACrC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["installBin.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst conditionalCopy = require('../conditionalCopy');\n\nconst PLATFORM_FILES = {\n win32: [\n { src: path.join('node_modules', 'npm', 'bin', 'npm'), dest: 'npm' },\n { src: path.join('node_modules', 'npm', 'bin', 'npm.cmd'), dest: 'npm.cmd' },\n { src: path.join('node_modules', 'npm', 'bin', 'npx'), dest: 'npx', optional: true },\n { src: path.join('node_modules', 'npm', 'bin', 'npx.cmd'), dest: 'npx.cmd', optional: true },\n ],\n posix: [\n { src: path.join('node_modules', 'npm', 'bin', 'npm-cli.js'), dest: 'npm' },\n { src: path.join('node_modules', 'npm', 'bin', 'npx-cli.js'), dest: 'npx', optional: true },\n ],\n};\n\nmodule.exports = function installBin(_version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const binPath = platform === 'win32' ? dest : path.join(dest, 'bin');\n\n const queue = new Queue();\n const files = PLATFORM_FILES[platform] || PLATFORM_FILES.posix;\n for (let index = 0; index < files.length; index++) {\n const file = files[index];\n queue.defer(conditionalCopy.bind(null, path.join(libPath, file.src), path.join(binPath, file.dest), file.optional));\n }\n\n queue.await(callback);\n};\n"],"names":["path","require","Queue","conditionalCopy","PLATFORM_FILES","win32","src","join","dest","optional","posix","module","exports","installBin","_version","options","callback","platform","process","libPath","binPath","queue","files","index","length","file","defer","bind","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,kBAAkBF,QAAQ;AAEhC,IAAMG,iBAAiB;IACrBC,OAAO;QACL;YAAEC,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAQC,MAAM;QAAM;QACnE;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAYC,MAAM;QAAU;QAC3E;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAQC,MAAM;YAAOC,UAAU;QAAK;QACnF;YAAEH,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAYC,MAAM;YAAWC,UAAU;QAAK;KAC5F;IACDC,OAAO;QACL;YAAEJ,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAeC,MAAM;QAAM;QAC1E;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAeC,MAAM;YAAOC,UAAU;QAAK;KAC3F;AACH;AAEAE,OAAOC,OAAO,GAAG,SAASC,WAAWC,QAAQ,EAAEN,IAAI,EAAEO,OAAO,EAAEC,QAAQ;IACpE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUT,OAAOR,KAAKO,IAAI,CAACC,MAAM;IAC9D,IAAMY,UAAUH,aAAa,UAAUT,OAAOR,KAAKO,IAAI,CAACC,MAAM;IAE9D,IAAMa,QAAQ,IAAInB;IAClB,IAAMoB,QAAQlB,cAAc,CAACa,SAAS,IAAIb,eAAeM,KAAK;IAC9D,IAAK,IAAIa,QAAQ,GAAGA,QAAQD,MAAME,MAAM,EAAED,QAAS;QACjD,IAAME,OAAOH,KAAK,CAACC,MAAM;QACzBF,MAAMK,KAAK,CAACvB,gBAAgBwB,IAAI,CAAC,MAAM3B,KAAKO,IAAI,CAACY,SAASM,KAAKnB,GAAG,GAAGN,KAAKO,IAAI,CAACa,SAASK,KAAKjB,IAAI,GAAGiB,KAAKhB,QAAQ;IACnH;IAEAY,MAAMO,KAAK,CAACZ;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installBin.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst conditionalCopy = require('../conditionalCopy');\n\nconst PLATFORM_FILES = {\n win32: [\n { src: path.join('node_modules', 'npm', 'bin', 'npm'), dest: 'npm' },\n { src: path.join('node_modules', 'npm', 'bin', 'npm.cmd'), dest: 'npm.cmd' },\n { src: path.join('node_modules', 'npm', 'bin', 'npx'), dest: 'npx', optional: true },\n { src: path.join('node_modules', 'npm', 'bin', 'npx.cmd'), dest: 'npx.cmd', optional: true },\n ],\n posix: [\n { src: path.join('node_modules', 'npm', 'bin', 'npm-cli.js'), dest: 'npm' },\n { src: path.join('node_modules', 'npm', 'bin', 'npx-cli.js'), dest: 'npx', optional: true },\n ],\n};\n\nmodule.exports = function installBin(_version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const binPath = platform === 'win32' ? dest : path.join(dest, 'bin');\n\n const queue = new Queue();\n const files = PLATFORM_FILES[platform] || PLATFORM_FILES.posix;\n for (let index = 0; index < files.length; index++) {\n const file = files[index];\n queue.defer(conditionalCopy.bind(null, path.join(libPath, file.src), path.join(binPath, file.dest), file.optional));\n }\n\n queue.await(callback);\n};\n"],"names":["path","require","Queue","conditionalCopy","PLATFORM_FILES","win32","src","join","dest","optional","posix","module","exports","installBin","_version","options","callback","platform","process","libPath","binPath","queue","files","index","length","file","defer","bind","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,kBAAkBF,QAAQ;AAEhC,IAAMG,iBAAiB;IACrBC,OAAO;QACL;YAAEC,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAQC,MAAM;QAAM;QACnE;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAYC,MAAM;QAAU;QAC3E;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAQC,MAAM;YAAOC,UAAU;QAAK;QACnF;YAAEH,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAYC,MAAM;YAAWC,UAAU;QAAK;KAC5F;IACDC,OAAO;QACL;YAAEJ,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAeC,MAAM;QAAM;QAC1E;YAAEF,KAAKN,KAAKO,IAAI,CAAC,gBAAgB,OAAO,OAAO;YAAeC,MAAM;YAAOC,UAAU;QAAK;KAC3F;AACH;AAEAE,OAAOC,OAAO,GAAG,SAASC,WAAWC,QAAQ,EAAEN,IAAI,EAAEO,OAAO,EAAEC,QAAQ;IACpE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUT,OAAOR,KAAKO,IAAI,CAACC,MAAM;IAC9D,IAAMY,UAAUH,aAAa,UAAUT,OAAOR,KAAKO,IAAI,CAACC,MAAM;IAE9D,IAAMa,QAAQ,IAAInB;IAClB,IAAMoB,QAAQlB,cAAc,CAACa,SAAS,IAAIb,eAAeM,KAAK;IAC9D,IAAK,IAAIa,QAAQ,GAAGA,QAAQD,MAAME,MAAM,EAAED,QAAS;QACjD,IAAME,OAAOH,KAAK,CAACC,MAAM;QACzBF,MAAMK,KAAK,CAACvB,gBAAgBwB,IAAI,CAAC,MAAM3B,KAAKO,IAAI,CAACY,SAASM,KAAKnB,GAAG,GAAGN,KAAKO,IAAI,CAACa,SAASK,KAAKjB,IAAI,GAAGiB,KAAKhB,QAAQ;IACnH;IAEAY,MAAMO,KAAK,CAACZ;AACd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["installLib.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\n\nconst NODE_DIST_URL = 'https://nodejs.org/dist/index.json';\nconst NPM_DIST_TAGS_URL = 'https://registry.npmjs.org/-/package/npm/dist-tags';\nconst NPM_DIST_URL = 'https://registry.npmjs.org/npm';\nconst NPM_MIN_VERSION = 3;\n\nmodule.exports = function installLib(version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n\n get(NODE_DIST_URL).json((err, res1) => {\n if (err) return callback(err);\n const releases = res1.body;\n\n const found = releases.find((record) => record.version === version.version);\n const npmMajorPair = found && found.npm ? +found.npm.split('.')[0] : NPM_MIN_VERSION;\n const npmMajor = Math.max(npmMajorPair, NPM_MIN_VERSION);\n\n get(NPM_DIST_TAGS_URL).json((err, res2) => {\n if (err) return callback(err);\n const distTags = res2.body;\n const installVersion = distTags[`latest-${npmMajor}`] || distTags[`next-${npmMajor}`] || distTags.latest;\n const downloadPath = `${NPM_DIST_URL}/-/npm-${installVersion}.tgz`;\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n conditionalExtract(cachePath, installPath, callback);\n });\n });\n });\n};\n"],"names":["path","require","get","conditionalCache","conditionalExtract","NODE_DIST_URL","NPM_DIST_TAGS_URL","NPM_DIST_URL","NPM_MIN_VERSION","module","exports","installLib","version","dest","options","callback","platform","process","libPath","join","installPath","json","err","res1","releases","body","found","find","record","npmMajorPair","npm","split","npmMajor","Math","max","res2","distTags","installVersion","latest","downloadPath","cachePath","cacheDirectory","basename"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AAEpB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AAEnC,IAAMI,gBAAgB;AACtB,IAAMC,oBAAoB;AAC1B,IAAMC,eAAe;AACrB,IAAMC,kBAAkB;AAExBC,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACnE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUH,OAAOb,KAAKmB,IAAI,CAACN,MAAM;IAC9D,IAAMO,cAAcpB,KAAKmB,IAAI,CAACD,SAAS,gBAAgB;IAEvDhB,IAAIG,eAAegB,IAAI,CAAC,SAACC,KAAKC;QAC5B,IAAID,KAAK,OAAOP,SAASO;QACzB,IAAME,WAAWD,KAAKE,IAAI;QAE1B,IAAMC,QAAQF,SAASG,IAAI,CAAC,SAACC;mBAAWA,OAAOhB,OAAO,KAAKA,QAAQA,OAAO;;QAC1E,IAAMiB,eAAeH,SAASA,MAAMI,GAAG,GAAG,CAACJ,MAAMI,GAAG,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAGvB;QACrE,IAAMwB,WAAWC,KAAKC,GAAG,CAACL,cAAcrB;QAExCN,IAAII,mBAAmBe,IAAI,CAAC,SAACC,KAAKa;YAChC,IAAIb,KAAK,OAAOP,SAASO;YACzB,IAAMc,WAAWD,KAAKV,IAAI;YAC1B,IAAMY,iBAAiBD,QAAQ,CAAC,AAAC,UAAkB,OAATJ,UAAW,IAAII,QAAQ,CAAC,AAAC,QAAgB,OAATJ,UAAW,IAAII,SAASE,MAAM;YACxG,IAAMC,eAAe,AAAC,GAAwBF,OAAtB9B,cAAa,WAAwB,OAAf8B,gBAAe;YAC7D,IAAMG,YAAYxC,KAAKmB,IAAI,CAACL,QAAQ2B,cAAc,EAAEzC,KAAK0C,QAAQ,CAACH;YAClEpC,iBAAiBoC,cAAcC,WAAW,SAAClB;gBACzC,IAAIA,KAAK,OAAOP,SAASO;gBACzBlB,mBAAmBoC,WAAWpB,aAAaL;YAC7C;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installLib.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\n\nconst NODE_DIST_URL = 'https://nodejs.org/dist/index.json';\nconst NPM_DIST_TAGS_URL = 'https://registry.npmjs.org/-/package/npm/dist-tags';\nconst NPM_DIST_URL = 'https://registry.npmjs.org/npm';\nconst NPM_MIN_VERSION = 3;\n\nmodule.exports = function installLib(version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n\n get(NODE_DIST_URL).json((err, res1) => {\n if (err) return callback(err);\n const releases = res1.body;\n\n const found = releases.find((record) => record.version === version.version);\n const npmMajorPair = found && found.npm ? +found.npm.split('.')[0] : NPM_MIN_VERSION;\n const npmMajor = Math.max(npmMajorPair, NPM_MIN_VERSION);\n\n get(NPM_DIST_TAGS_URL).json((err, res2) => {\n if (err) return callback(err);\n const distTags = res2.body;\n const installVersion = distTags[`latest-${npmMajor}`] || distTags[`next-${npmMajor}`] || distTags.latest;\n const downloadPath = `${NPM_DIST_URL}/-/npm-${installVersion}.tgz`;\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n conditionalExtract(cachePath, installPath, callback);\n });\n });\n });\n};\n"],"names":["path","require","get","conditionalCache","conditionalExtract","NODE_DIST_URL","NPM_DIST_TAGS_URL","NPM_DIST_URL","NPM_MIN_VERSION","module","exports","installLib","version","dest","options","callback","platform","process","libPath","join","installPath","json","err","res1","releases","body","found","find","record","npmMajorPair","npm","split","npmMajor","Math","max","res2","distTags","installVersion","latest","downloadPath","cachePath","cacheDirectory","basename"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AAEpB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AAEnC,IAAMI,gBAAgB;AACtB,IAAMC,oBAAoB;AAC1B,IAAMC,eAAe;AACrB,IAAMC,kBAAkB;AAExBC,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACnE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUH,OAAOb,KAAKmB,IAAI,CAACN,MAAM;IAC9D,IAAMO,cAAcpB,KAAKmB,IAAI,CAACD,SAAS,gBAAgB;IAEvDhB,IAAIG,eAAegB,IAAI,CAAC,SAACC,KAAKC;QAC5B,IAAID,KAAK,OAAOP,SAASO;QACzB,IAAME,WAAWD,KAAKE,IAAI;QAE1B,IAAMC,QAAQF,SAASG,IAAI,CAAC,SAACC;mBAAWA,OAAOhB,OAAO,KAAKA,QAAQA,OAAO;;QAC1E,IAAMiB,eAAeH,SAASA,MAAMI,GAAG,GAAG,CAACJ,MAAMI,GAAG,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAGvB;QACrE,IAAMwB,WAAWC,KAAKC,GAAG,CAACL,cAAcrB;QAExCN,IAAII,mBAAmBe,IAAI,CAAC,SAACC,KAAKa;YAChC,IAAIb,KAAK,OAAOP,SAASO;YACzB,IAAMc,WAAWD,KAAKV,IAAI;YAC1B,IAAMY,iBAAiBD,QAAQ,CAAC,AAAC,UAAkB,OAATJ,UAAW,IAAII,QAAQ,CAAC,AAAC,QAAgB,OAATJ,UAAW,IAAII,SAASE,MAAM;YACxG,IAAMC,eAAe,AAAC,GAAwBF,OAAtB9B,cAAa,WAAwB,OAAf8B,gBAAe;YAC7D,IAAMG,YAAYxC,KAAKmB,IAAI,CAACL,QAAQ2B,cAAc,EAAEzC,KAAK0C,QAAQ,CAACH;YAClEpC,iBAAiBoC,cAAcC,WAAW,SAAClB;gBACzC,IAAIA,KAAK,OAAOP,SAASO;gBACzBlB,mBAAmBoC,WAAWpB,aAAaL;YAC7C;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["filenames.js"],"sourcesContent":["const osArch = require('os').arch || require('../arch');\n\nconst PLATFORM_OS = {\n win32: 'win',\n darwin: 'osx',\n};\n\nconst PLATFORM_FILES = {\n win32: ['zip', 'exe'],\n darwin: ['tar'],\n};\n\nmodule.exports = function prebuiltFilenames(options) {\n const platform = options.platform || process.platform;\n const os = PLATFORM_OS[platform] || platform;\n const archs = [options.arch || osArch()];\n if (platform === 'darwin' && archs[0] === 'arm64') archs.push('x64'); // fallback\n\n const files = PLATFORM_FILES[platform];\n const results = [];\n for (let i = 0; i < archs.length; i++) {\n if (typeof files === 'undefined') {\n results.push(`${os}-${archs[i]}`);\n } else {\n for (let j = 0; j < files.length; j++) {\n results.push(`${os}-${archs[i]}-${files[j]}`);\n }\n }\n }\n return results;\n};\n"],"names":["osArch","require","arch","PLATFORM_OS","win32","darwin","PLATFORM_FILES","module","exports","prebuiltFilenames","options","platform","process","os","archs","push","files","results","i","length","j"],"mappings":";AAAA,IAAMA,SAASC,QAAQ,MAAMC,IAAI,IAAID,QAAQ;AAE7C,IAAME,cAAc;IAClBC,OAAO;IACPC,QAAQ;AACV;AAEA,IAAMC,iBAAiB;IACrBF,OAAO;QAAC;QAAO;KAAM;IACrBC,QAAQ;QAAC;KAAM;AACjB;AAEAE,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,OAAO;IACjD,IAAMC,WAAWD,QAAQC,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,KAAKV,WAAW,CAACQ,SAAS,IAAIA;IACpC,IAAMG,QAAQ;QAACJ,QAAQR,IAAI,IAAIF;KAAS;IACxC,IAAIW,aAAa,YAAYG,KAAK,CAAC,EAAE,KAAK,SAASA,MAAMC,IAAI,CAAC,QAAQ,WAAW;IAEjF,IAAMC,QAAQV,cAAc,CAACK,SAAS;IACtC,IAAMM,UAAU,EAAE;IAClB,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,MAAMK,MAAM,EAAED,IAAK;QACrC,IAAI,OAAOF,UAAU,aAAa;YAChCC,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAY,OAATC,KAAK,CAACI,EAAE;QAChC,OAAO;YACL,IAAK,IAAIE,IAAI,GAAGA,IAAIJ,MAAMG,MAAM,EAAEC,IAAK;gBACrCH,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAeG,OAAZF,KAAK,CAACI,EAAE,EAAC,KAAY,OAATF,KAAK,CAACI,EAAE;YAC5C;QACF;IACF;IACA,OAAOH;AACT"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/filenames.js"],"sourcesContent":["const osArch = require('os').arch || require('../arch');\n\nconst PLATFORM_OS = {\n win32: 'win',\n darwin: 'osx',\n};\n\nconst PLATFORM_FILES = {\n win32: ['zip', 'exe'],\n darwin: ['tar'],\n};\n\nmodule.exports = function prebuiltFilenames(options) {\n const platform = options.platform || process.platform;\n const os = PLATFORM_OS[platform] || platform;\n const archs = [options.arch || osArch()];\n if (platform === 'darwin' && archs[0] === 'arm64') archs.push('x64'); // fallback\n\n const files = PLATFORM_FILES[platform];\n const results = [];\n for (let i = 0; i < archs.length; i++) {\n if (typeof files === 'undefined') {\n results.push(`${os}-${archs[i]}`);\n } else {\n for (let j = 0; j < files.length; j++) {\n results.push(`${os}-${archs[i]}-${files[j]}`);\n }\n }\n }\n return results;\n};\n"],"names":["osArch","require","arch","PLATFORM_OS","win32","darwin","PLATFORM_FILES","module","exports","prebuiltFilenames","options","platform","process","os","archs","push","files","results","i","length","j"],"mappings":";AAAA,IAAMA,SAASC,QAAQ,MAAMC,IAAI,IAAID,QAAQ;AAE7C,IAAME,cAAc;IAClBC,OAAO;IACPC,QAAQ;AACV;AAEA,IAAMC,iBAAiB;IACrBF,OAAO;QAAC;QAAO;KAAM;IACrBC,QAAQ;QAAC;KAAM;AACjB;AAEAE,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,OAAO;IACjD,IAAMC,WAAWD,QAAQC,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,KAAKV,WAAW,CAACQ,SAAS,IAAIA;IACpC,IAAMG,QAAQ;QAACJ,QAAQR,IAAI,IAAIF;KAAS;IACxC,IAAIW,aAAa,YAAYG,KAAK,CAAC,EAAE,KAAK,SAASA,MAAMC,IAAI,CAAC,QAAQ,WAAW;IAEjF,IAAMC,QAAQV,cAAc,CAACK,SAAS;IACtC,IAAMM,UAAU,EAAE;IAClB,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,MAAMK,MAAM,EAAED,IAAK;QACrC,IAAI,OAAOF,UAAU,aAAa;YAChCC,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAY,OAATC,KAAK,CAACI,EAAE;QAChC,OAAO;YACL,IAAK,IAAIE,IAAI,GAAGA,IAAIJ,MAAMG,MAAM,EAAEC,IAAK;gBACrCH,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAeG,OAAZF,KAAK,CAACI,EAAE,EAAC,KAAY,OAATF,KAAK,CAACI,EAAE;YAC5C;QACF;IACF;IACA,OAAOH;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["findDistPaths.js"],"sourcesContent":["const distPaths = require('node-filename-to-dist-paths');\nconst prebuiltFilenames = require('./filenames');\n\nmodule.exports = function findDistPaths(version, options) {\n const filenames = options.filename ? [options.filename] : prebuiltFilenames(options);\n for (let index = 0; index < filenames.length; index++) {\n const filename = filenames[index];\n if (!~version.files.indexOf(filename)) continue;\n const relativePaths = distPaths(filename, version.version);\n if (relativePaths && relativePaths.length) return { version: version.version, filename: filename, relativePaths: relativePaths };\n }\n return null;\n};\n"],"names":["distPaths","require","prebuiltFilenames","module","exports","findDistPaths","version","options","filenames","filename","index","length","files","indexOf","relativePaths"],"mappings":";AAAA,IAAMA,YAAYC,QAAQ;AAC1B,IAAMC,oBAAoBD,QAAQ;AAElCE,OAAOC,OAAO,GAAG,SAASC,cAAcC,OAAO,EAAEC,OAAO;IACtD,IAAMC,YAAYD,QAAQE,QAAQ,GAAG;QAACF,QAAQE,QAAQ;KAAC,GAAGP,kBAAkBK;IAC5E,IAAK,IAAIG,QAAQ,GAAGA,QAAQF,UAAUG,MAAM,EAAED,QAAS;QACrD,IAAMD,WAAWD,SAAS,CAACE,MAAM;QACjC,IAAI,CAAC,CAACJ,QAAQM,KAAK,CAACC,OAAO,CAACJ,WAAW;QACvC,IAAMK,gBAAgBd,UAAUS,UAAUH,QAAQA,OAAO;QACzD,IAAIQ,iBAAiBA,cAAcH,MAAM,EAAE,OAAO;YAAEL,SAASA,QAAQA,OAAO;YAAEG,UAAUA;YAAUK,eAAeA;QAAc;IACjI;IACA,OAAO;AACT"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/findDistPaths.js"],"sourcesContent":["const distPaths = require('node-filename-to-dist-paths');\nconst prebuiltFilenames = require('./filenames');\n\nmodule.exports = function findDistPaths(version, options) {\n const filenames = options.filename ? [options.filename] : prebuiltFilenames(options);\n for (let index = 0; index < filenames.length; index++) {\n const filename = filenames[index];\n if (!~version.files.indexOf(filename)) continue;\n const relativePaths = distPaths(filename, version.version);\n if (relativePaths && relativePaths.length) return { version: version.version, filename: filename, relativePaths: relativePaths };\n }\n return null;\n};\n"],"names":["distPaths","require","prebuiltFilenames","module","exports","findDistPaths","version","options","filenames","filename","index","length","files","indexOf","relativePaths"],"mappings":";AAAA,IAAMA,YAAYC,QAAQ;AAC1B,IAAMC,oBAAoBD,QAAQ;AAElCE,OAAOC,OAAO,GAAG,SAASC,cAAcC,OAAO,EAAEC,OAAO;IACtD,IAAMC,YAAYD,QAAQE,QAAQ,GAAG;QAACF,QAAQE,QAAQ;KAAC,GAAGP,kBAAkBK;IAC5E,IAAK,IAAIG,QAAQ,GAAGA,QAAQF,UAAUG,MAAM,EAAED,QAAS;QACrD,IAAMD,WAAWD,SAAS,CAACE,MAAM;QACjC,IAAI,CAAC,CAACJ,QAAQM,KAAK,CAACC,OAAO,CAACJ,WAAW;QACvC,IAAMK,gBAAgBd,UAAUS,UAAUH,QAAQA,OAAO;QACzD,IAAIQ,iBAAiBA,cAAcH,MAAM,EAAE,OAAO;YAAEL,SAASA,QAAQA,OAAO;YAAEG,UAAUA;YAAUK,eAAeA;QAAc;IACjI;IACA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["const find = require('lodash.find');\n\nconst endsWithFn = require('../endsWithFn');\nconst findDistPaths = require('./findDistPaths');\nconst installCompressed = require('./installCompressed');\nconst installExe = require('./installExe');\nconst installSource = require('./installSource');\n\nmodule.exports = function install(version, dest, options, callback) {\n let record = findDistPaths(version, options);\n if (record) {\n if (record.filename === 'src') return installSource(record.relativePaths[0], dest, record, options, callback);\n\n let relativePath = find(record.relativePaths, endsWithFn(['.tar.gz', '.zip']));\n if (relativePath) return installCompressed(relativePath, dest, record, options, callback);\n\n relativePath = find(record.relativePaths, endsWithFn('.exe'));\n if (relativePath) return installExe(relativePath, dest, record, options, callback);\n }\n\n record = findDistPaths(version, { filename: 'src' });\n if (record && record.relativePaths.length) return installSource(record.relativePaths[0], dest, record, options, callback);\n callback(new Error(`Unable to install ${version}`));\n};\n"],"names":["find","require","endsWithFn","findDistPaths","installCompressed","installExe","installSource","module","exports","install","version","dest","options","callback","record","filename","relativePaths","relativePath","length","Error"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AAErB,IAAMC,aAAaD,QAAQ;AAC3B,IAAME,gBAAgBF,QAAQ;AAC9B,IAAMG,oBAAoBH,QAAQ;AAClC,IAAMI,aAAaJ,QAAQ;AAC3B,IAAMK,gBAAgBL,QAAQ;AAE9BM,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChE,IAAIC,SAASX,cAAcO,SAASE;IACpC,IAAIE,QAAQ;QACV,IAAIA,OAAOC,QAAQ,KAAK,OAAO,OAAOT,cAAcQ,OAAOE,aAAa,CAAC,EAAE,EAAEL,MAAMG,QAAQF,SAASC;QAEpG,IAAII,eAAejB,KAAKc,OAAOE,aAAa,EAAEd,WAAW;YAAC;YAAW;SAAO;QAC5E,IAAIe,cAAc,OAAOb,kBAAkBa,cAAcN,MAAMG,QAAQF,SAASC;QAEhFI,eAAejB,KAAKc,OAAOE,aAAa,EAAEd,WAAW;QACrD,IAAIe,cAAc,OAAOZ,WAAWY,cAAcN,MAAMG,QAAQF,SAASC;IAC3E;IAEAC,SAASX,cAAcO,SAAS;QAAEK,UAAU;IAAM;IAClD,IAAID,UAAUA,OAAOE,aAAa,CAACE,MAAM,EAAE,OAAOZ,cAAcQ,OAAOE,aAAa,CAAC,EAAE,EAAEL,MAAMG,QAAQF,SAASC;IAChHA,SAAS,IAAIM,MAAM,AAAC,qBAA4B,OAART;AAC1C"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/index.js"],"sourcesContent":["const find = require('lodash.find');\n\nconst endsWithFn = require('../endsWithFn');\nconst findDistPaths = require('./findDistPaths');\nconst installCompressed = require('./installCompressed');\nconst installExe = require('./installExe');\nconst installSource = require('./installSource');\n\nmodule.exports = function install(version, dest, options, callback) {\n let record = findDistPaths(version, options);\n if (record) {\n if (record.filename === 'src') return installSource(record.relativePaths[0], dest, record, options, callback);\n\n let relativePath = find(record.relativePaths, endsWithFn(['.tar.gz', '.zip']));\n if (relativePath) return installCompressed(relativePath, dest, record, options, callback);\n\n relativePath = find(record.relativePaths, endsWithFn('.exe'));\n if (relativePath) return installExe(relativePath, dest, record, options, callback);\n }\n\n record = findDistPaths(version, { filename: 'src' });\n if (record && record.relativePaths.length) return installSource(record.relativePaths[0], dest, record, options, callback);\n callback(new Error(`Unable to install ${version}`));\n};\n"],"names":["find","require","endsWithFn","findDistPaths","installCompressed","installExe","installSource","module","exports","install","version","dest","options","callback","record","filename","relativePaths","relativePath","length","Error"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AAErB,IAAMC,aAAaD,QAAQ;AAC3B,IAAME,gBAAgBF,QAAQ;AAC9B,IAAMG,oBAAoBH,QAAQ;AAClC,IAAMI,aAAaJ,QAAQ;AAC3B,IAAMK,gBAAgBL,QAAQ;AAE9BM,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChE,IAAIC,SAASX,cAAcO,SAASE;IACpC,IAAIE,QAAQ;QACV,IAAIA,OAAOC,QAAQ,KAAK,OAAO,OAAOT,cAAcQ,OAAOE,aAAa,CAAC,EAAE,EAAEL,MAAMG,QAAQF,SAASC;QAEpG,IAAII,eAAejB,KAAKc,OAAOE,aAAa,EAAEd,WAAW;YAAC;YAAW;SAAO;QAC5E,IAAIe,cAAc,OAAOb,kBAAkBa,cAAcN,MAAMG,QAAQF,SAASC;QAEhFI,eAAejB,KAAKc,OAAOE,aAAa,EAAEd,WAAW;QACrD,IAAIe,cAAc,OAAOZ,WAAWY,cAAcN,MAAMG,QAAQF,SAASC;IAC3E;IAEAC,SAASX,cAAcO,SAAS;QAAEK,UAAU;IAAM;IAClD,IAAID,UAAUA,OAAOE,aAAa,CAACE,MAAM,EAAE,OAAOZ,cAAcQ,OAAOE,aAAa,CAAC,EAAE,EAAEL,MAAMG,QAAQF,SAASC;IAChHA,SAAS,IAAIM,MAAM,AAAC,qBAA4B,OAART;AAC1C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["installCompressed.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\nconst rimraf2 = require('rimraf2');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\nconst progress = require('../progress');\n\nmodule.exports = function installCompressed(relativePath, dest, _record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n conditionalExtract(cachePath, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n if (err) return callback(err);\n\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => {\n callback(err);\n });\n });\n });\n });\n};\n"],"names":["path","require","access","rimraf2","conditionalCache","conditionalExtract","progress","module","exports","installCompressed","relativePath","dest","_record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","basename","err","strip","time","console","log","platform","process","libPath","installPath","disableGlob"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AACvB,IAAME,UAAUF,QAAQ;AAExB,IAAMG,mBAAmBH,QAAQ;AACjC,IAAMI,qBAAqBJ,QAAQ;AACnC,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACxF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYjB,KAAKkB,IAAI,CAACL,QAAQM,cAAc,EAAEnB,KAAKoB,QAAQ,CAACL;IAElEX,iBAAiBW,cAAcE,WAAW,SAACI;QACzC,IAAIA,KAAK,OAAOP,SAASO;QACzBnB,OAAOS,MAAM,SAACU;YACZ,IAAI,CAACA,KAAK,OAAOP,YAAY,iBAAiB;YAC9CT,mBAAmBY,WAAWN,MAAM;gBAAEW,OAAO;gBAAGhB,UAAUA;gBAAUiB,MAAM;eAASV,UAAW,SAACQ;gBAC7FG,QAAQC,GAAG,CAAC;gBACZ,IAAIJ,KAAK,OAAOP,SAASO;gBAEzB,gHAAgH;gBAChH,IAAMK,WAAWb,QAAQa,QAAQ,IAAIC,QAAQD,QAAQ;gBACrD,IAAME,UAAUF,aAAa,UAAUf,OAAOX,KAAKkB,IAAI,CAACP,MAAM;gBAC9D,IAAMkB,cAAc7B,KAAKkB,IAAI,CAACU,SAAS,gBAAgB;gBACvDzB,QAAQ0B,aAAa;oBAAEC,aAAa;gBAAK,GAAG;oBAC1ChB,SAASO;gBACX;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\nconst rimraf2 = require('rimraf2');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\nconst progress = require('../progress');\n\nmodule.exports = function installCompressed(relativePath, dest, _record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n conditionalExtract(cachePath, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n if (err) return callback(err);\n\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => {\n callback(err);\n });\n });\n });\n });\n};\n"],"names":["path","require","access","rimraf2","conditionalCache","conditionalExtract","progress","module","exports","installCompressed","relativePath","dest","_record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","basename","err","strip","time","console","log","platform","process","libPath","installPath","disableGlob"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AACvB,IAAME,UAAUF,QAAQ;AAExB,IAAMG,mBAAmBH,QAAQ;AACjC,IAAMI,qBAAqBJ,QAAQ;AACnC,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACxF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYjB,KAAKkB,IAAI,CAACL,QAAQM,cAAc,EAAEnB,KAAKoB,QAAQ,CAACL;IAElEX,iBAAiBW,cAAcE,WAAW,SAACI;QACzC,IAAIA,KAAK,OAAOP,SAASO;QACzBnB,OAAOS,MAAM,SAACU;YACZ,IAAI,CAACA,KAAK,OAAOP,YAAY,iBAAiB;YAC9CT,mBAAmBY,WAAWN,MAAM;gBAAEW,OAAO;gBAAGhB,UAAUA;gBAAUiB,MAAM;eAASV,UAAW,SAACQ;gBAC7FG,QAAQC,GAAG,CAAC;gBACZ,IAAIJ,KAAK,OAAOP,SAASO;gBAEzB,gHAAgH;gBAChH,IAAMK,WAAWb,QAAQa,QAAQ,IAAIC,QAAQD,QAAQ;gBACrD,IAAME,UAAUF,aAAa,UAAUf,OAAOX,KAAKkB,IAAI,CAACP,MAAM;gBAC9D,IAAMkB,cAAc7B,KAAKkB,IAAI,CAACU,SAAS,gBAAgB;gBACvDzB,QAAQ0B,aAAa;oBAAEC,aAAa;gBAAK,GAAG;oBAC1ChB,SAASO;gBACX;YACF;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["installExe.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\n\nconst conditionalCache = require('../conditionalCache');\nconst copyFile = require('../copyFile');\n\nmodule.exports = function installExe(relativePath, dest, record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, `node-${record.version}.exe`);\n const destPath = path.join(dest, path.basename(relativePath));\n\n access(destPath, (err) => {\n if (!err) return callback(); // already exists\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n copyFile(cachePath, destPath, callback);\n });\n });\n};\n"],"names":["path","require","access","conditionalCache","copyFile","module","exports","installExe","relativePath","dest","record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","version","destPath","basename","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,WAAWH,QAAQ;AAEzBI,OAAOC,OAAO,GAAG,SAASC,WAAWC,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ;IAChF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYf,KAAKgB,IAAI,CAACL,QAAQM,cAAc,EAAE,AAAC,QAAsB,OAAfP,OAAOQ,OAAO,EAAC;IAC3E,IAAMC,WAAWnB,KAAKgB,IAAI,CAACP,MAAMT,KAAKoB,QAAQ,CAACZ;IAE/CN,OAAOiB,UAAU,SAACE;QAChB,IAAI,CAACA,KAAK,OAAOT,YAAY,iBAAiB;QAC9CT,iBAAiBU,cAAcE,WAAW,SAACM;YACzC,IAAIA,KAAK,OAAOT,SAASS;YACzBjB,SAASW,WAAWI,UAAUP;QAChC;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installExe.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\n\nconst conditionalCache = require('../conditionalCache');\nconst copyFile = require('../copyFile');\n\nmodule.exports = function installExe(relativePath, dest, record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, `node-${record.version}.exe`);\n const destPath = path.join(dest, path.basename(relativePath));\n\n access(destPath, (err) => {\n if (!err) return callback(); // already exists\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n copyFile(cachePath, destPath, callback);\n });\n });\n};\n"],"names":["path","require","access","conditionalCache","copyFile","module","exports","installExe","relativePath","dest","record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","version","destPath","basename","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,WAAWH,QAAQ;AAEzBI,OAAOC,OAAO,GAAG,SAASC,WAAWC,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ;IAChF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYf,KAAKgB,IAAI,CAACL,QAAQM,cAAc,EAAE,AAAC,QAAsB,OAAfP,OAAOQ,OAAO,EAAC;IAC3E,IAAMC,WAAWnB,KAAKgB,IAAI,CAACP,MAAMT,KAAKoB,QAAQ,CAACZ;IAE/CN,OAAOiB,UAAU,SAACE;QAChB,IAAI,CAACA,KAAK,OAAOT,YAAY,iBAAiB;QAC9CT,iBAAiBU,cAAcE,WAAW,SAACM;YACzC,IAAIA,KAAK,OAAOT,SAASS;YACzBjB,SAASW,WAAWI,UAAUP;QAChC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["buildPosix.js"],"sourcesContent":["const path = require('path');\nconst spawn = require('cross-spawn-cb');\nconst Queue = require('queue-cb');\nconst access = require('fs-access-compat');\n\nmodule.exports = function installDefault(buildPath, dest, _options, callback) {\n const buildTarget = path.join(dest, 'node');\n\n access(buildTarget, (err) => {\n if (!err) return callback(); // already exists\n\n const queue = new Queue(1);\n queue.defer((callback) => {\n spawn('./configure', [`--prefix=${dest}`], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n queue.defer((callback) => {\n spawn('make', ['install'], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n queue.await(callback);\n });\n};\n"],"names":["path","require","spawn","Queue","access","module","exports","installDefault","buildPath","dest","_options","callback","buildTarget","join","err","queue","defer","stdio","cwd","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,QAAQF,QAAQ;AACtB,IAAMG,SAASH,QAAQ;AAEvBI,OAAOC,OAAO,GAAG,SAASC,eAAeC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IAC1E,IAAMC,cAAcZ,KAAKa,IAAI,CAACJ,MAAM;IAEpCL,OAAOQ,aAAa,SAACE;QACnB,IAAI,CAACA,KAAK,OAAOH,YAAY,iBAAiB;QAE9C,IAAMI,QAAQ,IAAIZ,MAAM;QACxBY,MAAMC,KAAK,CAAC,SAACL;YACXT,MAAM,eAAe;gBAAE,YAAgB,OAALO;aAAO,EAAE;gBAAEQ,OAAO;gBAAWC,KAAKV;YAAU,GAAGG;QACnF;QACAI,MAAMC,KAAK,CAAC,SAACL;YACXT,MAAM,QAAQ;gBAAC;aAAU,EAAE;gBAAEe,OAAO;gBAAWC,KAAKV;YAAU,GAAGG;QACnE;QACAI,MAAMI,KAAK,CAACR;IACd;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/buildPosix.js"],"sourcesContent":["const path = require('path');\nconst spawn = require('cross-spawn-cb');\nconst Queue = require('queue-cb');\nconst access = require('fs-access-compat');\n\nmodule.exports = function installDefault(buildPath, dest, _options, callback) {\n const buildTarget = path.join(dest, 'node');\n\n access(buildTarget, (err) => {\n if (!err) return callback(); // already exists\n\n const queue = new Queue(1);\n queue.defer((callback) => {\n spawn('./configure', [`--prefix=${dest}`], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n queue.defer((callback) => {\n spawn('make', ['install'], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n queue.await(callback);\n });\n};\n"],"names":["path","require","spawn","Queue","access","module","exports","installDefault","buildPath","dest","_options","callback","buildTarget","join","err","queue","defer","stdio","cwd","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,QAAQF,QAAQ;AACtB,IAAMG,SAASH,QAAQ;AAEvBI,OAAOC,OAAO,GAAG,SAASC,eAAeC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IAC1E,IAAMC,cAAcZ,KAAKa,IAAI,CAACJ,MAAM;IAEpCL,OAAOQ,aAAa,SAACE;QACnB,IAAI,CAACA,KAAK,OAAOH,YAAY,iBAAiB;QAE9C,IAAMI,QAAQ,IAAIZ,MAAM;QACxBY,MAAMC,KAAK,CAAC,SAACL;YACXT,MAAM,eAAe;gBAAE,YAAgB,OAALO;aAAO,EAAE;gBAAEQ,OAAO;gBAAWC,KAAKV;YAAU,GAAGG;QACnF;QACAI,MAAMC,KAAK,CAAC,SAACL;YACXT,MAAM,QAAQ;gBAAC;aAAU,EAAE;gBAAEe,OAAO;gBAAWC,KAAKV;YAAU,GAAGG;QACnE;QACAI,MAAMI,KAAK,CAACR;IACd;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["buildWin32.js"],"sourcesContent":["const path = require('path');\nconst spawn = require('cross-spawn-cb');\nconst Queue = require('queue-cb');\n\nconst access = require('fs-access-compat');\nconst conditionalCopy = require('../../conditionalCopy');\n\nmodule.exports = function installWin32(buildPath, dest, _options, callback) {\n const buildSource = path.join(buildPath, 'out', 'Release', 'node.exe');\n const buildTarget = path.join(dest, 'node.exe');\n\n access(buildTarget, (err) => {\n if (!err) return callback(); // already exists\n\n const queue = new Queue(1);\n queue.defer((callback) => {\n access(buildSource, (err) => {\n if (!err) return callback(); // already exists\n spawn('./vcbuild', [], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n });\n queue.defer(conditionalCopy.bind(null, buildSource, buildTarget));\n queue.await(callback);\n });\n};\n"],"names":["path","require","spawn","Queue","access","conditionalCopy","module","exports","installWin32","buildPath","dest","_options","callback","buildSource","join","buildTarget","err","queue","defer","stdio","cwd","bind","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,QAAQF,QAAQ;AAEtB,IAAMG,SAASH,QAAQ;AACvB,IAAMI,kBAAkBJ,QAAQ;AAEhCK,OAAOC,OAAO,GAAG,SAASC,aAAaC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IACxE,IAAMC,cAAcb,KAAKc,IAAI,CAACL,WAAW,OAAO,WAAW;IAC3D,IAAMM,cAAcf,KAAKc,IAAI,CAACJ,MAAM;IAEpCN,OAAOW,aAAa,SAACC;QACnB,IAAI,CAACA,KAAK,OAAOJ,YAAY,iBAAiB;QAE9C,IAAMK,QAAQ,IAAId,MAAM;QACxBc,MAAMC,KAAK,CAAC,SAACN;YACXR,OAAOS,aAAa,SAACG;gBACnB,IAAI,CAACA,KAAK,OAAOJ,YAAY,iBAAiB;gBAC9CV,MAAM,aAAa,EAAE,EAAE;oBAAEiB,OAAO;oBAAWC,KAAKX;gBAAU,GAAGG;YAC/D;QACF;QACAK,MAAMC,KAAK,CAACb,gBAAgBgB,IAAI,CAAC,MAAMR,aAAaE;QACpDE,MAAMK,KAAK,CAACV;IACd;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/buildWin32.js"],"sourcesContent":["const path = require('path');\nconst spawn = require('cross-spawn-cb');\nconst Queue = require('queue-cb');\n\nconst access = require('fs-access-compat');\nconst conditionalCopy = require('../../conditionalCopy');\n\nmodule.exports = function installWin32(buildPath, dest, _options, callback) {\n const buildSource = path.join(buildPath, 'out', 'Release', 'node.exe');\n const buildTarget = path.join(dest, 'node.exe');\n\n access(buildTarget, (err) => {\n if (!err) return callback(); // already exists\n\n const queue = new Queue(1);\n queue.defer((callback) => {\n access(buildSource, (err) => {\n if (!err) return callback(); // already exists\n spawn('./vcbuild', [], { stdio: 'inherit', cwd: buildPath }, callback);\n });\n });\n queue.defer(conditionalCopy.bind(null, buildSource, buildTarget));\n queue.await(callback);\n });\n};\n"],"names":["path","require","spawn","Queue","access","conditionalCopy","module","exports","installWin32","buildPath","dest","_options","callback","buildSource","join","buildTarget","err","queue","defer","stdio","cwd","bind","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,QAAQF,QAAQ;AAEtB,IAAMG,SAASH,QAAQ;AACvB,IAAMI,kBAAkBJ,QAAQ;AAEhCK,OAAOC,OAAO,GAAG,SAASC,aAAaC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ;IACxE,IAAMC,cAAcb,KAAKc,IAAI,CAACL,WAAW,OAAO,WAAW;IAC3D,IAAMM,cAAcf,KAAKc,IAAI,CAACJ,MAAM;IAEpCN,OAAOW,aAAa,SAACC;QACnB,IAAI,CAACA,KAAK,OAAOJ,YAAY,iBAAiB;QAE9C,IAAMK,QAAQ,IAAId,MAAM;QACxBc,MAAMC,KAAK,CAAC,SAACN;YACXR,OAAOS,aAAa,SAACG;gBACnB,IAAI,CAACA,KAAK,OAAOJ,YAAY,iBAAiB;gBAC9CV,MAAM,aAAa,EAAE,EAAE;oBAAEiB,OAAO;oBAAWC,KAAKX;gBAAU,GAAGG;YAC/D;QACF;QACAK,MAAMC,KAAK,CAACb,gBAAgBgB,IAAI,CAAC,MAAMR,aAAaE;QACpDE,MAAMK,KAAK,CAACV;IACd;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst conditionalCache = require('../../conditionalCache');\nconst conditionalExtract = require('../../conditionalExtract');\nconst buildPosix = require('./buildPosix');\nconst buildWin32 = require('./buildWin32');\n\nmodule.exports = function InstallSource(relativePath, dest, _record, options, callback) {\n const platform = options.platform || process.platform;\n const build = platform === 'win32' ? buildWin32 : buildPosix;\n const downloadPath = options.downloadURL(relativePath);\n const buildPath = path.join(options.buildDirectory, path.basename(relativePath));\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer(conditionalExtract.bind(null, cachePath, buildPath, { strip: 1 }));\n queue.defer(build.bind(null, buildPath, dest, options));\n queue.await(callback);\n};\n"],"names":["path","require","Queue","conditionalCache","conditionalExtract","buildPosix","buildWin32","module","exports","InstallSource","relativePath","dest","_record","options","callback","platform","process","build","downloadPath","downloadURL","buildPath","join","buildDirectory","basename","cachePath","cacheDirectory","queue","defer","bind","strip","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AAEtB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AACnC,IAAMI,aAAaJ,QAAQ;AAC3B,IAAMK,aAAaL,QAAQ;AAE3BM,OAAOC,OAAO,GAAG,SAASC,cAAcC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACpF,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,QAAQF,aAAa,UAAUT,aAAaD;IAClD,IAAMa,eAAeL,QAAQM,WAAW,CAACT;IACzC,IAAMU,YAAYpB,KAAKqB,IAAI,CAACR,QAAQS,cAAc,EAAEtB,KAAKuB,QAAQ,CAACb;IAClE,IAAMc,YAAYxB,KAAKqB,IAAI,CAACR,QAAQY,cAAc,EAAEzB,KAAKuB,QAAQ,CAACL;IAElE,IAAMQ,QAAQ,IAAIxB,MAAM;IACxBwB,MAAMC,KAAK,CAACxB,iBAAiByB,IAAI,CAAC,MAAMV,cAAcM;IACtDE,MAAMC,KAAK,CAACvB,mBAAmBwB,IAAI,CAAC,MAAMJ,WAAWJ,WAAW;QAAES,OAAO;IAAE;IAC3EH,MAAMC,KAAK,CAACV,MAAMW,IAAI,CAAC,MAAMR,WAAWT,MAAME;IAC9Ca,MAAMI,KAAK,CAAChB;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/index.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst conditionalCache = require('../../conditionalCache');\nconst conditionalExtract = require('../../conditionalExtract');\nconst buildPosix = require('./buildPosix');\nconst buildWin32 = require('./buildWin32');\n\nmodule.exports = function InstallSource(relativePath, dest, _record, options, callback) {\n const platform = options.platform || process.platform;\n const build = platform === 'win32' ? buildWin32 : buildPosix;\n const downloadPath = options.downloadURL(relativePath);\n const buildPath = path.join(options.buildDirectory, path.basename(relativePath));\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer(conditionalExtract.bind(null, cachePath, buildPath, { strip: 1 }));\n queue.defer(build.bind(null, buildPath, dest, options));\n queue.await(callback);\n};\n"],"names":["path","require","Queue","conditionalCache","conditionalExtract","buildPosix","buildWin32","module","exports","InstallSource","relativePath","dest","_record","options","callback","platform","process","build","downloadPath","downloadURL","buildPath","join","buildDirectory","basename","cachePath","cacheDirectory","queue","defer","bind","strip","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AAEtB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AACnC,IAAMI,aAAaJ,QAAQ;AAC3B,IAAMK,aAAaL,QAAQ;AAE3BM,OAAOC,OAAO,GAAG,SAASC,cAAcC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACpF,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,QAAQF,aAAa,UAAUT,aAAaD;IAClD,IAAMa,eAAeL,QAAQM,WAAW,CAACT;IACzC,IAAMU,YAAYpB,KAAKqB,IAAI,CAACR,QAAQS,cAAc,EAAEtB,KAAKuB,QAAQ,CAACb;IAClE,IAAMc,YAAYxB,KAAKqB,IAAI,CAACR,QAAQY,cAAc,EAAEzB,KAAKuB,QAAQ,CAACL;IAElE,IAAMQ,QAAQ,IAAIxB,MAAM;IACxBwB,MAAMC,KAAK,CAACxB,iBAAiByB,IAAI,CAAC,MAAMV,cAAcM;IACtDE,MAAMC,KAAK,CAACvB,mBAAmBwB,IAAI,CAAC,MAAMJ,WAAWJ,WAAW;QAAES,OAAO;IAAE;IAC3EH,MAAMC,KAAK,CAACV,MAAMW,IAAI,CAAC,MAAMR,WAAWT,MAAME;IAC9Ca,MAAMI,KAAK,CAAChB;AACd"}
@@ -1 +1 @@
1
- {"version":3,"sources":["installVersion.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst installNode = require('./installNode');\nconst installNPM = require('./installNPM');\nconst checkMissing = require('./checkMissing');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function install(version, dest, options, callback) {\n // use cwd if dest not provided\n if (!dest) dest = path.join(process.cwd(), version.version);\n\n checkMissing(dest, options, (err, missing) => {\n if (err || !missing.length) return callback(err, dest);\n\n const queue = new Queue(1);\n queue.defer(ensureDestinationParent.bind(null, dest));\n !~missing.indexOf('node') || queue.defer(installNode.bind(null, version, dest, options));\n !~missing.indexOf('npm') || queue.defer(installNPM.bind(null, version, dest, options));\n queue.await((err) => {\n err ? callback(err) : callback(null, dest);\n });\n });\n};\n"],"names":["path","require","Queue","installNode","installNPM","checkMissing","ensureDestinationParent","module","exports","install","version","dest","options","callback","join","process","cwd","err","missing","length","queue","defer","bind","indexOf","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AAEtB,IAAME,cAAcF,QAAQ;AAC5B,IAAMG,aAAaH,QAAQ;AAC3B,IAAMI,eAAeJ,QAAQ;AAC7B,IAAMK,0BAA0BL,QAAQ;AAExCM,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChE,+BAA+B;IAC/B,IAAI,CAACF,MAAMA,OAAOX,KAAKc,IAAI,CAACC,QAAQC,GAAG,IAAIN,QAAQA,OAAO;IAE1DL,aAAaM,MAAMC,SAAS,SAACK,KAAKC;QAChC,IAAID,OAAO,CAACC,QAAQC,MAAM,EAAE,OAAON,SAASI,KAAKN;QAEjD,IAAMS,QAAQ,IAAIlB,MAAM;QACxBkB,MAAMC,KAAK,CAACf,wBAAwBgB,IAAI,CAAC,MAAMX;QAC/C,CAAC,CAACO,QAAQK,OAAO,CAAC,WAAWH,MAAMC,KAAK,CAAClB,YAAYmB,IAAI,CAAC,MAAMZ,SAASC,MAAMC;QAC/E,CAAC,CAACM,QAAQK,OAAO,CAAC,UAAUH,MAAMC,KAAK,CAACjB,WAAWkB,IAAI,CAAC,MAAMZ,SAASC,MAAMC;QAC7EQ,MAAMI,KAAK,CAAC,SAACP;YACXA,MAAMJ,SAASI,OAAOJ,SAAS,MAAMF;QACvC;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installVersion.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst installNode = require('./installNode');\nconst installNPM = require('./installNPM');\nconst checkMissing = require('./checkMissing');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function install(version, dest, options, callback) {\n // use cwd if dest not provided\n if (!dest) dest = path.join(process.cwd(), version.version);\n\n checkMissing(dest, options, (err, missing) => {\n if (err || !missing.length) return callback(err, dest);\n\n const queue = new Queue(1);\n queue.defer(ensureDestinationParent.bind(null, dest));\n !~missing.indexOf('node') || queue.defer(installNode.bind(null, version, dest, options));\n !~missing.indexOf('npm') || queue.defer(installNPM.bind(null, version, dest, options));\n queue.await((err) => {\n err ? callback(err) : callback(null, dest);\n });\n });\n};\n"],"names":["path","require","Queue","installNode","installNPM","checkMissing","ensureDestinationParent","module","exports","install","version","dest","options","callback","join","process","cwd","err","missing","length","queue","defer","bind","indexOf","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AAEtB,IAAME,cAAcF,QAAQ;AAC5B,IAAMG,aAAaH,QAAQ;AAC3B,IAAMI,eAAeJ,QAAQ;AAC7B,IAAMK,0BAA0BL,QAAQ;AAExCM,OAAOC,OAAO,GAAG,SAASC,QAAQC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAChE,+BAA+B;IAC/B,IAAI,CAACF,MAAMA,OAAOX,KAAKc,IAAI,CAACC,QAAQC,GAAG,IAAIN,QAAQA,OAAO;IAE1DL,aAAaM,MAAMC,SAAS,SAACK,KAAKC;QAChC,IAAID,OAAO,CAACC,QAAQC,MAAM,EAAE,OAAON,SAASI,KAAKN;QAEjD,IAAMS,QAAQ,IAAIlB,MAAM;QACxBkB,MAAMC,KAAK,CAACf,wBAAwBgB,IAAI,CAAC,MAAMX;QAC/C,CAAC,CAACO,QAAQK,OAAO,CAAC,WAAWH,MAAMC,KAAK,CAAClB,YAAYmB,IAAI,CAAC,MAAMZ,SAASC,MAAMC;QAC/E,CAAC,CAACM,QAAQK,OAAO,CAAC,UAAUH,MAAMC,KAAK,CAACjB,WAAWkB,IAAI,CAAC,MAAMZ,SAASC,MAAMC;QAC7EQ,MAAMI,KAAK,CAAC,SAACP;YACXA,MAAMJ,SAASI,OAAOJ,SAAS,MAAMF;QACvC;IACF;AACF"}
@@ -2,7 +2,7 @@
2
2
  var cp = require('child_process');
3
3
  if (!cp.execSync) {
4
4
  var path = require('path');
5
- var execCallback = path.join(__dirname, 'execCallback.js');
5
+ var execCallback = path.join(__dirname, 'workers', 'execCallback.js');
6
6
  var functionExec = null; // break dependencies
7
7
  cp.execSync = function execSyncPolyfill(cmd, options) {
8
8
  if (!functionExec) functionExec = require('function-exec-sync');
@@ -1 +1 @@
1
- {"version":3,"sources":["polyfills.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, 'execCallback.js');\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 }, execCallback, cmd, options || {});\n };\n}\n"],"names":["cp","require","execSync","path","execCallback","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,IAAMC,OAAOF,QAAQ;IACrB,IAAMG,eAAeD,KAAKE,IAAI,CAACC,WAAW;IAE1C,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG,EAAEC,OAAO;QAClD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,eAAe;YAAEI,WAAW;QAAK,GAAGP,cAAcK,KAAKC,WAAW,CAAC;IAC5E;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/polyfills.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, 'workers', 'execCallback.js');\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 }, execCallback, cmd, options || {});\n };\n}\n"],"names":["cp","require","execSync","path","execCallback","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,IAAMC,OAAOF,QAAQ;IACrB,IAAMG,eAAeD,KAAKE,IAAI,CAACC,WAAW,WAAW;IAErD,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG,EAAEC,OAAO;QAClD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,eAAe;YAAEI,WAAW;QAAK,GAAGP,cAAcK,KAAKC,WAAW,CAAC;IAC5E;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["progress.js"],"sourcesContent":["const log = require('single-line-log2').stdout;\n\nmodule.exports = function progress(entry) {\n let message = `${entry.progress} ${entry.basename}`;\n if (entry.percentage) message += ` - ${entry.percentage.toFixed(0)}%`;\n log(message);\n};\n"],"names":["log","require","stdout","module","exports","progress","entry","message","basename","percentage","toFixed"],"mappings":";AAAA,IAAMA,MAAMC,QAAQ,oBAAoBC,MAAM;AAE9CC,OAAOC,OAAO,GAAG,SAASC,SAASC,KAAK;IACtC,IAAIC,UAAU,AAAC,GAAoBD,OAAlBA,MAAMD,QAAQ,EAAC,KAAkB,OAAfC,MAAME,QAAQ;IACjD,IAAIF,MAAMG,UAAU,EAAEF,WAAW,AAAC,MAAiC,OAA5BD,MAAMG,UAAU,CAACC,OAAO,CAAC,IAAG;IACnEV,IAAIO;AACN"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/progress.js"],"sourcesContent":["const log = require('single-line-log2').stdout;\n\nmodule.exports = function progress(entry) {\n let message = `${entry.progress} ${entry.basename}`;\n if (entry.percentage) message += ` - ${entry.percentage.toFixed(0)}%`;\n log(message);\n};\n"],"names":["log","require","stdout","module","exports","progress","entry","message","basename","percentage","toFixed"],"mappings":";AAAA,IAAMA,MAAMC,QAAQ,oBAAoBC,MAAM;AAE9CC,OAAOC,OAAO,GAAG,SAASC,SAASC,KAAK;IACtC,IAAIC,UAAU,AAAC,GAAoBD,OAAlBA,MAAMD,QAAQ,EAAC,KAAkB,OAAfC,MAAME,QAAQ;IACjD,IAAIF,MAAMG,UAAU,EAAEF,WAAW,AAAC,MAAiC,OAA5BD,MAAMG,UAAU,CAACC,OAAO,CAAC,IAAG;IACnEV,IAAIO;AACN"}
@@ -1 +1 @@
1
- {"version":3,"sources":["execCallback.js"],"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
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/workers/execCallback.js"],"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 +1 @@
1
- export default function installRelease(versionDetails: any, dest: any, options: any, callback: any): any;
1
+ export default function installRelease(versionDetails: any, dest: any, options: any, callback: any): void | Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -33,13 +33,13 @@
33
33
  "version": "tsds version"
34
34
  },
35
35
  "dependencies": {
36
- "cross-spawn-cb": "^1.3.1",
36
+ "cross-spawn-cb": "^1.5.7",
37
37
  "end-with": "^1.0.2",
38
38
  "exit": "^0.1.2",
39
- "fast-extract": "^1.3.0",
39
+ "fast-extract": "^1.3.1",
40
40
  "fs-access-compat": "^1.0.3",
41
41
  "function-exec-sync": "^1.1.2",
42
- "get-remote": "^1.3.0",
42
+ "get-remote": "^1.3.2",
43
43
  "getopts-compat": "^2.2.5",
44
44
  "homedir-polyfill": "^1.0.3",
45
45
  "isarray": "^2.0.5",
@@ -47,8 +47,7 @@
47
47
  "lodash.keys": "^4.2.0",
48
48
  "mkdirp-classic": "^0.5.3",
49
49
  "node-filename-to-dist-paths": "^0.2.5",
50
- "node-resolve-versions": "^1.0.1",
51
- "pinkie-promise": "^2.0.1",
50
+ "node-resolve-versions": "^1.0.4",
52
51
  "pump": "^3.0.2",
53
52
  "queue-cb": "^1.4.4",
54
53
  "rimraf2": "^2.8.2",
@@ -60,12 +59,11 @@
60
59
  "@types/node": "^22.10.2",
61
60
  "cr": "^0.1.0",
62
61
  "depcheck": "^1.4.7",
63
- "fs-access-sync-compat": "^1.0.2",
62
+ "fs-exists-sync": "^0.1.0",
64
63
  "is-version": "^0.2.1",
65
- "node-version-utils": "^1.1.0",
66
- "ts-dev-stack": "^1.5.4"
64
+ "node-version-utils": "^1.1.2",
65
+ "pinkie-promise": "^2.0.1"
67
66
  },
68
- "packageManager": "npm@11.0.0+sha512.11dff29565d2297c74e7c594a9762581bde969f0aa5cbe6f5b3644bf008a16c065ece61094d9ffbb81125be38df8e1ba43eb8244b3d30c61eb797e9a2440e3ec",
69
67
  "engines": {
70
68
  "node": ">=0.8"
71
69
  },