gm-plugkit 2.0.1264 → 2.0.1265
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap.js +6 -2
- package/package.json +1 -1
package/bootstrap.js
CHANGED
|
@@ -205,6 +205,7 @@ async function extractNpmPackageWasm(destPath, version) {
|
|
|
205
205
|
|
|
206
206
|
const cmd = resolveWindowsExe('npm');
|
|
207
207
|
const args = ['install', '--no-audit', '--no-fund', '--no-save', NPM_PACKAGE + '@' + version];
|
|
208
|
+
const isCmdShim = process.platform === 'win32' && /\.(cmd|bat)$/i.test(cmd);
|
|
208
209
|
|
|
209
210
|
const result = spawnSync(cmd, args, {
|
|
210
211
|
cwd: tempDir,
|
|
@@ -212,8 +213,7 @@ async function extractNpmPackageWasm(destPath, version) {
|
|
|
212
213
|
timeout: ATTEMPT_TIMEOUT_MS,
|
|
213
214
|
encoding: 'utf8',
|
|
214
215
|
windowsHide: true,
|
|
215
|
-
|
|
216
|
-
// package install, so no conhost flash during the extract step.
|
|
216
|
+
...(isCmdShim ? { shell: true } : {}),
|
|
217
217
|
...(process.platform === 'win32' ? { creationFlags: 0x08000000 } : {}),
|
|
218
218
|
});
|
|
219
219
|
|
|
@@ -305,6 +305,10 @@ async function extractNpmPackageWithRetry(destPath, version) {
|
|
|
305
305
|
log(`npm binary unresolvable (ENOENT); skipping retries, falling back`);
|
|
306
306
|
throw err;
|
|
307
307
|
}
|
|
308
|
+
if (err && (err.code === 'EINVAL' || /EINVAL/.test(String(err.message || '')))) {
|
|
309
|
+
log(`spawn EINVAL on npm shim; skipping retries, falling back`);
|
|
310
|
+
throw err;
|
|
311
|
+
}
|
|
308
312
|
if (attempt < MAX_ATTEMPTS) {
|
|
309
313
|
const wait = BACKOFF_MS[attempt - 1] || 120000;
|
|
310
314
|
log(`backing off ${wait}ms`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1265",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|