node-install-release 1.14.8 → 1.14.10

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.
Files changed (81) hide show
  1. package/dist/cjs/constants.d.ts +3 -3
  2. package/dist/cjs/createResult.d.ts +1 -1
  3. package/dist/cjs/createStoragePaths.d.ts +1 -1
  4. package/dist/cjs/files.d.ts +1 -1
  5. package/dist/cjs/index.d.ts +4 -4
  6. package/dist/cjs/installNPM/index.d.ts +1 -1
  7. package/dist/cjs/installNPM/installBin.d.ts +1 -1
  8. package/dist/cjs/installNPM/installBin.js +1 -1
  9. package/dist/cjs/installNPM/installBin.js.map +1 -1
  10. package/dist/cjs/installNPM/installLib.d.ts +1 -1
  11. package/dist/cjs/installNode/index.d.ts +1 -1
  12. package/dist/cjs/installNode/index.js +1 -1
  13. package/dist/cjs/installNode/index.js.map +1 -1
  14. package/dist/cjs/installNode/installCompressed.d.ts +1 -1
  15. package/dist/cjs/installNode/installExe.d.ts +1 -1
  16. package/dist/cjs/installNode/installFilename.d.ts +1 -1
  17. package/dist/cjs/installNode/installSource/buildPosix.d.ts +1 -1
  18. package/dist/cjs/installNode/installSource/buildWin32.d.ts +1 -1
  19. package/dist/cjs/installNode/installSource/index.d.ts +1 -1
  20. package/dist/cjs/installNode/validateDownload.d.ts +1 -1
  21. package/dist/cjs/lib/checkMissing.d.ts +1 -1
  22. package/dist/cjs/lib/conditionalCache.d.ts +1 -1
  23. package/dist/cjs/lib/conditionalCopy.d.ts +1 -1
  24. package/dist/cjs/lib/conditionalExtract.d.ts +1 -1
  25. package/dist/cjs/lib/ensureDestinationParent.d.ts +1 -1
  26. package/dist/cjs/lib/getTarget.d.ts +1 -1
  27. package/dist/cjs/workers/install.d.ts +1 -1
  28. package/dist/esm/constants.d.ts +3 -3
  29. package/dist/esm/createResult.d.ts +1 -1
  30. package/dist/esm/createStoragePaths.d.ts +1 -1
  31. package/dist/esm/files.d.ts +1 -1
  32. package/dist/esm/index.d.ts +4 -4
  33. package/dist/esm/installNPM/index.d.ts +1 -1
  34. package/dist/esm/installNPM/installBin.d.ts +1 -1
  35. package/dist/esm/installNPM/installBin.js +3 -1
  36. package/dist/esm/installNPM/installBin.js.map +1 -1
  37. package/dist/esm/installNPM/installLib.d.ts +1 -1
  38. package/dist/esm/installNode/index.d.ts +1 -1
  39. package/dist/esm/installNode/index.js +3 -1
  40. package/dist/esm/installNode/index.js.map +1 -1
  41. package/dist/esm/installNode/installCompressed.d.ts +1 -1
  42. package/dist/esm/installNode/installExe.d.ts +1 -1
  43. package/dist/esm/installNode/installFilename.d.ts +1 -1
  44. package/dist/esm/installNode/installSource/buildPosix.d.ts +1 -1
  45. package/dist/esm/installNode/installSource/buildWin32.d.ts +1 -1
  46. package/dist/esm/installNode/installSource/index.d.ts +1 -1
  47. package/dist/esm/installNode/validateDownload.d.ts +1 -1
  48. package/dist/esm/lib/checkMissing.d.ts +1 -1
  49. package/dist/esm/lib/conditionalCache.d.ts +1 -1
  50. package/dist/esm/lib/conditionalCopy.d.ts +1 -1
  51. package/dist/esm/lib/conditionalExtract.d.ts +1 -1
  52. package/dist/esm/lib/ensureDestinationParent.d.ts +1 -1
  53. package/dist/esm/lib/getTarget.d.ts +1 -1
  54. package/dist/esm/workers/install.d.ts +1 -1
  55. package/package.json +2 -2
  56. package/dist/cjs/cli.d.cts +0 -2
  57. package/dist/cjs/constants.d.cts +0 -25
  58. package/dist/cjs/createResult.d.cts +0 -2
  59. package/dist/cjs/createStoragePaths.d.cts +0 -2
  60. package/dist/cjs/files.d.cts +0 -3
  61. package/dist/cjs/index.d.cts +0 -8
  62. package/dist/cjs/installNPM/index.d.cts +0 -2
  63. package/dist/cjs/installNPM/installBin.d.cts +0 -2
  64. package/dist/cjs/installNPM/installLib.d.cts +0 -3
  65. package/dist/cjs/installNode/index.d.cts +0 -2
  66. package/dist/cjs/installNode/installCompressed.d.cts +0 -2
  67. package/dist/cjs/installNode/installExe.d.cts +0 -2
  68. package/dist/cjs/installNode/installFilename.d.cts +0 -2
  69. package/dist/cjs/installNode/installSource/buildPosix.d.cts +0 -2
  70. package/dist/cjs/installNode/installSource/buildWin32.d.cts +0 -2
  71. package/dist/cjs/installNode/installSource/index.d.cts +0 -2
  72. package/dist/cjs/installNode/validateDownload.d.cts +0 -2
  73. package/dist/cjs/lib/checkMissing.d.cts +0 -3
  74. package/dist/cjs/lib/conditionalCache.d.cts +0 -2
  75. package/dist/cjs/lib/conditionalCopy.d.cts +0 -2
  76. package/dist/cjs/lib/conditionalExtract.d.cts +0 -2
  77. package/dist/cjs/lib/copyFile.d.cts +0 -2
  78. package/dist/cjs/lib/ensureDestinationParent.d.cts +0 -2
  79. package/dist/cjs/lib/getTarget.d.cts +0 -2
  80. package/dist/cjs/types.d.cts +0 -39
  81. package/dist/cjs/workers/install.d.cts +0 -2
