@mutmutco/installer-launcher 0.1.7 → 0.1.8
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 +12 -7
- package/dist/launcher.sea.cjs +12 -7
- package/package.json +2 -2
package/dist/launcher.js
CHANGED
|
@@ -88,20 +88,26 @@ function wrapWords(text, width) {
|
|
|
88
88
|
if (line) lines.push(line);
|
|
89
89
|
return lines.length ? lines : [""];
|
|
90
90
|
}
|
|
91
|
-
function createFace({ product, color = false, columns }) {
|
|
91
|
+
function createFace({ product, color = false, columns, env = process.env }) {
|
|
92
92
|
const identity = identityFor(product);
|
|
93
93
|
const width = faceWidth(columns);
|
|
94
94
|
const paint = (sgr, text) => color ? `\x1B[${sgr}m${text}\x1B[0m` : String(text);
|
|
95
95
|
const bar = () => paint(PALETTE.muted, GLYPH.bar);
|
|
96
96
|
const indent = " ".repeat(TITLE_COLUMN - 1);
|
|
97
|
-
const
|
|
97
|
+
const continuedPhases = new Set((env.MM_FACE_CONTINUES ?? "").split(",").map((phase) => phase.trim()).filter(Boolean));
|
|
98
|
+
const continuesFace = continuedPhases.size > 0;
|
|
99
|
+
const welcome = () => continuesFace ? [] : [
|
|
98
100
|
`${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, identity.name)} \u2014 Mutatis Mutandis`,
|
|
99
101
|
bar(),
|
|
100
102
|
`${bar()} ${identity.warm}`,
|
|
101
103
|
bar()
|
|
102
104
|
];
|
|
105
|
+
const continues = (phase, kind = "ok") => {
|
|
106
|
+
const inherited = continuedPhases.delete(String(phase).trim());
|
|
107
|
+
return kind === "fail" ? false : inherited;
|
|
108
|
+
};
|
|
103
109
|
const step = (title, seconds = null, kind = "ok") => {
|
|
104
|
-
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.
|
|
110
|
+
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.dot) : paint(PALETTE.green, GLYPH.check);
|
|
105
111
|
const time = seconds === null || seconds === void 0 ? "" : paint(PALETTE.muted, `${Math.max(0, Math.round(seconds))}s`);
|
|
106
112
|
const column = Math.min(44, Math.max(0, width - 8));
|
|
107
113
|
const reserved = time ? 6 : 0;
|
|
@@ -115,8 +121,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
115
121
|
const body = (Array.isArray(lines) ? lines : String(lines).split("\n")).flatMap((raw) => {
|
|
116
122
|
const line = String(raw);
|
|
117
123
|
if (visibleWidth(line) <= width - 6) return [line];
|
|
118
|
-
|
|
119
|
-
return wrapWords(line, width - 6 - lead.length).map((part) => `${lead}${part}`);
|
|
124
|
+
return wrapWords(line, width - 6);
|
|
120
125
|
});
|
|
121
126
|
const content = Math.min(width - 6, Math.max(...body.map(visibleWidth)));
|
|
122
127
|
const rule = paint(identity.accent, GLYPH.rule.repeat(content + 4));
|
|
@@ -130,7 +135,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
130
135
|
};
|
|
131
136
|
const signOff = () => `${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, `${identity.name} \xB7 Mutatis Mutandis`)}`;
|
|
132
137
|
const refusal = (message) => `${bar()} ${paint(identity.accent, GLYPH.cross)} ${message}`;
|
|
133
|
-
return { identity, width, welcome, step, relay, receipt, signOff, refusal, paint };
|
|
138
|
+
return { identity, width, welcome, continues, step, relay, receipt, signOff, refusal, paint };
|
|
134
139
|
}
|
|
135
140
|
var RELAY_INDENT = " ".repeat(TITLE_COLUMN - 1);
|
|
136
141
|
var FRAMES = ["\u25D2", "\u25D0", "\u25D3", "\u25D1"];
|
|
@@ -863,7 +868,7 @@ function wipeProductDir(dir) {
|
|
|
863
868
|
}
|
|
864
869
|
|
|
865
870
|
// src/index.ts
|
|
866
|
-
var LAUNCHER_VERSION = true ? "0.1.
|
|
871
|
+
var LAUNCHER_VERSION = true ? "0.1.8" : readVersionFromPackage();
|
|
867
872
|
function defaultPrint(message) {
|
|
868
873
|
process.stdout.write(`${message}
|
|
869
874
|
`);
|
package/dist/launcher.sea.cjs
CHANGED
|
@@ -118,20 +118,26 @@ function wrapWords(text, width) {
|
|
|
118
118
|
if (line) lines.push(line);
|
|
119
119
|
return lines.length ? lines : [""];
|
|
120
120
|
}
|
|
121
|
-
function createFace({ product, color = false, columns }) {
|
|
121
|
+
function createFace({ product, color = false, columns, env = process.env }) {
|
|
122
122
|
const identity = identityFor(product);
|
|
123
123
|
const width = faceWidth(columns);
|
|
124
124
|
const paint = (sgr, text) => color ? `\x1B[${sgr}m${text}\x1B[0m` : String(text);
|
|
125
125
|
const bar = () => paint(PALETTE.muted, GLYPH.bar);
|
|
126
126
|
const indent = " ".repeat(TITLE_COLUMN - 1);
|
|
127
|
-
const
|
|
127
|
+
const continuedPhases = new Set((env.MM_FACE_CONTINUES ?? "").split(",").map((phase) => phase.trim()).filter(Boolean));
|
|
128
|
+
const continuesFace = continuedPhases.size > 0;
|
|
129
|
+
const welcome = () => continuesFace ? [] : [
|
|
128
130
|
`${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, identity.name)} \u2014 Mutatis Mutandis`,
|
|
129
131
|
bar(),
|
|
130
132
|
`${bar()} ${identity.warm}`,
|
|
131
133
|
bar()
|
|
132
134
|
];
|
|
135
|
+
const continues = (phase, kind = "ok") => {
|
|
136
|
+
const inherited = continuedPhases.delete(String(phase).trim());
|
|
137
|
+
return kind === "fail" ? false : inherited;
|
|
138
|
+
};
|
|
133
139
|
const step = (title, seconds = null, kind = "ok") => {
|
|
134
|
-
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.
|
|
140
|
+
const glyph = kind === "fail" ? paint(identity.accent, GLYPH.cross) : kind === "note" ? paint(PALETTE.muted, GLYPH.dot) : paint(PALETTE.green, GLYPH.check);
|
|
135
141
|
const time = seconds === null || seconds === void 0 ? "" : paint(PALETTE.muted, `${Math.max(0, Math.round(seconds))}s`);
|
|
136
142
|
const column = Math.min(44, Math.max(0, width - 8));
|
|
137
143
|
const reserved = time ? 6 : 0;
|
|
@@ -145,8 +151,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
145
151
|
const body = (Array.isArray(lines) ? lines : String(lines).split("\n")).flatMap((raw) => {
|
|
146
152
|
const line = String(raw);
|
|
147
153
|
if (visibleWidth(line) <= width - 6) return [line];
|
|
148
|
-
|
|
149
|
-
return wrapWords(line, width - 6 - lead.length).map((part) => `${lead}${part}`);
|
|
154
|
+
return wrapWords(line, width - 6);
|
|
150
155
|
});
|
|
151
156
|
const content = Math.min(width - 6, Math.max(...body.map(visibleWidth)));
|
|
152
157
|
const rule = paint(identity.accent, GLYPH.rule.repeat(content + 4));
|
|
@@ -160,7 +165,7 @@ function createFace({ product, color = false, columns }) {
|
|
|
160
165
|
};
|
|
161
166
|
const signOff = () => `${paint(identity.accent, GLYPH.diamond)} ${paint(identity.accent, `${identity.name} \xB7 Mutatis Mutandis`)}`;
|
|
162
167
|
const refusal = (message) => `${bar()} ${paint(identity.accent, GLYPH.cross)} ${message}`;
|
|
163
|
-
return { identity, width, welcome, step, relay, receipt, signOff, refusal, paint };
|
|
168
|
+
return { identity, width, welcome, continues, step, relay, receipt, signOff, refusal, paint };
|
|
164
169
|
}
|
|
165
170
|
var RELAY_INDENT = " ".repeat(TITLE_COLUMN - 1);
|
|
166
171
|
var FRAMES = ["\u25D2", "\u25D0", "\u25D3", "\u25D1"];
|
|
@@ -894,7 +899,7 @@ function wipeProductDir(dir) {
|
|
|
894
899
|
}
|
|
895
900
|
|
|
896
901
|
// src/index.ts
|
|
897
|
-
var LAUNCHER_VERSION = true ? "0.1.
|
|
902
|
+
var LAUNCHER_VERSION = true ? "0.1.8" : readVersionFromPackage();
|
|
898
903
|
function defaultPrint(message) {
|
|
899
904
|
process.stdout.write(`${message}
|
|
900
905
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/installer-launcher",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Single-executable (SEA) launcher: sign-in, gated payload fetch, self-update. One copy ships per product.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"vitest": "^4.1.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@mutmutco/installer-face": "^0.2.
|
|
37
|
+
"@mutmutco/installer-face": "^0.2.3"
|
|
38
38
|
}
|
|
39
39
|
}
|