node-install-release 1.19.1 → 1.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.js +62 -2
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/installNPM/installLib.js +7 -4
- package/dist/cjs/installNPM/installLib.js.map +1 -1
- package/dist/cjs/installNode/index.d.cts +2 -2
- package/dist/cjs/installNode/index.d.ts +2 -2
- package/dist/cjs/installNode/index.js.map +1 -1
- package/dist/cjs/installNode/installCompressed.d.cts +2 -2
- package/dist/cjs/installNode/installCompressed.d.ts +2 -2
- package/dist/cjs/installNode/installCompressed.js.map +1 -1
- package/dist/cjs/installNode/installExe.d.cts +2 -2
- package/dist/cjs/installNode/installExe.d.ts +2 -2
- package/dist/cjs/installNode/installExe.js.map +1 -1
- package/dist/cjs/installNode/installFilename.d.cts +2 -2
- package/dist/cjs/installNode/installFilename.d.ts +2 -2
- package/dist/cjs/installNode/installFilename.js +6 -2
- package/dist/cjs/installNode/installFilename.js.map +1 -1
- package/dist/cjs/installNode/installSource/buildPosix.js +7 -3
- package/dist/cjs/installNode/installSource/buildPosix.js.map +1 -1
- package/dist/cjs/installNode/installSource/buildWin32.js +6 -2
- package/dist/cjs/installNode/installSource/buildWin32.js.map +1 -1
- package/dist/cjs/installNode/installSource/index.d.cts +2 -2
- package/dist/cjs/installNode/installSource/index.d.ts +2 -2
- package/dist/cjs/installNode/installSource/index.js.map +1 -1
- package/dist/cjs/installNode/validateDownload.js +5 -2
- package/dist/cjs/installNode/validateDownload.js.map +1 -1
- package/dist/cjs/lib/conditionalCache.js +6 -2
- package/dist/cjs/lib/conditionalCache.js.map +1 -1
- package/dist/cjs/lib/copyFile.js +5 -2
- package/dist/cjs/lib/copyFile.js.map +1 -1
- package/dist/cjs/lib/extract.js +9 -6
- package/dist/cjs/lib/extract.js.map +1 -1
- package/dist/cjs/types.d.cts +1 -0
- package/dist/cjs/types.d.ts +1 -0
- package/dist/cjs/workers/install.js +47 -13
- package/dist/cjs/workers/install.js.map +1 -1
- package/dist/esm/cli.js +19 -3
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/installNPM/installLib.js +5 -2
- package/dist/esm/installNPM/installLib.js.map +1 -1
- package/dist/esm/installNode/index.d.ts +2 -2
- package/dist/esm/installNode/index.js.map +1 -1
- package/dist/esm/installNode/installCompressed.d.ts +2 -2
- package/dist/esm/installNode/installCompressed.js.map +1 -1
- package/dist/esm/installNode/installExe.d.ts +2 -2
- package/dist/esm/installNode/installExe.js.map +1 -1
- package/dist/esm/installNode/installFilename.d.ts +2 -2
- package/dist/esm/installNode/installFilename.js +5 -1
- package/dist/esm/installNode/installFilename.js.map +1 -1
- package/dist/esm/installNode/installSource/buildPosix.js +5 -1
- package/dist/esm/installNode/installSource/buildPosix.js.map +1 -1
- package/dist/esm/installNode/installSource/buildWin32.js +5 -1
- package/dist/esm/installNode/installSource/buildWin32.js.map +1 -1
- package/dist/esm/installNode/installSource/index.d.ts +2 -2
- package/dist/esm/installNode/installSource/index.js.map +1 -1
- package/dist/esm/installNode/validateDownload.js +4 -1
- package/dist/esm/installNode/validateDownload.js.map +1 -1
- package/dist/esm/lib/conditionalCache.js +6 -2
- package/dist/esm/lib/conditionalCache.js.map +1 -1
- package/dist/esm/lib/copyFile.js +7 -2
- package/dist/esm/lib/copyFile.js.map +1 -1
- package/dist/esm/lib/extract.js +8 -5
- package/dist/esm/lib/extract.js.map +1 -1
- package/dist/esm/types.d.ts +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/workers/install.js +23 -14
- package/dist/esm/workers/install.js.map +1 -1
- package/package.json +7 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export default function InstallSource(distPath: string, dest: string, options:
|
|
1
|
+
import type { NoParamCallback, ResolvedInstallOptions } from '../../types.js';
|
|
2
|
+
export default function InstallSource(distPath: string, dest: string, options: ResolvedInstallOptions, callback: NoParamCallback): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/index.ts"],"sourcesContent":["import { safeRm } from 'fs-remove-compat';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport tempSuffix from 'temp-suffix';\n\nimport { NODE_DIST_BASE_URL } from '../../constants.ts';\nimport conditionalCache from '../../lib/conditionalCache.ts';\nimport extract from '../../lib/extract.ts';\nimport type {
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/index.ts"],"sourcesContent":["import { safeRm } from 'fs-remove-compat';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport tempSuffix from 'temp-suffix';\n\nimport { NODE_DIST_BASE_URL } from '../../constants.ts';\nimport conditionalCache from '../../lib/conditionalCache.ts';\nimport extract from '../../lib/extract.ts';\nimport type { NoParamCallback, ResolvedInstallOptions } from '../../types.ts';\nimport validateDownload from '../validateDownload.ts';\nimport buildPosix from './buildPosix.ts';\nimport buildWin32 from './buildWin32.ts';\n\nexport default function InstallSource(distPath: string, dest: string, options: ResolvedInstallOptions, callback: NoParamCallback): void {\n const platform = options.platform;\n const build = platform === 'win32' ? buildWin32 : buildPosix;\n const downloadPath = `${NODE_DIST_BASE_URL}/${distPath}`;\n // Use temp build path to avoid race conditions with parallel builds\n const tempBuildPath = tempSuffix(path.join(options.buildPath, path.basename(distPath)));\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n const queue = new Queue(1);\n queue.defer((cb) => conditionalCache(downloadPath, cachePath, options, (err) => cb(err)));\n queue.defer((cb) => validateDownload(distPath, cachePath, (err) => cb(err)));\n queue.defer((cb) => extract(cachePath, tempBuildPath, (err) => cb(err)));\n queue.defer((cb) => build(tempBuildPath, dest, options, (err) => cb(err)));\n queue.await((err) => {\n // Always clean up temp build directory\n safeRm(tempBuildPath, () => callback(err));\n });\n}\n"],"names":["safeRm","path","Queue","tempSuffix","NODE_DIST_BASE_URL","conditionalCache","extract","validateDownload","buildPosix","buildWin32","InstallSource","distPath","dest","options","callback","platform","build","downloadPath","tempBuildPath","join","buildPath","basename","cachePath","queue","defer","cb","err","await"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,OAAOC,gBAAgB,cAAc;AAErC,SAASC,kBAAkB,QAAQ,qBAAqB;AACxD,OAAOC,sBAAsB,gCAAgC;AAC7D,OAAOC,aAAa,uBAAuB;AAE3C,OAAOC,sBAAsB,yBAAyB;AACtD,OAAOC,gBAAgB,kBAAkB;AACzC,OAAOC,gBAAgB,kBAAkB;AAEzC,eAAe,SAASC,cAAcC,QAAgB,EAAEC,IAAY,EAAEC,OAA+B,EAAEC,QAAyB;IAC9H,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,QAAQD,aAAa,UAAUN,aAAaD;IAClD,MAAMS,eAAe,GAAGb,mBAAmB,CAAC,EAAEO,UAAU;IACxD,oEAAoE;IACpE,MAAMO,gBAAgBf,WAAWF,KAAKkB,IAAI,CAACN,QAAQO,SAAS,EAAEnB,KAAKoB,QAAQ,CAACV;IAC5E,MAAMW,YAAYrB,KAAKkB,IAAI,CAACN,QAAQS,SAAS,EAAErB,KAAKoB,QAAQ,CAACJ;IAE7D,MAAMM,QAAQ,IAAIrB,MAAM;IACxBqB,MAAMC,KAAK,CAAC,CAACC,KAAOpB,iBAAiBY,cAAcK,WAAWT,SAAS,CAACa,MAAQD,GAAGC;IACnFH,MAAMC,KAAK,CAAC,CAACC,KAAOlB,iBAAiBI,UAAUW,WAAW,CAACI,MAAQD,GAAGC;IACtEH,MAAMC,KAAK,CAAC,CAACC,KAAOnB,QAAQgB,WAAWJ,eAAe,CAACQ,MAAQD,GAAGC;IAClEH,MAAMC,KAAK,CAAC,CAACC,KAAOT,MAAME,eAAeN,MAAMC,SAAS,CAACa,MAAQD,GAAGC;IACpEH,MAAMI,KAAK,CAAC,CAACD;QACX,uCAAuC;QACvC1B,OAAOkB,eAAe,IAAMJ,SAASY;IACvC;AACF"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import crypto from 'crypto';
|
|
2
2
|
import fs from 'fs';
|
|
3
|
-
import
|
|
3
|
+
import Module from 'module';
|
|
4
4
|
import oo from 'on-one';
|
|
5
5
|
import { NODE_DIST_BASE_URL } from '../constants.js';
|
|
6
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
6
7
|
export default function validateDownload(distPath, installPath, callback) {
|
|
7
8
|
const version = distPath.split('/')[0];
|
|
8
9
|
const downloadPath = `${NODE_DIST_BASE_URL}/${version}/SHASUMS256.txt`;
|
|
10
|
+
// deferred: get-file-compat is only needed to actually download and validate a release
|
|
11
|
+
const { getContent } = _require('get-file-compat');
|
|
9
12
|
getContent(downloadPath, 'utf8', (err, res)=>{
|
|
10
13
|
var _ref, _text_split__split_pop;
|
|
11
14
|
if (err) return callback(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/validateDownload.ts"],"sourcesContent":["import crypto from 'crypto';\nimport fs from 'fs';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/validateDownload.ts"],"sourcesContent":["import crypto from 'crypto';\nimport fs from 'fs';\nimport Module from 'module';\nimport oo from 'on-one';\nimport { NODE_DIST_BASE_URL } from '../constants.ts';\n\nimport type { ChecksumCallback, ChecksumResult } from '../types.ts';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nexport default function validateDownload(distPath: string, installPath: string, callback: ChecksumCallback): void {\n const version = distPath.split('/')[0];\n const downloadPath = `${NODE_DIST_BASE_URL}/${version}/SHASUMS256.txt`;\n // deferred: get-file-compat is only needed to actually download and validate a release\n const { getContent } = _require('get-file-compat');\n getContent(downloadPath, 'utf8', (err: Error | null, res: { content?: string }) => {\n if (err) return callback(err);\n const text = res?.content ?? '';\n const filename = distPath.split('/').slice(1).join('/');\n const expected = (text.split(filename)[0].split('\\n').pop() ?? '').trim();\n const hash = crypto.createHash('sha256');\n const stream = fs.createReadStream(installPath);\n stream.on('data', (data) => hash.update(data));\n oo(stream, ['error', 'end', 'close', 'finish'], (err: Error | null) => {\n if (err) return callback(err);\n const actual = hash.digest('hex');\n const match = actual === expected;\n const checksum: ChecksumResult = { actual, expected, match };\n match ? callback(undefined, checksum) : callback(new Error(`${filename} checksum failed`), checksum);\n });\n });\n}\n"],"names":["crypto","fs","Module","oo","NODE_DIST_BASE_URL","_require","require","createRequire","url","validateDownload","distPath","installPath","callback","version","split","downloadPath","getContent","err","res","text","content","filename","slice","join","expected","pop","trim","hash","createHash","stream","createReadStream","on","data","update","actual","digest","match","checksum","undefined","Error"],"mappings":"AAAA,OAAOA,YAAY,SAAS;AAC5B,OAAOC,QAAQ,KAAK;AACpB,OAAOC,YAAY,SAAS;AAC5B,OAAOC,QAAQ,SAAS;AACxB,SAASC,kBAAkB,QAAQ,kBAAkB;AAIrD,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F,eAAe,SAASG,iBAAiBC,QAAgB,EAAEC,WAAmB,EAAEC,QAA0B;IACxG,MAAMC,UAAUH,SAASI,KAAK,CAAC,IAAI,CAAC,EAAE;IACtC,MAAMC,eAAe,GAAGX,mBAAmB,CAAC,EAAES,QAAQ,eAAe,CAAC;IACtE,uFAAuF;IACvF,MAAM,EAAEG,UAAU,EAAE,GAAGX,SAAS;IAChCW,WAAWD,cAAc,QAAQ,CAACE,KAAmBC;kBAIjCC;QAHlB,IAAIF,KAAK,OAAOL,SAASK;QACzB,MAAME,eAAOD,gBAAAA,0BAAAA,IAAKE,OAAO,uCAAI;QAC7B,MAAMC,WAAWX,SAASI,KAAK,CAAC,KAAKQ,KAAK,CAAC,GAAGC,IAAI,CAAC;QACnD,MAAMC,WAAW,EAACL,yBAAAA,KAAKL,KAAK,CAACO,SAAS,CAAC,EAAE,CAACP,KAAK,CAAC,MAAMW,GAAG,gBAAvCN,oCAAAA,yBAA6C,IAAIO,IAAI;QACvE,MAAMC,OAAO3B,OAAO4B,UAAU,CAAC;QAC/B,MAAMC,SAAS5B,GAAG6B,gBAAgB,CAACnB;QACnCkB,OAAOE,EAAE,CAAC,QAAQ,CAACC,OAASL,KAAKM,MAAM,CAACD;QACxC7B,GAAG0B,QAAQ;YAAC;YAAS;YAAO;YAAS;SAAS,EAAE,CAACZ;YAC/C,IAAIA,KAAK,OAAOL,SAASK;YACzB,MAAMiB,SAASP,KAAKQ,MAAM,CAAC;YAC3B,MAAMC,QAAQF,WAAWV;YACzB,MAAMa,WAA2B;gBAAEH;gBAAQV;gBAAUY;YAAM;YAC3DA,QAAQxB,SAAS0B,WAAWD,YAAYzB,SAAS,IAAI2B,MAAM,GAAGlB,SAAS,gBAAgB,CAAC,GAAGgB;QAC7F;IACF;AACF"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import
|
|
2
|
+
import Module from 'module';
|
|
3
3
|
import ensureDestinationParent from './ensureDestinationParent.js';
|
|
4
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
4
5
|
export default function conditionalCache(endpoint, dest, options, callback) {
|
|
5
6
|
callback = typeof options === 'function' ? options : callback;
|
|
6
7
|
options = typeof options === 'function' ? {} : options || {};
|
|
7
8
|
fs.stat(dest, (err)=>{
|
|
8
9
|
if (!err) return callback === null || callback === void 0 ? void 0 : callback(); // already exists
|
|
9
10
|
ensureDestinationParent(dest, (err)=>{
|
|
10
|
-
|
|
11
|
+
if (err) return callback === null || callback === void 0 ? void 0 : callback(err);
|
|
12
|
+
// deferred: get-file-compat is only needed when the file is actually missing from cache
|
|
13
|
+
const { getFile } = _require('get-file-compat');
|
|
14
|
+
getFile(endpoint, dest, (err)=>callback === null || callback === void 0 ? void 0 : callback(err));
|
|
11
15
|
});
|
|
12
16
|
});
|
|
13
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/conditionalCache.ts"],"sourcesContent":["import fs from 'fs';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/conditionalCache.ts"],"sourcesContent":["import fs from 'fs';\nimport Module from 'module';\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nexport default function conditionalCache(endpoint: string, dest: string, options: InstallOptions, callback?: NoParamCallback): void {\n callback = typeof options === 'function' ? options : callback;\n options = typeof options === 'function' ? {} : ((options || {}) as InstallOptions);\n\n fs.stat(dest, (err) => {\n if (!err) return callback?.(); // already exists\n ensureDestinationParent(dest, (err) => {\n if (err) return callback?.(err);\n // deferred: get-file-compat is only needed when the file is actually missing from cache\n const { getFile } = _require('get-file-compat');\n getFile(endpoint, dest, (err: Error | null) => callback?.(err));\n });\n });\n}\n"],"names":["fs","Module","ensureDestinationParent","_require","require","createRequire","url","conditionalCache","endpoint","dest","options","callback","stat","err","getFile"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,YAAY,SAAS;AAE5B,OAAOC,6BAA6B,+BAA+B;AAEnE,MAAMC,WAAW,OAAOC,YAAY,cAAcH,OAAOI,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F,eAAe,SAASG,iBAAiBC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAA0B;IAC1HA,WAAW,OAAOD,YAAY,aAAaA,UAAUC;IACrDD,UAAU,OAAOA,YAAY,aAAa,CAAC,IAAMA,WAAW,CAAC;IAE7DV,GAAGY,IAAI,CAACH,MAAM,CAACI;QACb,IAAI,CAACA,KAAK,OAAOF,qBAAAA,+BAAAA,YAAc,iBAAiB;QAChDT,wBAAwBO,MAAM,CAACI;YAC7B,IAAIA,KAAK,OAAOF,qBAAAA,+BAAAA,SAAWE;YAC3B,wFAAwF;YACxF,MAAM,EAAEC,OAAO,EAAE,GAAGX,SAAS;YAC7BW,QAAQN,UAAUC,MAAM,CAACI,MAAsBF,qBAAAA,+BAAAA,SAAWE;QAC5D;IACF;AACF"}
|
package/dist/esm/lib/copyFile.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { copyFile } from 'fs-copy-compat';
|
|
2
1
|
import { safeRm } from 'fs-remove-compat';
|
|
2
|
+
import Module from 'module';
|
|
3
3
|
import Queue from 'queue-cb';
|
|
4
4
|
import ensureDestinationParent from './ensureDestinationParent.js';
|
|
5
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
5
6
|
export default function safeCopyFile(src, dest, callback) {
|
|
6
7
|
const queue = new Queue(1);
|
|
7
8
|
queue.defer(ensureDestinationParent.bind(null, dest));
|
|
8
9
|
queue.defer((cb)=>safeRm(dest, (err)=>cb(err)));
|
|
9
|
-
queue.defer((cb)=>
|
|
10
|
+
queue.defer((cb)=>{
|
|
11
|
+
// deferred: fs-copy-compat is only needed when a file is actually copied
|
|
12
|
+
const { copyFile } = _require('fs-copy-compat');
|
|
13
|
+
copyFile(src, dest, (err)=>cb(err));
|
|
14
|
+
});
|
|
10
15
|
queue.await(callback);
|
|
11
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import { safeRm } from 'fs-remove-compat';\nimport Module from 'module';\nimport Queue from 'queue-cb';\nimport type { NoParamCallback } from '../types.ts';\n\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\nexport default function safeCopyFile(src: string, dest: string, callback: NoParamCallback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((cb) => safeRm(dest, (err) => cb(err)));\n queue.defer((cb) => {\n // deferred: fs-copy-compat is only needed when a file is actually copied\n const { copyFile } = _require('fs-copy-compat');\n copyFile(src, dest, (err: Error | null) => cb(err));\n });\n queue.await(callback);\n}\n"],"names":["safeRm","Module","Queue","ensureDestinationParent","_require","require","createRequire","url","safeCopyFile","src","dest","callback","queue","defer","bind","cb","err","copyFile","await"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,SAAS;AAC5B,OAAOC,WAAW,WAAW;AAG7B,OAAOC,6BAA6B,+BAA+B;AAEnE,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAE1F,eAAe,SAASG,aAAaC,GAAW,EAAEC,IAAY,EAAEC,QAAyB;IACvF,MAAMC,QAAQ,IAAIV,MAAM;IAExBU,MAAMC,KAAK,CAACV,wBAAwBW,IAAI,CAAC,MAAMJ;IAC/CE,MAAMC,KAAK,CAAC,CAACE,KAAOf,OAAOU,MAAM,CAACM,MAAQD,GAAGC;IAC7CJ,MAAMC,KAAK,CAAC,CAACE;QACX,yEAAyE;QACzE,MAAM,EAAEE,QAAQ,EAAE,GAAGb,SAAS;QAC9Ba,SAASR,KAAKC,MAAM,CAACM,MAAsBD,GAAGC;IAChD;IACAJ,MAAMM,KAAK,CAACP;AACd"}
|
package/dist/esm/lib/extract.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import fastExtract from 'fast-extract';
|
|
2
1
|
import mkdirp from 'mkdirp-classic';
|
|
2
|
+
import Module from 'module';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import Queue from 'queue-cb';
|
|
5
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
5
6
|
export default function extract(src, dest, options, callback) {
|
|
6
|
-
|
|
7
|
-
options = typeof options === 'function' ? {} : options;
|
|
7
|
+
const done = typeof options === 'function' ? options : callback;
|
|
8
8
|
const extractOptions = {
|
|
9
9
|
strip: 1,
|
|
10
10
|
time: 1000,
|
|
11
|
-
...options
|
|
11
|
+
...typeof options === 'function' ? {} : options
|
|
12
12
|
};
|
|
13
|
+
// deferred: fast-extract pulls tar/zip/7z/xz/bzip2 decompressors, only needed when an archive is actually extracted
|
|
14
|
+
const fastExtractModule = _require('fast-extract');
|
|
15
|
+
const fastExtract = fastExtractModule.default || fastExtractModule;
|
|
13
16
|
const queue = new Queue(1);
|
|
14
17
|
queue.defer((cb)=>mkdirp(path.dirname(dest), (err)=>cb(err)));
|
|
15
18
|
queue.defer(fastExtract.bind(null, src, dest, extractOptions));
|
|
16
|
-
queue.await(
|
|
19
|
+
queue.await(done);
|
|
17
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/extract.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/extract.ts"],"sourcesContent":["import mkdirp from 'mkdirp-classic';\nimport Module from 'module';\nimport path from 'path';\nimport Queue from 'queue-cb';\n\nimport type { NoParamCallback } from '../types.ts';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\ninterface ExtractOptions {\n strip?: number;\n time?: number;\n}\n\nexport default function extract(src: string, dest: string, options: ExtractOptions | NoParamCallback, callback?: NoParamCallback): void {\n const done = (typeof options === 'function' ? options : callback) as NoParamCallback;\n const extractOptions = { strip: 1, time: 1000, ...(typeof options === 'function' ? {} : options) };\n // deferred: fast-extract pulls tar/zip/7z/xz/bzip2 decompressors, only needed when an archive is actually extracted\n const fastExtractModule = _require('fast-extract');\n const fastExtract = fastExtractModule.default || fastExtractModule;\n const queue = new Queue(1);\n queue.defer((cb) => mkdirp(path.dirname(dest), (err) => cb(err)));\n queue.defer(fastExtract.bind(null, src, dest, extractOptions));\n queue.await(done);\n}\n"],"names":["mkdirp","Module","path","Queue","_require","require","createRequire","url","extract","src","dest","options","callback","done","extractOptions","strip","time","fastExtractModule","fastExtract","default","queue","defer","cb","dirname","err","bind","await"],"mappings":"AAAA,OAAOA,YAAY,iBAAiB;AACpC,OAAOC,YAAY,SAAS;AAC5B,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAI7B,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYC,GAAG,IAAIF;AAO1F,eAAe,SAASG,QAAQC,GAAW,EAAEC,IAAY,EAAEC,OAAyC,EAAEC,QAA0B;IAC9H,MAAMC,OAAQ,OAAOF,YAAY,aAAaA,UAAUC;IACxD,MAAME,iBAAiB;QAAEC,OAAO;QAAGC,MAAM;QAAM,GAAI,OAAOL,YAAY,aAAa,CAAC,IAAIA,OAAO;IAAE;IACjG,oHAAoH;IACpH,MAAMM,oBAAoBb,SAAS;IACnC,MAAMc,cAAcD,kBAAkBE,OAAO,IAAIF;IACjD,MAAMG,QAAQ,IAAIjB,MAAM;IACxBiB,MAAMC,KAAK,CAAC,CAACC,KAAOtB,OAAOE,KAAKqB,OAAO,CAACb,OAAO,CAACc,MAAQF,GAAGE;IAC3DJ,MAAMC,KAAK,CAACH,YAAYO,IAAI,CAAC,MAAMhB,KAAKC,MAAMI;IAC9CM,MAAMM,KAAK,CAACb;AACd"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface InstallOptions extends VersionOptions {
|
|
|
31
31
|
arch?: NodeJS.Architecture;
|
|
32
32
|
cachePath?: string;
|
|
33
33
|
}
|
|
34
|
+
export type ResolvedInstallOptions = InstallOptions & StorageLocations;
|
|
34
35
|
export interface Target {
|
|
35
36
|
platform: NodeJS.Platform;
|
|
36
37
|
arch: NodeJS.Architecture;
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/types.ts"],"sourcesContent":["import type { VersionOptions } from 'node-resolve-versions';\n\nexport interface File {\n filename: string;\n starting: string;\n}\n\nexport interface FilePath {\n src: string;\n dest: string;\n optional?: boolean;\n}\n\nexport type StorageLocations = {\n cachePath: string;\n buildPath: string;\n installPath: string;\n};\n\nexport type InstallResult = {\n version: string;\n installPath: string;\n execPath: string;\n platform: NodeJS.Platform;\n};\n\nexport interface InstallOptions extends VersionOptions {\n type?: string;\n compression?: boolean;\n installPath?: string;\n buildPath?: string;\n name?: string;\n storagePath?: string;\n filename?: string;\n platform?: NodeJS.Platform;\n arch?: NodeJS.Architecture;\n cachePath?: string;\n}\n\nexport interface Target {\n platform: NodeJS.Platform;\n arch: NodeJS.Architecture;\n}\n\nexport type ChecksumResult = {\n actual: string;\n expected: string;\n match: boolean;\n};\n\nexport type InstallCallback = (err?: Error | null, result?: InstallResult) => void;\nexport type NoParamCallback = (err?: Error | null) => void;\nexport type ChecksumCallback = (err?: Error | null, checksum?: ChecksumResult) => void;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/types.ts"],"sourcesContent":["import type { VersionOptions } from 'node-resolve-versions';\n\nexport interface File {\n filename: string;\n starting: string;\n}\n\nexport interface FilePath {\n src: string;\n dest: string;\n optional?: boolean;\n}\n\nexport type StorageLocations = {\n cachePath: string;\n buildPath: string;\n installPath: string;\n};\n\nexport type InstallResult = {\n version: string;\n installPath: string;\n execPath: string;\n platform: NodeJS.Platform;\n};\n\nexport interface InstallOptions extends VersionOptions {\n type?: string;\n compression?: boolean;\n installPath?: string;\n buildPath?: string;\n name?: string;\n storagePath?: string;\n filename?: string;\n platform?: NodeJS.Platform;\n arch?: NodeJS.Architecture;\n cachePath?: string;\n}\n\n// InstallOptions after createStoragePaths/DEFAULT_STORAGE_PATHS have been merged in.\nexport type ResolvedInstallOptions = InstallOptions & StorageLocations;\n\nexport interface Target {\n platform: NodeJS.Platform;\n arch: NodeJS.Architecture;\n}\n\nexport type ChecksumResult = {\n actual: string;\n expected: string;\n match: boolean;\n};\n\nexport type InstallCallback = (err?: Error | null, result?: InstallResult) => void;\nexport type NoParamCallback = (err?: Error | null) => void;\nexport type ChecksumCallback = (err?: Error | null, checksum?: ChecksumResult) => void;\n"],"names":[],"mappings":"AAuDA,WAAuF"}
|
|
@@ -2,8 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import { safeRm } from 'fs-remove-compat';
|
|
3
3
|
import isVersion from 'is-version';
|
|
4
4
|
import mkdirp from 'mkdirp-classic';
|
|
5
|
-
import
|
|
6
|
-
import resolveVersions from 'node-resolve-versions';
|
|
5
|
+
import Module from 'module';
|
|
7
6
|
import path from 'path';
|
|
8
7
|
import Queue from 'queue-cb';
|
|
9
8
|
import tempSuffix from 'temp-suffix';
|
|
@@ -15,21 +14,29 @@ import installNPM from '../installNPM/index.js';
|
|
|
15
14
|
import checkMissing from '../lib/checkMissing.js';
|
|
16
15
|
import ensureDestinationParent from '../lib/ensureDestinationParent.js';
|
|
17
16
|
import getTarget from '../lib/getTarget.js';
|
|
17
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
18
18
|
function getVersions(versionExpression, options, callback) {
|
|
19
19
|
// short circuit
|
|
20
|
-
if (isVersion(versionExpression)) callback(undefined, [
|
|
20
|
+
if (isVersion(versionExpression)) return callback(undefined, [
|
|
21
21
|
versionExpression
|
|
22
22
|
]);
|
|
23
|
-
|
|
23
|
+
// deferred: node-resolve-versions pulls node-semvers/fetch-json-cache, only needed for a non-literal version expression
|
|
24
|
+
const resolveVersionsModule = _require('node-resolve-versions');
|
|
25
|
+
const resolveVersions = resolveVersionsModule.default || resolveVersionsModule;
|
|
26
|
+
resolveVersions(versionExpression, options, (err, result)=>callback(err, result));
|
|
24
27
|
}
|
|
25
28
|
export default function install(versionExpression, options, callback) {
|
|
29
|
+
var _options_cachePath, _options_buildPath, _options_installPath;
|
|
26
30
|
const storagePaths = options.storagePath ? createStoragePaths(options.storagePath) : DEFAULT_STORAGE_PATHS;
|
|
27
|
-
options
|
|
28
|
-
|
|
31
|
+
// ?? not spread order: an explicitly-undefined path in the caller's options would overwrite the default
|
|
32
|
+
const resolved = {
|
|
29
33
|
...options,
|
|
30
|
-
...getTarget(options)
|
|
34
|
+
...getTarget(options),
|
|
35
|
+
cachePath: (_options_cachePath = options.cachePath) !== null && _options_cachePath !== void 0 ? _options_cachePath : storagePaths.cachePath,
|
|
36
|
+
buildPath: (_options_buildPath = options.buildPath) !== null && _options_buildPath !== void 0 ? _options_buildPath : storagePaths.buildPath,
|
|
37
|
+
installPath: (_options_installPath = options.installPath) !== null && _options_installPath !== void 0 ? _options_installPath : storagePaths.installPath
|
|
31
38
|
};
|
|
32
|
-
getVersions(versionExpression,
|
|
39
|
+
getVersions(versionExpression, resolved, (err, versions)=>{
|
|
33
40
|
if (err) return callback(err);
|
|
34
41
|
if (!versions || !versions.length) {
|
|
35
42
|
callback(new Error(`Could not resolve versions for: ${versionExpression}`));
|
|
@@ -40,25 +47,27 @@ export default function install(versionExpression, options, callback) {
|
|
|
40
47
|
return;
|
|
41
48
|
}
|
|
42
49
|
const version = versions[0];
|
|
43
|
-
const result = createResult(
|
|
50
|
+
const result = createResult(resolved, version);
|
|
44
51
|
// Fast path: with atomic installs, folder exists = complete installation
|
|
45
52
|
fs.stat(result.installPath, (err)=>{
|
|
46
53
|
if (!err) return callback(undefined, result);
|
|
47
54
|
// Folder doesn't exist - do atomic install with temp folder
|
|
48
55
|
const tempPath = tempSuffix(result.installPath);
|
|
49
56
|
const queue = new Queue(1);
|
|
50
|
-
queue.defer((cb)=>mkdirp(
|
|
57
|
+
queue.defer((cb)=>mkdirp(resolved.cachePath, (err)=>cb(err)));
|
|
51
58
|
queue.defer(ensureDestinationParent.bind(null, tempPath));
|
|
52
59
|
// Install node to temp folder
|
|
53
|
-
queue.defer(installNode.bind(null, version, tempPath,
|
|
60
|
+
queue.defer(installNode.bind(null, version, tempPath, resolved));
|
|
54
61
|
// Check and install npm to temp folder
|
|
55
62
|
// Skip npm download only if bundled npm is modern (>= 3)
|
|
56
63
|
queue.defer((cb)=>{
|
|
57
|
-
checkMissing(tempPath,
|
|
64
|
+
checkMissing(tempPath, resolved, (err, npmMissing)=>{
|
|
58
65
|
if (err) return cb(err);
|
|
59
66
|
// npm not bundled with node - download it
|
|
60
|
-
if (~(npmMissing || []).indexOf('npm')) return installNPM(version, tempPath,
|
|
67
|
+
if (~(npmMissing || []).indexOf('npm')) return installNPM(version, tempPath, resolved, cb);
|
|
61
68
|
// npm is present (bundled with node) - keep it unless the dist index positively says it is ancient (<3)
|
|
69
|
+
// deferred: node-filename-to-dist-paths pulls fetch-json-cache, only needed to check a bundled npm's age
|
|
70
|
+
const { getDistAsync } = _require('node-filename-to-dist-paths');
|
|
62
71
|
getDistAsync(version, (_err, dist)=>{
|
|
63
72
|
const bundledNpmIsAncient = dist && dist.npm && +dist.npm.split('.')[0] < 3;
|
|
64
73
|
if (!bundledNpmIsAncient) return cb(); // unknown version keeps the bundled npm
|
|
@@ -66,7 +75,7 @@ export default function install(versionExpression, options, callback) {
|
|
|
66
75
|
const platform = options.platform;
|
|
67
76
|
const libPath = platform === 'win32' ? tempPath : path.join(tempPath, 'lib');
|
|
68
77
|
const npmPath = path.join(libPath, 'node_modules', 'npm');
|
|
69
|
-
safeRm(npmPath, ()=>installNPM(version, tempPath,
|
|
78
|
+
safeRm(npmPath, ()=>installNPM(version, tempPath, resolved, cb));
|
|
70
79
|
});
|
|
71
80
|
});
|
|
72
81
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/workers/install.ts"],"sourcesContent":["import fs from 'fs';\nimport { safeRm } from 'fs-remove-compat';\nimport isVersion from 'is-version';\nimport mkdirp from 'mkdirp-classic';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/workers/install.ts"],"sourcesContent":["import fs from 'fs';\nimport { safeRm } from 'fs-remove-compat';\nimport isVersion from 'is-version';\nimport mkdirp from 'mkdirp-classic';\nimport Module from 'module';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport tempSuffix from 'temp-suffix';\n\nimport { DEFAULT_STORAGE_PATHS } from '../constants.ts';\n\nimport createResult from '../createResult.ts';\nimport createStoragePaths from '../createStoragePaths.ts';\nimport installNode from '../installNode/index.ts';\n\nimport installNPM from '../installNPM/index.ts';\nimport checkMissing from '../lib/checkMissing.ts';\nimport ensureDestinationParent from '../lib/ensureDestinationParent.ts';\nimport getTarget from '../lib/getTarget.ts';\n\nimport type { InstallCallback, InstallOptions, ResolvedInstallOptions } from '../types.ts';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\n\ntype GetVersionsCallback = (error?: Error | null, results?: string[]) => void;\nfunction getVersions(versionExpression: string, options: InstallOptions, callback: GetVersionsCallback) {\n // short circuit\n if (isVersion(versionExpression)) return callback(undefined, [versionExpression]);\n // deferred: node-resolve-versions pulls node-semvers/fetch-json-cache, only needed for a non-literal version expression\n const resolveVersionsModule = _require('node-resolve-versions');\n const resolveVersions = resolveVersionsModule.default || resolveVersionsModule;\n resolveVersions(versionExpression, options, (err?: Error | null, result?: string[] | unknown[]) => callback(err, result as string[] | undefined));\n}\n\nexport default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): void {\n const storagePaths = options.storagePath ? createStoragePaths(options.storagePath) : DEFAULT_STORAGE_PATHS;\n // ?? not spread order: an explicitly-undefined path in the caller's options would overwrite the default\n const resolved: ResolvedInstallOptions = {\n ...options,\n ...getTarget(options),\n cachePath: options.cachePath ?? storagePaths.cachePath,\n buildPath: options.buildPath ?? storagePaths.buildPath,\n installPath: options.installPath ?? storagePaths.installPath,\n };\n getVersions(versionExpression, resolved, (err?: Error | null, versions?: string[]): void => {\n if (err) return callback(err);\n if (!versions || !versions.length) {\n callback(new Error(`Could not resolve versions for: ${versionExpression}`));\n return;\n }\n if (versions.length !== 1) {\n callback(new Error(`Version ${versionExpression} resolved to multiple versions: ${versions.map((x) => x)}. Expecting one.`));\n return;\n }\n\n const version = versions[0];\n const result = createResult(resolved, version);\n\n // Fast path: with atomic installs, folder exists = complete installation\n fs.stat(result.installPath, (err) => {\n if (!err) return callback(undefined, result);\n\n // Folder doesn't exist - do atomic install with temp folder\n const tempPath = tempSuffix(result.installPath);\n\n const queue = new Queue(1);\n queue.defer((cb) => mkdirp(resolved.cachePath, (err) => cb(err)));\n queue.defer(ensureDestinationParent.bind(null, tempPath));\n\n // Install node to temp folder\n queue.defer(installNode.bind(null, version, tempPath, resolved));\n\n // Check and install npm to temp folder\n // Skip npm download only if bundled npm is modern (>= 3)\n queue.defer((cb) => {\n checkMissing(tempPath, resolved, (err, npmMissing): void => {\n if (err) return cb(err);\n // npm not bundled with node - download it\n if (~(npmMissing || []).indexOf('npm')) return installNPM(version, tempPath, resolved, cb);\n\n // npm is present (bundled with node) - keep it unless the dist index positively says it is ancient (<3)\n // deferred: node-filename-to-dist-paths pulls fetch-json-cache, only needed to check a bundled npm's age\n const { getDistAsync } = _require('node-filename-to-dist-paths');\n getDistAsync(version, (_err: Error | null, dist: { npm?: string }) => {\n const bundledNpmIsAncient = dist && dist.npm && +dist.npm.split('.')[0] < 3;\n if (!bundledNpmIsAncient) return cb(); // unknown version keeps the bundled npm\n\n // old npm (<3) is buggy - delete it so installNPM can override\n const platform = options.platform;\n const libPath = platform === 'win32' ? tempPath : path.join(tempPath, 'lib');\n const npmPath = path.join(libPath, 'node_modules', 'npm');\n safeRm(npmPath, () => installNPM(version, tempPath, resolved, cb));\n });\n });\n });\n\n // Atomic rename: move temp folder to final destination\n queue.defer((cb) => {\n fs.rename(tempPath, result.installPath, (err) => {\n if (!err) return cb();\n // Race condition: another process may have already created dest\n if (err.code === 'EEXIST' || err.code === 'ENOTEMPTY' || err.code === 'EPERM') {\n // Another process won the race - clean up temp and succeed\n safeRm(tempPath, () => cb());\n return;\n }\n cb(err);\n });\n });\n\n queue.await((err) => {\n // Clean up temp folder on error\n if (err) return safeRm(tempPath, () => callback(err));\n\n callback(undefined, result);\n });\n });\n });\n}\n"],"names":["fs","safeRm","isVersion","mkdirp","Module","path","Queue","tempSuffix","DEFAULT_STORAGE_PATHS","createResult","createStoragePaths","installNode","installNPM","checkMissing","ensureDestinationParent","getTarget","_require","require","createRequire","url","getVersions","versionExpression","options","callback","undefined","resolveVersionsModule","resolveVersions","default","err","result","install","storagePaths","storagePath","resolved","cachePath","buildPath","installPath","versions","length","Error","map","x","version","stat","tempPath","queue","defer","cb","bind","npmMissing","indexOf","getDistAsync","_err","dist","bundledNpmIsAncient","npm","split","platform","libPath","join","npmPath","rename","code","await"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-install-release",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.3",
|
|
4
4
|
"description": "Cross-platform solution for installing releases of Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -78,5 +78,11 @@
|
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=0.8"
|
|
81
|
+
},
|
|
82
|
+
"allowScripts": {
|
|
83
|
+
"node-filename-to-dist-paths": true,
|
|
84
|
+
"node-semvers": true,
|
|
85
|
+
"node-version-use": true,
|
|
86
|
+
"thread-sleep-compat": true
|
|
81
87
|
}
|
|
82
88
|
}
|