@@ -1,7 +1,7 @@
1
- import type { FilePath } from './types.ts';
2
- export declare const FILES: Record<string, import("./types.ts").File[]>;
1
+ import type { FilePath } from './types.js';
2
+ export declare const FILES: Record<string, import("./types.js").File[]>;
3
3
  export declare const DEFAULT_STORAGE_PATH: string;
4
- export declare const DEFAULT_STORAGE_PATHS: import("./types.ts").StorageLocations;
4
+ export declare const DEFAULT_STORAGE_PATHS: import("./types.js").StorageLocations;
5
5
  export declare const FILE_PLATFORMS: string[];
6
6
  export declare const FILE_PLATFORM_MAP: {
7
7
  win: string;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, InstallResult } from './types.ts';
1
+ import type { InstallOptions, InstallResult } from './types.js';
2
2
  export default function createResult(options: InstallOptions, version: string): InstallResult;
@@ -1,2 +1,2 @@
1
- import type { StorageLocations } from './types.ts';
1
+ import type { StorageLocations } from './types.js';
2
2
  export default function createStoragePaths(storagePath: string): StorageLocations;
@@ -1,3 +1,3 @@
1
- import type { File } from './types.ts';
1
+ import type { File } from './types.js';
2
2
  declare const _default: Record<string, File[]>;
3
3
  export default _default;
@@ -1,8 +1,8 @@
1
- import type { InstallCallback, InstallOptions, InstallResult } from './types.ts';
2
- export type * from './types.ts';
1
+ import type { InstallCallback, InstallOptions, InstallResult } from './types.js';
2
+ export type * from './types.js';
3
3
  export default function install(versionExpression: string): Promise<InstallResult>;
4
4
  export default function install(versionExpression: string, options: InstallOptions): Promise<InstallResult>;
5
5
  export default function install(versionExpression: string, callback: InstallCallback): undefined;
6
6
  export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;
7
- export { default as createResult } from './createResult.ts';
8
- export { default as createStoragePaths } from './createStoragePaths.ts';
7
+ export { default as createResult } from './createResult.js';
8
+ export { default as createStoragePaths } from './createStoragePaths.js';
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback): void;
@@ -22,7 +22,7 @@ function installBin(_version, dest, options, callback) {
22
22
  var files = _constantsts.NPM_FILE_PATHS[platform] || _constantsts.NPM_FILE_PATHS.posix;
23
23
  var queue = new _queuecb.default();
24
24
  files.forEach(function(file) {
25
- return queue.defer(_conditionalCopyts.default.bind(null, _path.default.join(dest, file.src), _path.default.join(dest, file.dest), file.optional));
25
+ queue.defer(_conditionalCopyts.default.bind(null, _path.default.join(dest, file.src), _path.default.join(dest, file.dest), file.optional));
26
26
  });
27
27
  queue.await(callback);
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installBin.ts"],"sourcesContent":["import path from 'path';\nimport Queue from 'queue-cb';\nimport { NPM_FILE_PATHS } from '../constants.ts';\nimport conditionalCopy from '../lib/conditionalCopy.ts';\n\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\n\nexport default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback) {\n const platform = options.platform;\n const files = NPM_FILE_PATHS[platform] || NPM_FILE_PATHS.posix;\n\n const queue = new Queue();\n files.forEach((file) => queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional)));\n queue.await(callback);\n}\n"],"names":["installBin","_version","dest","options","callback","platform","files","NPM_FILE_PATHS","posix","queue","Queue","forEach","file","defer","conditionalCopy","bind","path","join","src","optional","await"],"mappings":";;;;+BAOA;;;eAAwBA;;;2DAPP;8DACC;2BACa;wEACH;;;;;;AAIb,SAASA,WAAWC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IACnH,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,QAAQC,2BAAc,CAACF,SAAS,IAAIE,2BAAc,CAACC,KAAK;IAE9D,IAAMC,QAAQ,IAAIC,gBAAK;IACvBJ,MAAMK,OAAO,CAAC,SAACC;eAASH,MAAMI,KAAK,CAACC,0BAAe,CAACC,IAAI,CAAC,MAAMC,aAAI,CAACC,IAAI,CAACf,MAAMU,KAAKM,GAAG,GAAGF,aAAI,CAACC,IAAI,CAACf,MAAMU,KAAKV,IAAI,GAAGU,KAAKO,QAAQ;;IACnIV,MAAMW,KAAK,CAAChB;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installBin.ts"],"sourcesContent":["import path from 'path';\nimport Queue from 'queue-cb';\nimport { NPM_FILE_PATHS } from '../constants.ts';\nimport conditionalCopy from '../lib/conditionalCopy.ts';\n\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\n\nexport default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback) {\n const platform = options.platform;\n const files = NPM_FILE_PATHS[platform] || NPM_FILE_PATHS.posix;\n\n const queue = new Queue();\n files.forEach((file) => {\n queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional));\n });\n queue.await(callback);\n}\n"],"names":["installBin","_version","dest","options","callback","platform","files","NPM_FILE_PATHS","posix","queue","Queue","forEach","file","defer","conditionalCopy","bind","path","join","src","optional","await"],"mappings":";;;;+BAOA;;;eAAwBA;;;2DAPP;8DACC;2BACa;wEACH;;;;;;AAIb,SAASA,WAAWC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IACnH,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,QAAQC,2BAAc,CAACF,SAAS,IAAIE,2BAAc,CAACC,KAAK;IAE9D,IAAMC,QAAQ,IAAIC,gBAAK;IACvBJ,MAAMK,OAAO,CAAC,SAACC;QACbH,MAAMI,KAAK,CAACC,0BAAe,CAACC,IAAI,CAAC,MAAMC,aAAI,CAACC,IAAI,CAACf,MAAMU,KAAKM,GAAG,GAAGF,aAAI,CAACC,IAAI,CAACf,MAAMU,KAAKV,IAAI,GAAGU,KAAKO,QAAQ;IAC7G;IACAV,MAAMW,KAAK,CAAChB;AACd"}
@@ -1,3 +1,3 @@
1
- import type { InstallOptions } from '../types.ts';
1
+ import type { InstallOptions } from '../types.js';
2
2
  export type Callback = (error?: Error, npmVersion?: string) => undefined;
