@bgicli/bgicli 2.2.12 → 2.2.13
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/dist/bgi.js +6 -8
- package/package.json +1 -1
package/dist/bgi.js
CHANGED
|
@@ -15410,7 +15410,7 @@ function clearCheckpoints(sessionId) {
|
|
|
15410
15410
|
|
|
15411
15411
|
// src/index.ts
|
|
15412
15412
|
var import_fs6 = require("fs");
|
|
15413
|
-
var VERSION2 = "2.2.
|
|
15413
|
+
var VERSION2 = "2.2.13";
|
|
15414
15414
|
function isNewer(latest, current) {
|
|
15415
15415
|
const [lM, lm, lp] = latest.split(".").map(Number);
|
|
15416
15416
|
const [cM, cm, cp] = current.split(".").map(Number);
|
|
@@ -15453,13 +15453,10 @@ async function checkAndAutoUpdate() {
|
|
|
15453
15453
|
`)
|
|
15454
15454
|
);
|
|
15455
15455
|
const ok = await new Promise((resolve3) => {
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
{ stdio: "inherit", shell: true }
|
|
15456
|
+
(0, import_child_process2.exec)(
|
|
15457
|
+
`npm install -g @bgicli/bgicli@${latest} --registry https://registry.npmjs.org`,
|
|
15458
|
+
(error) => resolve3(!error)
|
|
15460
15459
|
);
|
|
15461
|
-
child.on("close", (code) => resolve3(code === 0));
|
|
15462
|
-
child.on("error", () => resolve3(false));
|
|
15463
15460
|
});
|
|
15464
15461
|
if (ok) {
|
|
15465
15462
|
process.stdout.write(source_default.green(` \u2713 \u5DF2\u66F4\u65B0\u81F3 v${latest}\uFF0C\u91CD\u542F bgi \u540E\u751F\u6548
|
|
@@ -16691,7 +16688,8 @@ ${summary}` },
|
|
|
16691
16688
|
async function main() {
|
|
16692
16689
|
installBundledData();
|
|
16693
16690
|
printBanner();
|
|
16694
|
-
await checkAndAutoUpdate()
|
|
16691
|
+
await checkAndAutoUpdate().catch(() => {
|
|
16692
|
+
});
|
|
16695
16693
|
const rl = (0, import_readline.createInterface)({
|
|
16696
16694
|
input: process.stdin,
|
|
16697
16695
|
output: process.stdout,
|