@mutmutco/installer-launcher 0.1.18 → 1.0.1
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/launcher.js +19 -7
- package/dist/launcher.sea.cjs +19 -7
- package/package.json +1 -1
package/dist/launcher.js
CHANGED
|
@@ -1196,6 +1196,18 @@ function createInstallerRun(value, options = {}) {
|
|
|
1196
1196
|
let chunkColumn = 0;
|
|
1197
1197
|
const trailingCR = /* @__PURE__ */ new Set();
|
|
1198
1198
|
let deferredActivity;
|
|
1199
|
+
let runningPhase;
|
|
1200
|
+
const animateRunning = (title, measure) => {
|
|
1201
|
+
if (face.progress(title, measure)) return;
|
|
1202
|
+
if (activeTitle === title) spinner.say(title, measure);
|
|
1203
|
+
else {
|
|
1204
|
+
activeTitle = title;
|
|
1205
|
+
spinner.start(title, measure);
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
const resumeRunningPhase = () => {
|
|
1209
|
+
if (runningPhase && !finished) animateRunning(runningPhase.title, runningPhase.measure);
|
|
1210
|
+
};
|
|
1199
1211
|
const drawnPhaseCompletions = /* @__PURE__ */ new Set();
|
|
1200
1212
|
const closeChunk = () => {
|
|
1201
1213
|
if (chunkOpen) emit("\n", chunkChannel);
|
|
@@ -1247,14 +1259,11 @@ function createInstallerRun(value, options = {}) {
|
|
|
1247
1259
|
throw new Error("installer run: invalid runningTitle");
|
|
1248
1260
|
}
|
|
1249
1261
|
const runningTitle = facts.runningTitle?.trim() ?? title;
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
else {
|
|
1253
|
-
activeTitle = runningTitle;
|
|
1254
|
-
spinner.start(runningTitle, facts.measure ?? null);
|
|
1255
|
-
}
|
|
1262
|
+
runningPhase = { id: fold ? "check" : id, title: runningTitle, measure: facts.measure ?? null };
|
|
1263
|
+
animateRunning(runningTitle, facts.measure ?? null);
|
|
1256
1264
|
return;
|
|
1257
1265
|
}
|
|
1266
|
+
if (runningPhase && runningPhase.id === (fold ? "check" : id)) runningPhase = void 0;
|
|
1258
1267
|
if (fold && id !== "check") {
|
|
1259
1268
|
if (facts.detail) run2.relay(facts.detail);
|
|
1260
1269
|
return;
|
|
@@ -1278,6 +1287,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1278
1287
|
const completed = ["updated", "current", "kept", "skipped"].includes(facts.state);
|
|
1279
1288
|
durable(`${facts.id}${versions} ${separator} ${status}${activation}`, completed ? facts.seconds ?? null : null, facts.state === "failed" ? "fail" : facts.state === "updated" ? "ok" : "note");
|
|
1280
1289
|
if (facts.detail) run2.relay(facts.detail);
|
|
1290
|
+
resumeRunningPhase();
|
|
1281
1291
|
},
|
|
1282
1292
|
milestone({ step, state, ms, measure }) {
|
|
1283
1293
|
start();
|
|
@@ -1296,6 +1306,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1296
1306
|
if (state !== "fail" && drawnPhaseCompletions.has(step)) return;
|
|
1297
1307
|
durable(step, ms === void 0 ? null : ms / 1e3, state);
|
|
1298
1308
|
if (state === "ok") drawnPhaseCompletions.add(step);
|
|
1309
|
+
resumeRunningPhase();
|
|
1299
1310
|
},
|
|
1300
1311
|
signIn({ url, code }) {
|
|
1301
1312
|
start();
|
|
@@ -1394,6 +1405,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1394
1405
|
stop() {
|
|
1395
1406
|
closeChunk();
|
|
1396
1407
|
activeTitle = void 0;
|
|
1408
|
+
runningPhase = void 0;
|
|
1397
1409
|
spinner.stop();
|
|
1398
1410
|
}
|
|
1399
1411
|
};
|
|
@@ -1810,7 +1822,7 @@ function page(title, body) {
|
|
|
1810
1822
|
}
|
|
1811
1823
|
|
|
1812
1824
|
// src/index.ts
|
|
1813
|
-
var LAUNCHER_VERSION = true ? "0.1
|
|
1825
|
+
var LAUNCHER_VERSION = true ? "1.0.1" : readVersionFromPackage();
|
|
1814
1826
|
function defaultPrint(message) {
|
|
1815
1827
|
process.stdout.write(`${message}
|
|
1816
1828
|
`);
|
package/dist/launcher.sea.cjs
CHANGED
|
@@ -1229,6 +1229,18 @@ function createInstallerRun(value, options = {}) {
|
|
|
1229
1229
|
let chunkColumn = 0;
|
|
1230
1230
|
const trailingCR = /* @__PURE__ */ new Set();
|
|
1231
1231
|
let deferredActivity;
|
|
1232
|
+
let runningPhase;
|
|
1233
|
+
const animateRunning = (title, measure) => {
|
|
1234
|
+
if (face.progress(title, measure)) return;
|
|
1235
|
+
if (activeTitle === title) spinner.say(title, measure);
|
|
1236
|
+
else {
|
|
1237
|
+
activeTitle = title;
|
|
1238
|
+
spinner.start(title, measure);
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
const resumeRunningPhase = () => {
|
|
1242
|
+
if (runningPhase && !finished) animateRunning(runningPhase.title, runningPhase.measure);
|
|
1243
|
+
};
|
|
1232
1244
|
const drawnPhaseCompletions = /* @__PURE__ */ new Set();
|
|
1233
1245
|
const closeChunk = () => {
|
|
1234
1246
|
if (chunkOpen) emit("\n", chunkChannel);
|
|
@@ -1280,14 +1292,11 @@ function createInstallerRun(value, options = {}) {
|
|
|
1280
1292
|
throw new Error("installer run: invalid runningTitle");
|
|
1281
1293
|
}
|
|
1282
1294
|
const runningTitle = facts.runningTitle?.trim() ?? title;
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
else {
|
|
1286
|
-
activeTitle = runningTitle;
|
|
1287
|
-
spinner.start(runningTitle, facts.measure ?? null);
|
|
1288
|
-
}
|
|
1295
|
+
runningPhase = { id: fold ? "check" : id, title: runningTitle, measure: facts.measure ?? null };
|
|
1296
|
+
animateRunning(runningTitle, facts.measure ?? null);
|
|
1289
1297
|
return;
|
|
1290
1298
|
}
|
|
1299
|
+
if (runningPhase && runningPhase.id === (fold ? "check" : id)) runningPhase = void 0;
|
|
1291
1300
|
if (fold && id !== "check") {
|
|
1292
1301
|
if (facts.detail) run2.relay(facts.detail);
|
|
1293
1302
|
return;
|
|
@@ -1311,6 +1320,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1311
1320
|
const completed = ["updated", "current", "kept", "skipped"].includes(facts.state);
|
|
1312
1321
|
durable(`${facts.id}${versions} ${separator} ${status}${activation}`, completed ? facts.seconds ?? null : null, facts.state === "failed" ? "fail" : facts.state === "updated" ? "ok" : "note");
|
|
1313
1322
|
if (facts.detail) run2.relay(facts.detail);
|
|
1323
|
+
resumeRunningPhase();
|
|
1314
1324
|
},
|
|
1315
1325
|
milestone({ step, state, ms, measure }) {
|
|
1316
1326
|
start();
|
|
@@ -1329,6 +1339,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1329
1339
|
if (state !== "fail" && drawnPhaseCompletions.has(step)) return;
|
|
1330
1340
|
durable(step, ms === void 0 ? null : ms / 1e3, state);
|
|
1331
1341
|
if (state === "ok") drawnPhaseCompletions.add(step);
|
|
1342
|
+
resumeRunningPhase();
|
|
1332
1343
|
},
|
|
1333
1344
|
signIn({ url, code }) {
|
|
1334
1345
|
start();
|
|
@@ -1427,6 +1438,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
1427
1438
|
stop() {
|
|
1428
1439
|
closeChunk();
|
|
1429
1440
|
activeTitle = void 0;
|
|
1441
|
+
runningPhase = void 0;
|
|
1430
1442
|
spinner.stop();
|
|
1431
1443
|
}
|
|
1432
1444
|
};
|
|
@@ -1843,7 +1855,7 @@ function page(title, body) {
|
|
|
1843
1855
|
}
|
|
1844
1856
|
|
|
1845
1857
|
// src/index.ts
|
|
1846
|
-
var LAUNCHER_VERSION = true ? "0.1
|
|
1858
|
+
var LAUNCHER_VERSION = true ? "1.0.1" : readVersionFromPackage();
|
|
1847
1859
|
function defaultPrint(message) {
|
|
1848
1860
|
process.stdout.write(`${message}
|
|
1849
1861
|
`);
|
package/package.json
CHANGED