zyrk 0.8.2 → 0.8.3
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/README.md +5 -1
- package/VERSION +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +2 -4
- package/dist/cli/progress.d.ts +1 -0
- package/dist/cli/progress.d.ts.map +1 -1
- package/dist/cli/progress.js +41 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -481,7 +481,11 @@ linking on stderr. Interactive terminals show the stages as a calm, multi-line
|
|
|
481
481
|
sequence, followed by a success footer; package downloads show received bytes,
|
|
482
482
|
and a checkmark lists each unique package/version linked after the project
|
|
483
483
|
transaction commits. Both `zyrk add prettier` and `zyrk install prettier` show
|
|
484
|
-
these details. Redirected output uses plain progress messages
|
|
484
|
+
these details. Redirected output uses plain progress messages, with frequent
|
|
485
|
+
source and download updates limited to once per second. Stage changes and
|
|
486
|
+
completion flush the latest counts, including when an install fails.
|
|
487
|
+
Intentionally unbuilt installs use an attention footer and state which review
|
|
488
|
+
action is needed. Source counters
|
|
485
489
|
distinguish verified reuse from newly downloaded sources. Source counts differ
|
|
486
490
|
from dependency contexts when peers split a package. `--json` disables progress.
|
|
487
491
|
Other native commands use the same terminal language: successful summaries get
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v0.8.
|
|
1
|
+
v0.8.3
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAe,SAAS,EAAe,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAoB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAM3C,OAAO,EAAqC,KAAK,UAAU,EAAE,MAA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E,MAAM,GAAG,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3D,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CACxC,CAAC;AAuDF,gFAAgF;AAChF,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAuhBpE"}
|
package/dist/cli/main.js
CHANGED
|
@@ -40,6 +40,7 @@ function installCompletion(readiness) {
|
|
|
40
40
|
};
|
|
41
41
|
case "intentionally-unbuilt":
|
|
42
42
|
return {
|
|
43
|
+
tone: "attention",
|
|
43
44
|
title: "Installed; some dependency builds were intentionally skipped.",
|
|
44
45
|
detail: "Review build policy before running packages that need those builds.",
|
|
45
46
|
};
|
|
@@ -803,10 +804,7 @@ export async function runCli(options) {
|
|
|
803
804
|
}
|
|
804
805
|
: {}),
|
|
805
806
|
});
|
|
806
|
-
progress.close(
|
|
807
|
-
title: `Dependency changes installed from the verified shared store.`,
|
|
808
|
-
detail: `${result.packages} packages; ${result.reused} realizations reused.`,
|
|
809
|
-
});
|
|
807
|
+
progress.close(installCompletion(result.readiness));
|
|
810
808
|
if (parsed.json) {
|
|
811
809
|
return emit({
|
|
812
810
|
exitCode: 0,
|
package/dist/cli/progress.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { InstallProgress } from "../install/run.ts";
|
|
|
2
2
|
export type InstallCompletion = {
|
|
3
3
|
title: string;
|
|
4
4
|
detail?: string;
|
|
5
|
+
tone?: "success" | "attention";
|
|
5
6
|
};
|
|
6
7
|
/** Presentation only: never writes to stdout or exposes package URLs or paths. */
|
|
7
8
|
export declare function createInstallProgress(stream: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/cli/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAYzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/cli/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAYzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE;IAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAC1D,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC;IACD,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,KAAK,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C,CAiIA"}
|
package/dist/cli/progress.js
CHANGED
|
@@ -18,6 +18,9 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
18
18
|
let statusLine = false;
|
|
19
19
|
let lastDownload = 0;
|
|
20
20
|
let lastPlain = "";
|
|
21
|
+
let pendingPlain = "";
|
|
22
|
+
let lastPlainAt = -Infinity;
|
|
23
|
+
let downloadAnnounced = false;
|
|
21
24
|
const write = (text) => {
|
|
22
25
|
try {
|
|
23
26
|
stream.write(text);
|
|
@@ -32,6 +35,14 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
32
35
|
write(`\r\u001b[2K${lineBreak ? "\n" : ""}`);
|
|
33
36
|
statusLine = false;
|
|
34
37
|
};
|
|
38
|
+
const flushPlain = () => {
|
|
39
|
+
if (pendingPlain && pendingPlain !== lastPlain) {
|
|
40
|
+
write(`zyrk: ${pendingPlain}\n`);
|
|
41
|
+
lastPlain = pendingPlain;
|
|
42
|
+
lastPlainAt = Date.now();
|
|
43
|
+
}
|
|
44
|
+
pendingPlain = "";
|
|
45
|
+
};
|
|
35
46
|
return {
|
|
36
47
|
update(event) {
|
|
37
48
|
if (quiet || closed)
|
|
@@ -45,6 +56,8 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
45
56
|
if (pkg?.status === "linked") {
|
|
46
57
|
if (tty)
|
|
47
58
|
clearStatus(true);
|
|
59
|
+
else
|
|
60
|
+
flushPlain();
|
|
48
61
|
write(`${green("✓")} ${packageLabel} linked\n`);
|
|
49
62
|
return;
|
|
50
63
|
}
|
|
@@ -63,7 +76,7 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
63
76
|
lastDownload = Date.now();
|
|
64
77
|
const status = pkg?.status === "downloading"
|
|
65
78
|
? ` Downloading ${packageLabel}: ${((pkg.bytes ?? 0) / 1024).toFixed(1)} KiB`
|
|
66
|
-
: ` Sources verified ${event.completed ?? 0}
|
|
79
|
+
: ` Sources verified ${event.completed ?? 0}${event.total === undefined ? "" : `/${event.total}`} · reused ${event.reused ?? 0} · downloaded ${event.downloaded ?? 0}`;
|
|
67
80
|
write(`\r\u001b[2K${dim(status)}`);
|
|
68
81
|
statusLine = true;
|
|
69
82
|
}
|
|
@@ -78,9 +91,25 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
78
91
|
(event.reused === undefined
|
|
79
92
|
? ""
|
|
80
93
|
: ` — reused ${event.reused}, downloaded ${event.downloaded ?? 0}`);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
const newStage = stage !== currentStage;
|
|
95
|
+
if (newStage) {
|
|
96
|
+
flushPlain();
|
|
97
|
+
currentStage = stage;
|
|
98
|
+
downloadAnnounced = false;
|
|
99
|
+
}
|
|
100
|
+
const firstDownload = pkg?.status === "downloading" && !downloadAnnounced;
|
|
101
|
+
if (pkg?.status === "downloading")
|
|
102
|
+
downloadAnnounced = true;
|
|
103
|
+
pendingPlain = current;
|
|
104
|
+
const sourcesComplete = event.phase === "fetching" &&
|
|
105
|
+
pkg?.status !== "downloading" &&
|
|
106
|
+
event.total !== undefined &&
|
|
107
|
+
event.completed === event.total;
|
|
108
|
+
if (newStage ||
|
|
109
|
+
firstDownload ||
|
|
110
|
+
sourcesComplete ||
|
|
111
|
+
Date.now() - lastPlainAt >= 1000)
|
|
112
|
+
flushPlain();
|
|
84
113
|
},
|
|
85
114
|
close(completion) {
|
|
86
115
|
if (closed)
|
|
@@ -88,11 +117,18 @@ export function createInstallProgress(stream, quiet, options = {}) {
|
|
|
88
117
|
closed = true;
|
|
89
118
|
if (quiet)
|
|
90
119
|
return;
|
|
120
|
+
if (!tty)
|
|
121
|
+
flushPlain();
|
|
91
122
|
if (tty) {
|
|
92
123
|
clearStatus(true);
|
|
93
124
|
if (completion) {
|
|
94
125
|
write(`${dim("─".repeat(46))}\n`);
|
|
95
|
-
|
|
126
|
+
const marker = completion.tone === "attention"
|
|
127
|
+
? color
|
|
128
|
+
? "\u001b[33m!\u001b[0m"
|
|
129
|
+
: "!"
|
|
130
|
+
: green("✓");
|
|
131
|
+
write(`${marker} ${completion.title}\n`);
|
|
96
132
|
if (completion.detail)
|
|
97
133
|
write(`${dim(completion.detail)}\n`);
|
|
98
134
|
}
|