3
3
  export default function installLib(version: string, dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -42,7 +42,7 @@ function install(version, dest, options, callback) {
42
42
  ].concat(parts.slice(2)).join('-');
43
43
  });
44
44
  (_constantsts.FILES[filePlatform] || []).forEach(function(x) {
45
- return filenames.push(x.filename);
45
+ filenames.push(x.filename);
46
46
  });
47
47
  filenames.push('src');
48
48
  filenames = filenames.filter(function(filename, i) {
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/index.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILES } from '../constants.ts';\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\nimport installFilename from './installFilename.ts';\n\nexport default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined {\n let filenames = null;\n\n // a specific filename\n if (options.filename) filenames = [options.filename];\n // infer with fallbacks\n else {\n const { platform, arch } = options;\n const filePlatform = FILE_PLATFORM_MAP[platform] || platform;\n const parts = [filePlatform, arch];\n if (options.type) parts.push(options.type);\n if (options.compression) parts.push(options.compression);\n\n // generate the files in search order\n const archs = [arch, process.arch];\n filenames = archs.map((a) => [filePlatform, a].concat(parts.slice(2)).join('-'));\n (FILES[filePlatform] || []).forEach((x) => filenames.push(x.filename));\n filenames.push('src');\n filenames = filenames.filter((filename, i) => filenames.indexOf(filename) === i);\n }\n\n const tryNext = (cb) => {\n if (filenames.length === 0) return cb(new Error(`Failed to find installable for ${version}${options.filename ? ` Filename: ${options.filename}` : ''}`));\n installFilename(filenames.shift(), version, dest, options, (err) => (err ? tryNext(cb) : cb()));\n };\n tryNext((err) => {\n console.log(`node ${version.slice(1)} ${!err ? 'installed' : `install failed. Error: ${err.message}`}`);\n callback(err);\n });\n}\n"],"names":["install","version","dest","options","callback","filenames","filename","platform","arch","filePlatform","FILE_PLATFORM_MAP","parts","type","push","compression","archs","process","map","a","concat","slice","join","FILES","forEach","x","filter","i","indexOf","tryNext","cb","length","Error","installFilename","shift","err","console","log","message"],"mappings":";;;;+BAIA;;;eAAwBA;;;2BAJiB;wEAEb;;;;;;AAEb,SAASA,QAAQC,OAAe,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IAC/G,IAAIC,YAAY;IAEhB,sBAAsB;IACtB,IAAIF,QAAQG,QAAQ,EAAED,YAAY;QAACF,QAAQG,QAAQ;KAAC;SAE/C;QACH,IAAQC,WAAmBJ,QAAnBI,UAAUC,OAASL,QAATK;QAClB,IAAMC,eAAeC,8BAAiB,CAACH,SAAS,IAAIA;QACpD,IAAMI,QAAQ;YAACF;YAAcD;SAAK;QAClC,IAAIL,QAAQS,IAAI,EAAED,MAAME,IAAI,CAACV,QAAQS,IAAI;QACzC,IAAIT,QAAQW,WAAW,EAAEH,MAAME,IAAI,CAACV,QAAQW,WAAW;QAEvD,qCAAqC;QACrC,IAAMC,QAAQ;YAACP;YAAMQ,QAAQR,IAAI;SAAC;QAClCH,YAAYU,MAAME,GAAG,CAAC,SAACC;mBAAM;gBAACT;gBAAcS;aAAE,CAACC,MAAM,CAACR,MAAMS,KAAK,CAAC,IAAIC,IAAI,CAAC;;QAC1EC,CAAAA,kBAAK,CAACb,aAAa,IAAI,EAAE,AAAD,EAAGc,OAAO,CAAC,SAACC;mBAAMnB,UAAUQ,IAAI,CAACW,EAAElB,QAAQ;;QACpED,UAAUQ,IAAI,CAAC;QACfR,YAAYA,UAAUoB,MAAM,CAAC,SAACnB,UAAUoB;mBAAMrB,UAAUsB,OAAO,CAACrB,cAAcoB;;IAChF;IAEA,IAAME,UAAU,SAACC;QACf,IAAIxB,UAAUyB,MAAM,KAAK,GAAG,OAAOD,GAAG,IAAIE,MAAM,AAAC,kCAA2C5B,OAAVF,SAAmE,OAAzDE,QAAQG,QAAQ,GAAG,AAAC,cAA8B,OAAjBH,QAAQG,QAAQ,IAAK;QAClJ0B,IAAAA,0BAAe,EAAC3B,UAAU4B,KAAK,IAAIhC,SAASC,MAAMC,SAAS,SAAC+B;mBAASA,MAAMN,QAAQC,MAAMA;;IAC3F;IACAD,QAAQ,SAACM;QACPC,QAAQC,GAAG,CAAC,AAAC,QAA2B,OAApBnC,QAAQmB,KAAK,CAAC,IAAG,KAAgE,OAA7D,CAACc,MAAM,cAAc,AAAC,0BAAqC,OAAZA,IAAIG,OAAO;QAClGjC,SAAS8B;IACX;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/index.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILES } from '../constants.ts';\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\nimport installFilename from './installFilename.ts';\n\nexport default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined {\n let filenames = null;\n\n // a specific filename\n if (options.filename) filenames = [options.filename];\n // infer with fallbacks\n else {\n const { platform, arch } = options;\n const filePlatform = FILE_PLATFORM_MAP[platform] || platform;\n const parts = [filePlatform, arch];\n if (options.type) parts.push(options.type);\n if (options.compression) parts.push(options.compression);\n\n // generate the files in search order\n const archs = [arch, process.arch];\n filenames = archs.map((a) => [filePlatform, a].concat(parts.slice(2)).join('-'));\n (FILES[filePlatform] || []).forEach((x) => {\n filenames.push(x.filename);\n });\n filenames.push('src');\n filenames = filenames.filter((filename, i) => filenames.indexOf(filename) === i);\n }\n\n const tryNext = (cb) => {\n if (filenames.length === 0) return cb(new Error(`Failed to find installable for ${version}${options.filename ? ` Filename: ${options.filename}` : ''}`));\n installFilename(filenames.shift(), version, dest, options, (err) => (err ? tryNext(cb) : cb()));\n };\n tryNext((err) => {\n console.log(`node ${version.slice(1)} ${!err ? 'installed' : `install failed. Error: ${err.message}`}`);\n callback(err);\n });\n}\n"],"names":["install","version","dest","options","callback","filenames","filename","platform","arch","filePlatform","FILE_PLATFORM_MAP","parts","type","push","compression","archs","process","map","a","concat","slice","join","FILES","forEach","x","filter","i","indexOf","tryNext","cb","length","Error","installFilename","shift","err","console","log","message"],"mappings":";;;;+BAIA;;;eAAwBA;;;2BAJiB;wEAEb;;;;;;AAEb,SAASA,QAAQC,OAAe,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IAC/G,IAAIC,YAAY;IAEhB,sBAAsB;IACtB,IAAIF,QAAQG,QAAQ,EAAED,YAAY;QAACF,QAAQG,QAAQ;KAAC;SAE/C;QACH,IAAQC,WAAmBJ,QAAnBI,UAAUC,OAASL,QAATK;QAClB,IAAMC,eAAeC,8BAAiB,CAACH,SAAS,IAAIA;QACpD,IAAMI,QAAQ;YAACF;YAAcD;SAAK;QAClC,IAAIL,QAAQS,IAAI,EAAED,MAAME,IAAI,CAACV,QAAQS,IAAI;QACzC,IAAIT,QAAQW,WAAW,EAAEH,MAAME,IAAI,CAACV,QAAQW,WAAW;QAEvD,qCAAqC;QACrC,IAAMC,QAAQ;YAACP;YAAMQ,QAAQR,IAAI;SAAC;QAClCH,YAAYU,MAAME,GAAG,CAAC,SAACC;mBAAM;gBAACT;gBAAcS;aAAE,CAACC,MAAM,CAACR,MAAMS,KAAK,CAAC,IAAIC,IAAI,CAAC;;QAC1EC,CAAAA,kBAAK,CAACb,aAAa,IAAI,EAAE,AAAD,EAAGc,OAAO,CAAC,SAACC;YACnCnB,UAAUQ,IAAI,CAACW,EAAElB,QAAQ;QAC3B;QACAD,UAAUQ,IAAI,CAAC;QACfR,YAAYA,UAAUoB,MAAM,CAAC,SAACnB,UAAUoB;mBAAMrB,UAAUsB,OAAO,CAACrB,cAAcoB;;IAChF;IAEA,IAAME,UAAU,SAACC;QACf,IAAIxB,UAAUyB,MAAM,KAAK,GAAG,OAAOD,GAAG,IAAIE,MAAM,AAAC,kCAA2C5B,OAAVF,SAAmE,OAAzDE,QAAQG,QAAQ,GAAG,AAAC,cAA8B,OAAjBH,QAAQG,QAAQ,IAAK;QAClJ0B,IAAAA,0BAAe,EAAC3B,UAAU4B,KAAK,IAAIhC,SAASC,MAAMC,SAAS,SAAC+B;mBAASA,MAAMN,QAAQC,MAAMA;;IAC3F;IACAD,QAAQ,SAACM;QACPC,QAAQC,GAAG,CAAC,AAAC,QAA2B,OAApBnC,QAAQmB,KAAK,CAAC,IAAG,KAAgE,OAA7D,CAACc,MAAM,cAAc,AAAC,0BAAqC,OAAZA,IAAIG,OAAO;QAClGjC,SAAS8B;IACX;AACF"}
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installExe(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installFilename(filename: string, version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function installPosix(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function installWin32(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function InstallSource(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function validateDownload(distPath: string, installPath: string, callback: NoParamCallback): undefined;
@@ -1,3 +1,3 @@
1
- import type { InstallOptions } from '../types.ts';
1
+ import type { InstallOptions } from '../types.js';
2
2
  export type Callback = (error?: Error, missing?: string[]) => undefined;
3
3
  export default function checkMissing(dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function conditionalCache(endpoint: string, dest: string, options: InstallOptions, callback?: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function conditionalCopy(src: string, dest: string, optional: boolean, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function conditionalExtract(src: string, dest: string, options: InstallOptions | NoParamCallback, callback?: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function ensureDestinationParent(dest: string, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, Target } from '../types.ts';
1
+ import type { InstallOptions, Target } from '../types.js';
2
2
  export default function getTarget(options: InstallOptions): Target;
@@ -1,2 +1,2 @@
1
- import type { InstallCallback, InstallOptions } from '../types.ts';
1
+ import type { InstallCallback, InstallOptions } from '../types.js';
2
2
  export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;
@@ -1,7 +1,7 @@
1
- import type { FilePath } from './types.ts';
2
- export declare const FILES: Record<string, import("./types.ts").File[]>;
1
+ import type { FilePath } from './types.js';
2
+ export declare const FILES: Record<string, import("./types.js").File[]>;
3
3
  export declare const DEFAULT_STORAGE_PATH: string;
4
- export declare const DEFAULT_STORAGE_PATHS: import("./types.ts").StorageLocations;
4
+ export declare const DEFAULT_STORAGE_PATHS: import("./types.js").StorageLocations;
5
5
  export declare const FILE_PLATFORMS: string[];
6
6
  export declare const FILE_PLATFORM_MAP: {
7
7
  win: string;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, InstallResult } from './types.ts';
1
+ import type { InstallOptions, InstallResult } from './types.js';
2
2
  export default function createResult(options: InstallOptions, version: string): InstallResult;
@@ -1,2 +1,2 @@
1
- import type { StorageLocations } from './types.ts';
1
+ import type { StorageLocations } from './types.js';
2
2
  export default function createStoragePaths(storagePath: string): StorageLocations;
@@ -1,3 +1,3 @@
1
- import type { File } from './types.ts';
1
+ import type { File } from './types.js';
2
2
  declare const _default: Record<string, File[]>;
3
3
  export default _default;
@@ -1,8 +1,8 @@
1
- import type { InstallCallback, InstallOptions, InstallResult } from './types.ts';
2
- export type * from './types.ts';
1
+ import type { InstallCallback, InstallOptions, InstallResult } from './types.js';
2
+ export type * from './types.js';
3
3
  export default function install(versionExpression: string): Promise<InstallResult>;
4
4
  export default function install(versionExpression: string, options: InstallOptions): Promise<InstallResult>;
5
5
  export default function install(versionExpression: string, callback: InstallCallback): undefined;
6
6
  export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;
7
- export { default as createResult } from './createResult.ts';
8
- export { default as createStoragePaths } from './createStoragePaths.ts';
7
+ export { default as createResult } from './createResult.js';
8
+ export { default as createStoragePaths } from './createStoragePaths.js';
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback): void;
@@ -6,6 +6,8 @@ export default function installBin(_version, dest, options, callback) {
6
6
  const platform = options.platform;
7
7
  const files = NPM_FILE_PATHS[platform] || NPM_FILE_PATHS.posix;
8
8
  const queue = new Queue();
9
- files.forEach((file)=>queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional)));
9
+ files.forEach((file)=>{
10
+ queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional));
11
+ });
10
12
  queue.await(callback);
11
13
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installBin.ts"],"sourcesContent":["import path from 'path';\nimport Queue from 'queue-cb';\nimport { NPM_FILE_PATHS } from '../constants.ts';\nimport conditionalCopy from '../lib/conditionalCopy.ts';\n\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\n\nexport default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback) {\n const platform = options.platform;\n const files = NPM_FILE_PATHS[platform] || NPM_FILE_PATHS.posix;\n\n const queue = new Queue();\n files.forEach((file) => queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional)));\n queue.await(callback);\n}\n"],"names":["path","Queue","NPM_FILE_PATHS","conditionalCopy","installBin","_version","dest","options","callback","platform","files","posix","queue","forEach","file","defer","bind","join","src","optional","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,SAASC,cAAc,QAAQ,kBAAkB;AACjD,OAAOC,qBAAqB,4BAA4B;AAIxD,eAAe,SAASC,WAAWC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IACnH,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,QAAQR,cAAc,CAACO,SAAS,IAAIP,eAAeS,KAAK;IAE9D,MAAMC,QAAQ,IAAIX;IAClBS,MAAMG,OAAO,CAAC,CAACC,OAASF,MAAMG,KAAK,CAACZ,gBAAgBa,IAAI,CAAC,MAAMhB,KAAKiB,IAAI,CAACX,MAAMQ,KAAKI,GAAG,GAAGlB,KAAKiB,IAAI,CAACX,MAAMQ,KAAKR,IAAI,GAAGQ,KAAKK,QAAQ;IACnIP,MAAMQ,KAAK,CAACZ;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installBin.ts"],"sourcesContent":["import path from 'path';\nimport Queue from 'queue-cb';\nimport { NPM_FILE_PATHS } from '../constants.ts';\nimport conditionalCopy from '../lib/conditionalCopy.ts';\n\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\n\nexport default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback) {\n const platform = options.platform;\n const files = NPM_FILE_PATHS[platform] || NPM_FILE_PATHS.posix;\n\n const queue = new Queue();\n files.forEach((file) => {\n queue.defer(conditionalCopy.bind(null, path.join(dest, file.src), path.join(dest, file.dest), file.optional));\n });\n queue.await(callback);\n}\n"],"names":["path","Queue","NPM_FILE_PATHS","conditionalCopy","installBin","_version","dest","options","callback","platform","files","posix","queue","forEach","file","defer","bind","join","src","optional","await"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,SAASC,cAAc,QAAQ,kBAAkB;AACjD,OAAOC,qBAAqB,4BAA4B;AAIxD,eAAe,SAASC,WAAWC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IACnH,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,QAAQR,cAAc,CAACO,SAAS,IAAIP,eAAeS,KAAK;IAE9D,MAAMC,QAAQ,IAAIX;IAClBS,MAAMG,OAAO,CAAC,CAACC;QACbF,MAAMG,KAAK,CAACZ,gBAAgBa,IAAI,CAAC,MAAMhB,KAAKiB,IAAI,CAACX,MAAMQ,KAAKI,GAAG,GAAGlB,KAAKiB,IAAI,CAACX,MAAMQ,KAAKR,IAAI,GAAGQ,KAAKK,QAAQ;IAC7G;IACAP,MAAMQ,KAAK,CAACZ;AACd"}
@@ -1,3 +1,3 @@
1
- import type { InstallOptions } from '../types.ts';
1
+ import type { InstallOptions } from '../types.js';
2
2
  export type Callback = (error?: Error, npmVersion?: string) => undefined;
3
3
  export default function installLib(version: string, dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -24,7 +24,9 @@ export default function install(version, dest, options, callback) {
24
24
  filePlatform,
25
25
  a
26
26
  ].concat(parts.slice(2)).join('-'));
27
- (FILES[filePlatform] || []).forEach((x)=>filenames.push(x.filename));
27
+ (FILES[filePlatform] || []).forEach((x)=>{
28
+ filenames.push(x.filename);
29
+ });
28
30
  filenames.push('src');
29
31
  filenames = filenames.filter((filename, i)=>filenames.indexOf(filename) === i);
30
32
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/index.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILES } from '../constants.ts';\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\nimport installFilename from './installFilename.ts';\n\nexport default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined {\n let filenames = null;\n\n // a specific filename\n if (options.filename) filenames = [options.filename];\n // infer with fallbacks\n else {\n const { platform, arch } = options;\n const filePlatform = FILE_PLATFORM_MAP[platform] || platform;\n const parts = [filePlatform, arch];\n if (options.type) parts.push(options.type);\n if (options.compression) parts.push(options.compression);\n\n // generate the files in search order\n const archs = [arch, process.arch];\n filenames = archs.map((a) => [filePlatform, a].concat(parts.slice(2)).join('-'));\n (FILES[filePlatform] || []).forEach((x) => filenames.push(x.filename));\n filenames.push('src');\n filenames = filenames.filter((filename, i) => filenames.indexOf(filename) === i);\n }\n\n const tryNext = (cb) => {\n if (filenames.length === 0) return cb(new Error(`Failed to find installable for ${version}${options.filename ? ` Filename: ${options.filename}` : ''}`));\n installFilename(filenames.shift(), version, dest, options, (err) => (err ? tryNext(cb) : cb()));\n };\n tryNext((err) => {\n console.log(`node ${version.slice(1)} ${!err ? 'installed' : `install failed. Error: ${err.message}`}`);\n callback(err);\n });\n}\n"],"names":["FILE_PLATFORM_MAP","FILES","installFilename","install","version","dest","options","callback","filenames","filename","platform","arch","filePlatform","parts","type","push","compression","archs","process","map","a","concat","slice","join","forEach","x","filter","i","indexOf","tryNext","cb","length","Error","shift","err","console","log","message"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,KAAK,QAAQ,kBAAkB;AAE3D,OAAOC,qBAAqB,uBAAuB;AAEnD,eAAe,SAASC,QAAQC,OAAe,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IAC/G,IAAIC,YAAY;IAEhB,sBAAsB;IACtB,IAAIF,QAAQG,QAAQ,EAAED,YAAY;QAACF,QAAQG,QAAQ;KAAC;SAE/C;QACH,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGL;QAC3B,MAAMM,eAAeZ,iBAAiB,CAACU,SAAS,IAAIA;QACpD,MAAMG,QAAQ;YAACD;YAAcD;SAAK;QAClC,IAAIL,QAAQQ,IAAI,EAAED,MAAME,IAAI,CAACT,QAAQQ,IAAI;QACzC,IAAIR,QAAQU,WAAW,EAAEH,MAAME,IAAI,CAACT,QAAQU,WAAW;QAEvD,qCAAqC;QACrC,MAAMC,QAAQ;YAACN;YAAMO,QAAQP,IAAI;SAAC;QAClCH,YAAYS,MAAME,GAAG,CAAC,CAACC,IAAM;gBAACR;gBAAcQ;aAAE,CAACC,MAAM,CAACR,MAAMS,KAAK,CAAC,IAAIC,IAAI,CAAC;QAC1EtB,CAAAA,KAAK,CAACW,aAAa,IAAI,EAAE,AAAD,EAAGY,OAAO,CAAC,CAACC,IAAMjB,UAAUO,IAAI,CAACU,EAAEhB,QAAQ;QACpED,UAAUO,IAAI,CAAC;QACfP,YAAYA,UAAUkB,MAAM,CAAC,CAACjB,UAAUkB,IAAMnB,UAAUoB,OAAO,CAACnB,cAAckB;IAChF;IAEA,MAAME,UAAU,CAACC;QACf,IAAItB,UAAUuB,MAAM,KAAK,GAAG,OAAOD,GAAG,IAAIE,MAAM,CAAC,+BAA+B,EAAE5B,UAAUE,QAAQG,QAAQ,GAAG,CAAC,WAAW,EAAEH,QAAQG,QAAQ,EAAE,GAAG,IAAI;QACtJP,gBAAgBM,UAAUyB,KAAK,IAAI7B,SAASC,MAAMC,SAAS,CAAC4B,MAASA,MAAML,QAAQC,MAAMA;IAC3F;IACAD,QAAQ,CAACK;QACPC,QAAQC,GAAG,CAAC,CAAC,KAAK,EAAEhC,QAAQkB,KAAK,CAAC,GAAG,CAAC,EAAE,CAACY,MAAM,cAAc,CAAC,uBAAuB,EAAEA,IAAIG,OAAO,EAAE,EAAE;QACtG9B,SAAS2B;IACX;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/index.ts"],"sourcesContent":["import { FILE_PLATFORM_MAP, FILES } from '../constants.ts';\nimport type { InstallOptions, NoParamCallback } from '../types.ts';\nimport installFilename from './installFilename.ts';\n\nexport default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined {\n let filenames = null;\n\n // a specific filename\n if (options.filename) filenames = [options.filename];\n // infer with fallbacks\n else {\n const { platform, arch } = options;\n const filePlatform = FILE_PLATFORM_MAP[platform] || platform;\n const parts = [filePlatform, arch];\n if (options.type) parts.push(options.type);\n if (options.compression) parts.push(options.compression);\n\n // generate the files in search order\n const archs = [arch, process.arch];\n filenames = archs.map((a) => [filePlatform, a].concat(parts.slice(2)).join('-'));\n (FILES[filePlatform] || []).forEach((x) => {\n filenames.push(x.filename);\n });\n filenames.push('src');\n filenames = filenames.filter((filename, i) => filenames.indexOf(filename) === i);\n }\n\n const tryNext = (cb) => {\n if (filenames.length === 0) return cb(new Error(`Failed to find installable for ${version}${options.filename ? ` Filename: ${options.filename}` : ''}`));\n installFilename(filenames.shift(), version, dest, options, (err) => (err ? tryNext(cb) : cb()));\n };\n tryNext((err) => {\n console.log(`node ${version.slice(1)} ${!err ? 'installed' : `install failed. Error: ${err.message}`}`);\n callback(err);\n });\n}\n"],"names":["FILE_PLATFORM_MAP","FILES","installFilename","install","version","dest","options","callback","filenames","filename","platform","arch","filePlatform","parts","type","push","compression","archs","process","map","a","concat","slice","join","forEach","x","filter","i","indexOf","tryNext","cb","length","Error","shift","err","console","log","message"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,KAAK,QAAQ,kBAAkB;AAE3D,OAAOC,qBAAqB,uBAAuB;AAEnD,eAAe,SAASC,QAAQC,OAAe,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAAyB;IAC/G,IAAIC,YAAY;IAEhB,sBAAsB;IACtB,IAAIF,QAAQG,QAAQ,EAAED,YAAY;QAACF,QAAQG,QAAQ;KAAC;SAE/C;QACH,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGL;QAC3B,MAAMM,eAAeZ,iBAAiB,CAACU,SAAS,IAAIA;QACpD,MAAMG,QAAQ;YAACD;YAAcD;SAAK;QAClC,IAAIL,QAAQQ,IAAI,EAAED,MAAME,IAAI,CAACT,QAAQQ,IAAI;QACzC,IAAIR,QAAQU,WAAW,EAAEH,MAAME,IAAI,CAACT,QAAQU,WAAW;QAEvD,qCAAqC;QACrC,MAAMC,QAAQ;YAACN;YAAMO,QAAQP,IAAI;SAAC;QAClCH,YAAYS,MAAME,GAAG,CAAC,CAACC,IAAM;gBAACR;gBAAcQ;aAAE,CAACC,MAAM,CAACR,MAAMS,KAAK,CAAC,IAAIC,IAAI,CAAC;QAC1EtB,CAAAA,KAAK,CAACW,aAAa,IAAI,EAAE,AAAD,EAAGY,OAAO,CAAC,CAACC;YACnCjB,UAAUO,IAAI,CAACU,EAAEhB,QAAQ;QAC3B;QACAD,UAAUO,IAAI,CAAC;QACfP,YAAYA,UAAUkB,MAAM,CAAC,CAACjB,UAAUkB,IAAMnB,UAAUoB,OAAO,CAACnB,cAAckB;IAChF;IAEA,MAAME,UAAU,CAACC;QACf,IAAItB,UAAUuB,MAAM,KAAK,GAAG,OAAOD,GAAG,IAAIE,MAAM,CAAC,+BAA+B,EAAE5B,UAAUE,QAAQG,QAAQ,GAAG,CAAC,WAAW,EAAEH,QAAQG,QAAQ,EAAE,GAAG,IAAI;QACtJP,gBAAgBM,UAAUyB,KAAK,IAAI7B,SAASC,MAAMC,SAAS,CAAC4B,MAASA,MAAML,QAAQC,MAAMA;IAC3F;IACAD,QAAQ,CAACK;QACPC,QAAQC,GAAG,CAAC,CAAC,KAAK,EAAEhC,QAAQkB,KAAK,CAAC,GAAG,CAAC,EAAE,CAACY,MAAM,cAAc,CAAC,uBAAuB,EAAEA,IAAIG,OAAO,EAAE,EAAE;QACtG9B,SAAS2B;IACX;AACF"}
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installExe(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function installFilename(filename: string, version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function installPosix(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function installWin32(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../../types.js';
2
2
  export default function InstallSource(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function validateDownload(distPath: string, installPath: string, callback: NoParamCallback): undefined;
@@ -1,3 +1,3 @@
1
- import type { InstallOptions } from '../types.ts';
1
+ import type { InstallOptions } from '../types.js';
2
2
  export type Callback = (error?: Error, missing?: string[]) => undefined;
3
3
  export default function checkMissing(dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function conditionalCache(endpoint: string, dest: string, options: InstallOptions, callback?: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function conditionalCopy(src: string, dest: string, optional: boolean, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
1
+ import type { InstallOptions, NoParamCallback } from '../types.js';
2
2
  export default function conditionalExtract(src: string, dest: string, options: InstallOptions | NoParamCallback, callback?: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { NoParamCallback } from '../types.ts';
1
+ import type { NoParamCallback } from '../types.js';
2
2
  export default function ensureDestinationParent(dest: string, callback: NoParamCallback): undefined;
@@ -1,2 +1,2 @@
1
- import type { InstallOptions, Target } from '../types.ts';
1
+ import type { InstallOptions, Target } from '../types.js';
2
2
  export default function getTarget(options: InstallOptions): Target;
@@ -1,2 +1,2 @@
1
- import type { InstallCallback, InstallOptions } from '../types.ts';
1
+ import type { InstallCallback, InstallOptions } from '../types.js';
2
2
  export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.14.8",
3
+ "version": "1.14.10",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -25,7 +25,7 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "main": "dist/cjs/index.js",
28
- "types": "dist/cjs/index.d.cts",
28
+ "types": "dist/cjs/index.d.ts",
29
29
  "bin": {
30
30
  "nir": "bin/cli.js"
31
31
  },
@@ -1,2 +0,0 @@
1
- declare const _default: (argv: string[]) => undefined;
2
- export default _default;
@@ -1,25 +0,0 @@
1
- import type { FilePath } from './types.ts';
2
- export declare const FILES: Record<string, import("./types.ts").File[]>;
3
- export declare const DEFAULT_STORAGE_PATH: string;
4
- export declare const DEFAULT_STORAGE_PATHS: import("./types.ts").StorageLocations;
5
- export declare const FILE_PLATFORMS: string[];
6
- export declare const FILE_PLATFORM_MAP: {
7
- win: string;
8
- win32: string;
9
- osx: string;
10
- darwin: string;
11
- };
12
- export declare const EXTENSIONS_COMPRESSED: string[];
13
- export declare const NODE_FILE_PATHS: {
14
- win32: string;
15
- posix: string;
16
- };
17
- export declare const NODE_DIST_BASE_URL = "https://nodejs.org/dist";
18
- export declare const NODE_SCHEDULES_URL = "https://raw.githubusercontent.com/nodejs/Release/master/schedule.json";
19
- export declare const NPM_DIST_URL = "https://registry.npmjs.org/npm";
20
- export declare const NPM_DIST_TAGS_URL = "https://registry.npmjs.org/-/package/npm/dist-tags";
21
- export declare const NPM_MIN_VERSION = 3;
22
- export declare const NPM_FILE_PATHS: {
23
- win32: FilePath[];
24
- posix: FilePath[];
25
- };
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, InstallResult } from './types.ts';
2
- export default function createResult(options: InstallOptions, version: string): InstallResult;
@@ -1,2 +0,0 @@
1
- import type { StorageLocations } from './types.ts';
2
- export default function createStoragePaths(storagePath: string): StorageLocations;
@@ -1,3 +0,0 @@
1
- import type { File } from './types.ts';
2
- declare const _default: Record<string, File[]>;
3
- export default _default;
@@ -1,8 +0,0 @@
1
- import type { InstallCallback, InstallOptions, InstallResult } from './types.ts';
2
- export type * from './types.ts';
3
- export default function install(versionExpression: string): Promise<InstallResult>;
4
- export default function install(versionExpression: string, options: InstallOptions): Promise<InstallResult>;
5
- export default function install(versionExpression: string, callback: InstallCallback): undefined;
6
- export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;
7
- export { default as createResult } from './createResult.ts';
8
- export { default as createStoragePaths } from './createStoragePaths.ts';
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function installBin(_version: string, dest: string, options: InstallOptions, callback: NoParamCallback): void;
@@ -1,3 +0,0 @@
1
- import type { InstallOptions } from '../types.ts';
2
- export type Callback = (error?: Error, npmVersion?: string) => undefined;
3
- export default function installLib(version: string, dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function install(version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function installExe(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function installFilename(filename: string, version: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
2
- export default function installPosix(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
2
- export default function installWin32(buildPath: string, dest: string, _options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../../types.ts';
2
- export default function InstallSource(distPath: string, dest: string, options: InstallOptions, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { NoParamCallback } from '../types.ts';
2
- export default function validateDownload(distPath: string, installPath: string, callback: NoParamCallback): undefined;
@@ -1,3 +0,0 @@
1
- import type { InstallOptions } from '../types.ts';
2
- export type Callback = (error?: Error, missing?: string[]) => undefined;
3
- export default function checkMissing(dest: string, options: InstallOptions, callback: Callback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function conditionalCache(endpoint: string, dest: string, options: InstallOptions, callback?: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { NoParamCallback } from '../types.ts';
2
- export default function conditionalCopy(src: string, dest: string, optional: boolean, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, NoParamCallback } from '../types.ts';
2
- export default function conditionalExtract(src: string, dest: string, options: InstallOptions | NoParamCallback, callback?: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import { type NoParamCallback } from 'fs';
2
- export default function safeCopyFile(src: string, dest: string, callback: NoParamCallback): void;
@@ -1,2 +0,0 @@
1
- import type { NoParamCallback } from '../types.ts';
2
- export default function ensureDestinationParent(dest: string, callback: NoParamCallback): undefined;
@@ -1,2 +0,0 @@
1
- import type { InstallOptions, Target } from '../types.ts';
2
- export default function getTarget(options: InstallOptions): Target;
@@ -1,39 +0,0 @@
1
- import type { VersionOptions } from 'node-resolve-versions';
2
- export interface File {
3
- filename: string;
4
- starting: string;
5
- }
6
- export interface FilePath {
7
- src: string;
8
- dest: string;
9
- optional?: boolean;
10
- }
11
- export type StorageLocations = {
12
- cachePath: string;
13
- buildPath: string;
14
- installPath: string;
15
- };
16
- export type InstallResult = {
17
- version: string;
18
- installPath: string;
19
- execPath: string;
20
- platform: NodeJS.Platform;
21
- };
22
- export interface InstallOptions extends VersionOptions {
23
- type?: string;
24
- compression?: boolean;
25
- installPath?: string;
26
- buildPath?: string;
27
- name?: string;
28
- storagePath?: string;
29
- filename?: string;
30
- platform?: NodeJS.Platform;
31
- arch?: NodeJS.Architecture;
32
- cachePath?: string;
33
- }
34
- export interface Target {
35
- platform: NodeJS.Platform;
36
- arch: NodeJS.Architecture;
37
- }
38
- export type InstallCallback = (err?: Error, result?: InstallResult) => void;
39
- export type NoParamCallback = (err?: Error) => void;
@@ -1,2 +0,0 @@
1
- import type { InstallCallback, InstallOptions } from '../types.ts';
2
- export default function install(versionExpression: string, options: InstallOptions, callback: InstallCallback): undefined;