glyphix 1.2.9 → 1.2.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.
- package/bin/glyphix.js +16 -14
- package/package.json +1 -1
package/bin/glyphix.js
CHANGED
|
@@ -335,22 +335,22 @@ var GxGenerate = class {
|
|
|
335
335
|
}
|
|
336
336
|
const curDir = process.cwd();
|
|
337
337
|
process.chdir((0, import_node_path3.resolve)(this.sourceRoot, ".."));
|
|
338
|
-
|
|
338
|
+
try {
|
|
339
|
+
(0, import_node_fs.unlinkSync)((0, import_node_path3.resolve)(process.cwd(), "package-lock.json"));
|
|
340
|
+
(0, import_node_fs.unlinkSync)((0, import_node_path3.resolve)(process.cwd(), "yarn.lock"));
|
|
341
|
+
} catch {
|
|
342
|
+
}
|
|
343
|
+
const installDepProcess = (0, import_node_child_process.spawn)(
|
|
344
|
+
"npm",
|
|
345
|
+
["install", "--allow-remote", "all", "--no-save", "typescript@^5.8.3"],
|
|
346
|
+
{ shell: true }
|
|
347
|
+
);
|
|
339
348
|
installDepProcess.on("error", (err) => {
|
|
340
349
|
console.error(err);
|
|
341
350
|
});
|
|
342
351
|
installDepProcess.on("message", (message) => {
|
|
343
352
|
console.log(message);
|
|
344
353
|
});
|
|
345
|
-
installDepProcess.on("close", (code) => {
|
|
346
|
-
if (code === 0) {
|
|
347
|
-
process.chdir(curDir);
|
|
348
|
-
resolve3();
|
|
349
|
-
} else {
|
|
350
|
-
process.chdir(curDir);
|
|
351
|
-
process.exit(1);
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
354
|
let stdout = "";
|
|
355
355
|
let stderr = "";
|
|
356
356
|
if (installDepProcess.stdout) {
|
|
@@ -371,14 +371,16 @@ var GxGenerate = class {
|
|
|
371
371
|
});
|
|
372
372
|
installDepProcess.on("close", (code, signal) => {
|
|
373
373
|
if (code === 0) {
|
|
374
|
+
process.chdir(curDir);
|
|
374
375
|
resolve3();
|
|
375
376
|
return;
|
|
376
377
|
}
|
|
378
|
+
process.chdir(curDir);
|
|
377
379
|
const out = stdout.trim();
|
|
378
|
-
const
|
|
379
|
-
if (out) console.error(out);
|
|
380
|
-
if (
|
|
381
|
-
|
|
380
|
+
const errOutput = stderr.trim();
|
|
381
|
+
if (out) console.error("[npm install] stdout:", out);
|
|
382
|
+
if (errOutput) console.error("[npm install] stderr:", errOutput);
|
|
383
|
+
console.error("[npm install] exited with code:", code);
|
|
382
384
|
});
|
|
383
385
|
});
|
|
384
386
|
}
|