@cat-factory/cli 0.12.0 → 0.13.0

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.
@@ -0,0 +1,82 @@
1
+ import { type EnvEntry } from './env.js';
2
+ /**
3
+ * What the write did, and what it did to each key an operator might care about.
4
+ *
5
+ * Four categories rather than a boolean, because "nothing was overwritten" is the claim this kind of
6
+ * command makes and only the split can state it: `kept` is a value the file already held and this
7
+ * run reused, `changed` is one it REPLACED (the case that owes the operator a sentence), `added` is
8
+ * new, and `preserved` is everything in the file the caller does not manage and therefore must not
9
+ * lose.
10
+ */
11
+ export interface EnvMerge {
12
+ text: string;
13
+ kept: readonly string[];
14
+ changed: readonly string[];
15
+ added: readonly string[];
16
+ preserved: readonly string[];
17
+ }
18
+ /**
19
+ * The header written above the content the merge did not manage.
20
+ *
21
+ * Exported because a consumer rendering its own report matches on it. Recognition on the way IN goes
22
+ * through {@link CARRIED_OVER_PREFIX}, not through this: it introduces an UNMANAGED assignment, so
23
+ * the ordinary comment-block rule carries it over, and a merge that then prepended a fresh copy grew
24
+ * the file by one line per run.
25
+ */
26
+ export declare const CARRIED_OVER_HEADER = "# Carried over unchanged from the previous file; this command does not manage these.";
27
+ /**
28
+ * Merge the managed entries into an existing `.env`, keeping every unmanaged line VERBATIM.
29
+ *
30
+ * `existing` is `null` for a file that does not exist yet, which writes the whole thing. The managed
31
+ * values are quoted on the way out where they need it (see {@link quoteEnvValue}); the kept/changed
32
+ * comparison stays against the UNQUOTED form, which is what both sides hold.
33
+ */
34
+ export declare function mergeEnvFile(existing: string | null, entries: readonly EnvEntry[]): EnvMerge;
35
+ /**
36
+ * Quote a managed value when leaving it bare would make the reader disagree with the writer.
37
+ *
38
+ * `renderEnvFile` emits a bare `KEY=value`, and a `.env` is typically read with `node:util`'s
39
+ * `parseEnv`, which treats an unquoted `#` as the start of a comment and strips surrounding
40
+ * whitespace: `parseEnv('A=with # hash')` is `{ A: 'with' }`. So a value READ as `cf-acc #2` (from a
41
+ * quoted line an operator wrote), offered as a prompt default and accepted unchanged would be
42
+ * written back as a DIFFERENT value while the merge report called it unchanged.
43
+ *
44
+ * Double quotes preferred, single quotes when the value contains a double one, because `parseEnv`
45
+ * supports both delimiters and NO escape inside either (`A="he said \"hi\""` parses as `he said \`).
46
+ * A value carrying both quote characters is therefore unrepresentable, so it throws rather than
47
+ * writing a file that reads back as something else: the whole promise of such a command is that the
48
+ * file it wrote is the file the reader will read.
49
+ */
50
+ export declare function quoteEnvValue(value: string): string;
51
+ /**
52
+ * The `KEY=` assignments a `.env` holds, by key, with each value unquoted.
53
+ *
54
+ * Hand-rolled rather than `node:util`'s `parseEnv`, because what a merge needs is the SET of keys and
55
+ * whether each still holds the value being written, and the comparison has to be against the same
56
+ * unquoted form the writer produces. A value the caller does not manage is never read for its
57
+ * meaning, only skipped, so the shallow read is sufficient exactly where it is used.
58
+ *
59
+ * An assignment with an EMPTY value is kept, so `preserved` can report a `FOO=` line the merge
60
+ * carried over. A caller using this for prompt DEFAULTS filters those itself, because blank usually
61
+ * means absent to whatever reads the file.
62
+ */
63
+ export declare function readAssignments(text: string): Record<string, string>;
64
+ /**
65
+ * One line per managed key, with every secret's value WITHHELD rather than masked.
66
+ *
67
+ * `secretKeys` is the caller's, and it is a SET rather than a predicate on purpose: a pattern match
68
+ * (`key.includes('TOKEN')`) passes today and quietly stops covering the next secret whose name does
69
+ * not say so, and the failure is one nobody sees: a token on somebody's scrollback.
70
+ *
71
+ * Withheld and not masked, because a masked value still states its length and its prefix, and this
72
+ * output is routinely pasted into an issue when the setup did not work.
73
+ */
74
+ export declare function describeEntries(entries: readonly EnvEntry[], secretKeys: ReadonlySet<string>): readonly string[];
75
+ /**
76
+ * What the write did, in the order an operator wants it: what changed, then what was left alone.
77
+ *
78
+ * `changed` leads because it is the only category that can surprise anyone, and the promise such a
79
+ * command makes is that it never overwrites a value without saying so.
80
+ */
81
+ export declare function describeMerge(merge: EnvMerge, path: string): readonly string[];
82
+ //# sourceMappingURL=envMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envMerge.d.ts","sourceRoot":"","sources":["../src/envMerge.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,UAAU,CAAA;AAEvD;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IACvB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B;AAcD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,yFAA+D,CAAA;AAO/F;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,CAoB5F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASnD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMpE;AAyJD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,SAAS,MAAM,EAAE,CAKnB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAW9E"}
@@ -0,0 +1,293 @@
1
+ // MERGING into an existing `.env`, which is the other half of writing one.
2
+ //
3
+ // `env.ts` renders a fresh file. This is what a setup command needs the second time it runs, and the
4
+ // two belong together: a generator that can only overwrite is a generator nobody runs twice.
5
+ //
6
+ // Published rather than kept inside whichever command needed it first, because five judgements here
7
+ // are each a SILENT failure when you get them wrong (the command reports success and the file means
8
+ // something else), and every consumer that writes its own generator has to make all five:
9
+ //
10
+ // 1. **Unmanaged content is carried over VERBATIM**, never re-rendered from a parse, and a
11
+ // multi-line quoted value is ONE assignment rather than a line and some debris. A parse-then-
12
+ // requote round trip is how a PEM acquires a stray escape and stops matching the certificate it
13
+ // was pasted from; a line-at-a-time strip is how one loses its opening line and has the rest
14
+ // re-filed as somebody else's content, which the reader then takes for a set of garbage keys.
15
+ // 2. **The report is four categories, not a boolean.** "Nothing was overwritten" is the claim such
16
+ // a command makes, and only `kept` / `changed` / `added` / `preserved` can state it.
17
+ // 3. **A managed value is QUOTED where the READER would otherwise disagree with the writer.**
18
+ // `renderEnvFile` emits a bare `KEY=value`; `node:util`'s `parseEnv` treats an unquoted `#` as a
19
+ // comment, so `A=cf-kargo #2` reads back as `cf-kargo`. A value carrying both quote characters
20
+ // is unrepresentable and THROWS rather than being written as something else.
21
+ // 4. **The carried-over header must be RECOGNISED as well as written**, or the file grows by one
22
+ // identical line per run, and recognised by a STABLE PREFIX rather than the whole sentence, or
23
+ // the day the wording changes every file written by a previous run grows one anyway.
24
+ // 5. **Secrets are withheld by an ENUMERATED list**, never a pattern match: `key.includes('TOKEN')`
25
+ // passes today and quietly stops covering the next secret whose name does not say so.
26
+ //
27
+ // The list of secrets itself stays the CALLER's, because only a caller knows its own; the withholding
28
+ // behaviour does not.
29
+ import { renderEnvFile } from './env.js';
30
+ /**
31
+ * The part of the header that IDENTIFIES it, and the only part any recognition may depend on.
32
+ *
33
+ * Split off the sentence because recognising the whole of it is a trap that has already fired: the
34
+ * header used to name `configure`, and generalising the wording for a published helper meant every
35
+ * file a previous run had written carried a line the next run no longer matched. It was then filed as
36
+ * an ordinary comment above unmanaged content, a fresh header was prepended above it, and the file
37
+ * kept both, which is precisely the growth rule 4 exists to prevent. Matching a prefix that does not
38
+ * carry the changeable half makes the next rewording free.
39
+ */
40
+ const CARRIED_OVER_PREFIX = '# Carried over unchanged from the previous file;';
41
+ /**
42
+ * The header written above the content the merge did not manage.
43
+ *
44
+ * Exported because a consumer rendering its own report matches on it. Recognition on the way IN goes
45
+ * through {@link CARRIED_OVER_PREFIX}, not through this: it introduces an UNMANAGED assignment, so
46
+ * the ordinary comment-block rule carries it over, and a merge that then prepended a fresh copy grew
47
+ * the file by one line per run.
48
+ */
49
+ export const CARRIED_OVER_HEADER = `${CARRIED_OVER_PREFIX} this command does not manage these.`;
50
+ /** Whether a line is the carried-over header, in whichever words the run that wrote it used. */
51
+ function isCarriedOverHeader(line) {
52
+ return line.trim().startsWith(CARRIED_OVER_PREFIX);
53
+ }
54
+ /**
55
+ * Merge the managed entries into an existing `.env`, keeping every unmanaged line VERBATIM.
56
+ *
57
+ * `existing` is `null` for a file that does not exist yet, which writes the whole thing. The managed
58
+ * values are quoted on the way out where they need it (see {@link quoteEnvValue}); the kept/changed
59
+ * comparison stays against the UNQUOTED form, which is what both sides hold.
60
+ */
61
+ export function mergeEnvFile(existing, entries) {
62
+ const managed = entries.map((entry) => entry.key);
63
+ const previous = existing === null ? {} : readAssignments(existing);
64
+ const kept = [];
65
+ const changed = [];
66
+ const added = [];
67
+ for (const entry of entries) {
68
+ const before = previous[entry.key];
69
+ if (before === undefined)
70
+ added.push(entry.key);
71
+ else if (before === entry.value)
72
+ kept.push(entry.key);
73
+ else
74
+ changed.push(entry.key);
75
+ }
76
+ const leftover = existing === null ? '' : stripAssignments(existing, managed);
77
+ const preserved = Object.keys(previous).filter((key) => !managed.includes(key));
78
+ const tail = leftover.length > 0 ? `\n${CARRIED_OVER_HEADER}\n${leftover}\n` : '';
79
+ const rendered = renderEnvFile(entries.map((entry) => ({ ...entry, value: quoteEnvValue(entry.value) })));
80
+ return { text: `${rendered}${tail}`, kept, changed, added, preserved };
81
+ }
82
+ /**
83
+ * Quote a managed value when leaving it bare would make the reader disagree with the writer.
84
+ *
85
+ * `renderEnvFile` emits a bare `KEY=value`, and a `.env` is typically read with `node:util`'s
86
+ * `parseEnv`, which treats an unquoted `#` as the start of a comment and strips surrounding
87
+ * whitespace: `parseEnv('A=with # hash')` is `{ A: 'with' }`. So a value READ as `cf-acc #2` (from a
88
+ * quoted line an operator wrote), offered as a prompt default and accepted unchanged would be
89
+ * written back as a DIFFERENT value while the merge report called it unchanged.
90
+ *
91
+ * Double quotes preferred, single quotes when the value contains a double one, because `parseEnv`
92
+ * supports both delimiters and NO escape inside either (`A="he said \"hi\""` parses as `he said \`).
93
+ * A value carrying both quote characters is therefore unrepresentable, so it throws rather than
94
+ * writing a file that reads back as something else: the whole promise of such a command is that the
95
+ * file it wrote is the file the reader will read.
96
+ */
97
+ export function quoteEnvValue(value) {
98
+ if (!/[#\n"']/.test(value) && value.trim() === value)
99
+ return value;
100
+ if (!value.includes('"'))
101
+ return `"${value}"`;
102
+ if (!value.includes("'"))
103
+ return `'${value}'`;
104
+ throw new Error(`A value containing both \` " \` and \` ' \` cannot be written to a .env file: neither quoting ` +
105
+ `style survives, and \`parseEnv\` supports no escape inside either. Choose a value without ` +
106
+ `one of them.`);
107
+ }
108
+ /**
109
+ * The `KEY=` assignments a `.env` holds, by key, with each value unquoted.
110
+ *
111
+ * Hand-rolled rather than `node:util`'s `parseEnv`, because what a merge needs is the SET of keys and
112
+ * whether each still holds the value being written, and the comparison has to be against the same
113
+ * unquoted form the writer produces. A value the caller does not manage is never read for its
114
+ * meaning, only skipped, so the shallow read is sufficient exactly where it is used.
115
+ *
116
+ * An assignment with an EMPTY value is kept, so `preserved` can report a `FOO=` line the merge
117
+ * carried over. A caller using this for prompt DEFAULTS filters those itself, because blank usually
118
+ * means absent to whatever reads the file.
119
+ */
120
+ export function readAssignments(text) {
121
+ const found = {};
122
+ for (const line of readEnvLines(text)) {
123
+ if (line.kind === 'assignment')
124
+ found[line.key] = line.value;
125
+ }
126
+ return found;
127
+ }
128
+ /** `export FOO=bar` and `FOO=bar` alike, since both appear in a hand-written file. */
129
+ const ASSIGNMENT = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=(.*)$/;
130
+ /**
131
+ * Split a `.env` into logical lines, joining a QUOTED VALUE that spans several of them.
132
+ *
133
+ * The one place the multi-line rule lives, because both readers need it and neither can be right
134
+ * alone: a line-at-a-time reader takes `KEY="-----BEGIN CERTIFICATE-----` for the whole value, and a
135
+ * line-at-a-time stripper drops that first line and re-emits the certificate's body as unmanaged
136
+ * content, which the merge then writes back under the carried-over header and the reader takes for a
137
+ * set of garbage keys (a base64 line ending `Qm9keQ==` even parses as an assignment). A PEM is the
138
+ * commonest such value and is exactly what the module header promises to survive.
139
+ *
140
+ * Continuation is decided by the OPENING quote only: a value whose first character is `"` or `'` and
141
+ * which does not close it on the same line continues until a line that does. That matches what
142
+ * `node:util`'s `parseEnv` accepts, which is the reader this writer has to agree with, and it leaves
143
+ * every ordinary bare value exactly as it was.
144
+ */
145
+ function readEnvLines(text) {
146
+ const physical = text.split('\n');
147
+ const out = [];
148
+ for (let index = 0; index < physical.length; index++) {
149
+ const line = physical[index];
150
+ if (line.trim().startsWith('#')) {
151
+ out.push({ kind: 'comment', text: line });
152
+ continue;
153
+ }
154
+ if (line.trim().length === 0) {
155
+ out.push({ kind: 'blank', text: line });
156
+ continue;
157
+ }
158
+ const match = ASSIGNMENT.exec(line);
159
+ const key = match?.[1];
160
+ if (key === undefined) {
161
+ out.push({ kind: 'other', text: line });
162
+ continue;
163
+ }
164
+ const raw = match?.[2] ?? '';
165
+ const quote = unclosedQuote(raw);
166
+ if (quote === null) {
167
+ out.push({ kind: 'assignment', key, value: unquote(raw), text: line });
168
+ continue;
169
+ }
170
+ const spanned = [raw];
171
+ // Tracked rather than read back off the last element, which would count the OPENING quote in
172
+ // `raw` as its own closer for a `KEY="` that is the file's final line.
173
+ let closed = false;
174
+ while (!closed && index + 1 < physical.length) {
175
+ const next = physical[++index];
176
+ spanned.push(next);
177
+ closed = next.includes(quote);
178
+ }
179
+ // An unterminated quote is REFUSED rather than guessed at. Where the value ends is then
180
+ // unknowable, so every answer this module gives about the file (which keys it holds, what is
181
+ // unmanaged, what it preserved) would be a guess reported as a fact, and the whole point of the
182
+ // four-way report is that it can be trusted. `parseEnv` cannot read such a file either.
183
+ if (!closed) {
184
+ throw new Error(`${key} opens a ${quote === '"' ? 'double' : 'single'}-quoted value that is never closed, ` +
185
+ `so where it ends cannot be known and neither can what else this file holds. Close the ` +
186
+ `quote (or remove it) and run this again.`);
187
+ }
188
+ const joined = spanned.join('\n');
189
+ out.push({
190
+ kind: 'assignment',
191
+ key,
192
+ value: unquote(joined),
193
+ text: `${line.slice(0, line.length - raw.length)}${joined}`,
194
+ });
195
+ }
196
+ return out;
197
+ }
198
+ /**
199
+ * The quote character a value OPENS and does not close on its own line, or null.
200
+ *
201
+ * The opening character only, and never a quote found mid-value: `A=it's fine` opens nothing, so
202
+ * treating a stray apostrophe as a continuation would swallow every line after it.
203
+ */
204
+ function unclosedQuote(raw) {
205
+ const value = raw.trimStart();
206
+ const quote = value.startsWith('"') ? '"' : value.startsWith("'") ? "'" : null;
207
+ if (quote === null)
208
+ return null;
209
+ return value.indexOf(quote, 1) === -1 ? quote : null;
210
+ }
211
+ function unquote(raw) {
212
+ const value = raw.trim();
213
+ const quoted = (value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"));
214
+ return quoted && value.length >= 2 ? value.slice(1, -1) : value;
215
+ }
216
+ /**
217
+ * Everything in the file that is NOT an assignment to a managed key, with each dropped key's
218
+ * leading comment block dropped with it.
219
+ *
220
+ * The comments go too because they were written by a previous run to describe the value beneath
221
+ * them; kept, they would sit above whatever unmanaged variable happened to follow and describe it
222
+ * wrongly.
223
+ *
224
+ * The carried-over header is dropped wherever it appears rather than only above a managed key: the
225
+ * merge re-writes it, and it introduces UNMANAGED content, so the ordinary comment-block rule carries
226
+ * it over and the file grows by one line per run. Matched by {@link isCarriedOverHeader}, so a header
227
+ * a previous version of this code wrote in different words is still recognised.
228
+ *
229
+ * A managed key whose value spans several lines takes ALL of them with it, which is what reading
230
+ * through {@link readEnvLines} buys: dropped a line at a time, the continuation lines are neither
231
+ * comments nor blanks nor assignments to a managed key, so they survive as "unmanaged" content and
232
+ * the file is written back corrupted.
233
+ */
234
+ function stripAssignments(text, managed) {
235
+ const out = [];
236
+ let comments = [];
237
+ for (const line of readEnvLines(text)) {
238
+ if (line.kind === 'comment') {
239
+ if (!isCarriedOverHeader(line.text))
240
+ comments.push(line.text);
241
+ continue;
242
+ }
243
+ if (line.kind === 'blank') {
244
+ // A blank line ends a comment block: whatever it introduced is above it, so the comments are
245
+ // free-standing and belong with the content that is kept.
246
+ out.push(...comments, line.text);
247
+ comments = [];
248
+ continue;
249
+ }
250
+ if (line.kind === 'assignment' && managed.includes(line.key)) {
251
+ comments = [];
252
+ continue;
253
+ }
254
+ out.push(...comments, line.text);
255
+ comments = [];
256
+ }
257
+ out.push(...comments);
258
+ return out.join('\n').replace(/^\n+|\n+$/g, '');
259
+ }
260
+ /**
261
+ * One line per managed key, with every secret's value WITHHELD rather than masked.
262
+ *
263
+ * `secretKeys` is the caller's, and it is a SET rather than a predicate on purpose: a pattern match
264
+ * (`key.includes('TOKEN')`) passes today and quietly stops covering the next secret whose name does
265
+ * not say so, and the failure is one nobody sees: a token on somebody's scrollback.
266
+ *
267
+ * Withheld and not masked, because a masked value still states its length and its prefix, and this
268
+ * output is routinely pasted into an issue when the setup did not work.
269
+ */
270
+ export function describeEntries(entries, secretKeys) {
271
+ return entries.map((entry) => ` ${entry.key}=${secretKeys.has(entry.key) ? '(set, not shown)' : entry.value || '(empty)'}`);
272
+ }
273
+ /**
274
+ * What the write did, in the order an operator wants it: what changed, then what was left alone.
275
+ *
276
+ * `changed` leads because it is the only category that can surprise anyone, and the promise such a
277
+ * command makes is that it never overwrites a value without saying so.
278
+ */
279
+ export function describeMerge(merge, path) {
280
+ const lines = [`Wrote ${path}.`];
281
+ if (merge.changed.length > 0) {
282
+ lines.push(` replaced: ${merge.changed.join(', ')} (the previous values are gone)`);
283
+ }
284
+ if (merge.added.length > 0)
285
+ lines.push(` added: ${merge.added.join(', ')}`);
286
+ if (merge.kept.length > 0)
287
+ lines.push(` unchanged: ${merge.kept.join(', ')}`);
288
+ if (merge.preserved.length > 0) {
289
+ lines.push(` left alone (not managed here): ${merge.preserved.join(', ')}`);
290
+ }
291
+ return lines;
292
+ }
293
+ //# sourceMappingURL=envMerge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envMerge.js","sourceRoot":"","sources":["../src/envMerge.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,qGAAqG;AACrG,6FAA6F;AAC7F,EAAE;AACF,oGAAoG;AACpG,oGAAoG;AACpG,0FAA0F;AAC1F,EAAE;AACF,6FAA6F;AAC7F,mGAAmG;AACnG,qGAAqG;AACrG,kGAAkG;AAClG,mGAAmG;AACnG,qGAAqG;AACrG,0FAA0F;AAC1F,gGAAgG;AAChG,sGAAsG;AACtG,oGAAoG;AACpG,kFAAkF;AAClF,mGAAmG;AACnG,oGAAoG;AACpG,0FAA0F;AAC1F,sGAAsG;AACtG,2FAA2F;AAC3F,EAAE;AACF,sGAAsG;AACtG,sBAAsB;AAEtB,OAAO,EAAiB,aAAa,EAAE,MAAM,UAAU,CAAA;AAmBvD;;;;;;;;;GASG;AACH,MAAM,mBAAmB,GAAG,kDAAkD,CAAA;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,mBAAmB,sCAAsC,CAAA;AAE/F,gGAAgG;AAChG,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,QAAuB,EAAE,OAA4B;IAChF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC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,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5E,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC9E,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,oCAAoC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC9E,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { decodeToken, normalizeApiServerUrl, readApiServerCommand, readTokenComm
9
9
  export { DEFAULT_INGRESS_PORT, INGRESS_HOST_TEMPLATE, type IngressReadiness, ingressHostTemplate, ingressUrlPort, } from './k3s-ingress.js';
10
10
  export { classifyHost, hasServerVersion, type HostDetections, type HostState, isRecreateOffer, type Offer, type OfferId, parseK3dClusters, parseKindClusters, probeHost, RECREATE_OFFERS, recreateOfferFor, recreateTargetForContext, type ToolDetection, } from './k3s-probe.js';
11
11
  export { buildFrontendEnv, buildLocalEnv, type EnvEntry, type FrontendEnvInput, type LocalEnvInput, renderEnvFile, } from './env.js';
12
+ export { CARRIED_OVER_HEADER, describeEntries, describeMerge, type EnvMerge, mergeEnvFile, quoteEnvValue, readAssignments, } from './envMerge.js';
12
13
  export { buildGitignore, mergeGitignore, REQUIRED_GITIGNORE_RULES } from './gitignore.js';
13
14
  export { type Io, createConsoleIo } from './io.js';
14
15
  export { type BootstrapInput, buildPlan, type PlannedFile } from './plan.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EACf,SAAS,EACT,YAAY,E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MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,aAAa,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,aAAa,EACb,aAAa,EACb,KAAK,WAAW,GACjB,MAAM,UAAU,CAAA"}
package/dist/index.js CHANGED
@@ -20,6 +20,11 @@ export { decodeToken, normalizeApiServerUrl, readApiServerCommand, readTokenComm
20
20
  export { DEFAULT_INGRESS_PORT, INGRESS_HOST_TEMPLATE, ingressHostTemplate, ingressUrlPort, } from './k3s-ingress.js';
21
21
  export { classifyHost, hasServerVersion, isRecreateOffer, parseK3dClusters, parseKindClusters, probeHost, RECREATE_OFFERS, recreateOfferFor, recreateTargetForContext, } from './k3s-probe.js';
22
22
  export { buildFrontendEnv, buildLocalEnv, renderEnvFile, } from './env.js';
23
+ // The MERGE half of writing a `.env`, beside the render half it completes. Exported for the same
24
+ // reason the k3s reads are: other in-repo tooling (the acceptance suite's `configure`) writes a
25
+ // `.env` a person may already have edited, and the five ways to get that subtly wrong are each a
26
+ // silent failure. See the module header for what they are.
27
+ export { CARRIED_OVER_HEADER, describeEntries, describeMerge, mergeEnvFile, quoteEnvValue, readAssignments, } from './envMerge.js';
23
28
  export { buildGitignore, mergeGitignore, REQUIRED_GITIGNORE_RULES } from './gitignore.js';
24
29
  export { createConsoleIo } from './io.js';
25
30
  export { buildPlan } from './plan.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,OAAO,EAEL,SAAS,EACT,YAAY,EAEZ,eAAe,EACf,SAAS,EACT,QAAQ,GACT,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,SAAS,EAAsB,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EAAuB,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,EAAmB,MAAM,SAAS,CAAA;AACzC,OAAO,EAEL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAE1B,iBAAiB,EACjB,UAAU,GAEX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,mBAAmB,EAAgC,QAAQ,EAAE,MAAM,UAAU,CAAA;AACtF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,0BAA0B,EAC1B,YAAY,EAEZ,+BAA+B,GAChC,MAAM,kBAAkB,CAAA;AACzB,gGAAgG;AAChG,iGAAiG;AACjG,kGAAkG;AAClG,6FAA6F;AAC7F,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,6FAA6F;AAC7F,qFAAqF;AACrF,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EAErB,mBAAmB,EACnB,cAAc,GACf,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAGhB,eAAe,EAGf,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eA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BAAgB,GAEjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EAGnB,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,aAAa,EACb,aAAa,GAEd,MAAM,UAAU,CAAA"}
@@ -131,6 +131,14 @@ export declare function normalizeApiServerUrl(url: string): string;
131
131
  * mutating a remote/production cluster in `--yes` mode: the `use-existing` offer fires for ANY
132
132
  * reachable kubeconfig, which may point at a shared cluster. A local-looking context name OR a
133
133
  * loopback/Docker-host apiserver is treated as local.
134
+ *
135
+ * The apiserver half is `localHost.ts`'s `isLocalMachineHost`, a pinned copy of kernel's helper
136
+ * of the same name (this package ships with no runtime dependencies, so it cannot import kernel;
137
+ * `localHost.conformity.test.ts` is what stops the two drifting). It replaced a hand-kept host
138
+ * list here: that list and the environment provider's had already separated, and the one missing
139
+ * k3d's `0.0.0.0` silently withheld a behaviour from the default local setup. The mDNS and
140
+ * wildcard-DNS suffixes stay here because they are heuristics about a DEVELOPER'S kubeconfig,
141
+ * not facts about the host.
134
142
  */
135
143
  export declare function looksLocalCluster(context: string | undefined, apiServerUrl: string): boolean;
136
144
  /** Injectable dependencies for the provisioner (mirrors the k3s-command deps). */
@@ -1 +1 @@
1
- {"version":3,"file":"k3s-provision.d.ts","sourceRoot":"","sources":["../src/k3s-provision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAmB,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAKL,KAAK,gBAAgB,EAErB,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EACL,KAAK,SAAS,EAEd,KAAK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C,CAAA;IACrC,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAwCD,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAajF;AAgCD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAInE;AAED,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAE9D;AA2ED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,EACvC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,kBAAkB,CAAC,CAkH7B"}
@@ -2,6 +2,7 @@ import { OPTION_DEFAULTS } from './args.js';
2
2
  import { runCommand } from './host-shell.js';
3
3
  import { DEFAULT_INGRESS_PORT, INGRESS_CONTAINER_HTTP_PORT, INGRESS_SETTLE_WAIT_MS, probeIngress, } from './k3s-ingress.js';
4
4
  import {} from './io.js';
5
+ import { isLocalMachineHost } from './localHost.js';
5
6
  import { isRecreateOffer, RECREATE_OFFERS, recreateTargetForContext, } from './k3s-probe.js';
6
7
  /** The namespace + ServiceAccount + long-lived token Secret the guided setup creates. */
7
8
  export const CAT_FACTORY_NAMESPACE = 'cat-factory';
@@ -268,15 +269,6 @@ export function decodeToken(base64) {
268
269
  /** kubeconfig context names that unambiguously denote a LOCAL cluster. */
269
270
  const LOCAL_CONTEXT_PREFIXES = ['k3d-', 'kind-'];
270
271
  const LOCAL_CONTEXT_NAMES = ['minikube', 'docker-desktop', 'orbstack', 'colima', 'rancher-desktop'];
271
- /** Hostnames that denote a LOCAL apiserver (loopback / the Docker host alias). */
272
- const LOCAL_API_HOSTS = [
273
- 'localhost',
274
- '127.0.0.1',
275
- '0.0.0.0',
276
- '::1',
277
- '[::1]',
278
- 'host.docker.internal',
279
- ];
280
272
  /** Normalize the wildcard bind address k3d writes for the apiserver to a dialable loopback host. */
281
273
  export function normalizeApiServerUrl(url) {
282
274
  return url.replace('//0.0.0.0:', '//127.0.0.1:');
@@ -286,6 +278,14 @@ export function normalizeApiServerUrl(url) {
286
278
  * mutating a remote/production cluster in `--yes` mode: the `use-existing` offer fires for ANY
287
279
  * reachable kubeconfig, which may point at a shared cluster. A local-looking context name OR a
288
280
  * loopback/Docker-host apiserver is treated as local.
281
+ *
282
+ * The apiserver half is `localHost.ts`'s `isLocalMachineHost`, a pinned copy of kernel's helper
283
+ * of the same name (this package ships with no runtime dependencies, so it cannot import kernel;
284
+ * `localHost.conformity.test.ts` is what stops the two drifting). It replaced a hand-kept host
285
+ * list here: that list and the environment provider's had already separated, and the one missing
286
+ * k3d's `0.0.0.0` silently withheld a behaviour from the default local setup. The mDNS and
287
+ * wildcard-DNS suffixes stay here because they are heuristics about a DEVELOPER'S kubeconfig,
288
+ * not facts about the host.
289
289
  */
290
290
  export function looksLocalCluster(context, apiServerUrl) {
291
291
  const ctx = (context ?? '').toLowerCase();
@@ -300,9 +300,9 @@ export function looksLocalCluster(context, apiServerUrl) {
300
300
  catch {
301
301
  host = '';
302
302
  }
303
- if (LOCAL_API_HOSTS.includes(host))
303
+ if (host && isLocalMachineHost(host))
304
304
  return true;
305
- return host.endsWith('.local') || host.endsWith('.localhost') || host.endsWith('.nip.io');
305
+ return host.endsWith('.local') || host.endsWith('.nip.io');
306
306
  }
307
307
  /** Default poll budget for {@link readSaToken}: 20 attempts × 500ms = 10s. */
308
308
  const DEFAULT_TOKEN_READ_ATTEMPTS = 20;
@@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AI,EAAE,WAAW;QACjB,MAAM,EAAE,aAAa;QACrB,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACrD,CACF,CAAA;IAED,OAAO;QACL,MAAM,EAAE,WAAW;QACnB,WAAW,EAAE,WAAW;QACxB,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,YAAY;QACZ,QAAQ;QACR,qBAAqB,EAAE,IAAI;QAC3B,OAAO;QACP,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,aAAa,CAAC,OAAuB;IAC5C,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAA;AACxD,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Whether a hostname names THIS machine, over any of the spellings a local toolchain produces.
3
+ *
4
+ * Wider than loopback on purpose: the two spellings a local cluster actually writes into a
5
+ * kubeconfig are k3d's wildcard `0.0.0.0` and Docker Desktop's `kubernetes.docker.internal`, so a
6
+ * bare loopback test excludes the default setup of both. Narrower than "private": a shared
7
+ * staging cluster on 10.x is somebody else's machine however private its address.
8
+ */
9
+ export declare function isLocalMachineHost(hostname: string): boolean;
10
+ //# sourceMappingURL=localHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localHost.d.ts","sourceRoot":"","sources":["../src/localHost.ts"],"names":[],"mappings":"AA4BA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM5D"}
@@ -0,0 +1,43 @@
1
+ // `isLocalMachineHost` is a deliberate COPY of kernel's helper of the same name, for the same
2
+ // reason `errorText.ts` copies `getErrorMessage`: this package is published and stays runtime
3
+ // dependency-free, so shipped code cannot import a `workspace:*` package. That import resolves
4
+ // through pnpm's link in every local run and is simply absent on the registry, so the failure
5
+ // reaches whoever runs `npx cat-factory` and nobody before them.
6
+ //
7
+ // A copy is only acceptable if it cannot drift, and `localHost.conformity.test.ts` pins the two
8
+ // to the same answer over the hosts a kubeconfig actually carries. Kernel is a DEVdependency,
9
+ // which is what makes that test's import legal where this file's would not be.
10
+ /**
11
+ * Hostnames that reach the machine this process runs on without being loopback ADDRESSES: the
12
+ * wildcard bind addresses a tool writes into a config when it listened on every interface, and
13
+ * the aliases a container runtime publishes for its host.
14
+ */
15
+ const LOCAL_MACHINE_ALIASES = new Set([
16
+ '0.0.0.0',
17
+ '::',
18
+ 'host.docker.internal',
19
+ 'kubernetes.docker.internal',
20
+ 'gateway.docker.internal',
21
+ ]);
22
+ /** Whether a hostname is loopback: `localhost`, any `127.x.x.x`, or the IPv6 `::1`. */
23
+ function isLoopbackHost(host) {
24
+ return host === 'localhost' || host === '::1' || /^127\.\d+\.\d+\.\d+$/.test(host);
25
+ }
26
+ /**
27
+ * Whether a hostname names THIS machine, over any of the spellings a local toolchain produces.
28
+ *
29
+ * Wider than loopback on purpose: the two spellings a local cluster actually writes into a
30
+ * kubeconfig are k3d's wildcard `0.0.0.0` and Docker Desktop's `kubernetes.docker.internal`, so a
31
+ * bare loopback test excludes the default setup of both. Narrower than "private": a shared
32
+ * staging cluster on 10.x is somebody else's machine however private its address.
33
+ */
34
+ export function isLocalMachineHost(hostname) {
35
+ const host = hostname.toLowerCase().replace(/^\[|\]$/g, '');
36
+ if (isLoopbackHost(host))
37
+ return true;
38
+ if (LOCAL_MACHINE_ALIASES.has(host))
39
+ return true;
40
+ // RFC 6761 reserves the whole `.localhost` tree to loopback.
41
+ return host.endsWith('.localhost');
42
+ }
43
+ //# sourceMappingURL=localHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localHost.js","sourceRoot":"","sources":["../src/localHost.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,+FAA+F;AAC/F,8FAA8F;AAC9F,iEAAiE;AACjE,EAAE;AACF,gGAAgG;AAChG,8FAA8F;AAC9F,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,SAAS;IACT,IAAI;IACJ,sBAAsB;IACtB,4BAA4B;IAC5B,yBAAyB;CAC1B,CAAC,CAAA;AAEF,uFAAuF;AACvF,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,KAAK,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACpF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;IAC3D,IAAI,cAAc,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACrC,IAAI,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAChD,6DAA6D;IAC7D,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/cli",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Bootstrap CLI for the Agent Architecture Board: scaffold a local-mode deployment (Node/local backend + frontend SPA) on your own machine — generates the crypto secrets, populates and gitignores the .env files, and mints a GitHub/GitLab personal access token by opening the browser at the right pre-scoped URL.",
5
5
  "keywords": [
6
6
  "bootstrap",
@@ -41,8 +41,8 @@
41
41
  "typescript": "7.0.2",
42
42
  "valibot": "^1.4.2",
43
43
  "vitest": "^4.1.10",
44
- "@cat-factory/contracts": "0.295.0",
45
- "@cat-factory/kernel": "0.286.3"
44
+ "@cat-factory/contracts": "0.320.0",
45
+ "@cat-factory/kernel": "0.310.0"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsc -b tsconfig.build.json",