@inventarch/cli 3.1.0 → 3.2.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.
- package/LANGUAGE.md +2 -2
- package/README.md +222 -23
- package/SPEC.md +26 -25
- package/assets/base/62ecd5092f364b40e335e9e509ef512ac8030eb5689e72a5d0ff1e073cb13cfb.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/185ebc43ae4798ede53905a6d6ff35fb0cf65e9e1bafa6413fe58e3306cf8af7.tgz +0 -0
- package/assets/host.json +3 -3
- package/assets/vocabulary.json +14 -14
- package/dist/args.d.ts +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/author.d.ts.map +1 -1
- package/dist/author.js +6 -7
- package/dist/author.js.map +1 -1
- package/dist/briefing.d.ts +10 -5
- package/dist/briefing.d.ts.map +1 -1
- package/dist/briefing.js +10 -3
- package/dist/briefing.js.map +1 -1
- package/dist/capture.d.ts +6 -4
- package/dist/capture.d.ts.map +1 -1
- package/dist/capture.js +13 -11
- package/dist/capture.js.map +1 -1
- package/dist/channel.d.ts +4 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +4 -1
- package/dist/channel.js.map +1 -1
- package/dist/claude-cli.d.ts +3 -3
- package/dist/claude-cli.js +7 -7
- package/dist/commands.d.ts +9 -9
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +31 -33
- package/dist/commands.js.map +1 -1
- package/dist/compile.d.ts +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +1 -1
- package/dist/compile.js.map +1 -1
- package/dist/consumer.d.ts +49 -42
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +60 -56
- package/dist/consumer.js.map +1 -1
- package/dist/decline.js +4 -4
- package/dist/decline.js.map +1 -1
- package/dist/distribute.d.ts +31 -29
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +40 -37
- package/dist/distribute.js.map +1 -1
- package/dist/doctor-user.d.ts +3 -3
- package/dist/doctor-user.d.ts.map +1 -1
- package/dist/doctor-user.js +8 -8
- package/dist/doctor-user.js.map +1 -1
- package/dist/doctor.d.ts +3 -3
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +70 -64
- package/dist/doctor.js.map +1 -1
- package/dist/format.d.ts +2 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +6 -6
- package/dist/format.js.map +1 -1
- package/dist/home-remedy.d.ts +2 -2
- package/dist/home-remedy.d.ts.map +1 -1
- package/dist/home-remedy.js +3 -3
- package/dist/home-remedy.js.map +1 -1
- package/dist/host-projection.d.ts +39 -39
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +73 -74
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +52 -53
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +92 -95
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +65 -60
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +119 -118
- package/dist/init.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +8 -8
- package/dist/main.js.map +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +16 -16
- package/dist/next.js.map +1 -1
- package/dist/operation-help.d.ts +3 -3
- package/dist/operation-help.d.ts.map +1 -1
- package/dist/operation-help.js +9 -9
- package/dist/operation-help.js.map +1 -1
- package/dist/pack.d.ts +1 -1
- package/dist/pack.d.ts.map +1 -1
- package/dist/pack.js +12 -12
- package/dist/pack.js.map +1 -1
- package/dist/position.d.ts +1 -1
- package/dist/position.d.ts.map +1 -1
- package/dist/position.js +11 -12
- package/dist/position.js.map +1 -1
- package/dist/preview.d.ts +4 -4
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +28 -28
- package/dist/preview.js.map +1 -1
- package/dist/profile.d.ts +23 -23
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +50 -51
- package/dist/profile.js.map +1 -1
- package/dist/project.d.ts +10 -11
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +31 -33
- package/dist/project.js.map +1 -1
- package/dist/read.d.ts +2 -2
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +5 -5
- package/dist/read.js.map +1 -1
- package/dist/render.d.ts +31 -30
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +27 -26
- package/dist/render.js.map +1 -1
- package/dist/session.d.ts +9 -9
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +13 -13
- package/dist/session.js.map +1 -1
- package/dist/user-host.d.ts +1 -1
- package/dist/user-host.js +5 -5
- package/dist/user-host.js.map +1 -1
- package/dist/validate.d.ts +9 -9
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +35 -38
- package/dist/validate.js.map +1 -1
- package/dist/vocabulary.d.ts +1 -1
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +2 -2
- package/dist/vocabulary.js.map +1 -1
- package/package.json +6 -6
- package/assets/base/7db20e0dbbc2b88701ea24991886b4a8e08d419dda469cce5caff66911f81e4c.ia.tgz +0 -0
- package/assets/host/7e80bd7098018c1c13e3fae4cd363acfeffedccd5b6ec06c4952b62f449a4246.tgz +0 -0
package/dist/init.js
CHANGED
|
@@ -7,50 +7,48 @@ import { canonical } from './plugin-sources.js';
|
|
|
7
7
|
export { readBase, PIN_PATH, baseArchivePath, PACKAGE_ID } from './bundled-base.js';
|
|
8
8
|
/**
|
|
9
9
|
* `ia init`: docs/specs/consumer-cli-contract/README.md §2.1, implementing
|
|
10
|
-
* docs/specs/workspace-initialization-apply/README.md (
|
|
11
|
-
* docs/specs/workspace-initialization/README.md (
|
|
10
|
+
* docs/specs/workspace-initialization-apply/README.md (the apply spec) to reach the end state
|
|
11
|
+
* docs/specs/workspace-initialization/README.md (the initialization spec) fixes.
|
|
12
12
|
*
|
|
13
|
-
* Without `--apply` it prints the reviewable plan: the owned paths, the target's classification (
|
|
14
|
-
* conflicts detected now, the starter it would write, the bundled base pin and the steps. It exits 0 whether or not
|
|
13
|
+
* Without `--apply` it prints the reviewable plan: the owned paths, the target's classification (the apply spec §1),
|
|
14
|
+
* the conflicts detected now, the starter it would write, the bundled base pin and the steps. It exits 0 whether or not
|
|
15
15
|
* conflicts were found, because reporting them is the command's job.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* descriptor names no distribution, so `ia pack` refuses until one is authored.
|
|
17
|
+
* SPEC `init`: the starter is three authored records in `.ia/src/workspace.ia` — the `@workspace`, its participant
|
|
18
|
+
* `@agent` and that participant's `@mandate` — and a create-only `.ia/.gitignore`. No local `@system` and no
|
|
19
|
+
* `@distribution` are written unless `--system` asks for them, inside `.ia/src/systems/<name>/`, where the packer
|
|
20
|
+
* finds a release's records; without them the release descriptor names no distribution, so `ia pack` refuses until
|
|
21
|
+
* one is authored.
|
|
23
22
|
*
|
|
24
|
-
* With `--apply` it runs the steps in order — verify the pin, install the bundled base unless it is already
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* request. `<directory>` is the only way to name the target: this verb never performs root discovery, and `--root`
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
23
|
+
* With `--apply` it runs the steps in order — verify the pin, install the bundled base unless it is already installed
|
|
24
|
+
* as planned, author the starter create-only, admit and read the authored identities from the compiled graph, write
|
|
25
|
+
* `.ia/release.json`, the completion point — through the shared install services and `createFile`. No journal is
|
|
26
|
+
* written: a rerun derives from the workspace which steps are done (the apply spec §5). No step performs a network
|
|
27
|
+
* request. `<directory>` is the only way to name the target: this verb never performs root discovery, and `--root` is
|
|
28
|
+
* refused by the grammar rather than silently ignored. Two effects follow the completion point and are reported apart:
|
|
29
|
+
* the capture, through db's `writeCapture` as `ia capture` writes it, and, only with `--host`, the projection. A later
|
|
30
|
+
* step that fails leaves every earlier result in place and says so, naming its own command.
|
|
32
31
|
*
|
|
33
32
|
* `--host claude` or `--host codex` (docs/specs/host-registration/README.md §4 "init --host") is the project effect:
|
|
34
33
|
* once the workspace is initialized, after the capture, the `ia host <host> --apply` path runs under the question
|
|
35
|
-
* already answered here, so it never asks a second one, and its projection is written by `applyHostProjection`, the
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
34
|
+
* already answered here, so it never asks a second one, and its projection is written by `applyHostProjection`, the one
|
|
35
|
+
* writer of projection files. It reads the live revision rather than the capture, so a capture that fails does not keep
|
|
36
|
+
* it from running; the capture's refusal then says the projection is written. The plan names that step and writes
|
|
37
|
+
* nothing for it — the host plan needs `.ia/release.json`, which only the apply writes. A host step that refuses leaves
|
|
38
|
+
* the workspace initialized: the refusal keeps the service's code, message and location, and its next action names the
|
|
39
|
+
* rerun.
|
|
41
40
|
*
|
|
42
|
-
* `--migrate`
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* distribution
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* files (`collectMigration`, `applyMigration`).
|
|
41
|
+
* `--migrate` takes a workspace a 1.1.0 `ia init` wrote instead: one local system folder, `.ia/src/systems/<name>/`,
|
|
42
|
+
* whose `system.ia` holds exactly the starter `@system <name>`, registering no word, and `@agent <name>-steward`, and
|
|
43
|
+
* whose `records/workspace.ia` holds exactly `@workspace <name>` and `@distribution <name>-distribution`. It rewrites
|
|
44
|
+
* it into the three starter records: each other record file moves from the folder's `records/` to `.ia/src/`, where a
|
|
45
|
+
* record's word, not its folder, decides its system, so its identity is unchanged; the local system folder goes and the
|
|
46
|
+
* descriptor names no distribution, unless `--system` keeps the `@system` and its steward and re-roots the
|
|
47
|
+
* `@distribution` at the system. It plans by default, and plan and apply alike refuse a workspace of any other shape
|
|
48
|
+
* before anything is written. The three records use fields only the base this CLI bundles declares, so the apply first
|
|
49
|
+
* installs that base where the workspace has another, as `ia init` installs it; it then captures and re-projects each
|
|
50
|
+
* host whose projection the workspace owns through `applyHostProjection`, which retires the 1.x steward guard and
|
|
51
|
+
* deletes the owned steward agent files (`collectMigration`, `applyMigration`).
|
|
54
52
|
*/
|
|
55
53
|
import { readMigrationJournal, beginMigrationJournal, applyMigrationFiles, finishMigrationJournal, completeMigrationProjection, reopenMigrationProjection, } from './migration-journal.js';
|
|
56
54
|
import { spawnSync } from 'node:child_process';
|
|
@@ -77,8 +75,9 @@ import { findProgram, programEnv, programHome } from './program.js';
|
|
|
77
75
|
import { codeOf, openSession } from './session.js';
|
|
78
76
|
import { atom, blockSymbolWidth, document, entry, fieldRows, headerLine, quote, safeRootAdvice, sectionLabel, truncateDigest, words, } from './render.js';
|
|
79
77
|
/**
|
|
80
|
-
* Relative to the `@inventarch/cli` package root, as `assets/vocabulary.json` is (vocabulary.ts CATALOGUE_PATH). The
|
|
81
|
-
* package's id is read from this pin and appears nowhere in this source:
|
|
78
|
+
* Relative to the `@inventarch/cli` package root, as `assets/vocabulary.json` is (vocabulary.ts CATALOGUE_PATH). The
|
|
79
|
+
* base package's id is read from this pin and appears nowhere in this source: the pin is the only authority for those
|
|
80
|
+
* bytes.
|
|
82
81
|
*/
|
|
83
82
|
export const DESCRIPTOR_PATH = '.ia/release.json';
|
|
84
83
|
export const STARTER_VERSION = '0.1.0';
|
|
@@ -86,10 +85,10 @@ export const STARTER_VERSION = '0.1.0';
|
|
|
86
85
|
export const INSTALL_LOCK = '.ia/distributions/install-lock.json';
|
|
87
86
|
const cachePath = (digest) => `.ia/distributions/cache/${digest}.ia.tgz`;
|
|
88
87
|
const systemFolder = (name) => `.ia/src/systems/${name}`;
|
|
89
|
-
/**
|
|
88
|
+
/** Where a local system lives: `ia init --system` writes it there, and `ia preview system <name>` shows it there. */
|
|
90
89
|
export const systemPath = (name) => `${systemFolder(name)}/system.ia`;
|
|
91
90
|
const distributionPath = (name) => `${systemFolder(name)}/records/distribution.ia`;
|
|
92
|
-
/**
|
|
91
|
+
/** SPEC `init`: the one file the three starter records share, at the root of the authored source. */
|
|
93
92
|
export const WORKSPACE_PATH = '.ia/src/workspace.ia';
|
|
94
93
|
/** Create-only: the local working state each clone makes for itself, never the authored records or the lock. */
|
|
95
94
|
export const IGNORE_PATH = '.ia/.gitignore';
|
|
@@ -209,12 +208,12 @@ function migrationGitConflict(root, base, lock) {
|
|
|
209
208
|
/** `packages/db/src/distribution/codec.ts` packageId and identifier: the id rule and the system-name ceiling. */
|
|
210
209
|
const NAME = /^[a-z][a-z0-9-]*$/;
|
|
211
210
|
const NAME_LIMIT = 64;
|
|
212
|
-
/** A local system name `ia init --system` and `ia
|
|
211
|
+
/** A local system name `ia init --system` and `ia preview system` accept: the id rule and the system-name ceiling. */
|
|
213
212
|
export const isSystemName = (name) => NAME.test(name) && name.length <= NAME_LIMIT;
|
|
214
|
-
/**
|
|
213
|
+
/** `createFile`'s temporary name, `<target>.<randomUUID()>.tmp` (apps/distribution/src/files.ts:76). */
|
|
215
214
|
export const LEFTOVER = /^(system\.ia|workspace\.ia|distribution\.ia|release\.json|\.gitignore)\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.tmp$/;
|
|
216
215
|
/** The installation, not the target, is at fault; `ia doctor` names the channel a reinstall goes through. */
|
|
217
|
-
/**
|
|
216
|
+
/** The paths init owns: the authored source, the ignore file, the descriptor, the install state and the capture. */
|
|
218
217
|
export function ownedPaths(name, system = false) {
|
|
219
218
|
return [
|
|
220
219
|
{ path: '.ia/src/', purpose: 'authored records' },
|
|
@@ -227,8 +226,9 @@ export function ownedPaths(name, system = false) {
|
|
|
227
226
|
];
|
|
228
227
|
}
|
|
229
228
|
/**
|
|
230
|
-
* §2
|
|
231
|
-
* spells the refused invocation for another target
|
|
229
|
+
* The initialization spec §2: an existing directory, or a single new segment under an existing directory. Anything else
|
|
230
|
+
* is usage. `rerun` spells the refused invocation for another target; `runInit` keeps every other argument it was
|
|
231
|
+
* given.
|
|
232
232
|
*/
|
|
233
233
|
export function resolveTarget(cwd, supplied, rerun = (target) => `ia init ${quote(target)}`) {
|
|
234
234
|
const target = supplied === undefined ? resolve(cwd) : isAbsolute(supplied) ? resolve(supplied) : resolve(cwd, supplied);
|
|
@@ -254,12 +254,12 @@ const writable = (path) => {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
257
|
+
* Read the pin and verify the bytes against it, never falling back to another file. A missing archive is read as no
|
|
258
|
+
* bytes, so the archive verifier's own refusal reports it; a pin that cannot be read at all has no digest to verify
|
|
259
|
+
* against and is the CLI's own failure. Either way the next action says the installation is damaged, because nothing
|
|
260
|
+
* the user did to the target can cause it.
|
|
261
261
|
*/
|
|
262
|
-
/**
|
|
262
|
+
/** The name's normalization: lowercase, every run outside `[a-z0-9-]` becomes `-`, no leading or trailing `-`. */
|
|
263
263
|
export const normalizeName = (directory) => {
|
|
264
264
|
const normalized = directory.toLowerCase().replace(/[^a-z0-9-]+/g, '-');
|
|
265
265
|
let start = 0, end = normalized.length;
|
|
@@ -270,7 +270,7 @@ export const normalizeName = (directory) => {
|
|
|
270
270
|
end--;
|
|
271
271
|
return normalized.slice(start, end);
|
|
272
272
|
};
|
|
273
|
-
/**
|
|
273
|
+
/** Valid only if the name, the full id and the public-system rule all hold. Nothing is invented. */
|
|
274
274
|
export function starterIdentity(root, supplied, systems) {
|
|
275
275
|
const name = supplied === undefined ? normalizeName(basename(root)) : supplied.slice(supplied.indexOf('/') + 1);
|
|
276
276
|
const id = supplied ?? `local/${name}`;
|
|
@@ -285,10 +285,9 @@ export function starterIdentity(root, supplied, systems) {
|
|
|
285
285
|
return { name, id, conflict: null };
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
|
-
* `--system`'s local system, the 1.x starter system unchanged (
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
* requires (operator decision, 2026-09-25).
|
|
288
|
+
* `--system`'s local system, the 1.x starter system unchanged (verbatim in shape): the steward needs `agent-system`,
|
|
289
|
+
* and `governance` is required. `work-system` is required so the system folder can hold `@plan`, `@milestone`, `@task`
|
|
290
|
+
* and `@decision` records with no edit: a system may use only words owned by systems it directly requires.
|
|
292
291
|
*/
|
|
293
292
|
export function starterSystem(name) {
|
|
294
293
|
return [
|
|
@@ -314,11 +313,11 @@ export function starterSystem(name) {
|
|
|
314
313
|
].join('\n');
|
|
315
314
|
}
|
|
316
315
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
316
|
+
* SPEC `init`'s three records, at placement authored (band 100), with only the fields their schemas declare. The
|
|
317
|
+
* `@workspace` composes every installed system, so nothing installed is unreachable, declares the authored root its
|
|
318
|
+
* records are captured under and names the participant as its steward. The participant `@agent` implies no host
|
|
319
|
+
* permission, and its `@mandate` grants it closed moves over that workspace; the mandate's one prose clause claims
|
|
320
|
+
* nothing. Every name is the workspace's.
|
|
322
321
|
*/
|
|
323
322
|
export function starterRecords(name, systems, sources = []) {
|
|
324
323
|
return [
|
|
@@ -354,7 +353,7 @@ export function starterRecords(name, systems, sources = []) {
|
|
|
354
353
|
].join('\n');
|
|
355
354
|
}
|
|
356
355
|
/**
|
|
357
|
-
* `--system`'s release root (
|
|
356
|
+
* `--system`'s release root (a distribution's roots are system registrations). It
|
|
358
357
|
* sits in the system folder, so the closure from it stays inside folders the packer can release
|
|
359
358
|
* (apps/distribution/src/snapshot.ts, "Release roots must belong to native system folders").
|
|
360
359
|
*/
|
|
@@ -373,8 +372,8 @@ export function starterDistribution(name) {
|
|
|
373
372
|
}
|
|
374
373
|
/**
|
|
375
374
|
* The authored files in the order the author step writes them, and the records they hold, in file order. With
|
|
376
|
-
* `--system` the `@workspace` composes the local system after `systems` (
|
|
377
|
-
*
|
|
375
|
+
* `--system` the `@workspace` composes the local system after `systems` (a repository that owns vocabulary composes
|
|
376
|
+
* its own system), so the packet renders a pointer line for it.
|
|
378
377
|
*/
|
|
379
378
|
export function starterFiles(name, systems, system, sources = []) {
|
|
380
379
|
return {
|
|
@@ -439,10 +438,10 @@ const canonicalHttps = (value) => {
|
|
|
439
438
|
};
|
|
440
439
|
const LOCAL = { repository: null, commit: null, recipe: 'ustar-v1', epoch: 0 };
|
|
441
440
|
/**
|
|
442
|
-
*
|
|
443
|
-
* first remote Git lists. The remote's configured URL is read as written, so an SSH remote is "no
|
|
444
|
-
* is never rewritten into a guessed HTTPS one; a URL carrying credentials is refused the same way
|
|
445
|
-
* into a file meant to be committed.
|
|
441
|
+
* The descriptor's provenance. Sourced only from a Git checkout with a commit and an HTTPS remote: `origin` when it
|
|
442
|
+
* exists, else the first remote Git lists. The remote's configured URL is read as written, so an SSH remote is "no
|
|
443
|
+
* HTTPS remote" and is never rewritten into a guessed HTTPS one; a URL carrying credentials is refused the same way
|
|
444
|
+
* rather than copied into a file meant to be committed.
|
|
446
445
|
*/
|
|
447
446
|
export function readProvenance(git) {
|
|
448
447
|
const local = (missing) => ({ source: LOCAL, missing });
|
|
@@ -481,8 +480,8 @@ const baseDependencies = (base) => [
|
|
|
481
480
|
{ id: base.pin.id, range: `^${base.pin.version}`, systems: base.systems },
|
|
482
481
|
];
|
|
483
482
|
/**
|
|
484
|
-
*
|
|
485
|
-
* without it, `undefined` leaves the key out, because a default starter authors no `@distribution
|
|
483
|
+
* The release descriptor init writes. With `--system`, `distribution` stays null until admission reads the compiled
|
|
484
|
+
* record; without it, `undefined` leaves the key out, because a default starter authors no `@distribution`.
|
|
486
485
|
*/
|
|
487
486
|
export function starterDescriptor(id, name, base, provenance, distribution, assets = []) {
|
|
488
487
|
return {
|
|
@@ -501,7 +500,7 @@ export function starterDescriptor(id, name, base, provenance, distribution, asse
|
|
|
501
500
|
}
|
|
502
501
|
/** Two-space JSON with a final newline; `decodeReleaseDescriptor` requires the dependency rows sorted, as they are. */
|
|
503
502
|
export const descriptorText = (descriptor) => JSON.stringify(descriptor, null, 2) + '\n';
|
|
504
|
-
/**
|
|
503
|
+
/** Exactly the one request and the one package the pin describes. */
|
|
505
504
|
export const locksBase = (lock, pin) => lock !== undefined &&
|
|
506
505
|
lock.requests.length === 1 &&
|
|
507
506
|
lock.requests[0].id === pin.id &&
|
|
@@ -563,8 +562,9 @@ function lowerFrom(from, root, name, lower) {
|
|
|
563
562
|
return plan;
|
|
564
563
|
}
|
|
565
564
|
/**
|
|
566
|
-
*
|
|
567
|
-
* on the name, `--system` and the bundled manifest, so
|
|
565
|
+
* The plan: the target's classification, its conflicts and the steps. The starter bytes compared are what this
|
|
566
|
+
* invocation would write for its resolved id: they depend only on the name, `--system` and the bundled manifest, so
|
|
567
|
+
* they are recomputed on every run instead of being journaled.
|
|
568
568
|
*/
|
|
569
569
|
export function collectInit(request) {
|
|
570
570
|
const { root, host } = request;
|
|
@@ -607,7 +607,7 @@ export function collectInit(request) {
|
|
|
607
607
|
}
|
|
608
608
|
: starterFiles(name, base.systems, system, sources);
|
|
609
609
|
const assets = lowered?.assets ?? [];
|
|
610
|
-
//
|
|
610
|
+
// A temporary file `createFile` left beside one of this initialization's own targets.
|
|
611
611
|
const targets = new Set([...files.map((file) => file.path), IGNORE_PATH, DESCRIPTOR_PATH]);
|
|
612
612
|
// `.<uuid>.tmp` is 41 characters: the dot, a 36-character UUID and `.tmp`.
|
|
613
613
|
const leftover = (path) => LEFTOVER.test(basename(path)) && targets.has(path.slice(0, -41));
|
|
@@ -615,11 +615,11 @@ export function collectInit(request) {
|
|
|
615
615
|
const written = new Set();
|
|
616
616
|
let lock = false, installed = false;
|
|
617
617
|
if (present) {
|
|
618
|
-
// readInstalledState refuses while `.ia/distributions/pending.json` exists, which is
|
|
619
|
-
//
|
|
620
|
-
//
|
|
618
|
+
// readInstalledState refuses while `.ia/distributions/pending.json` exists, which is recovery-required: an
|
|
619
|
+
// interrupted apply must be recovered before anything reasons about this workspace. Its rows are held back so the
|
|
620
|
+
// plan lists authored source, then the lock, then install state, as before.
|
|
621
621
|
const installation = [];
|
|
622
|
-
//
|
|
622
|
+
// A held or abandoned install lock is recovery-required too. A process killed inside
|
|
623
623
|
// applyInstallation skips the `finally` that releases it (apps/distribution/src/install.ts:67-97), before
|
|
624
624
|
// `pending` exists and after it is removed. `ia recover installation` clears a dead holder's lock and refuses a
|
|
625
625
|
// live one (`acquire(root, true)`, install.ts:71), so it is the remedy whether or not a journal exists; the
|
|
@@ -678,7 +678,7 @@ export function collectInit(request) {
|
|
|
678
678
|
reason: 'A lock already names direct requests and resolved versions',
|
|
679
679
|
});
|
|
680
680
|
conflicts.push(...installation);
|
|
681
|
-
//
|
|
681
|
+
// A completed initialization is a conflict, because the starter now belongs to the user (band 100).
|
|
682
682
|
if (existsSync(resolve(root, DESCRIPTOR_PATH)))
|
|
683
683
|
conflicts.push({ path: DESCRIPTOR_PATH, reason: 'The target is already initialized' });
|
|
684
684
|
}
|
|
@@ -736,20 +736,20 @@ export function collectInit(request) {
|
|
|
736
736
|
/**
|
|
737
737
|
* The sentence the next action of a step that fails or is interrupted once the descriptor is written opens with:
|
|
738
738
|
* initialization is complete, so running `ia init` again refuses the target, and each effect is finished by its own
|
|
739
|
-
* command
|
|
739
|
+
* command. The project effect's also says whether the capture before it was taken.
|
|
740
740
|
*/
|
|
741
741
|
const INITIALIZED = 'The workspace is initialized.';
|
|
742
742
|
const CAPTURED = 'The workspace is initialized and captured.';
|
|
743
743
|
const UNCAPTURED = 'The workspace is initialized but not captured.';
|
|
744
744
|
/**
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
* before the first write it is the plain interruption and the target is byte-identical; after one, the
|
|
748
|
-
* names the rerun that finishes. Two effects follow the completion point, each reported apart, and each
|
|
749
|
-
* is interrupted leaves the workspace initialized and names its own command: the capture, `ia capture`,
|
|
750
|
-
* `options.project` is given (`--host`), the project effect, `ia host`. The project effect reads the
|
|
751
|
-
* never the capture
|
|
752
|
-
*
|
|
745
|
+
* The apply's steps, in SPEC `init`'s order. Each step before the descriptor either completes or leaves a state
|
|
746
|
+
* `collectInit` classifies as resumable or recovery-required. The signal is observed at step boundaries (the apply spec
|
|
747
|
+
* §5): before the first write it is the plain interruption and the target is byte-identical; after one, the
|
|
748
|
+
* interruption names the rerun that finishes. Two effects follow the completion point, each reported apart, and each
|
|
749
|
+
* that fails or is interrupted leaves the workspace initialized and names its own command: the capture, `ia capture`,
|
|
750
|
+
* and, only when `options.project` is given (`--host`), the project effect, `ia host`. The project effect reads the
|
|
751
|
+
* live revision, never the capture, so it runs after a capture that failed too, and that failure is then refused with
|
|
752
|
+
* the capture's own repair, after a sentence saying the projection is written.
|
|
753
753
|
*/
|
|
754
754
|
export async function applyInit(view, options) {
|
|
755
755
|
const { root, starter } = view;
|
|
@@ -765,23 +765,23 @@ export async function applyInit(view, options) {
|
|
|
765
765
|
if (options.signal?.aborted)
|
|
766
766
|
throw resume;
|
|
767
767
|
};
|
|
768
|
-
//
|
|
768
|
+
// The pin is read again rather than trusted from the plan, and must still be the one the plan showed.
|
|
769
769
|
const base = readBase(options.packageRoot);
|
|
770
770
|
if (base.pin.archive !== starter.base.archive || base.pin.manifest !== starter.base.manifest)
|
|
771
771
|
throw new Refusal('IA-CLI-FAILED', 'The bundled base package changed while planning', 3, { path: resolve(options.packageRoot, PIN_PATH) }, DAMAGED);
|
|
772
772
|
options.signal?.throwIfAborted();
|
|
773
|
-
// The last point at which the target is byte-identical to its state before the command
|
|
773
|
+
// The last point at which the target is byte-identical to its state before the command.
|
|
774
774
|
mkdirSync(root, { recursive: true });
|
|
775
775
|
for (const path of view.leftovers)
|
|
776
776
|
unlinkSync(resolve(root, path));
|
|
777
777
|
const step = (id) => view.steps.find((row) => row.id === id);
|
|
778
|
-
//
|
|
778
|
+
// The install step: the bundled base, installed as the workspace's one request.
|
|
779
779
|
if (step('install').status === 'pending')
|
|
780
780
|
await installBase(root, base, 'install', { signal: options.signal, checkpoint }, resume);
|
|
781
781
|
boundary('install');
|
|
782
782
|
if (view.adoption)
|
|
783
783
|
applyAdoption(planAdoption(root, view.adoption.id, view.adoption.release, false));
|
|
784
|
-
//
|
|
784
|
+
// The author step: create-only, so a starter file already present with these bytes is skipped and nothing is ever
|
|
785
785
|
// rewritten. The ignore file is written only where none exists; one the target already holds is its own.
|
|
786
786
|
for (const file of starter.files)
|
|
787
787
|
if (!view.present.includes(file.path))
|
|
@@ -790,15 +790,15 @@ export async function applyInit(view, options) {
|
|
|
790
790
|
if (ignore === 'written')
|
|
791
791
|
createFile(root, IGNORE_PATH, Buffer.from(IGNORE_TEXT));
|
|
792
792
|
boundary('author');
|
|
793
|
-
//
|
|
793
|
+
// The admission step: the identities are read from the compiled graph, never string-constructed.
|
|
794
794
|
const { compiled } = admitStarter(root, starter.records, 'initialized', '');
|
|
795
795
|
const authored = compiled.map((record) => record.identity), distribution = compiled.find((record) => record.discriminator === 'distribution')?.identity ?? null;
|
|
796
796
|
boundary('admission');
|
|
797
|
-
//
|
|
797
|
+
// The descriptor, the completion point (the apply spec §5). A default starter's descriptor names no distribution.
|
|
798
798
|
createFile(root, DESCRIPTOR_PATH, Buffer.from(descriptorText(starterDescriptor(id, name, base, starter.provenance, distribution ?? undefined, starter.assets))));
|
|
799
799
|
checkpoint('init:descriptor');
|
|
800
800
|
const installed = readInstalledState({ root });
|
|
801
|
-
//
|
|
801
|
+
// The capture effect: `ia capture` on the workspace just initialized, written through db's writeCapture. A
|
|
802
802
|
// failure is refused as `ia capture` refuses it, located and with its repair (`captureFailure`), for this root.
|
|
803
803
|
const recapture = `ia capture --root ${quote(root)}`;
|
|
804
804
|
let capture, failed;
|
|
@@ -816,7 +816,7 @@ export async function applyInit(view, options) {
|
|
|
816
816
|
}
|
|
817
817
|
if (capture !== undefined)
|
|
818
818
|
checkpoint('init:capture');
|
|
819
|
-
//
|
|
819
|
+
// The project effect, only with `--host`: after a capture that failed too. A signal the capture stopped for,
|
|
820
820
|
// it observes itself, naming `ia host`, the effect this invocation asked for, after saying the capture was not taken.
|
|
821
821
|
const projected = options.project?.(capture === undefined ? UNCAPTURED : CAPTURED);
|
|
822
822
|
if (failed !== undefined)
|
|
@@ -837,8 +837,8 @@ export async function applyInit(view, options) {
|
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
839
|
/**
|
|
840
|
-
*
|
|
841
|
-
* is cached, resolved from that one archive and installed as the workspace's one request, by `ia init` into a new
|
|
840
|
+
* The installer's three calls, offline, resolved the way `ia install` resolves (distribute.ts collectPlan): the bundled
|
|
841
|
+
* base is cached, resolved from that one archive and installed as the workspace's one request, by `ia init` into a new
|
|
842
842
|
* workspace and by `ia init --migrate` in place of a 1.x base. A signal during it is `resume`.
|
|
843
843
|
*/
|
|
844
844
|
async function installBase(root, base, operation, options, resume) {
|
|
@@ -858,7 +858,7 @@ async function installBase(root, base, operation, options, resume) {
|
|
|
858
858
|
if (options.signal?.aborted)
|
|
859
859
|
throw resume;
|
|
860
860
|
// collectInit already refuses a lock present at planning time; this is another installer taking it between
|
|
861
|
-
// planning and apply. The installer's code is kept (§4
|
|
861
|
+
// planning and apply. The installer's code is kept (§4 of the contract); the next action names the recovery
|
|
862
862
|
// that clears the lock if that installer has since died.
|
|
863
863
|
if (codeOf(error, '') === 'IA-DIST-INSTALL-BUSY')
|
|
864
864
|
throw new Refusal('IA-DIST-INSTALL-BUSY', error instanceof Error ? error.message : String(error), 3, { path: root }, `If no installer is running, an interrupted one left its lock: run "${recoverCommand('recover', root)}", then apply again.`);
|
|
@@ -869,7 +869,7 @@ async function installBase(root, base, operation, options, resume) {
|
|
|
869
869
|
const conflictMessage = (conflicts, blocked) => conflicts.length === 1
|
|
870
870
|
? `${conflicts[0].reason}: ${conflicts[0].path}`
|
|
871
871
|
: `${conflicts.length} conflicts block ${blocked}: ${conflicts.map((row) => `${row.path} (${row.reason})`).join('; ')}`;
|
|
872
|
-
/**
|
|
872
|
+
/** Every conflict is listed; `--apply` refuses at class 3 and writes nothing. */
|
|
873
873
|
function initializedNext(view) {
|
|
874
874
|
if (!view.conflicts.some((row) => row.path === DESCRIPTOR_PATH && row.reason === 'The target is already initialized'))
|
|
875
875
|
return null;
|
|
@@ -964,7 +964,7 @@ const stepRows = (view, symbol, caps) => [
|
|
|
964
964
|
const provenanceText = (provenance) => provenance.missing === null
|
|
965
965
|
? `${provenance.source.repository} at ${provenance.source.commit.slice(0, 12)}`
|
|
966
966
|
: `Unpublished local; ${MISSING[provenance.missing]}`;
|
|
967
|
-
/**
|
|
967
|
+
/** The starter rows name the records, release and provenance this initialization would write. */
|
|
968
968
|
const starterRows = (view, caps) => {
|
|
969
969
|
const { starter } = view, pin = starter.base;
|
|
970
970
|
const rows = starter.name === null || starter.id === null
|
|
@@ -1074,7 +1074,7 @@ export function renderInit(view, caps, supplied, advice) {
|
|
|
1074
1074
|
entry([words(next)], { depth: 0, symbol: 'step' }, caps),
|
|
1075
1075
|
], { leadingBlank: true });
|
|
1076
1076
|
}
|
|
1077
|
-
/** §2.
|
|
1077
|
+
/** Contract §2.0's change summary for `init`: the plan's own blocks without the preview note or the footer. */
|
|
1078
1078
|
export const renderInitSummary = (view, caps) => document([headerLine('Plan', 'init', [{ text: view.root, column: 50 }], caps), ...planBlocks(view, caps)], {
|
|
1079
1079
|
leadingBlank: true,
|
|
1080
1080
|
});
|
|
@@ -1104,7 +1104,7 @@ export function renderApplied(view, applied, caps) {
|
|
|
1104
1104
|
words(`${applied.resumed ? 'Finished initializing' : 'Initialized'} ${applied.id}; release descriptor ${DESCRIPTOR_PATH}.`),
|
|
1105
1105
|
words(`Installed generation ${truncateDigest(applied.generation, caps.ascii)}, counter ${applied.counter}.`),
|
|
1106
1106
|
], { depth: 1, symbol: 'success' }, caps),
|
|
1107
|
-
//
|
|
1107
|
+
// SPEC `init`: the records authored, then each effect, reported apart.
|
|
1108
1108
|
authoredEntry(applied, caps),
|
|
1109
1109
|
capturedEntry(applied.effects.capture, caps),
|
|
1110
1110
|
applied.effects.project === 'skipped'
|
|
@@ -1117,7 +1117,7 @@ export function renderApplied(view, applied, caps) {
|
|
|
1117
1117
|
words(`Registered with ${view.host}; written, not observed answering.`),
|
|
1118
1118
|
], { depth: 1, symbol: 'success' }, caps),
|
|
1119
1119
|
stepRows(view, () => 'success', caps),
|
|
1120
|
-
//
|
|
1120
|
+
// Host registration spec §4: the notes `ia host` prints after a registration, from the same function.
|
|
1121
1121
|
...(applied.host === undefined || view.host === 'none' ? [] : hostNotes(view.host, caps)),
|
|
1122
1122
|
closingEntry(applied.distribution, caps),
|
|
1123
1123
|
], { leadingBlank: true });
|
|
@@ -1151,7 +1151,7 @@ export async function runInit(context) {
|
|
|
1151
1151
|
const id = args.value('id');
|
|
1152
1152
|
if (args.value('registry') !== undefined && args.value('adopt') === undefined)
|
|
1153
1153
|
throw new UsageError('ia init --registry requires --adopt');
|
|
1154
|
-
// A malformed identity is usage (§
|
|
1154
|
+
// A malformed identity is usage (the initialization spec §2), decided before the target is read.
|
|
1155
1155
|
if (id !== undefined && (!PACKAGE_ID.test(id) || id.includes('..')))
|
|
1156
1156
|
throw new UsageError(`--id must be <provider/name>; got ${id}`);
|
|
1157
1157
|
const root = resolveTarget(host.cwd, args.positionals[0], (target) => respell(context, { positionals: [target] }));
|
|
@@ -1159,8 +1159,8 @@ export async function runInit(context) {
|
|
|
1159
1159
|
return await initialize(context, root, id);
|
|
1160
1160
|
}
|
|
1161
1161
|
catch (error) {
|
|
1162
|
-
//
|
|
1163
|
-
//
|
|
1162
|
+
// This verb's target is `<directory>`, which `--root` cannot carry, so a service refusal with no remedy of its own
|
|
1163
|
+
// is given the fallback for that directory rather than for the cwd, which may not be it.
|
|
1164
1164
|
if (error instanceof Refusal || error instanceof Interrupted || error instanceof UsageError || host.signal?.aborted)
|
|
1165
1165
|
throw error;
|
|
1166
1166
|
throw refusalOf(error, { command: 'init', root });
|
|
@@ -1205,15 +1205,15 @@ async function initialize(context, root, id) {
|
|
|
1205
1205
|
stdout: applied === null ? renderInit(view, caps, args.positionals[0], host) : renderApplied(view, applied, caps),
|
|
1206
1206
|
stderr: '',
|
|
1207
1207
|
};
|
|
1208
|
-
// §
|
|
1208
|
+
// The apply spec §1: conflicts are reported inside the plan and are not an error class, so a plan is always exit 0.
|
|
1209
1209
|
if (!apply)
|
|
1210
1210
|
return rendered(null);
|
|
1211
1211
|
if (view.state !== 'fresh' && view.state !== 'resumable')
|
|
1212
1212
|
throw conflictRefusal(view);
|
|
1213
|
-
// §2.
|
|
1213
|
+
// Contract §2.0, as `ia install` asks it: parsing already refused every `--apply` whose question cannot be answered.
|
|
1214
1214
|
if (!args.flag('yes') && !(await confirm(host.interaction, renderInitSummary(view, caps), CONFIRMATION)))
|
|
1215
1215
|
return { exitCode: 0, stdout: renderDeclined(view, caps, args.positionals[0], host), stderr: '' };
|
|
1216
|
-
// The project effect, last (
|
|
1216
|
+
// The project effect, last (SPEC `init`): the `ia host` path, whose apply writes the receipt.
|
|
1217
1217
|
const project = selected === 'none' ? undefined : (done) => registerHost(context, selected, root, done);
|
|
1218
1218
|
try {
|
|
1219
1219
|
return rendered(await applyInit(view, { packageRoot: host.packageRoot, signal: host.signal, project }));
|
|
@@ -1230,7 +1230,7 @@ async function initialize(context, root, id) {
|
|
|
1230
1230
|
* Its arguments come from `ia host`'s own grammar rather than a hand-built object, so the host step reads exactly
|
|
1231
1231
|
* what `ia host` would. `--yes` stands for the answer this invocation already gave, by flag or at the prompt, so
|
|
1232
1232
|
* the step never asks a second question. Every failure here happens after initialization completed: the workspace
|
|
1233
|
-
* stays initialized, and each refusal keeps the service's code, message and location (contract §4
|
|
1233
|
+
* stays initialized, and each refusal keeps the service's code, message and location (contract §4).
|
|
1234
1234
|
*
|
|
1235
1235
|
* Its next action is `ia host`'s own remedy for that refusal, after `done`, the sentence saying what initialization
|
|
1236
1236
|
* completed, the capture included or not. Every `ia host` command the remedy names gains `--root <root>`, because
|
|
@@ -1243,14 +1243,14 @@ function registerHost(context, selected, root, done) {
|
|
|
1243
1243
|
const host = `ia host ${selected} --root ${quote(root)} --apply`;
|
|
1244
1244
|
const finish = `Run "${host}" to finish host registration.`, recover = `Run "${host}" for the recovery it names, then run it again to finish host registration.`;
|
|
1245
1245
|
const composed = (next) => `${done} ${next === null ? finish : next.endsWith(THEN_RERUN) ? recover : rootedNext(next, selected, root)}`;
|
|
1246
|
-
//
|
|
1246
|
+
// A signal observed after the last init write interrupts a command that has written, so it names the rerun.
|
|
1247
1247
|
if (context.host.signal?.aborted)
|
|
1248
1248
|
throw new Interrupted(composed(null));
|
|
1249
1249
|
const command = findCommand('host');
|
|
1250
1250
|
const args = parseArguments([selected, '--root', root, '--apply', '--yes'], command.grammar);
|
|
1251
1251
|
try {
|
|
1252
1252
|
const applied = applyHostSet(collectHost({ ...context, command, args }), context.host.packageRoot, context.host.signal);
|
|
1253
|
-
// A host apply that returns has projected, and `applyHostProjection` wrote the receipt
|
|
1253
|
+
// A host apply that returns has projected, and `applyHostProjection` wrote the receipt before it returned.
|
|
1254
1254
|
const receipt = readReceipt(root, selected);
|
|
1255
1255
|
return { effect: { host: selected, files: receipt.files, receipt: STATE.receipt(selected) }, host: applied };
|
|
1256
1256
|
}
|
|
@@ -1464,7 +1464,8 @@ export function collectMigration(request) {
|
|
|
1464
1464
|
path: found.source.path,
|
|
1465
1465
|
reason: `Holds @${record.word} ${record.name}, which the migration authors in ${record.path}`,
|
|
1466
1466
|
});
|
|
1467
|
-
//
|
|
1467
|
+
// Host registration spec §6: a pending host journal refuses the whole verb and names the recovery that clears it, as
|
|
1468
|
+
// `ia host` does.
|
|
1468
1469
|
if (!system) {
|
|
1469
1470
|
const removedRecords = [...local, ...starter.filter((record) => record.discriminator === 'distribution')];
|
|
1470
1471
|
const references = (value, word, name, identity) => {
|
|
@@ -1504,7 +1505,7 @@ export function collectMigration(request) {
|
|
|
1504
1505
|
for (const host of projected)
|
|
1505
1506
|
try {
|
|
1506
1507
|
const guard = planRetirement(root, host) === null ? 'none' : 'retire';
|
|
1507
|
-
// The hook step the projection effect runs
|
|
1508
|
+
// The hook step the projection effect runs, found before the migration plans its writes.
|
|
1508
1509
|
preflightHooks(root, host);
|
|
1509
1510
|
hosts.push({ host, guard, files: migratedFiles(root, host) });
|
|
1510
1511
|
}
|
|
@@ -1600,7 +1601,7 @@ const MIGRATED_CAPTURED = 'The workspace is migrated and captured.';
|
|
|
1600
1601
|
const MIGRATED_UNCAPTURED = 'The workspace is migrated but not captured.';
|
|
1601
1602
|
/**
|
|
1602
1603
|
* The admission step `ia init` and `ia init --migrate` share: zero error findings, then each planned starter record as
|
|
1603
|
-
* the compiled graph holds it at its path, never string-constructed
|
|
1604
|
+
* the compiled graph holds it at its path, never string-constructed, with every record the graph holds.
|
|
1604
1605
|
* `done` opens each refusal's next action with what the command completed before it, if anything.
|
|
1605
1606
|
*/
|
|
1606
1607
|
function admitStarter(root, planned, what, done) {
|
|
@@ -1823,7 +1824,7 @@ export function migrationEnvelope(view, apply, applied = null) {
|
|
|
1823
1824
|
...(applied === null ? {} : { applied }),
|
|
1824
1825
|
};
|
|
1825
1826
|
}
|
|
1826
|
-
/** One row per file: its path, then what the migration does to it, each row on one content column
|
|
1827
|
+
/** One row per file: its path, then what the migration does to it, each row on one content column. */
|
|
1827
1828
|
const fileRows = (rows, caps) => {
|
|
1828
1829
|
const symbolWidth = blockSymbolWidth(rows.map((row) => row.symbol), caps.ascii);
|
|
1829
1830
|
return rows.flatMap((row) => entry([[atom(row.path, 'cyan', 0), ...words(row.text, null, 2)]], { depth: 1, symbol: row.symbol, symbolWidth }, caps));
|
|
@@ -1949,7 +1950,7 @@ export function renderMigration(view, caps, supplied) {
|
|
|
1949
1950
|
entry([words(next)], { depth: 0, symbol: 'step' }, caps),
|
|
1950
1951
|
], { leadingBlank: true });
|
|
1951
1952
|
}
|
|
1952
|
-
/** §2.
|
|
1953
|
+
/** Contract §2.0's change summary: the plan's own blocks without the preview note or the footer. */
|
|
1953
1954
|
const renderMigrationSummary = (view, caps) => document([migrationHeader(view, caps), ...migrationBlocks(view, caps)], { leadingBlank: true });
|
|
1954
1955
|
export function renderMigrated(view, applied, caps) {
|
|
1955
1956
|
return document([
|
|
@@ -2014,7 +2015,7 @@ async function migrate(context, root) {
|
|
|
2014
2015
|
/**
|
|
2015
2016
|
* A finished git run's answer, or null when git is not really there: it could not start, or it is the macOS stub
|
|
2016
2017
|
* `/usr/bin/git`, which only asks for the Xcode Command Line Tools and fails; reading that as "not a Git checkout" would
|
|
2017
|
-
* send the user after the wrong fix
|
|
2018
|
+
* send the user after the wrong fix.
|
|
2018
2019
|
*/
|
|
2019
2020
|
export function gitAnswer(result) {
|
|
2020
2021
|
if (result.error !== undefined)
|