pgflow 0.0.1-prealpha.0 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE.md +660 -0
  3. package/eslint.config.cjs +3 -0
  4. package/package.json +13 -6
  5. package/project.json +40 -0
  6. package/src/commands/install/copy-migrations.ts +101 -0
  7. package/src/commands/install/index.ts +45 -0
  8. package/src/commands/install/supabase-path-prompt.ts +28 -0
  9. package/src/commands/install/update-config-toml.ts +130 -0
  10. package/src/index.ts +76 -0
  11. package/src/types.d.ts +1 -0
  12. package/tsconfig.json +20 -0
  13. package/tsconfig.lib.json +19 -0
  14. package/tsconfig.spec.json +33 -0
  15. package/vite.config.ts +25 -0
  16. package/dist/node_modules/.package-lock.json +0 -129
  17. package/dist/node_modules/@commander-js/extra-typings/LICENSE +0 -21
  18. package/dist/node_modules/@commander-js/extra-typings/README.md +0 -66
  19. package/dist/node_modules/@commander-js/extra-typings/esm.d.mts +0 -2
  20. package/dist/node_modules/@commander-js/extra-typings/esm.mjs +0 -16
  21. package/dist/node_modules/@commander-js/extra-typings/index.d.ts +0 -1467
  22. package/dist/node_modules/@commander-js/extra-typings/index.js +0 -25
  23. package/dist/node_modules/@commander-js/extra-typings/package.json +0 -63
  24. package/dist/node_modules/@esbuild/linux-x64/README.md +0 -3
  25. package/dist/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  26. package/dist/node_modules/@esbuild/linux-x64/package.json +0 -20
  27. package/dist/node_modules/commander/LICENSE +0 -22
  28. package/dist/node_modules/commander/Readme.md +0 -1149
  29. package/dist/node_modules/commander/esm.mjs +0 -16
  30. package/dist/node_modules/commander/index.js +0 -24
  31. package/dist/node_modules/commander/lib/argument.js +0 -149
  32. package/dist/node_modules/commander/lib/command.js +0 -2662
  33. package/dist/node_modules/commander/lib/error.js +0 -39
  34. package/dist/node_modules/commander/lib/help.js +0 -709
  35. package/dist/node_modules/commander/lib/option.js +0 -367
  36. package/dist/node_modules/commander/lib/suggestSimilar.js +0 -101
  37. package/dist/node_modules/commander/package-support.json +0 -16
  38. package/dist/node_modules/commander/package.json +0 -82
  39. package/dist/node_modules/commander/typings/esm.d.mts +0 -3
  40. package/dist/node_modules/commander/typings/index.d.ts +0 -1045
  41. package/dist/node_modules/esbuild/LICENSE.md +0 -21
  42. package/dist/node_modules/esbuild/README.md +0 -3
  43. package/dist/node_modules/esbuild/bin/esbuild +0 -0
  44. package/dist/node_modules/esbuild/install.js +0 -287
  45. package/dist/node_modules/esbuild/lib/main.d.ts +0 -705
  46. package/dist/node_modules/esbuild/lib/main.js +0 -2251
  47. package/dist/node_modules/esbuild/package.json +0 -48
  48. package/dist/node_modules/get-tsconfig/LICENSE +0 -21
  49. package/dist/node_modules/get-tsconfig/README.md +0 -235
  50. package/dist/node_modules/get-tsconfig/dist/index.cjs +0 -7
  51. package/dist/node_modules/get-tsconfig/dist/index.d.cts +0 -1439
  52. package/dist/node_modules/get-tsconfig/dist/index.d.mts +0 -1439
  53. package/dist/node_modules/get-tsconfig/dist/index.mjs +0 -7
  54. package/dist/node_modules/get-tsconfig/package.json +0 -46
  55. package/dist/node_modules/resolve-pkg-maps/LICENSE +0 -21
  56. package/dist/node_modules/resolve-pkg-maps/README.md +0 -216
  57. package/dist/node_modules/resolve-pkg-maps/dist/index.cjs +0 -1
  58. package/dist/node_modules/resolve-pkg-maps/dist/index.d.cts +0 -11
  59. package/dist/node_modules/resolve-pkg-maps/dist/index.d.mts +0 -11
  60. package/dist/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
  61. package/dist/node_modules/resolve-pkg-maps/package.json +0 -42
  62. package/dist/node_modules/tsx/LICENSE +0 -21
  63. package/dist/node_modules/tsx/README.md +0 -32
  64. package/dist/node_modules/tsx/dist/cjs/api/index.cjs +0 -1
  65. package/dist/node_modules/tsx/dist/cjs/api/index.d.cts +0 -35
  66. package/dist/node_modules/tsx/dist/cjs/api/index.d.mts +0 -35
  67. package/dist/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
  68. package/dist/node_modules/tsx/dist/cjs/index.cjs +0 -1
  69. package/dist/node_modules/tsx/dist/cjs/index.mjs +0 -1
  70. package/dist/node_modules/tsx/dist/cli.cjs +0 -54
  71. package/dist/node_modules/tsx/dist/cli.mjs +0 -55
  72. package/dist/node_modules/tsx/dist/client-BQVF1NaW.mjs +0 -1
  73. package/dist/node_modules/tsx/dist/client-D6NvIMSC.cjs +0 -1
  74. package/dist/node_modules/tsx/dist/esm/api/index.cjs +0 -1
  75. package/dist/node_modules/tsx/dist/esm/api/index.d.cts +0 -35
  76. package/dist/node_modules/tsx/dist/esm/api/index.d.mts +0 -35
  77. package/dist/node_modules/tsx/dist/esm/api/index.mjs +0 -1
  78. package/dist/node_modules/tsx/dist/esm/index.cjs +0 -2
  79. package/dist/node_modules/tsx/dist/esm/index.mjs +0 -2
  80. package/dist/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +0 -1
  81. package/dist/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +0 -1
  82. package/dist/node_modules/tsx/dist/index-B4SIRlEU.cjs +0 -16
  83. package/dist/node_modules/tsx/dist/index-DlKgSVBb.mjs +0 -16
  84. package/dist/node_modules/tsx/dist/loader.cjs +0 -1
  85. package/dist/node_modules/tsx/dist/loader.mjs +0 -1
  86. package/dist/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +0 -1
  87. package/dist/node_modules/tsx/dist/node-features-roYmp9jK.cjs +0 -1
  88. package/dist/node_modules/tsx/dist/package--YiorJOq.mjs +0 -1
  89. package/dist/node_modules/tsx/dist/package-BUuKnQXZ.cjs +0 -1
  90. package/dist/node_modules/tsx/dist/patch-repl.cjs +0 -1
  91. package/dist/node_modules/tsx/dist/patch-repl.mjs +0 -1
  92. package/dist/node_modules/tsx/dist/preflight.cjs +0 -1
  93. package/dist/node_modules/tsx/dist/preflight.mjs +0 -1
  94. package/dist/node_modules/tsx/dist/register-C3TE0KFF.mjs +0 -3
  95. package/dist/node_modules/tsx/dist/register-CVZT-Tul.cjs +0 -1
  96. package/dist/node_modules/tsx/dist/register-DCnOAxY2.cjs +0 -3
  97. package/dist/node_modules/tsx/dist/register-RyGUjI6j.mjs +0 -1
  98. package/dist/node_modules/tsx/dist/repl.cjs +0 -3
  99. package/dist/node_modules/tsx/dist/repl.mjs +0 -3
  100. package/dist/node_modules/tsx/dist/require-BnyFnlmk.mjs +0 -1
  101. package/dist/node_modules/tsx/dist/require-DBpSESet.cjs +0 -1
  102. package/dist/node_modules/tsx/dist/suppress-warnings.cjs +0 -1
  103. package/dist/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  104. package/dist/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  105. package/dist/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +0 -1
  106. package/dist/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
  107. package/dist/node_modules/tsx/package.json +0 -68
  108. package/dist/package.json +0 -27
  109. package/dist/sql/000000_schema.sql +0 -150
  110. package/dist/sql/000005_create_flow.sql +0 -29
  111. package/dist/sql/000010_add_step.sql +0 -48
  112. package/dist/sql/000015_start_ready_steps.sql +0 -45
  113. package/dist/sql/000020_start_flow.sql +0 -46
  114. package/dist/sql/000030_read_with_poll_backport.sql +0 -70
  115. package/dist/sql/000040_poll_for_tasks.sql +0 -100
  116. package/dist/sql/000045_maybe_complete_run.sql +0 -30
  117. package/dist/sql/000050_complete_task.sql +0 -98
  118. package/dist/sql/000055_calculate_retry_delay.sql +0 -11
  119. package/dist/sql/000060_fail_task.sql +0 -124
  120. package/dist/sql/000_edge_worker_initial.sql +0 -86
  121. package/dist/src/commands/install.d.ts +0 -4
  122. package/dist/src/commands/install.d.ts.map +0 -1
  123. package/dist/src/index.d.ts +0 -2
  124. package/dist/src/index.d.ts.map +0 -1
  125. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Evan Wallace
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,3 +0,0 @@
1
- # esbuild
2
-
3
- This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details.
@@ -1,287 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
-
25
- // lib/npm/node-platform.ts
26
- var fs = require("fs");
27
- var os = require("os");
28
- var path = require("path");
29
- var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
30
- var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
31
- var knownWindowsPackages = {
32
- "win32 arm64 LE": "@esbuild/win32-arm64",
33
- "win32 ia32 LE": "@esbuild/win32-ia32",
34
- "win32 x64 LE": "@esbuild/win32-x64"
35
- };
36
- var knownUnixlikePackages = {
37
- "aix ppc64 BE": "@esbuild/aix-ppc64",
38
- "android arm64 LE": "@esbuild/android-arm64",
39
- "darwin arm64 LE": "@esbuild/darwin-arm64",
40
- "darwin x64 LE": "@esbuild/darwin-x64",
41
- "freebsd arm64 LE": "@esbuild/freebsd-arm64",
42
- "freebsd x64 LE": "@esbuild/freebsd-x64",
43
- "linux arm LE": "@esbuild/linux-arm",
44
- "linux arm64 LE": "@esbuild/linux-arm64",
45
- "linux ia32 LE": "@esbuild/linux-ia32",
46
- "linux mips64el LE": "@esbuild/linux-mips64el",
47
- "linux ppc64 LE": "@esbuild/linux-ppc64",
48
- "linux riscv64 LE": "@esbuild/linux-riscv64",
49
- "linux s390x BE": "@esbuild/linux-s390x",
50
- "linux x64 LE": "@esbuild/linux-x64",
51
- "linux loong64 LE": "@esbuild/linux-loong64",
52
- "netbsd arm64 LE": "@esbuild/netbsd-arm64",
53
- "netbsd x64 LE": "@esbuild/netbsd-x64",
54
- "openbsd arm64 LE": "@esbuild/openbsd-arm64",
55
- "openbsd x64 LE": "@esbuild/openbsd-x64",
56
- "sunos x64 LE": "@esbuild/sunos-x64"
57
- };
58
- var knownWebAssemblyFallbackPackages = {
59
- "android arm LE": "@esbuild/android-arm",
60
- "android x64 LE": "@esbuild/android-x64"
61
- };
62
- function pkgAndSubpathForCurrentPlatform() {
63
- let pkg;
64
- let subpath;
65
- let isWASM = false;
66
- let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
67
- if (platformKey in knownWindowsPackages) {
68
- pkg = knownWindowsPackages[platformKey];
69
- subpath = "esbuild.exe";
70
- } else if (platformKey in knownUnixlikePackages) {
71
- pkg = knownUnixlikePackages[platformKey];
72
- subpath = "bin/esbuild";
73
- } else if (platformKey in knownWebAssemblyFallbackPackages) {
74
- pkg = knownWebAssemblyFallbackPackages[platformKey];
75
- subpath = "bin/esbuild";
76
- isWASM = true;
77
- } else {
78
- throw new Error(`Unsupported platform: ${platformKey}`);
79
- }
80
- return { pkg, subpath, isWASM };
81
- }
82
- function downloadedBinPath(pkg, subpath) {
83
- const esbuildLibDir = path.dirname(require.resolve("esbuild"));
84
- return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
85
- }
86
-
87
- // lib/npm/node-install.ts
88
- var fs2 = require("fs");
89
- var os2 = require("os");
90
- var path2 = require("path");
91
- var zlib = require("zlib");
92
- var https = require("https");
93
- var child_process = require("child_process");
94
- var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
95
- var toPath = path2.join(__dirname, "bin", "esbuild");
96
- var isToPathJS = true;
97
- function validateBinaryVersion(...command) {
98
- command.push("--version");
99
- let stdout;
100
- try {
101
- stdout = child_process.execFileSync(command.shift(), command, {
102
- // Without this, this install script strangely crashes with the error
103
- // "EACCES: permission denied, write" but only on Ubuntu Linux when node is
104
- // installed from the Snap Store. This is not a problem when you download
105
- // the official version of node. The problem appears to be that stderr
106
- // (i.e. file descriptor 2) isn't writable?
107
- //
108
- // More info:
109
- // - https://snapcraft.io/ (what the Snap Store is)
110
- // - https://nodejs.org/dist/ (download the official version of node)
111
- // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
112
- //
113
- stdio: "pipe"
114
- }).toString().trim();
115
- } catch (err) {
116
- if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
117
- let os3 = "this version of macOS";
118
- try {
119
- os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
120
- } catch {
121
- }
122
- throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
123
-
124
- The Go compiler (which esbuild relies on) no longer supports ${os3},
125
- which means the "esbuild" binary executable can't be run. You can either:
126
-
127
- * Update your version of macOS to one that the Go compiler supports
128
- * Use the "esbuild-wasm" package instead of the "esbuild" package
129
- * Build esbuild yourself using an older version of the Go compiler
130
- `);
131
- }
132
- throw err;
133
- }
134
- if (stdout !== versionFromPackageJSON) {
135
- throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
136
- }
137
- }
138
- function isYarn() {
139
- const { npm_config_user_agent } = process.env;
140
- if (npm_config_user_agent) {
141
- return /\byarn\//.test(npm_config_user_agent);
142
- }
143
- return false;
144
- }
145
- function fetch(url) {
146
- return new Promise((resolve, reject) => {
147
- https.get(url, (res) => {
148
- if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location)
149
- return fetch(res.headers.location).then(resolve, reject);
150
- if (res.statusCode !== 200)
151
- return reject(new Error(`Server responded with ${res.statusCode}`));
152
- let chunks = [];
153
- res.on("data", (chunk) => chunks.push(chunk));
154
- res.on("end", () => resolve(Buffer.concat(chunks)));
155
- }).on("error", reject);
156
- });
157
- }
158
- function extractFileFromTarGzip(buffer, subpath) {
159
- try {
160
- buffer = zlib.unzipSync(buffer);
161
- } catch (err) {
162
- throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`);
163
- }
164
- let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, "");
165
- let offset = 0;
166
- subpath = `package/${subpath}`;
167
- while (offset < buffer.length) {
168
- let name = str(offset, 100);
169
- let size = parseInt(str(offset + 124, 12), 8);
170
- offset += 512;
171
- if (!isNaN(size)) {
172
- if (name === subpath) return buffer.subarray(offset, offset + size);
173
- offset += size + 511 & ~511;
174
- }
175
- }
176
- throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
177
- }
178
- function installUsingNPM(pkg, subpath, binPath) {
179
- const env = { ...process.env, npm_config_global: void 0 };
180
- const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
181
- const installDir = path2.join(esbuildLibDir, "npm-install");
182
- fs2.mkdirSync(installDir);
183
- try {
184
- fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
185
- child_process.execSync(
186
- `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
187
- { cwd: installDir, stdio: "pipe", env }
188
- );
189
- const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
190
- fs2.renameSync(installedBinPath, binPath);
191
- } finally {
192
- try {
193
- removeRecursive(installDir);
194
- } catch {
195
- }
196
- }
197
- }
198
- function removeRecursive(dir) {
199
- for (const entry of fs2.readdirSync(dir)) {
200
- const entryPath = path2.join(dir, entry);
201
- let stats;
202
- try {
203
- stats = fs2.lstatSync(entryPath);
204
- } catch {
205
- continue;
206
- }
207
- if (stats.isDirectory()) removeRecursive(entryPath);
208
- else fs2.unlinkSync(entryPath);
209
- }
210
- fs2.rmdirSync(dir);
211
- }
212
- function applyManualBinaryPathOverride(overridePath) {
213
- const pathString = JSON.stringify(overridePath);
214
- fs2.writeFileSync(toPath, `#!/usr/bin/env node
215
- require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' });
216
- `);
217
- const libMain = path2.join(__dirname, "lib", "main.js");
218
- const code = fs2.readFileSync(libMain, "utf8");
219
- fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
220
- ${code}`);
221
- }
222
- function maybeOptimizePackage(binPath) {
223
- if (os2.platform() !== "win32" && !isYarn()) {
224
- const tempPath = path2.join(__dirname, "bin-esbuild");
225
- try {
226
- fs2.linkSync(binPath, tempPath);
227
- fs2.renameSync(tempPath, toPath);
228
- isToPathJS = false;
229
- fs2.unlinkSync(tempPath);
230
- } catch {
231
- }
232
- }
233
- }
234
- async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
235
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
236
- console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
237
- try {
238
- fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
239
- fs2.chmodSync(binPath, 493);
240
- } catch (e) {
241
- console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
242
- throw e;
243
- }
244
- }
245
- async function checkAndPreparePackage() {
246
- if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
247
- if (!fs2.existsSync(ESBUILD_BINARY_PATH)) {
248
- console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
249
- } else {
250
- applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
251
- return;
252
- }
253
- }
254
- const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
255
- let binPath;
256
- try {
257
- binPath = require.resolve(`${pkg}/${subpath}`);
258
- } catch (e) {
259
- console.error(`[esbuild] Failed to find package "${pkg}" on the file system
260
-
261
- This can happen if you use the "--no-optional" flag. The "optionalDependencies"
262
- package.json feature is used by esbuild to install the correct binary executable
263
- for your current platform. This install script will now attempt to work around
264
- this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
265
- `);
266
- binPath = downloadedBinPath(pkg, subpath);
267
- try {
268
- console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
269
- installUsingNPM(pkg, subpath, binPath);
270
- } catch (e2) {
271
- console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`);
272
- try {
273
- await downloadDirectlyFromNPM(pkg, subpath, binPath);
274
- } catch (e3) {
275
- throw new Error(`Failed to install package "${pkg}"`);
276
- }
277
- }
278
- }
279
- maybeOptimizePackage(binPath);
280
- }
281
- checkAndPreparePackage().then(() => {
282
- if (isToPathJS) {
283
- validateBinaryVersion(process.execPath, toPath);
284
- } else {
285
- validateBinaryVersion(toPath);
286
- }
287
- });