@mutmutco/hub 4.5.3 → 4.5.4
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/index.cjs +18 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -734,6 +734,18 @@ function createInstallerRun(value, options = {}) {
|
|
|
734
734
|
let chunkColumn = 0;
|
|
735
735
|
const trailingCR = /* @__PURE__ */ new Set();
|
|
736
736
|
let deferredActivity;
|
|
737
|
+
let runningPhase;
|
|
738
|
+
const animateRunning = (title, measure) => {
|
|
739
|
+
if (face.progress(title, measure)) return;
|
|
740
|
+
if (activeTitle === title) spinner.say(title, measure);
|
|
741
|
+
else {
|
|
742
|
+
activeTitle = title;
|
|
743
|
+
spinner.start(title, measure);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
const resumeRunningPhase = () => {
|
|
747
|
+
if (runningPhase && !finished) animateRunning(runningPhase.title, runningPhase.measure);
|
|
748
|
+
};
|
|
737
749
|
const drawnPhaseCompletions = /* @__PURE__ */ new Set();
|
|
738
750
|
const closeChunk = () => {
|
|
739
751
|
if (chunkOpen) emit("\n", chunkChannel);
|
|
@@ -785,14 +797,11 @@ function createInstallerRun(value, options = {}) {
|
|
|
785
797
|
throw new Error("installer run: invalid runningTitle");
|
|
786
798
|
}
|
|
787
799
|
const runningTitle = facts.runningTitle?.trim() ?? title;
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
else {
|
|
791
|
-
activeTitle = runningTitle;
|
|
792
|
-
spinner.start(runningTitle, facts.measure ?? null);
|
|
793
|
-
}
|
|
800
|
+
runningPhase = { id: fold ? "check" : id, title: runningTitle, measure: facts.measure ?? null };
|
|
801
|
+
animateRunning(runningTitle, facts.measure ?? null);
|
|
794
802
|
return;
|
|
795
803
|
}
|
|
804
|
+
if (runningPhase && runningPhase.id === (fold ? "check" : id)) runningPhase = void 0;
|
|
796
805
|
if (fold && id !== "check") {
|
|
797
806
|
if (facts.detail) run.relay(facts.detail);
|
|
798
807
|
return;
|
|
@@ -816,6 +825,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
816
825
|
const completed = ["updated", "current", "kept", "skipped"].includes(facts.state);
|
|
817
826
|
durable(`${facts.id}${versions} ${separator} ${status}${activation}`, completed ? facts.seconds ?? null : null, facts.state === "failed" ? "fail" : facts.state === "updated" ? "ok" : "note");
|
|
818
827
|
if (facts.detail) run.relay(facts.detail);
|
|
828
|
+
resumeRunningPhase();
|
|
819
829
|
},
|
|
820
830
|
milestone({ step, state, ms, measure }) {
|
|
821
831
|
start();
|
|
@@ -834,6 +844,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
834
844
|
if (state !== "fail" && drawnPhaseCompletions.has(step)) return;
|
|
835
845
|
durable(step, ms === void 0 ? null : ms / 1e3, state);
|
|
836
846
|
if (state === "ok") drawnPhaseCompletions.add(step);
|
|
847
|
+
resumeRunningPhase();
|
|
837
848
|
},
|
|
838
849
|
signIn({ url, code }) {
|
|
839
850
|
start();
|
|
@@ -932,6 +943,7 @@ function createInstallerRun(value, options = {}) {
|
|
|
932
943
|
stop() {
|
|
933
944
|
closeChunk();
|
|
934
945
|
activeTitle = void 0;
|
|
946
|
+
runningPhase = void 0;
|
|
935
947
|
spinner.stop();
|
|
936
948
|
}
|
|
937
949
|
};
|
package/package.json
CHANGED