@inventarch/cli 3.5.1 → 3.6.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/NOTICE +2 -0
- package/README.md +2 -1
- package/SPEC.md +13 -4
- package/THIRD_PARTY_NOTICES.txt +49 -0
- package/assets/host/44dc1fa77e0235df35e1dd05d5a5ce8c2b19d4545caf0b8579f2f4e1b9efbbc6.tgz +0 -0
- package/assets/host.json +4 -4
- package/dist/args.d.ts +9 -0
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js.map +1 -1
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +53 -0
- package/dist/bin.js.map +1 -0
- package/dist/claude-cli.d.ts +13 -1
- package/dist/claude-cli.d.ts.map +1 -1
- package/dist/claude-cli.js +31 -1
- package/dist/claude-cli.js.map +1 -1
- package/dist/commands.d.ts +17 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +66 -3
- package/dist/commands.js.map +1 -1
- package/dist/committed-host.d.ts.map +1 -1
- package/dist/committed-host.js +14 -2
- package/dist/committed-host.js.map +1 -1
- package/dist/console/app.d.ts +47 -0
- package/dist/console/app.d.ts.map +1 -0
- package/dist/console/app.js +921 -0
- package/dist/console/app.js.map +1 -0
- package/dist/console/batch-next.d.ts +54 -0
- package/dist/console/batch-next.d.ts.map +1 -0
- package/dist/console/batch-next.js +260 -0
- package/dist/console/batch-next.js.map +1 -0
- package/dist/console/batch-plan.d.ts +109 -0
- package/dist/console/batch-plan.d.ts.map +1 -0
- package/dist/console/batch-plan.js +308 -0
- package/dist/console/batch-plan.js.map +1 -0
- package/dist/console/batch-run.d.ts +195 -0
- package/dist/console/batch-run.d.ts.map +1 -0
- package/dist/console/batch-run.js +868 -0
- package/dist/console/batch-run.js.map +1 -0
- package/dist/console/batch-screen.d.ts +36 -0
- package/dist/console/batch-screen.d.ts.map +1 -0
- package/dist/console/batch-screen.js +113 -0
- package/dist/console/batch-screen.js.map +1 -0
- package/dist/console/grid.d.ts +30 -0
- package/dist/console/grid.d.ts.map +1 -0
- package/dist/console/grid.js +87 -0
- package/dist/console/grid.js.map +1 -0
- package/dist/console/keys.d.ts +54 -0
- package/dist/console/keys.d.ts.map +1 -0
- package/dist/console/keys.js +204 -0
- package/dist/console/keys.js.map +1 -0
- package/dist/console/layout-all.d.ts +70 -0
- package/dist/console/layout-all.d.ts.map +1 -0
- package/dist/console/layout-all.js +401 -0
- package/dist/console/layout-all.js.map +1 -0
- package/dist/console/layout-repo.d.ts +65 -0
- package/dist/console/layout-repo.d.ts.map +1 -0
- package/dist/console/layout-repo.js +275 -0
- package/dist/console/layout-repo.js.map +1 -0
- package/dist/console/load.d.ts +33 -0
- package/dist/console/load.d.ts.map +1 -0
- package/dist/console/load.js +166 -0
- package/dist/console/load.js.map +1 -0
- package/dist/console/offers.d.ts +39 -0
- package/dist/console/offers.d.ts.map +1 -0
- package/dist/console/offers.js +285 -0
- package/dist/console/offers.js.map +1 -0
- package/dist/console/run.d.ts +56 -0
- package/dist/console/run.d.ts.map +1 -0
- package/dist/console/run.js +210 -0
- package/dist/console/run.js.map +1 -0
- package/dist/console/state.d.ts +127 -0
- package/dist/console/state.d.ts.map +1 -0
- package/dist/console/state.js +273 -0
- package/dist/console/state.js.map +1 -0
- package/dist/console/terminal.d.ts +60 -0
- package/dist/console/terminal.d.ts.map +1 -0
- package/dist/console/terminal.js +114 -0
- package/dist/console/terminal.js.map +1 -0
- package/dist/console/width-table.d.ts +10 -0
- package/dist/console/width-table.d.ts.map +1 -0
- package/dist/console/width-table.js +753 -0
- package/dist/console/width-table.js.map +1 -0
- package/dist/console/width.d.ts +18 -0
- package/dist/console/width.d.ts.map +1 -0
- package/dist/console/width.js +114 -0
- package/dist/console/width.js.map +1 -0
- package/dist/console/workspaces-state.d.ts +93 -0
- package/dist/console/workspaces-state.d.ts.map +1 -0
- package/dist/console/workspaces-state.js +192 -0
- package/dist/console/workspaces-state.js.map +1 -0
- package/dist/consumer.d.ts +13 -8
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +22 -34
- package/dist/consumer.js.map +1 -1
- package/dist/discovery.d.ts +8 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +36 -0
- package/dist/discovery.js.map +1 -0
- package/dist/distribute.d.ts +9 -0
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +70 -13
- package/dist/distribute.js.map +1 -1
- package/dist/doctor-authority.d.ts.map +1 -1
- package/dist/doctor-authority.js +7 -4
- package/dist/doctor-authority.js.map +1 -1
- package/dist/doctor-extensions.d.ts +36 -0
- package/dist/doctor-extensions.d.ts.map +1 -0
- package/dist/doctor-extensions.js +118 -0
- package/dist/doctor-extensions.js.map +1 -0
- package/dist/doctor-mounts.d.ts.map +1 -1
- package/dist/doctor-mounts.js +3 -2
- package/dist/doctor-mounts.js.map +1 -1
- package/dist/doctor-user.d.ts +64 -0
- package/dist/doctor-user.d.ts.map +1 -1
- package/dist/doctor-user.js +309 -34
- package/dist/doctor-user.js.map +1 -1
- package/dist/doctor.d.ts +22 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +81 -32
- package/dist/doctor.js.map +1 -1
- package/dist/fix.d.ts +67 -0
- package/dist/fix.d.ts.map +1 -0
- package/dist/fix.js +136 -0
- package/dist/fix.js.map +1 -0
- package/dist/handoff.d.ts +65 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +264 -0
- package/dist/handoff.js.map +1 -0
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +1 -8
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +9 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +23 -7
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +4 -6
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +80 -9
- package/dist/init.js.map +1 -1
- package/dist/local-cli.d.ts +67 -0
- package/dist/local-cli.d.ts.map +1 -0
- package/dist/local-cli.js +269 -0
- package/dist/local-cli.js.map +1 -0
- package/dist/main.d.ts +47 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +121 -26
- package/dist/main.js.map +1 -1
- package/dist/marketplace-record.d.ts +7 -1
- package/dist/marketplace-record.d.ts.map +1 -1
- package/dist/marketplace-record.js +6 -3
- package/dist/marketplace-record.js.map +1 -1
- package/dist/package-manager.d.ts +43 -0
- package/dist/package-manager.d.ts.map +1 -0
- package/dist/package-manager.js +164 -0
- package/dist/package-manager.js.map +1 -0
- package/dist/position.d.ts.map +1 -1
- package/dist/position.js +16 -2
- package/dist/position.js.map +1 -1
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +11 -3
- package/dist/preview.js.map +1 -1
- package/dist/profile.d.ts +1 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +3 -4
- package/dist/profile.js.map +1 -1
- package/dist/program.d.ts +10 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +38 -1
- package/dist/program.js.map +1 -1
- package/dist/project.js +2 -2
- package/dist/project.js.map +1 -1
- package/dist/render.d.ts +7 -2
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +42 -3
- package/dist/render.js.map +1 -1
- package/dist/self.d.ts +6 -0
- package/dist/self.d.ts.map +1 -0
- package/dist/self.js +20 -0
- package/dist/self.js.map +1 -0
- package/dist/tracked-lock.d.ts +15 -0
- package/dist/tracked-lock.d.ts.map +1 -0
- package/dist/tracked-lock.js +37 -0
- package/dist/tracked-lock.js.map +1 -0
- package/dist/tracked.d.ts +125 -0
- package/dist/tracked.d.ts.map +1 -0
- package/dist/tracked.js +436 -0
- package/dist/tracked.js.map +1 -0
- package/dist/user-host.d.ts +7 -3
- package/dist/user-host.d.ts.map +1 -1
- package/dist/user-host.js +24 -11
- package/dist/user-host.js.map +1 -1
- package/dist/workspace-state.d.ts +15 -0
- package/dist/workspace-state.d.ts.map +1 -0
- package/dist/workspace-state.js +35 -0
- package/dist/workspace-state.js.map +1 -0
- package/dist/workspaces.d.ts +37 -0
- package/dist/workspaces.d.ts.map +1 -0
- package/dist/workspaces.js +319 -0
- package/dist/workspaces.js.map +1 -0
- package/package.json +9 -8
- package/assets/host/e594fd978a0f8a9f042bf40ab124779067e1c88e4a72b7ce57261ca0e48a984c.tgz +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Session } from './session.js';
|
|
2
|
+
/** The descriptor a workspace that ships a package carries. */
|
|
3
|
+
export declare const DESCRIPTOR_PATH = ".ia/release.json";
|
|
4
|
+
/** True when the folder holds workspace sources. */
|
|
5
|
+
export declare const hasWorkspaceSource: (root: string) => boolean;
|
|
6
|
+
/** True when the folder carries a release descriptor, that is, it ships a package. */
|
|
7
|
+
export declare const shipsPackage: (root: string) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The target must admit, with zero error findings, before anything is rendered or registered. The refusal is the CLI's
|
|
10
|
+
* own classification of the target, so it is IA-CLI-CONFLICT and names the command that shows the findings.
|
|
11
|
+
*/
|
|
12
|
+
export declare function requireAdmitted(session: Session, root: string): void;
|
|
13
|
+
/** Opens the workspace as every renderer does and refuses it unless it admits; nothing is read from it beyond that. */
|
|
14
|
+
export declare function requireAdmittedWorkspace(root: string): void;
|
|
15
|
+
//# sourceMappingURL=workspace-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,+DAA+D;AAC/D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAElD,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,OAA+C,CAAC;AAClG,sFAAsF;AACtF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OAAqD,CAAC;AAElG;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CASpE;AACD,uHAAuH;AACvH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAO3D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a folder is, as `ia host` and `ia project` ask it. Two questions, kept apart so each caller says which it means:
|
|
3
|
+
* whether the folder has workspace sources (`hasWorkspaceSource`, what the host and projection guard tests), and whether
|
|
4
|
+
* it ships a package (`shipsPackage`, what a release descriptor means). A workspace that admits and ships no package is
|
|
5
|
+
* set up fully: it has sources and no descriptor.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync } from 'node:fs';
|
|
8
|
+
import { resolve } from 'node:path';
|
|
9
|
+
import { Refusal } from './consumer.js';
|
|
10
|
+
import { openSession } from './session.js';
|
|
11
|
+
/** The descriptor a workspace that ships a package carries. */
|
|
12
|
+
export const DESCRIPTOR_PATH = '.ia/release.json';
|
|
13
|
+
/** True when the folder holds workspace sources. */
|
|
14
|
+
export const hasWorkspaceSource = (root) => existsSync(resolve(root, '.ia/src'));
|
|
15
|
+
/** True when the folder carries a release descriptor, that is, it ships a package. */
|
|
16
|
+
export const shipsPackage = (root) => existsSync(resolve(root, DESCRIPTOR_PATH));
|
|
17
|
+
/**
|
|
18
|
+
* The target must admit, with zero error findings, before anything is rendered or registered. The refusal is the CLI's
|
|
19
|
+
* own classification of the target, so it is IA-CLI-CONFLICT and names the command that shows the findings.
|
|
20
|
+
*/
|
|
21
|
+
export function requireAdmitted(session, root) {
|
|
22
|
+
if (session.admission().status !== 'admitted')
|
|
23
|
+
throw new Refusal('IA-CLI-CONFLICT', 'The workspace does not admit; host registration needs a workspace with zero error findings', 3, { path: root }, 'Run "ia validate" and fix the reported errors.');
|
|
24
|
+
}
|
|
25
|
+
/** Opens the workspace as every renderer does and refuses it unless it admits; nothing is read from it beyond that. */
|
|
26
|
+
export function requireAdmittedWorkspace(root) {
|
|
27
|
+
const session = openSession(root);
|
|
28
|
+
try {
|
|
29
|
+
requireAdmitted(session, root);
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
session.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=workspace-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-state.js","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAElD,oDAAoD;AACpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;AAClG,sFAAsF;AACtF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;AAElG;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAAgB,EAAE,IAAY;IAC5D,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,MAAM,KAAK,UAAU;QAC3C,MAAM,IAAI,OAAO,CACf,iBAAiB,EACjB,4FAA4F,EAC5F,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,EACd,gDAAgD,CACjD,CAAC;AACN,CAAC;AACD,uHAAuH;AACvH,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC;QACH,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Context, Result } from './consumer.js';
|
|
2
|
+
import type { Capabilities } from './render.js';
|
|
3
|
+
import type { TrackedState } from './tracked.js';
|
|
4
|
+
declare const ACTIONS: readonly ["list", "add", "find", "remove"];
|
|
5
|
+
type Action = (typeof ACTIONS)[number];
|
|
6
|
+
/**
|
|
7
|
+
* The options only one action reads; any other action refuses them as usage rather than ignoring them. Read from the
|
|
8
|
+
* command spec's `actions`, the table a fix's flow reads too (fix.ts).
|
|
9
|
+
*/
|
|
10
|
+
export declare const OWNED: Readonly<Record<string, Action>>;
|
|
11
|
+
/** `clash`: a found workspace `find --apply` would refuse, as its id is tracked already or another found one takes it. */
|
|
12
|
+
type Row = {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly state: TrackedState | 'tracked' | 'new' | 'clash';
|
|
15
|
+
readonly root: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* `id state root`, two spaces apart, measured in display columns. The id and the root share the width the state leaves:
|
|
19
|
+
* the root keeps at least 20 columns (or its whole width when narrower) and the id, shortened in the middle, at most what
|
|
20
|
+
* remains, so a long id never pushes a row past the terminal. Where even those minimums do not fit, the rows are stacked
|
|
21
|
+
* instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare function table(rows: readonly Row[], caps: Capabilities): readonly string[];
|
|
24
|
+
/**
|
|
25
|
+
* One block per row, a blank line apart: the id, then the root and the state indented below it. Every line keeps to
|
|
26
|
+
* the width, down to one column. The indents (2, then 4) give way first, so the widest state line stays whole while it
|
|
27
|
+
* can; below that the state word is shortened at its end after the symbol, and without room for the symbol it stands
|
|
28
|
+
* alone. The id and the root are shortened in the middle.
|
|
29
|
+
*/
|
|
30
|
+
export declare function stacked(rows: readonly Row[], caps: Capabilities): readonly string[];
|
|
31
|
+
/** `list`'s closing count: every row is one of present, missing or unreadable, and the last is named only when seen. */
|
|
32
|
+
export declare function listSummary(rows: readonly {
|
|
33
|
+
readonly state: TrackedState;
|
|
34
|
+
}[]): string;
|
|
35
|
+
export declare function runWorkspaces(context: Context): Promise<Result>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,aAAa,CAAC;AAYrE,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAmBnE,QAAA,MAAM,OAAO,4CAA6C,CAAC;AAC3D,KAAK,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AACvC;;;GAGG;AACH,eAAO,MAAM,KAAK,EAA+C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AA4DlG,0HAA0H;AAC1H,KAAK,GAAG,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAStH;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,YAAY,GAAG,SAAS,MAAM,EAAE,CAiBjF;AACD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,YAAY,GAAG,SAAS,MAAM,EAAE,CAkBnF;AA0BD,wHAAwH;AACxH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE,EAAE,GAAG,MAAM,CAIrF;AAqKD,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAuCrE"}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ia workspaces list | add | find | remove`: docs/specs/consumer-cli-contract/README.md §2.16. The tracked list in the
|
|
3
|
+
* IA home (tracked.ts) from the command line: a user-state command, not an agent one, so it has no catalog row and no
|
|
4
|
+
* mandate gate. It opens no workspace, so `--root` is refused; `add` takes its directory as a positional and defaults to
|
|
5
|
+
* the workspace that holds the cwd. `add` and `remove` write at once, since they change only the user's own list and
|
|
6
|
+
* print exactly what changed; `find` previews and writes only with `--apply`, confirmed as every `--apply` is (§2.0).
|
|
7
|
+
* Nothing here reads or writes the MCP door's `workspace-locations.json`.
|
|
8
|
+
*/
|
|
9
|
+
import { lstatSync, realpathSync } from 'node:fs';
|
|
10
|
+
import { resolve } from 'node:path';
|
|
11
|
+
import { UsageError } from './args.js';
|
|
12
|
+
import { findCommand, ownedOptions } from './commands.js';
|
|
13
|
+
import { clusterWidth, graphemes, stringWidth } from './console/width.js';
|
|
14
|
+
import { confirm, discoverRoot, iaHomeOf, Refusal } from './consumer.js';
|
|
15
|
+
import { homeSrcRemedy } from './home-remedy.js';
|
|
16
|
+
import { atom, document, entry, sectionLabel, statusSymbol, style, terminalSafe, terminalText, words, } from './render.js';
|
|
17
|
+
import { checkTrackId, defaultTrackId, clashRemedy, commandPath, FIND_DEPTH, findWorkspaces, idClashes, idTaken, PATH_OMITTED, readTracked, trackedRow, trackedState, trackWorkspace, trackWorkspaces, untrackWorkspace, } from './tracked.js';
|
|
18
|
+
const ACTIONS = ['list', 'add', 'find', 'remove'];
|
|
19
|
+
/**
|
|
20
|
+
* The options only one action reads; any other action refuses them as usage rather than ignoring them. Read from the
|
|
21
|
+
* command spec's `actions`, the table a fix's flow reads too (fix.ts).
|
|
22
|
+
*/
|
|
23
|
+
export const OWNED = ownedOptions(findCommand('workspaces'));
|
|
24
|
+
/** A row as `--json` prints it: `label` is null rather than absent, so every row has one shape. */
|
|
25
|
+
const shown = (row) => ({ id: row.id, root: row.root, label: row.label ?? null, added: row.added });
|
|
26
|
+
const withState = (row) => ({ ...shown(row), state: trackedState(row) });
|
|
27
|
+
const json = (value) => ({
|
|
28
|
+
exitCode: 0,
|
|
29
|
+
stdout: JSON.stringify({ version: 1, ...value }) + '\n',
|
|
30
|
+
stderr: '',
|
|
31
|
+
});
|
|
32
|
+
const human = (blocks) => ({
|
|
33
|
+
exitCode: 0,
|
|
34
|
+
stdout: document(blocks, { leadingBlank: true }),
|
|
35
|
+
stderr: '',
|
|
36
|
+
});
|
|
37
|
+
const ROOT_MIN = 20, ID_MIN = 8;
|
|
38
|
+
const markOf = (ascii) => (ascii ? '...' : '…');
|
|
39
|
+
/** The clusters of `text` that fit in `width` columns, from its start; a cluster is kept whole or dropped. */
|
|
40
|
+
function leading(text, width) {
|
|
41
|
+
let used = 0, out = '';
|
|
42
|
+
for (const cluster of graphemes(text)) {
|
|
43
|
+
used += clusterWidth(cluster);
|
|
44
|
+
if (used > width)
|
|
45
|
+
break;
|
|
46
|
+
out += cluster;
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
/** The clusters of `text` that fit in `width` columns, from its end; a cluster is kept whole or dropped. */
|
|
51
|
+
function trailing(text, width) {
|
|
52
|
+
let used = 0, out = '';
|
|
53
|
+
for (const cluster of [...graphemes(text)].reverse()) {
|
|
54
|
+
used += clusterWidth(cluster);
|
|
55
|
+
if (used > width)
|
|
56
|
+
break;
|
|
57
|
+
out = cluster + out;
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
/** `text` followed by the spaces that fill `width` columns. */
|
|
62
|
+
const fill = (text, width) => text + ' '.repeat(Math.max(0, width - stringWidth(text)));
|
|
63
|
+
/**
|
|
64
|
+
* Shortened in the middle, so both the volume and the folder name stay readable. Never wider than `width`: below room
|
|
65
|
+
* for the mark and a character either side, the text is cut at the width instead.
|
|
66
|
+
*/
|
|
67
|
+
function middle(text, width, ascii) {
|
|
68
|
+
if (stringWidth(text) <= width)
|
|
69
|
+
return text;
|
|
70
|
+
const mark = markOf(ascii);
|
|
71
|
+
if (width < mark.length + 2)
|
|
72
|
+
return leading(text, width);
|
|
73
|
+
const keep = width - mark.length;
|
|
74
|
+
return leading(text, Math.ceil(keep / 2)) + mark + trailing(text, Math.floor(keep / 2));
|
|
75
|
+
}
|
|
76
|
+
/** Shortened at the end, for a word whose start is what identifies it; never wider than `width`. */
|
|
77
|
+
function head(text, width, ascii) {
|
|
78
|
+
if (stringWidth(text) <= width)
|
|
79
|
+
return text;
|
|
80
|
+
const mark = markOf(ascii);
|
|
81
|
+
return width < mark.length + 1 ? leading(text, width) : leading(text, width - mark.length) + mark;
|
|
82
|
+
}
|
|
83
|
+
const SYMBOLS = {
|
|
84
|
+
present: 'success',
|
|
85
|
+
missing: 'warning',
|
|
86
|
+
unreadable: 'warning',
|
|
87
|
+
tracked: 'success',
|
|
88
|
+
new: 'added',
|
|
89
|
+
clash: 'warning',
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* `id state root`, two spaces apart, measured in display columns. The id and the root share the width the state leaves:
|
|
93
|
+
* the root keeps at least 20 columns (or its whole width when narrower) and the id, shortened in the middle, at most what
|
|
94
|
+
* remains, so a long id never pushes a row past the terminal. Where even those minimums do not fit, the rows are stacked
|
|
95
|
+
* instead.
|
|
96
|
+
*/
|
|
97
|
+
export function table(rows, caps) {
|
|
98
|
+
const symbolWidth = Math.max(...rows.map((row) => statusSymbol(SYMBOLS[row.state], caps.ascii).width));
|
|
99
|
+
const stateWidth = symbolWidth + 1 + Math.max(...rows.map((row) => row.state.length));
|
|
100
|
+
const idBudget = Math.max(caps.width - (2 + 2 + stateWidth + 2 + ROOT_MIN), ID_MIN), idWidth = Math.min(Math.max(2, ...rows.map((row) => stringWidth(row.id))), idBudget);
|
|
101
|
+
const rootNeed = Math.min(ROOT_MIN, Math.max(...rows.map((row) => stringWidth(row.root))));
|
|
102
|
+
if (2 + idWidth + 2 + stateWidth + 2 + rootNeed > caps.width)
|
|
103
|
+
return stacked(rows, caps);
|
|
104
|
+
const rootWidth = Math.max(caps.width - (2 + idWidth + 2 + stateWidth + 2), ROOT_MIN);
|
|
105
|
+
const header = style(` ${'id'.padEnd(idWidth)} ${'state'.padEnd(stateWidth)} root`, 'dim', caps.color);
|
|
106
|
+
return [
|
|
107
|
+
header,
|
|
108
|
+
...rows.map((row) => {
|
|
109
|
+
const symbol = statusSymbol(SYMBOLS[row.state], caps.ascii);
|
|
110
|
+
const state = style(symbol.text, symbol.role, caps.color) + ` ${row.state}`.padEnd(stateWidth - symbol.width);
|
|
111
|
+
return ` ${fill(middle(row.id, idWidth, caps.ascii), idWidth)} ${state} ${middle(row.root, rootWidth, caps.ascii)}`;
|
|
112
|
+
}),
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* One block per row, a blank line apart: the id, then the root and the state indented below it. Every line keeps to
|
|
117
|
+
* the width, down to one column. The indents (2, then 4) give way first, so the widest state line stays whole while it
|
|
118
|
+
* can; below that the state word is shortened at its end after the symbol, and without room for the symbol it stands
|
|
119
|
+
* alone. The id and the root are shortened in the middle.
|
|
120
|
+
*/
|
|
121
|
+
export function stacked(rows, caps) {
|
|
122
|
+
const { width, ascii } = caps;
|
|
123
|
+
const symbols = rows.map((row) => statusSymbol(SYMBOLS[row.state], ascii));
|
|
124
|
+
const stateWidth = Math.max(...rows.map((row, index) => symbols[index].width + 1 + row.state.length));
|
|
125
|
+
const inner = Math.max(Math.min(4, width - stateWidth), 0), outer = inner >= 4 ? 2 : 0;
|
|
126
|
+
const state = (row, symbol) => {
|
|
127
|
+
const budget = width - inner;
|
|
128
|
+
if (budget >= symbol.width + 2)
|
|
129
|
+
return `${style(symbol.text, symbol.role, caps.color)} ${head(row.state, budget - symbol.width - 1, ascii)}`;
|
|
130
|
+
return style(head(row.state, budget, ascii), symbol.role, caps.color);
|
|
131
|
+
};
|
|
132
|
+
return rows.flatMap((row, index) => [
|
|
133
|
+
...(index === 0 ? [] : ['']),
|
|
134
|
+
' '.repeat(outer) + middle(row.id, width - outer, ascii),
|
|
135
|
+
' '.repeat(inner) + middle(row.root, width - inner, ascii),
|
|
136
|
+
' '.repeat(inner) + state(row, symbols[index]),
|
|
137
|
+
]);
|
|
138
|
+
}
|
|
139
|
+
const line = (tokens, symbol, caps) => entry([tokens], { depth: 0, symbol }, caps);
|
|
140
|
+
function list(context, home) {
|
|
141
|
+
const rows = readTracked(home).map(withState);
|
|
142
|
+
if (context.json)
|
|
143
|
+
return json({ workspaces: rows });
|
|
144
|
+
const { caps } = context;
|
|
145
|
+
if (rows.length === 0)
|
|
146
|
+
return human([
|
|
147
|
+
line([
|
|
148
|
+
...words('No workspaces tracked. Add one with:'),
|
|
149
|
+
atom('ia workspaces add <directory>,'),
|
|
150
|
+
...words('or find them with:'),
|
|
151
|
+
atom('ia workspaces find <folder>'),
|
|
152
|
+
], 'info', caps),
|
|
153
|
+
]);
|
|
154
|
+
return human([
|
|
155
|
+
[sectionLabel('Tracked workspaces', caps), ...table(terminalSafe(rows), caps)],
|
|
156
|
+
line(words(listSummary(rows)), rows.every((row) => row.state === 'present') ? 'success' : 'warning', caps),
|
|
157
|
+
]);
|
|
158
|
+
}
|
|
159
|
+
/** `list`'s closing count: every row is one of present, missing or unreadable, and the last is named only when seen. */
|
|
160
|
+
export function listSummary(rows) {
|
|
161
|
+
const count = (state) => rows.filter((row) => row.state === state).length;
|
|
162
|
+
const unreadable = count('unreadable');
|
|
163
|
+
return `${rows.length} tracked: ${count('present')} present, ${count('missing')} missing${unreadable === 0 ? '' : `, ${unreadable} unreadable`}.`;
|
|
164
|
+
}
|
|
165
|
+
async function add(context, home, directory) {
|
|
166
|
+
const { args, host, caps } = context;
|
|
167
|
+
const root = directory === undefined ? discoverRoot(host.cwd, home) : resolve(host.cwd, directory);
|
|
168
|
+
if (root === undefined)
|
|
169
|
+
throw new Refusal('IA-DB-ROOT-INVALID', `No workspace (.ia/src) holds ${host.cwd}`, 3, null, 'Run "ia workspaces add <directory>" naming the workspace to track.');
|
|
170
|
+
const { status, row: tracked } = await trackWorkspace(home, { root, id: args.value('id'), label: args.value('label') }, new Date(), { signal: host.signal });
|
|
171
|
+
if (context.json)
|
|
172
|
+
return json({ status, workspace: withState(tracked) });
|
|
173
|
+
const row = terminalSafe(tracked);
|
|
174
|
+
return human([
|
|
175
|
+
status === 'added'
|
|
176
|
+
? line([...words(`Tracked ${row.id} at`), atom(`${row.root}.`)], 'success', caps)
|
|
177
|
+
: line([atom(row.root, null, 0), ...words(`is already tracked as ${row.id}.`)], 'info', caps),
|
|
178
|
+
]);
|
|
179
|
+
}
|
|
180
|
+
async function find(context, home, folder) {
|
|
181
|
+
const { args, host, caps } = context;
|
|
182
|
+
const depth = args.integer('depth', FIND_DEPTH);
|
|
183
|
+
const given = resolve(host.cwd, folder);
|
|
184
|
+
const roots = findWorkspaces(given, { depth, iaHome: home });
|
|
185
|
+
// The folder as the walk read it, at its real path, or as given when it is a link the walk does not follow;
|
|
186
|
+
// findWorkspaces has refused one that is not a directory.
|
|
187
|
+
const walked = lstatSync(given).isSymbolicLink() ? given : realpathSync(given);
|
|
188
|
+
const tracked = readTracked(home);
|
|
189
|
+
const found = roots.map((root) => {
|
|
190
|
+
const row = trackedRow(tracked, root);
|
|
191
|
+
return { root, tracked: row !== undefined, id: row?.id ?? defaultTrackId(root) };
|
|
192
|
+
});
|
|
193
|
+
const untracked = found.filter((row) => !row.tracked);
|
|
194
|
+
// The roots --apply would refuse for their id; --apply refuses the first before it asks.
|
|
195
|
+
const clashes = idClashes(tracked, untracked);
|
|
196
|
+
const clashing = new Set(clashes.flatMap((clash) => (clash.queued ? [clash.root, clash.other] : [clash.root])));
|
|
197
|
+
if (args.flag('apply') && clashes.length > 0)
|
|
198
|
+
throw idTaken(home, clashes[0]);
|
|
199
|
+
let applied = false, added = [];
|
|
200
|
+
if (args.flag('apply')) {
|
|
201
|
+
const summary = document([
|
|
202
|
+
[
|
|
203
|
+
sectionLabel('Track', caps),
|
|
204
|
+
...untracked.flatMap((row) => line([atom(terminalText(row.id), null, 0), atom(terminalText(row.root), null, 2)], 'info', caps)),
|
|
205
|
+
],
|
|
206
|
+
]);
|
|
207
|
+
applied =
|
|
208
|
+
untracked.length === 0 ||
|
|
209
|
+
args.flag('yes') ||
|
|
210
|
+
(await confirm(host.interaction, summary, 'Track these workspaces? [y/N] '));
|
|
211
|
+
if (applied)
|
|
212
|
+
added = await trackWorkspaces(home, untracked.map((row) => row.root), new Date(), { signal: host.signal });
|
|
213
|
+
}
|
|
214
|
+
if (context.json)
|
|
215
|
+
return json({ folder: walked, found, applied, added: added.map((row) => row.id) });
|
|
216
|
+
if (found.length === 0)
|
|
217
|
+
return human([
|
|
218
|
+
line([...words('No workspaces found under'), atom(terminalText(walked)), ...words(`to depth ${depth}.`)], 'info', caps),
|
|
219
|
+
]);
|
|
220
|
+
const now = new Set(added.map((row) => row.id));
|
|
221
|
+
const rows = found.map((row) => ({
|
|
222
|
+
id: terminalText(row.id),
|
|
223
|
+
root: terminalText(row.root),
|
|
224
|
+
state: row.tracked || now.has(row.id) ? 'tracked' : clashing.has(row.root) ? 'clash' : 'new',
|
|
225
|
+
}));
|
|
226
|
+
const pending = rows.filter((row) => row.state !== 'tracked').length, folderPath = commandPath(walked);
|
|
227
|
+
return human([
|
|
228
|
+
[
|
|
229
|
+
sectionLabel(`Workspaces under ${middle(terminalText(walked), caps.width - 17, caps.ascii)}`, caps),
|
|
230
|
+
...table(rows, caps),
|
|
231
|
+
],
|
|
232
|
+
...clashes.map((clash) => {
|
|
233
|
+
const remedy = clashRemedy(clash), shownClash = terminalSafe(clash);
|
|
234
|
+
return line([
|
|
235
|
+
...(clash.queued
|
|
236
|
+
? [
|
|
237
|
+
...words(`Two found workspaces would both take the id ${shownClash.id}:`),
|
|
238
|
+
atom(shownClash.other),
|
|
239
|
+
...words('and'),
|
|
240
|
+
atom(`${shownClash.root}.`),
|
|
241
|
+
]
|
|
242
|
+
: [
|
|
243
|
+
...words(`The id ${shownClash.id} is already tracked for`),
|
|
244
|
+
atom(`${shownClash.other},`),
|
|
245
|
+
...words('so'),
|
|
246
|
+
atom(shownClash.root),
|
|
247
|
+
...words('needs another id.'),
|
|
248
|
+
]),
|
|
249
|
+
...words(remedy.before),
|
|
250
|
+
atom(`"${remedy.command}"`),
|
|
251
|
+
...words(remedy.after),
|
|
252
|
+
], 'warning', caps);
|
|
253
|
+
}),
|
|
254
|
+
added.length > 0
|
|
255
|
+
? line(words(`Tracked ${added.length} of ${found.length} found.`), 'success', caps)
|
|
256
|
+
: pending === 0
|
|
257
|
+
? line(words(`All ${found.length} found are tracked.`), 'success', caps)
|
|
258
|
+
: clashes.length > 0
|
|
259
|
+
? line(words(`${pending} of ${found.length} found ${pending === 1 ? 'is' : 'are'} not tracked.`), 'info', caps)
|
|
260
|
+
: line([
|
|
261
|
+
...words(`${pending} of ${found.length} found ${pending === 1 ? 'is' : 'are'} not tracked.`),
|
|
262
|
+
...(folderPath !== undefined
|
|
263
|
+
? [...words('Track them with'), atom(`"ia workspaces find ${folderPath} --apply".`)]
|
|
264
|
+
: [
|
|
265
|
+
...words('From that folder, run'),
|
|
266
|
+
atom('"ia workspaces find . --apply"'),
|
|
267
|
+
...words(`to track them; ${PATH_OMITTED}.`),
|
|
268
|
+
]),
|
|
269
|
+
], 'info', caps),
|
|
270
|
+
]);
|
|
271
|
+
}
|
|
272
|
+
async function remove(context, home, target) {
|
|
273
|
+
const removed = await untrackWorkspace(home, target, context.host.cwd, { signal: context.host.signal });
|
|
274
|
+
if (context.json)
|
|
275
|
+
return json({ removed: shown(removed) });
|
|
276
|
+
const shownRemoved = terminalSafe(removed);
|
|
277
|
+
return human([
|
|
278
|
+
line([
|
|
279
|
+
...words(`Untracked ${shownRemoved.id}`),
|
|
280
|
+
atom(`(${shownRemoved.root}).`),
|
|
281
|
+
...words('Nothing on disk was changed.'),
|
|
282
|
+
], 'success', context.caps),
|
|
283
|
+
]);
|
|
284
|
+
}
|
|
285
|
+
export async function runWorkspaces(context) {
|
|
286
|
+
const { args, host } = context;
|
|
287
|
+
const [action, target, extra] = args.positionals;
|
|
288
|
+
if (!ACTIONS.includes(action))
|
|
289
|
+
throw new UsageError('Workspaces action must be list, add, find or remove');
|
|
290
|
+
for (const [name, owner] of Object.entries(OWNED))
|
|
291
|
+
if (owner !== action && (args.flag(name) || args.value(name) !== undefined))
|
|
292
|
+
throw new UsageError(`--${name} applies only to ia workspaces ${owner}`);
|
|
293
|
+
if (extra !== undefined || (action === 'list' && target !== undefined))
|
|
294
|
+
throw new UsageError(`Unexpected argument ${extra ?? target}`);
|
|
295
|
+
if ((action === 'find' || action === 'remove') && target === undefined)
|
|
296
|
+
throw new UsageError(`Expected ${action === 'find' ? '<folder>' : '<id|directory>'}`);
|
|
297
|
+
// Arguments are judged before any state is read or a root discovered (§1.2), a malformed tracked file included.
|
|
298
|
+
if (action === 'add' && args.value('id') !== undefined)
|
|
299
|
+
checkTrackId(args.value('id'));
|
|
300
|
+
const home = iaHomeOf(host.env);
|
|
301
|
+
if (home === undefined)
|
|
302
|
+
throw new Refusal('IA-DIST-INPUT-INVALID', 'IA_HOME or IA_HOST_HOME is not an absolute path, so there is no IA home to keep the tracked list in', 3, null, 'Set IA_HOME to an absolute directory, or unset it to use ~/.ia; then run "ia workspaces list".');
|
|
303
|
+
try {
|
|
304
|
+
if (action === 'list')
|
|
305
|
+
return list(context, home);
|
|
306
|
+
if (action === 'add')
|
|
307
|
+
return await add(context, home, target);
|
|
308
|
+
if (action === 'find')
|
|
309
|
+
return await find(context, home, target);
|
|
310
|
+
return await remove(context, home, target);
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
// writeHomeFile refuses a home that holds src/ (host plugin distribution spec §3); name the move that repairs it.
|
|
314
|
+
if (!(error instanceof Refusal) && error.code === 'IA-DIST-PATH-UNSAFE')
|
|
315
|
+
throw new Refusal('IA-DIST-PATH-UNSAFE', error.message, 3, null, homeSrcRemedy(home, 'ia workspaces list'));
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=workspaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../src/workspaces.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,GACN,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,SAAS,EACT,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,OAA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MAAM,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9D,IAAI,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,MAAO,CAAC,CAAC;QACjE,OAAO,MAAM,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,MAAO,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kHAAkH;QAClH,IAAI,CAAC,CAAC,KAAK,YAAY,OAAO,CAAC,IAAK,KAA4B,CAAC,IAAI,KAAK,qBAAqB;YAC7F,MAAM,IAAI,OAAO,CACf,qBAAqB,EACpB,KAAe,CAAC,OAAO,EACxB,CAAC,EACD,IAAI,EACJ,aAAa,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAC1C,CAAC;QACJ,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inventarch/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"types": "./dist/main.d.ts",
|
|
@@ -11,15 +11,16 @@
|
|
|
11
11
|
"SPEC.md",
|
|
12
12
|
"LICENSE",
|
|
13
13
|
"NOTICE",
|
|
14
|
+
"THIRD_PARTY_NOTICES.txt",
|
|
14
15
|
"LANGUAGE.md"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@inventarch/kb": "3.
|
|
18
|
-
"@inventarch/distribution": "3.
|
|
19
|
-
"@inventarch/compliance": "3.
|
|
20
|
-
"@inventarch/workspace-runtime": "3.
|
|
21
|
-
"@inventarch/db": "3.
|
|
22
|
-
"@inventarch/runtime": "3.
|
|
18
|
+
"@inventarch/kb": "3.6.0",
|
|
19
|
+
"@inventarch/distribution": "3.6.0",
|
|
20
|
+
"@inventarch/compliance": "3.6.0",
|
|
21
|
+
"@inventarch/workspace-runtime": "3.6.0",
|
|
22
|
+
"@inventarch/db": "3.6.0",
|
|
23
|
+
"@inventarch/runtime": "3.6.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/node": "^22.19.0",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"vitest": "^4.1.12"
|
|
28
29
|
},
|
|
29
30
|
"bin": {
|
|
30
|
-
"ia": "./dist/
|
|
31
|
+
"ia": "./dist/bin.js"
|
|
31
32
|
},
|
|
32
33
|
"license": "Apache-2.0",
|
|
33
34
|
"exports": {
|