@metamask-previews/local-node-utils 1.0.0-preview-8bfa290fb → 2.0.0-preview-0a30e47

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 (155) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/{archive.d.mts → archive.d.ts} +1 -1
  3. package/dist/archive.d.ts.map +1 -0
  4. package/dist/{archive.mjs → archive.js} +2 -2
  5. package/dist/archive.js.map +1 -0
  6. package/dist/{artifact.d.cts → artifact.d.ts} +2 -2
  7. package/dist/artifact.d.ts.map +1 -0
  8. package/dist/{artifact.mjs → artifact.js} +2 -2
  9. package/dist/artifact.js.map +1 -0
  10. package/dist/{cache-directory.d.cts → cache-directory.d.ts} +1 -1
  11. package/dist/cache-directory.d.ts.map +1 -0
  12. package/dist/{cache-directory.mjs → cache-directory.js} +6 -6
  13. package/dist/cache-directory.js.map +1 -0
  14. package/dist/{cache.d.cts → cache.d.ts} +1 -1
  15. package/dist/cache.d.ts.map +1 -0
  16. package/dist/{cache.mjs → cache.js} +3 -3
  17. package/dist/cache.js.map +1 -0
  18. package/dist/{checksum.d.cts → checksum.d.ts} +1 -1
  19. package/dist/checksum.d.ts.map +1 -0
  20. package/dist/{checksum.mjs → checksum.js} +4 -4
  21. package/dist/checksum.js.map +1 -0
  22. package/dist/{cli.d.cts → cli.d.ts} +1 -1
  23. package/dist/cli.d.ts.map +1 -0
  24. package/dist/{cli.mjs → cli.js} +1 -1
  25. package/dist/cli.js.map +1 -0
  26. package/dist/{command.d.cts → command.d.ts} +1 -1
  27. package/dist/command.d.ts.map +1 -0
  28. package/dist/{command.mjs → command.js} +2 -2
  29. package/dist/command.js.map +1 -0
  30. package/dist/{download.d.cts → download.d.ts} +1 -1
  31. package/dist/download.d.ts.map +1 -0
  32. package/dist/{download.mjs → download.js} +7 -7
  33. package/dist/download.js.map +1 -0
  34. package/dist/{errors.d.cts → errors.d.ts} +1 -1
  35. package/dist/errors.d.ts.map +1 -0
  36. package/dist/{errors.mjs → errors.js} +1 -1
  37. package/dist/errors.js.map +1 -0
  38. package/dist/{executable-wrapper.d.cts → executable-wrapper.d.ts} +1 -1
  39. package/dist/executable-wrapper.d.ts.map +1 -0
  40. package/dist/{executable-wrapper.mjs → executable-wrapper.js} +4 -4
  41. package/dist/executable-wrapper.js.map +1 -0
  42. package/dist/{filesystem.d.cts → filesystem.d.ts} +1 -1
  43. package/dist/filesystem.d.ts.map +1 -0
  44. package/dist/{filesystem.mjs → filesystem.js} +3 -3
  45. package/dist/filesystem.js.map +1 -0
  46. package/dist/index.d.ts +16 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +14 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/{package-json.d.cts → package-json.d.ts} +1 -1
  51. package/dist/package-json.d.ts.map +1 -0
  52. package/dist/{package-json.mjs → package-json.js} +4 -4
  53. package/dist/package-json.js.map +1 -0
  54. package/dist/{platform.d.cts → platform.d.ts} +1 -1
  55. package/dist/platform.d.ts.map +1 -0
  56. package/dist/{platform.mjs → platform.js} +3 -3
  57. package/dist/platform.js.map +1 -0
  58. package/dist/{types.d.cts → types.d.ts} +1 -1
  59. package/dist/types.d.ts.map +1 -0
  60. package/dist/types.js +2 -0
  61. package/dist/types.js.map +1 -0
  62. package/package.json +12 -16
  63. package/dist/archive.cjs +0 -13
  64. package/dist/archive.cjs.map +0 -1
  65. package/dist/archive.d.cts +0 -3
  66. package/dist/archive.d.cts.map +0 -1
  67. package/dist/archive.d.mts.map +0 -1
  68. package/dist/archive.mjs.map +0 -1
  69. package/dist/artifact.cjs +0 -40
  70. package/dist/artifact.cjs.map +0 -1
  71. package/dist/artifact.d.cts.map +0 -1
  72. package/dist/artifact.d.mts +0 -6
  73. package/dist/artifact.d.mts.map +0 -1
  74. package/dist/artifact.mjs.map +0 -1
  75. package/dist/cache-directory.cjs +0 -28
  76. package/dist/cache-directory.cjs.map +0 -1
  77. package/dist/cache-directory.d.cts.map +0 -1
  78. package/dist/cache-directory.d.mts +0 -6
  79. package/dist/cache-directory.d.mts.map +0 -1
  80. package/dist/cache-directory.mjs.map +0 -1
  81. package/dist/cache.cjs +0 -14
  82. package/dist/cache.cjs.map +0 -1
  83. package/dist/cache.d.cts.map +0 -1
  84. package/dist/cache.d.mts +0 -5
  85. package/dist/cache.d.mts.map +0 -1
  86. package/dist/cache.mjs.map +0 -1
  87. package/dist/checksum.cjs +0 -17
  88. package/dist/checksum.cjs.map +0 -1
  89. package/dist/checksum.d.cts.map +0 -1
  90. package/dist/checksum.d.mts +0 -2
  91. package/dist/checksum.d.mts.map +0 -1
  92. package/dist/checksum.mjs.map +0 -1
  93. package/dist/cli.cjs +0 -11
  94. package/dist/cli.cjs.map +0 -1
  95. package/dist/cli.d.cts.map +0 -1
  96. package/dist/cli.d.mts +0 -2
  97. package/dist/cli.d.mts.map +0 -1
  98. package/dist/cli.mjs.map +0 -1
  99. package/dist/command.cjs +0 -28
  100. package/dist/command.cjs.map +0 -1
  101. package/dist/command.d.cts.map +0 -1
  102. package/dist/command.d.mts +0 -2
  103. package/dist/command.d.mts.map +0 -1
  104. package/dist/command.mjs.map +0 -1
  105. package/dist/download.cjs +0 -47
  106. package/dist/download.cjs.map +0 -1
  107. package/dist/download.d.cts.map +0 -1
  108. package/dist/download.d.mts +0 -3
  109. package/dist/download.d.mts.map +0 -1
  110. package/dist/download.mjs.map +0 -1
  111. package/dist/errors.cjs +0 -11
  112. package/dist/errors.cjs.map +0 -1
  113. package/dist/errors.d.cts.map +0 -1
  114. package/dist/errors.d.mts +0 -2
  115. package/dist/errors.d.mts.map +0 -1
  116. package/dist/errors.mjs.map +0 -1
  117. package/dist/executable-wrapper.cjs +0 -76
  118. package/dist/executable-wrapper.cjs.map +0 -1
  119. package/dist/executable-wrapper.d.cts.map +0 -1
  120. package/dist/executable-wrapper.d.mts +0 -9
  121. package/dist/executable-wrapper.d.mts.map +0 -1
  122. package/dist/executable-wrapper.mjs.map +0 -1
  123. package/dist/filesystem.cjs +0 -45
  124. package/dist/filesystem.cjs.map +0 -1
  125. package/dist/filesystem.d.cts.map +0 -1
  126. package/dist/filesystem.d.mts +0 -4
  127. package/dist/filesystem.d.mts.map +0 -1
  128. package/dist/filesystem.mjs.map +0 -1
  129. package/dist/index.cjs +0 -37
  130. package/dist/index.cjs.map +0 -1
  131. package/dist/index.d.cts +0 -16
  132. package/dist/index.d.cts.map +0 -1
  133. package/dist/index.d.mts +0 -16
  134. package/dist/index.d.mts.map +0 -1
  135. package/dist/index.mjs +0 -14
  136. package/dist/index.mjs.map +0 -1
  137. package/dist/package-json.cjs +0 -29
  138. package/dist/package-json.cjs.map +0 -1
  139. package/dist/package-json.d.cts.map +0 -1
  140. package/dist/package-json.d.mts +0 -6
  141. package/dist/package-json.d.mts.map +0 -1
  142. package/dist/package-json.mjs.map +0 -1
  143. package/dist/platform.cjs +0 -25
  144. package/dist/platform.cjs.map +0 -1
  145. package/dist/platform.d.cts.map +0 -1
  146. package/dist/platform.d.mts +0 -3
  147. package/dist/platform.d.mts.map +0 -1
  148. package/dist/platform.mjs.map +0 -1
  149. package/dist/types.cjs +0 -3
  150. package/dist/types.cjs.map +0 -1
  151. package/dist/types.d.cts.map +0 -1
  152. package/dist/types.d.mts +0 -14
  153. package/dist/types.d.mts.map +0 -1
  154. package/dist/types.mjs +0 -2
  155. package/dist/types.mjs.map +0 -1
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFile = exports.isDirectory = exports.findExecutable = void 0;
4
- /* eslint-disable import-x/no-nodejs-modules */
5
- const node_fs_1 = require("node:fs");
6
- const node_path_1 = require("node:path");
7
- function findExecutable(root, name) {
8
- if (!(0, node_fs_1.existsSync)(root)) {
9
- return undefined;
10
- }
11
- for (const entry of (0, node_fs_1.readdirSync)(root)) {
12
- const entryPath = (0, node_path_1.join)(root, entry);
13
- const stat = (0, node_fs_1.statSync)(entryPath);
14
- if (stat.isDirectory()) {
15
- const found = findExecutable(entryPath, name);
16
- if (found) {
17
- return found;
18
- }
19
- }
20
- else if (entry === name) {
21
- return entryPath;
22
- }
23
- }
24
- return undefined;
25
- }
26
- exports.findExecutable = findExecutable;
27
- function isDirectory(path) {
28
- try {
29
- return (0, node_fs_1.statSync)(path).isDirectory();
30
- }
31
- catch {
32
- return false;
33
- }
34
- }
35
- exports.isDirectory = isDirectory;
36
- function isFile(path) {
37
- try {
38
- return (0, node_fs_1.statSync)(path).isFile();
39
- }
40
- catch {
41
- return false;
42
- }
43
- }
44
- exports.isFile = isFile;
45
- //# sourceMappingURL=filesystem.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem.cjs","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,qCAA4D;AAC5D,yCAAiC;AAEjC,SAAgB,cAAc,CAAC,IAAY,EAAE,IAAY;IACvD,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,IAAA,qBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,SAAS,CAAC,CAAC;QACjC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC9C,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1B,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAnBD,wCAmBC;AAED,SAAgB,WAAW,CAAC,IAAY;IACtC,IAAI,CAAC;QACH,OAAO,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAND,kCAMC;AAED,SAAgB,MAAM,CAAC,IAAY;IACjC,IAAI,CAAC;QACH,OAAO,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAND,wBAMC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules */\nimport { existsSync, readdirSync, statSync } from 'node:fs';\nimport { join } from 'node:path';\n\nexport function findExecutable(root: string, name: string): string | undefined {\n if (!existsSync(root)) {\n return undefined;\n }\n\n for (const entry of readdirSync(root)) {\n const entryPath = join(root, entry);\n const stat = statSync(entryPath);\n if (stat.isDirectory()) {\n const found = findExecutable(entryPath, name);\n if (found) {\n return found;\n }\n } else if (entry === name) {\n return entryPath;\n }\n }\n\n return undefined;\n}\n\nexport function isDirectory(path: string): boolean {\n try {\n return statSync(path).isDirectory();\n } catch {\n return false;\n }\n}\n\nexport function isFile(path: string): boolean {\n try {\n return statSync(path).isFile();\n } catch {\n return false;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem.d.cts","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmB7E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAM5C"}
@@ -1,4 +0,0 @@
1
- export declare function findExecutable(root: string, name: string): string | undefined;
2
- export declare function isDirectory(path: string): boolean;
3
- export declare function isFile(path: string): boolean;
4
- //# sourceMappingURL=filesystem.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem.d.mts","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmB7E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAM5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem.mjs","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB;AAC5D,OAAO,EAAE,IAAI,EAAE,kBAAkB;AAEjC,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,IAAY;IACvD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QACjC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC9C,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1B,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules */\nimport { existsSync, readdirSync, statSync } from 'node:fs';\nimport { join } from 'node:path';\n\nexport function findExecutable(root: string, name: string): string | undefined {\n if (!existsSync(root)) {\n return undefined;\n }\n\n for (const entry of readdirSync(root)) {\n const entryPath = join(root, entry);\n const stat = statSync(entryPath);\n if (stat.isDirectory()) {\n const found = findExecutable(entryPath, name);\n if (found) {\n return found;\n }\n } else if (entry === name) {\n return entryPath;\n }\n }\n\n return undefined;\n}\n\nexport function isDirectory(path: string): boolean {\n try {\n return statSync(path).isDirectory();\n } catch {\n return false;\n }\n}\n\nexport function isFile(path: string): boolean {\n try {\n return statSync(path).isFile();\n } catch {\n return false;\n }\n}\n"]}
package/dist/index.cjs DELETED
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readPackageJsonToolConfig = exports.normalizeSystemArchitecture = exports.getPlatformKey = exports.isFile = exports.isDirectory = exports.findExecutable = exports.installExecutableWrapper = exports.downloadFileFromUrl = exports.extractTarGzArchive = exports.extractTarBz2Archive = exports.isFileMissingError = exports.runCommand = exports.readCliValue = exports.verifyFileChecksum = exports.getMetamaskCacheDirectory = exports.cleanInstallerCache = exports.resolvePlatformConfig = exports.requireCompletePlatformConfig = exports.mergeArtifactConfig = exports.getCacheKey = void 0;
4
- var artifact_js_1 = require("./artifact.cjs");
5
- Object.defineProperty(exports, "getCacheKey", { enumerable: true, get: function () { return artifact_js_1.getCacheKey; } });
6
- Object.defineProperty(exports, "mergeArtifactConfig", { enumerable: true, get: function () { return artifact_js_1.mergeArtifactConfig; } });
7
- Object.defineProperty(exports, "requireCompletePlatformConfig", { enumerable: true, get: function () { return artifact_js_1.requireCompletePlatformConfig; } });
8
- Object.defineProperty(exports, "resolvePlatformConfig", { enumerable: true, get: function () { return artifact_js_1.resolvePlatformConfig; } });
9
- var cache_js_1 = require("./cache.cjs");
10
- Object.defineProperty(exports, "cleanInstallerCache", { enumerable: true, get: function () { return cache_js_1.cleanInstallerCache; } });
11
- var cache_directory_js_1 = require("./cache-directory.cjs");
12
- Object.defineProperty(exports, "getMetamaskCacheDirectory", { enumerable: true, get: function () { return cache_directory_js_1.getMetamaskCacheDirectory; } });
13
- var checksum_js_1 = require("./checksum.cjs");
14
- Object.defineProperty(exports, "verifyFileChecksum", { enumerable: true, get: function () { return checksum_js_1.verifyFileChecksum; } });
15
- var cli_js_1 = require("./cli.cjs");
16
- Object.defineProperty(exports, "readCliValue", { enumerable: true, get: function () { return cli_js_1.readCliValue; } });
17
- var command_js_1 = require("./command.cjs");
18
- Object.defineProperty(exports, "runCommand", { enumerable: true, get: function () { return command_js_1.runCommand; } });
19
- var errors_js_1 = require("./errors.cjs");
20
- Object.defineProperty(exports, "isFileMissingError", { enumerable: true, get: function () { return errors_js_1.isFileMissingError; } });
21
- var archive_js_1 = require("./archive.cjs");
22
- Object.defineProperty(exports, "extractTarBz2Archive", { enumerable: true, get: function () { return archive_js_1.extractTarBz2Archive; } });
23
- Object.defineProperty(exports, "extractTarGzArchive", { enumerable: true, get: function () { return archive_js_1.extractTarGzArchive; } });
24
- var download_js_1 = require("./download.cjs");
25
- Object.defineProperty(exports, "downloadFileFromUrl", { enumerable: true, get: function () { return download_js_1.downloadFileFromUrl; } });
26
- var executable_wrapper_js_1 = require("./executable-wrapper.cjs");
27
- Object.defineProperty(exports, "installExecutableWrapper", { enumerable: true, get: function () { return executable_wrapper_js_1.installExecutableWrapper; } });
28
- var filesystem_js_1 = require("./filesystem.cjs");
29
- Object.defineProperty(exports, "findExecutable", { enumerable: true, get: function () { return filesystem_js_1.findExecutable; } });
30
- Object.defineProperty(exports, "isDirectory", { enumerable: true, get: function () { return filesystem_js_1.isDirectory; } });
31
- Object.defineProperty(exports, "isFile", { enumerable: true, get: function () { return filesystem_js_1.isFile; } });
32
- var platform_js_1 = require("./platform.cjs");
33
- Object.defineProperty(exports, "getPlatformKey", { enumerable: true, get: function () { return platform_js_1.getPlatformKey; } });
34
- Object.defineProperty(exports, "normalizeSystemArchitecture", { enumerable: true, get: function () { return platform_js_1.normalizeSystemArchitecture; } });
35
- var package_json_js_1 = require("./package-json.cjs");
36
- Object.defineProperty(exports, "readPackageJsonToolConfig", { enumerable: true, get: function () { return package_json_js_1.readPackageJsonToolConfig; } });
37
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAKA,8CAKuB;AAJrB,0GAAA,WAAW,OAAA;AACX,kHAAA,mBAAmB,OAAA;AACnB,4HAAA,6BAA6B,OAAA;AAC7B,oHAAA,qBAAqB,OAAA;AAEvB,wCAAiD;AAAxC,+GAAA,mBAAmB,OAAA;AAC5B,4DAAiE;AAAxD,+HAAA,yBAAyB,OAAA;AAClC,8CAAmD;AAA1C,iHAAA,kBAAkB,OAAA;AAC3B,oCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,4CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,0CAAiD;AAAxC,+GAAA,kBAAkB,OAAA;AAC3B,4CAAyE;AAAhE,kHAAA,oBAAoB,OAAA;AAAE,iHAAA,mBAAmB,OAAA;AAClD,8CAAoD;AAA3C,kHAAA,mBAAmB,OAAA;AAC5B,kEAAmE;AAA1D,iIAAA,wBAAwB,OAAA;AAEjC,kDAAsE;AAA7D,+GAAA,cAAc,OAAA;AAAE,4GAAA,WAAW,OAAA;AAAE,uGAAA,MAAM,OAAA;AAC5C,8CAA4E;AAAnE,6GAAA,cAAc,OAAA;AAAE,0HAAA,2BAA2B,OAAA;AACpD,sDAA8D;AAArD,4HAAA,yBAAyB,OAAA","sourcesContent":["export type {\n ArtifactConfig,\n ArtifactPlatformConfig,\n InstallDependencies,\n} from './types.js';\nexport {\n getCacheKey,\n mergeArtifactConfig,\n requireCompletePlatformConfig,\n resolvePlatformConfig,\n} from './artifact.js';\nexport { cleanInstallerCache } from './cache.js';\nexport { getMetamaskCacheDirectory } from './cache-directory.js';\nexport { verifyFileChecksum } from './checksum.js';\nexport { readCliValue } from './cli.js';\nexport { runCommand } from './command.js';\nexport { isFileMissingError } from './errors.js';\nexport { extractTarBz2Archive, extractTarGzArchive } from './archive.js';\nexport { downloadFileFromUrl } from './download.js';\nexport { installExecutableWrapper } from './executable-wrapper.js';\nexport type { ExecutableWrapperPathResolution } from './executable-wrapper.js';\nexport { findExecutable, isDirectory, isFile } from './filesystem.js';\nexport { getPlatformKey, normalizeSystemArchitecture } from './platform.js';\nexport { readPackageJsonToolConfig } from './package-json.js';\n"]}
package/dist/index.d.cts DELETED
@@ -1,16 +0,0 @@
1
- export type { ArtifactConfig, ArtifactPlatformConfig, InstallDependencies, } from "./types.cjs";
2
- export { getCacheKey, mergeArtifactConfig, requireCompletePlatformConfig, resolvePlatformConfig, } from "./artifact.cjs";
3
- export { cleanInstallerCache } from "./cache.cjs";
4
- export { getMetamaskCacheDirectory } from "./cache-directory.cjs";
5
- export { verifyFileChecksum } from "./checksum.cjs";
6
- export { readCliValue } from "./cli.cjs";
7
- export { runCommand } from "./command.cjs";
8
- export { isFileMissingError } from "./errors.cjs";
9
- export { extractTarBz2Archive, extractTarGzArchive } from "./archive.cjs";
10
- export { downloadFileFromUrl } from "./download.cjs";
11
- export { installExecutableWrapper } from "./executable-wrapper.cjs";
12
- export type { ExecutableWrapperPathResolution } from "./executable-wrapper.cjs";
13
- export { findExecutable, isDirectory, isFile } from "./filesystem.cjs";
14
- export { getPlatformKey, normalizeSystemArchitecture } from "./platform.cjs";
15
- export { readPackageJsonToolConfig } from "./package-json.cjs";
16
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GACpB,oBAAmB;AACpB,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,GACtB,uBAAsB;AACvB,OAAO,EAAE,mBAAmB,EAAE,oBAAmB;AACjD,OAAO,EAAE,yBAAyB,EAAE,8BAA6B;AACjE,OAAO,EAAE,kBAAkB,EAAE,uBAAsB;AACnD,OAAO,EAAE,YAAY,EAAE,kBAAiB;AACxC,OAAO,EAAE,UAAU,EAAE,sBAAqB;AAC1C,OAAO,EAAE,kBAAkB,EAAE,qBAAoB;AACjD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,sBAAqB;AACzE,OAAO,EAAE,mBAAmB,EAAE,uBAAsB;AACpD,OAAO,EAAE,wBAAwB,EAAE,iCAAgC;AACnE,YAAY,EAAE,+BAA+B,EAAE,iCAAgC;AAC/E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,yBAAwB;AACtE,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,uBAAsB;AAC5E,OAAO,EAAE,yBAAyB,EAAE,2BAA0B"}
package/dist/index.d.mts DELETED
@@ -1,16 +0,0 @@
1
- export type { ArtifactConfig, ArtifactPlatformConfig, InstallDependencies, } from "./types.mjs";
2
- export { getCacheKey, mergeArtifactConfig, requireCompletePlatformConfig, resolvePlatformConfig, } from "./artifact.mjs";
3
- export { cleanInstallerCache } from "./cache.mjs";
4
- export { getMetamaskCacheDirectory } from "./cache-directory.mjs";
5
- export { verifyFileChecksum } from "./checksum.mjs";
6
- export { readCliValue } from "./cli.mjs";
7
- export { runCommand } from "./command.mjs";
8
- export { isFileMissingError } from "./errors.mjs";
9
- export { extractTarBz2Archive, extractTarGzArchive } from "./archive.mjs";
10
- export { downloadFileFromUrl } from "./download.mjs";
11
- export { installExecutableWrapper } from "./executable-wrapper.mjs";
12
- export type { ExecutableWrapperPathResolution } from "./executable-wrapper.mjs";
13
- export { findExecutable, isDirectory, isFile } from "./filesystem.mjs";
14
- export { getPlatformKey, normalizeSystemArchitecture } from "./platform.mjs";
15
- export { readPackageJsonToolConfig } from "./package-json.mjs";
16
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GACpB,oBAAmB;AACpB,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,GACtB,uBAAsB;AACvB,OAAO,EAAE,mBAAmB,EAAE,oBAAmB;AACjD,OAAO,EAAE,yBAAyB,EAAE,8BAA6B;AACjE,OAAO,EAAE,kBAAkB,EAAE,uBAAsB;AACnD,OAAO,EAAE,YAAY,EAAE,kBAAiB;AACxC,OAAO,EAAE,UAAU,EAAE,sBAAqB;AAC1C,OAAO,EAAE,kBAAkB,EAAE,qBAAoB;AACjD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,sBAAqB;AACzE,OAAO,EAAE,mBAAmB,EAAE,uBAAsB;AACpD,OAAO,EAAE,wBAAwB,EAAE,iCAAgC;AACnE,YAAY,EAAE,+BAA+B,EAAE,iCAAgC;AAC/E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,yBAAwB;AACtE,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,uBAAsB;AAC5E,OAAO,EAAE,yBAAyB,EAAE,2BAA0B"}
package/dist/index.mjs DELETED
@@ -1,14 +0,0 @@
1
- export { getCacheKey, mergeArtifactConfig, requireCompletePlatformConfig, resolvePlatformConfig } from "./artifact.mjs";
2
- export { cleanInstallerCache } from "./cache.mjs";
3
- export { getMetamaskCacheDirectory } from "./cache-directory.mjs";
4
- export { verifyFileChecksum } from "./checksum.mjs";
5
- export { readCliValue } from "./cli.mjs";
6
- export { runCommand } from "./command.mjs";
7
- export { isFileMissingError } from "./errors.mjs";
8
- export { extractTarBz2Archive, extractTarGzArchive } from "./archive.mjs";
9
- export { downloadFileFromUrl } from "./download.mjs";
10
- export { installExecutableWrapper } from "./executable-wrapper.mjs";
11
- export { findExecutable, isDirectory, isFile } from "./filesystem.mjs";
12
- export { getPlatformKey, normalizeSystemArchitecture } from "./platform.mjs";
13
- export { readPackageJsonToolConfig } from "./package-json.mjs";
14
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,EACtB,uBAAsB;AACvB,OAAO,EAAE,mBAAmB,EAAE,oBAAmB;AACjD,OAAO,EAAE,yBAAyB,EAAE,8BAA6B;AACjE,OAAO,EAAE,kBAAkB,EAAE,uBAAsB;AACnD,OAAO,EAAE,YAAY,EAAE,kBAAiB;AACxC,OAAO,EAAE,UAAU,EAAE,sBAAqB;AAC1C,OAAO,EAAE,kBAAkB,EAAE,qBAAoB;AACjD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,sBAAqB;AACzE,OAAO,EAAE,mBAAmB,EAAE,uBAAsB;AACpD,OAAO,EAAE,wBAAwB,EAAE,iCAAgC;AAEnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,yBAAwB;AACtE,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,uBAAsB;AAC5E,OAAO,EAAE,yBAAyB,EAAE,2BAA0B","sourcesContent":["export type {\n ArtifactConfig,\n ArtifactPlatformConfig,\n InstallDependencies,\n} from './types.js';\nexport {\n getCacheKey,\n mergeArtifactConfig,\n requireCompletePlatformConfig,\n resolvePlatformConfig,\n} from './artifact.js';\nexport { cleanInstallerCache } from './cache.js';\nexport { getMetamaskCacheDirectory } from './cache-directory.js';\nexport { verifyFileChecksum } from './checksum.js';\nexport { readCliValue } from './cli.js';\nexport { runCommand } from './command.js';\nexport { isFileMissingError } from './errors.js';\nexport { extractTarBz2Archive, extractTarGzArchive } from './archive.js';\nexport { downloadFileFromUrl } from './download.js';\nexport { installExecutableWrapper } from './executable-wrapper.js';\nexport type { ExecutableWrapperPathResolution } from './executable-wrapper.js';\nexport { findExecutable, isDirectory, isFile } from './filesystem.js';\nexport { getPlatformKey, normalizeSystemArchitecture } from './platform.js';\nexport { readPackageJsonToolConfig } from './package-json.js';\n"]}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readPackageJsonToolConfig = void 0;
4
- /* eslint-disable import-x/no-nodejs-modules, no-restricted-globals */
5
- const node_fs_1 = require("node:fs");
6
- const node_path_1 = require("node:path");
7
- const errors_js_1 = require("./errors.cjs");
8
- function readPackageJsonToolConfig({ cwd = process.cwd(), packageJsonPath = (0, node_path_1.join)(cwd, 'package.json'), configKeys, }) {
9
- let raw;
10
- try {
11
- raw = (0, node_fs_1.readFileSync)(packageJsonPath, 'utf8');
12
- }
13
- catch (error) {
14
- if ((0, errors_js_1.isFileMissingError)(error)) {
15
- return {};
16
- }
17
- throw error;
18
- }
19
- const packageJson = JSON.parse(raw);
20
- for (const key of configKeys) {
21
- const config = packageJson[key];
22
- if (config && typeof config === 'object') {
23
- return config;
24
- }
25
- }
26
- return {};
27
- }
28
- exports.readPackageJsonToolConfig = readPackageJsonToolConfig;
29
- //# sourceMappingURL=package-json.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-json.cjs","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACtE,qCAAuC;AACvC,yCAAiC;AAEjC,4CAAiD;AAEjD,SAAgB,yBAAyB,CAAC,EACxC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EACnB,eAAe,GAAG,IAAA,gBAAI,EAAC,GAAG,EAAE,cAAc,CAAC,EAC3C,UAAU,GAKX;IACC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,IAAA,sBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,8BAAkB,EAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IAC/D,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzC,OAAO,MAAiC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AA5BD,8DA4BC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules, no-restricted-globals */\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { isFileMissingError } from './errors.js';\n\nexport function readPackageJsonToolConfig({\n cwd = process.cwd(),\n packageJsonPath = join(cwd, 'package.json'),\n configKeys,\n}: {\n cwd?: string;\n packageJsonPath?: string;\n configKeys: string[];\n}): Record<string, unknown> {\n let raw: string;\n try {\n raw = readFileSync(packageJsonPath, 'utf8');\n } catch (error) {\n if (isFileMissingError(error)) {\n return {};\n }\n throw error;\n }\n\n const packageJson = JSON.parse(raw) as Record<string, unknown>;\n for (const key of configKeys) {\n const config = packageJson[key];\n if (config && typeof config === 'object') {\n return config as Record<string, unknown>;\n }\n }\n\n return {};\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-json.d.cts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAMA,wBAAgB,yBAAyB,CAAC,EACxC,GAAmB,EACnB,eAA2C,EAC3C,UAAU,GACX,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoB1B"}
@@ -1,6 +0,0 @@
1
- export declare function readPackageJsonToolConfig({ cwd, packageJsonPath, configKeys, }: {
2
- cwd?: string;
3
- packageJsonPath?: string;
4
- configKeys: string[];
5
- }): Record<string, unknown>;
6
- //# sourceMappingURL=package-json.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-json.d.mts","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAMA,wBAAgB,yBAAyB,CAAC,EACxC,GAAmB,EACnB,eAA2C,EAC3C,UAAU,GACX,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoB1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-json.mjs","sourceRoot":"","sources":["../src/package-json.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,YAAY,EAAE,gBAAgB;AACvC,OAAO,EAAE,IAAI,EAAE,kBAAkB;AAEjC,OAAO,EAAE,kBAAkB,EAAE,qBAAoB;AAEjD,MAAM,UAAU,yBAAyB,CAAC,EACxC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EACnB,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAC3C,UAAU,GAKX;IACC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IAC/D,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzC,OAAO,MAAiC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules, no-restricted-globals */\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { isFileMissingError } from './errors.js';\n\nexport function readPackageJsonToolConfig({\n cwd = process.cwd(),\n packageJsonPath = join(cwd, 'package.json'),\n configKeys,\n}: {\n cwd?: string;\n packageJsonPath?: string;\n configKeys: string[];\n}): Record<string, unknown> {\n let raw: string;\n try {\n raw = readFileSync(packageJsonPath, 'utf8');\n } catch (error) {\n if (isFileMissingError(error)) {\n return {};\n }\n throw error;\n }\n\n const packageJson = JSON.parse(raw) as Record<string, unknown>;\n for (const key of configKeys) {\n const config = packageJson[key];\n if (config && typeof config === 'object') {\n return config as Record<string, unknown>;\n }\n }\n\n return {};\n}\n"]}
package/dist/platform.cjs DELETED
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeSystemArchitecture = exports.getPlatformKey = void 0;
4
- /* eslint-disable import-x/no-nodejs-modules */
5
- const node_child_process_1 = require("node:child_process");
6
- const node_os_1 = require("node:os");
7
- function getPlatformKey() {
8
- return `${(0, node_os_1.platform)()}-${normalizeSystemArchitecture()}`;
9
- }
10
- exports.getPlatformKey = getPlatformKey;
11
- function normalizeSystemArchitecture(architecture = (0, node_os_1.arch)()) {
12
- if (architecture === 'x64' && (0, node_os_1.platform)() === 'darwin') {
13
- const result = (0, node_child_process_1.spawnSync)('sysctl', ['-n', 'sysctl.proc_translated'], {
14
- encoding: 'utf8',
15
- shell: false,
16
- stdio: ['ignore', 'pipe', 'ignore'],
17
- });
18
- if (result.stdout.trim() === '1') {
19
- return 'arm64';
20
- }
21
- }
22
- return architecture;
23
- }
24
- exports.normalizeSystemArchitecture = normalizeSystemArchitecture;
25
- //# sourceMappingURL=platform.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.cjs","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAA+C;AAC/C,qCAAiE;AAEjE,SAAgB,cAAc;IAC5B,OAAO,GAAG,IAAA,kBAAU,GAAE,IAAI,2BAA2B,EAAE,EAAE,CAAC;AAC5D,CAAC;AAFD,wCAEC;AAED,SAAgB,2BAA2B,CAAC,YAAY,GAAG,IAAA,cAAM,GAAE;IACjE,IAAI,YAAY,KAAK,KAAK,IAAI,IAAA,kBAAU,GAAE,KAAK,QAAQ,EAAE,CAAC;QACxD,MAAM,MAAM,GAAG,IAAA,8BAAS,EAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC,EAAE;YACnE,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACjC,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAbD,kEAaC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules */\nimport { spawnSync } from 'node:child_process';\nimport { arch as osArch, platform as osPlatform } from 'node:os';\n\nexport function getPlatformKey(): string {\n return `${osPlatform()}-${normalizeSystemArchitecture()}`;\n}\n\nexport function normalizeSystemArchitecture(architecture = osArch()): string {\n if (architecture === 'x64' && osPlatform() === 'darwin') {\n const result = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], {\n encoding: 'utf8',\n shell: false,\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n if (result.stdout.trim() === '1') {\n return 'arm64';\n }\n }\n\n return architecture;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.d.cts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,2BAA2B,CAAC,YAAY,SAAW,GAAG,MAAM,CAa3E"}
@@ -1,3 +0,0 @@
1
- export declare function getPlatformKey(): string;
2
- export declare function normalizeSystemArchitecture(architecture?: string): string;
3
- //# sourceMappingURL=platform.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.d.mts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,2BAA2B,CAAC,YAAY,SAAW,GAAG,MAAM,CAa3E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.mjs","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,SAAS,EAAE,2BAA2B;AAC/C,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,QAAQ,IAAI,UAAU,EAAE,gBAAgB;AAEjE,MAAM,UAAU,cAAc;IAC5B,OAAO,GAAG,UAAU,EAAE,IAAI,2BAA2B,EAAE,EAAE,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,YAAY,GAAG,MAAM,EAAE;IACjE,IAAI,YAAY,KAAK,KAAK,IAAI,UAAU,EAAE,KAAK,QAAQ,EAAE,CAAC;QACxD,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC,EAAE;YACnE,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACjC,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable import-x/no-nodejs-modules */\nimport { spawnSync } from 'node:child_process';\nimport { arch as osArch, platform as osPlatform } from 'node:os';\n\nexport function getPlatformKey(): string {\n return `${osPlatform()}-${normalizeSystemArchitecture()}`;\n}\n\nexport function normalizeSystemArchitecture(architecture = osArch()): string {\n if (architecture === 'x64' && osPlatform() === 'darwin') {\n const result = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], {\n encoding: 'utf8',\n shell: false,\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n if (result.stdout.trim() === '1') {\n return 'arm64';\n }\n }\n\n return architecture;\n}\n"]}
package/dist/types.cjs DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type ArtifactPlatformConfig = {\n checksum: string;\n size?: number;\n url: string;\n};\n\nexport type ArtifactConfig = {\n platforms: Record<string, ArtifactPlatformConfig | undefined>;\n version?: string;\n};\n\nexport type InstallDependencies = {\n downloadFile?: (url: string, destination: string) => Promise<void>;\n extractArchive?: (archivePath: string, destination: string) => Promise<void>;\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,CAAC,CAAC;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E,CAAC"}
package/dist/types.d.mts DELETED
@@ -1,14 +0,0 @@
1
- export type ArtifactPlatformConfig = {
2
- checksum: string;
3
- size?: number;
4
- url: string;
5
- };
6
- export type ArtifactConfig = {
7
- platforms: Record<string, ArtifactPlatformConfig | undefined>;
8
- version?: string;
9
- };
10
- export type InstallDependencies = {
11
- downloadFile?: (url: string, destination: string) => Promise<void>;
12
- extractArchive?: (archivePath: string, destination: string) => Promise<void>;
13
- };
14
- //# sourceMappingURL=types.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,CAAC,CAAC;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E,CAAC"}
package/dist/types.mjs DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type ArtifactPlatformConfig = {\n checksum: string;\n size?: number;\n url: string;\n};\n\nexport type ArtifactConfig = {\n platforms: Record<string, ArtifactPlatformConfig | undefined>;\n version?: string;\n};\n\nexport type InstallDependencies = {\n downloadFile?: (url: string, destination: string) => Promise<void>;\n extractArchive?: (archivePath: string, destination: string) => Promise<void>;\n};\n"]}