@detergent-software/atk 9.2.0-dev.3 → 9.2.0-dev.5

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +12 -12
  3. package/build/command-manifest.json +25 -3
  4. package/build/commands/diff.d.ts +3 -2
  5. package/build/commands/diff.d.ts.map +1 -1
  6. package/build/commands/diff.js +48 -13
  7. package/build/commands/diff.js.map +1 -1
  8. package/build/commands/install.d.ts +2 -2
  9. package/build/commands/install.d.ts.map +1 -1
  10. package/build/commands/install.js +198 -6
  11. package/build/commands/install.js.map +1 -1
  12. package/build/commands/uninstall.d.ts +2 -2
  13. package/build/commands/uninstall.d.ts.map +1 -1
  14. package/build/commands/uninstall.js +33 -11
  15. package/build/commands/uninstall.js.map +1 -1
  16. package/build/commands/update.d.ts +3 -2
  17. package/build/commands/update.d.ts.map +1 -1
  18. package/build/commands/update.js +270 -74
  19. package/build/commands/update.js.map +1 -1
  20. package/build/components/DiffView.d.ts +11 -5
  21. package/build/components/DiffView.d.ts.map +1 -1
  22. package/build/components/DiffView.js +7 -5
  23. package/build/components/DiffView.js.map +1 -1
  24. package/build/hooks/useUninstallState.d.ts +22 -2
  25. package/build/hooks/useUninstallState.d.ts.map +1 -1
  26. package/build/hooks/useUninstallState.js +152 -15
  27. package/build/hooks/useUninstallState.js.map +1 -1
  28. package/build/lib/diff-command.d.ts +27 -2
  29. package/build/lib/diff-command.d.ts.map +1 -1
  30. package/build/lib/diff-command.js +39 -7
  31. package/build/lib/diff-command.js.map +1 -1
  32. package/build/lib/uninstaller.d.ts +23 -3
  33. package/build/lib/uninstaller.d.ts.map +1 -1
  34. package/build/lib/uninstaller.js +71 -35
  35. package/build/lib/uninstaller.js.map +1 -1
  36. package/build/lib/updater.d.ts +3 -2
  37. package/build/lib/updater.d.ts.map +1 -1
  38. package/build/lib/updater.js +16 -3
  39. package/build/lib/updater.js.map +1 -1
  40. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [9.2.0-dev.5](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.2.0-dev.4&targetVersion=GTv9.2.0-dev.5) (2026-10-23)
2
+
3
+ ### Features
4
+
5
+ * **cli:** install several assets at once as one plan ([9f45771](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/9f45771cd13f2e9f62352c6ee7050afa3f3c2bb2))
6
+ * **cli:** uninstall several assets at once ([eeaf8e2](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/eeaf8e26db6619593264ae33183086aec94a9d3e))
7
+ * **cli:** update several assets at once and pick them with atk update -i ([ad76872](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/ad768721353fe5f6a466aa33807dcbdedd488f29))
8
+
9
+ ### Bug Fixes
10
+
11
+ * **cli:** agree the verb in the bundle refusal of several names ([7bb43aa](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/7bb43aaf6c0f6295e5b8253106ea76a68d0d45c0))
12
+ * **cli:** give atk update --interactive the short flag -I ([7ab8d77](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/7ab8d777eabd3a5e90e4dc5d13fd7c2054c64457))
13
+ * **cli:** review fixes for install, uninstall and update with several names ([4bdfa9c](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/4bdfa9c3560460af7b91e480f24a6ee9c28d57dc))
14
+
15
+ ## [9.2.0-dev.4](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.2.0-dev.3&targetVersion=GTv9.2.0-dev.4) (2026-10-23)
16
+
17
+ ### Features
18
+
19
+ * **cli:** compare atk diff with a chosen version or the locked one ([ef0e182](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/ef0e182764ae57223037c695dfeda286f66d95e7))
20
+
21
+ ### Bug Fixes
22
+
23
+ * **cli:** keep atk diff's latest wording and outdated colour ([95894f7](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/95894f7cddd0f1dbfab06fea1494055147609035))
24
+ * **cli:** say when atk diff --installed finds its version unpublished ([7aed9ae](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/7aed9ae6d42afc32dedc12bddcf55952c1801a1c))
25
+
1
26
  ## [9.2.0-dev.3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.2.0-dev.2&targetVersion=GTv9.2.0-dev.3) (2026-10-23)
2
27
 
3
28
  ### Features
package/README.md CHANGED
@@ -77,7 +77,7 @@ atk update
77
77
  | `atk checkout <name>` | Fetch a writable working copy of a registry asset for updating |
78
78
  | `atk config` | Manage user configuration (`~/.atkrc.json`) |
79
79
  | `atk deprecate <name>` | Deprecate an asset or bundle (or `--undo`) via PR, no new version |
80
- | `atk diff <asset>` | Show changes between installed and latest versions |
80
+ | `atk diff <asset>` | Show changes against the latest, `@<version>` or `--installed` |
81
81
  | `atk doctor` | Run environment diagnostics |
82
82
  | `atk info <asset>` | Show asset details, what depends on it and the bundles with it |
83
83
  | `atk init` | Scaffold a new asset or bundle |
@@ -109,20 +109,20 @@ A short flag means the same long flag on every command that takes it, and a long
109
109
 
110
110
  | Short | Long | Short | Long |
111
111
  | ----- | ------------------------------------ | ----- | ----------------------------------------------------- |
112
- | `-a` | `--all` | `-O` | `--offline` (`init`) |
113
- | `-b` | `--bundle` | `-o` | `--org` |
114
- | `-C` | `--context` | `-P` | `--project-root` |
115
- | `-d` | `--description` (`init`, `register`) | `-p` | `--pin` |
116
- | `-e` | `--entrypoint` | `-R` | `--reset` |
117
- | `-F` | `--from` | `-r` | `--refresh` |
118
- | `-f` | `--force` | `-s` | `--sort` |
119
- | `-g` | `--tag` | `-T` | `--tool` |
120
- | `-h` | `--help` | `-t` | `--type` |
112
+ | `-a` | `--all` | `-n` | `--dry-run` |
113
+ | `-b` | `--bundle` | `-O` | `--offline` (`init`) |
114
+ | `-C` | `--context` | `-o` | `--org` |
115
+ | `-d` | `--description` (`init`, `register`) | `-P` | `--project-root` |
116
+ | `-e` | `--entrypoint` | `-p` | `--pin` |
117
+ | `-F` | `--from` | `-R` | `--reset` |
118
+ | `-f` | `--force` | `-r` | `--refresh` |
119
+ | `-g` | `--tag` | `-s` | `--sort` |
120
+ | `-h` | `--help` | `-T` | `--tool` |
121
+ | `-I` | `--interactive` (`update`) | `-t` | `--type` |
121
122
  | `-i` | `--from-installed` | `-u` | `--update` |
122
123
  | `-j` | `--json` | `-V` | `--version`, an asset's (`checkout`, `drift`, `info`) |
123
124
  | `-l` | `--limit` | `-v` | `--version`, the CLI's |
124
125
  | `-m` | `--message` | `-y` | `--yes` |
125
- | `-n` | `--dry-run` | | |
126
126
 
127
127
  CLI 9.0.0 changed the letters that meant two things. `-n` became `--dry-run` on `publish`, `unpublish`, `promote` and `deprecate`. Their old `-d` is now an unknown option on all four, so an old dry run fails rather than running for real. `--name` (`init`, `register`, `drift`), `--author` (`init`, `register`), `deprecate --reason`, `info --full`, `info --verbose` and `release-notes --prerelease` lost their short flags. `move` gained `-n` and `setup` gained `-j`.
128
128
 
@@ -138,7 +138,7 @@ These fail a build when they find something (CLI 9.2.0+):
138
138
 
139
139
  - `atk sync --check` exits 1 when the installed files don't match the lockfile: a file or config entry missing or changed, a local edit (which `atk sync` keeps but the check doesn't), a hook copy sync would remove because its locked version doesn't declare the tool, or an asset sync would refuse. Frozen assets and assets uninstalled for a tool pass, except such a hook copy left on disk. It changes nothing. Add `--user` to check the user scope. It can't be combined with `--force`.
140
140
  - `atk outdated --exit-code` exits 1 when an installed asset has an update. A pin that doesn't match the installed version doesn't count.
141
- - `atk diff <asset> --exit-code` exits 1 when the installed files differ from the latest version's. A newer version with the same files exits 0.
141
+ - `atk diff <asset> --exit-code` exits 1 when the installed files differ from the latest version's. A newer version with the same files exits 0. `atk diff <asset>@<version>` compares with that version instead, and `--installed` with the version the lockfile records, so `atk diff <asset> --installed --exit-code` fails only on local edits.
142
142
  - `atk drift [path] --exit-code` exits 1 when a local asset folder differs from its published version.
143
143
 
144
144
  `atk audit` exits 1 on a checksum failure, as before. Without these flags, the commands exit 0 when they find something. An error is still exit 1 (with `--json`, `"outcome": "error"`), and a usage error is exit 2. All four call the ATK API, so give them a token. A CI checkout has no `.atkrc.json` (it is gitignored), so name the tool with `--tool`:
@@ -224,11 +224,11 @@
224
224
  "name": "diff",
225
225
  "args": [
226
226
  {
227
- "description": "Asset name (supports @org/name syntax)",
227
+ "description": "Asset name (supports name@version and @org/name syntax)",
228
228
  "name": "<name>"
229
229
  }
230
230
  ],
231
- "description": "Show changes between installed and latest version",
231
+ "description": "Show changes between installed files and the latest or a chosen version",
232
232
  "file": "diff.js",
233
233
  "options": [
234
234
  {
@@ -239,7 +239,12 @@
239
239
  },
240
240
  {
241
241
  "flags": "--exit-code",
242
- "description": "Exit 1 when the installed files differ from the latest version's (for CI)",
242
+ "description": "Exit 1 when the installed files differ from the compared version's (for CI)",
243
+ "defaultValue": false
244
+ },
245
+ {
246
+ "flags": "--installed",
247
+ "description": "Compare with the version the lockfile records, which shows only local edits",
243
248
  "defaultValue": false
244
249
  },
245
250
  {
@@ -508,6 +513,10 @@
508
513
  {
509
514
  "description": "Asset, bundle, or org scope to install (supports name@version and @org)",
510
515
  "name": "[target]"
516
+ },
517
+ {
518
+ "description": "More assets to install with the first, as one plan (name@version and @org/name)",
519
+ "name": "[targets...]"
511
520
  }
512
521
  ],
513
522
  "description": "Install an asset or bundle (no args syncs from lockfile)",
@@ -1320,6 +1329,10 @@
1320
1329
  {
1321
1330
  "description": "Asset or bundle name to uninstall",
1322
1331
  "name": "<name>"
1332
+ },
1333
+ {
1334
+ "description": "More assets to uninstall with the first",
1335
+ "name": "[names...]"
1323
1336
  }
1324
1337
  ],
1325
1338
  "description": "Uninstall an asset or bundle",
@@ -1479,6 +1492,10 @@
1479
1492
  {
1480
1493
  "description": "Asset name (updates all if omitted, supports name@version syntax)",
1481
1494
  "name": "[name]"
1495
+ },
1496
+ {
1497
+ "description": "More assets to update to their latest versions",
1498
+ "name": "[names...]"
1482
1499
  }
1483
1500
  ],
1484
1501
  "description": "Update installed assets",
@@ -1494,6 +1511,11 @@
1494
1511
  "description": "Override version pins on targeted assets, and overwrite local edits",
1495
1512
  "defaultValue": false
1496
1513
  },
1514
+ {
1515
+ "flags": "-I, --interactive",
1516
+ "description": "Pick the outdated assets to update from a list (needs an interactive terminal)",
1517
+ "defaultValue": false
1518
+ },
1497
1519
  {
1498
1520
  "flags": "-j, --json",
1499
1521
  "description": "Output raw JSON (for scripting and CI)",
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const description = "Show changes between installed and latest version";
2
+ export declare const description = "Show changes between installed files and the latest or a chosen version";
3
3
  export declare const options: z.ZodObject<{
4
4
  context: z.ZodDefault<z.ZodNumber>;
5
5
  exitCode: z.ZodOptional<z.ZodBoolean>;
6
+ installed: z.ZodOptional<z.ZodBoolean>;
6
7
  json: z.ZodDefault<z.ZodBoolean>;
7
8
  org: z.ZodOptional<z.ZodString>;
8
9
  projectRoot: z.ZodOptional<z.ZodString>;
@@ -15,6 +16,6 @@ type Props = {
15
16
  args: z.infer<typeof args>;
16
17
  options: z.infer<typeof options>;
17
18
  };
18
- export default function Diff({ args: [rawName], options: { context, exitCode, json, org: cliOrg, projectRoot, refresh, tool, user }, }: Props): import("react").JSX.Element;
19
+ export default function Diff({ args: [rawName], options: { context, exitCode, installed, json, org: cliOrg, projectRoot, refresh, tool, user }, }: Props): import("react").JSX.Element;
19
20
  export {};
20
21
  //# sourceMappingURL=diff.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/comm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AE,IAAI,EAAE,GAC/F,EAAE,KAAK,+BAwHP"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text } from 'ink';
2
+ import { Box, Text } from 'ink';
3
3
  import { z } from 'zod';
4
4
  import { DiffView, ErrorView, Spinner } from '../components/index.js';
5
5
  import { useCommand } from '../hooks/useCommand.js';
@@ -7,7 +7,10 @@ import { computeDiffOutcome } from '../lib/diff-command.js';
7
7
  import { parseOrgFromName } from '../lib/org.js';
8
8
  import { renderJson, useNonInteractive } from '../lib/output.js';
9
9
  import { argument, option } from '../lib/pastel/index.js';
10
- export const description = 'Show changes between installed and latest version';
10
+ import { scopedCommand } from '../lib/scope.js';
11
+ import { reportUsageError } from '../lib/usage-error.js';
12
+ import { parseNameVersion } from '../lib/version.js';
13
+ export const description = 'Show changes between installed files and the latest or a chosen version';
11
14
  export const options = z.object({
12
15
  context: z
13
16
  .number()
@@ -20,7 +23,13 @@ export const options = z.object({
20
23
  .boolean()
21
24
  .optional()
22
25
  .describe(option({
23
- description: "Exit 1 when the installed files differ from the latest version's (for CI)",
26
+ description: "Exit 1 when the installed files differ from the compared version's (for CI)",
27
+ })),
28
+ installed: z
29
+ .boolean()
30
+ .optional()
31
+ .describe(option({
32
+ description: 'Compare with the version the lockfile records, which shows only local edits',
24
33
  })),
25
34
  json: z
26
35
  .boolean()
@@ -65,13 +74,27 @@ export const options = z.object({
65
74
  })),
66
75
  });
67
76
  export const args = z.tuple([
68
- z.string().describe(argument({ description: 'Asset name (supports @org/name syntax)', name: 'name' })),
77
+ z
78
+ .string()
79
+ .describe(argument({ description: 'Asset name (supports name@version and @org/name syntax)', name: 'name' })),
69
80
  ]);
70
- export default function Diff({ args: [rawName], options: { context, exitCode, json, org: cliOrg, projectRoot, refresh, tool, user }, }) {
71
- const { name: nameFromOrg, org: inlineOrg } = parseOrgFromName(rawName);
72
- const name = inlineOrg ? nameFromOrg : rawName;
81
+ export default function Diff({ args: [rawName], options: { context, exitCode, installed, json, org: cliOrg, projectRoot, refresh, tool, user }, }) {
82
+ // The version first, so `@org/name@1.2.0` parses as info and install parse it.
83
+ const { name: parsedName, version } = parseNameVersion(rawName);
84
+ const { name: nameFromOrg, org: inlineOrg } = parseOrgFromName(parsedName);
85
+ const name = inlineOrg ? nameFromOrg : parsedName;
73
86
  const { json: effectiveJson } = useNonInteractive(json);
74
- const state = useCommand(async (progress) => computeDiffOutcome(name, undefined, tool, context, refresh, projectRoot, user, cliOrg, inlineOrg, progress), [cliOrg, context, inlineOrg, name, projectRoot, refresh, tool, user]);
87
+ const state = useCommand(async (progress) => {
88
+ if (version && installed) {
89
+ reportUsageError(`error: ${name}@${version} and --installed contradict each other: --installed compares with the locked version`, effectiveJson);
90
+ }
91
+ const target = installed
92
+ ? { kind: 'installed' }
93
+ : version
94
+ ? { kind: 'version', version }
95
+ : { kind: 'latest' };
96
+ return computeDiffOutcome(name, target, undefined, tool, context, refresh, projectRoot, user, cliOrg, inlineOrg, progress);
97
+ }, [cliOrg, context, effectiveJson, inlineOrg, installed, name, projectRoot, refresh, tool, user, version]);
75
98
  if (state.status === 'loading') {
76
99
  return _jsx(Spinner, { message: state.message });
77
100
  }
@@ -88,9 +111,9 @@ export default function Diff({ args: [rawName], options: { context, exitCode, js
88
111
  return _jsx(ErrorView, { command: state.command, hint: state.hint, message: state.message });
89
112
  }
90
113
  const { data } = state;
91
- // Nothing to compare: the asset isn't installed, or the registry doesn't have it. With
92
- // --exit-code, files that differ fail too; a new version with the same files doesn't.
93
- if (data.outcome === 'not-installed' || data.outcome === 'not-in-registry' || (exitCode && hasChanges(data))) {
114
+ // Nothing to compare: the asset isn't installed, or the registry doesn't have it or the version.
115
+ // With --exit-code, files that differ fail too; a new version with the same files doesn't.
116
+ if (data.outcome !== 'results' || (exitCode && hasChanges(data))) {
94
117
  process.exitCode = 1;
95
118
  }
96
119
  if (effectiveJson) {
@@ -102,12 +125,23 @@ export default function Diff({ args: [rawName], options: { context, exitCode, js
102
125
  if (data.outcome === 'not-in-registry') {
103
126
  return (_jsxs(Text, { children: [_jsx(Text, { color: 'yellow', children: "!" }), " ", _jsx(Text, { bold: true, children: data.name }), " was not found in the registry."] }));
104
127
  }
105
- return (_jsx(DiffView, { diffs: data.diffs, installedVersion: data.installed.version, latestVersion: data.latestVersion, name: data.name, sameVersion: data.sameVersion, scope: data.scope }));
128
+ if (data.outcome === 'version-not-found') {
129
+ return (_jsxs(Box, { flexDirection: 'column', children: [data.target === 'installed' ? (_jsxs(Text, { children: [_jsx(Text, { color: 'yellow', children: "!" }), " The installed version ", _jsxs(Text, { bold: true, children: ["\"", data.version, "\""] }), " of", ' ', _jsxs(Text, { bold: true, children: ["\"", data.name, "\""] }), " is no longer in the registry, so there is nothing to compare with."] })) : (_jsxs(Text, { children: [_jsx(Text, { color: 'yellow', children: "!" }), " Version ", _jsxs(Text, { bold: true, children: ["\"", data.version, "\""] }), " of ", _jsxs(Text, { bold: true, children: ["\"", data.name, "\""] }), ' ', "not found."] })), data.availableVersions.length > 0 && (_jsxs(Text, { dimColor: true, children: ["Available versions: ", data.availableVersions.join(', ')] })), data.target === 'installed' && (_jsxs(Text, { dimColor: true, children: ["Run ", _jsx(Text, { bold: true, children: scopedCommand(`atk update ${data.name}`, data.scope) }), " to move to the latest version."] }))] }));
130
+ }
131
+ return (_jsx(DiffView, { comparedVersion: data.comparedVersion, diffs: data.diffs, installedVersion: data.installed.version, latestVersion: data.latestVersion, name: data.name, sameVersion: data.sameVersion, scope: data.scope, target: data.target }));
106
132
  }
107
133
  function buildJsonOutput(data) {
108
134
  if (data.outcome === 'not-installed' || data.outcome === 'not-in-registry') {
109
135
  return { name: data.name, outcome: data.outcome };
110
136
  }
137
+ if (data.outcome === 'version-not-found') {
138
+ return {
139
+ availableVersions: data.availableVersions,
140
+ name: data.name,
141
+ outcome: data.outcome,
142
+ version: data.version,
143
+ };
144
+ }
111
145
  const diffs = data.diffs.map((d) => ({
112
146
  fileName: d.fileName,
113
147
  ...(d.localLines !== undefined ? { localLines: d.localLines } : {}),
@@ -115,6 +149,7 @@ function buildJsonOutput(data) {
115
149
  status: d.status,
116
150
  }));
117
151
  return {
152
+ comparedVersion: data.comparedVersion,
118
153
  diffs,
119
154
  hasChanges: hasChanges(data),
120
155
  installedVersion: data.installed.version,
@@ -124,7 +159,7 @@ function buildJsonOutput(data) {
124
159
  sameVersion: data.sameVersion,
125
160
  };
126
161
  }
127
- /** Whether any installed file differs from the latest version's. */
162
+ /** Whether any installed file differs from the compared version's. */
128
163
  function hasChanges(data) {
129
164
  return data.outcome === 'results' && data.diffs.some((d) => d.status !== 'unchanged');
130
165
  }
@@ -1 +1 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,MAAM,WAAW,GAAG,mDAAmD,CAAC;AAE/E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,OAAO,CAAC,CAAC,CAAC;SACV,QAAQ,CACP,MAAM,CAAC;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,4CAA4C;KAC1D,CAAC,CACH;IAC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11 @@ export declare const options: z.ZodObject<{
14
14
  user: z.ZodOptional<z.ZodBoolean>;
15
15
  yes: z.ZodDefault<z.ZodBoolean>;
16
16
  }, z.core.$strip>;
17
- export declare const args: z.ZodTuple<[z.ZodOptional<z.ZodString>], null>;
17
+ export declare const args: z.ZodTuple<[z.ZodOptional<z.ZodString>], z.ZodString>;
18
18
  type Props = {
19
19
  args: z.infer<typeof args>;
20
20
  options: z.infer<typeof options>;
21
21
  };
22
- export default function Install({ args: [rawName], options: { adopt, all, dryRun, force, json, org, pin, projectRoot, refresh, tool, user, yes }, }: Props): import("react").JSX.Element;
22
+ export default function Install({ args: [rawName, ...more], options: { adopt, all, dryRun, force, json, org, pin, projectRoot, refresh, tool, user, yes }, }: Props): import("react").JSX.Element;
23
23
  export {};
24
24
  //# sourceMappingURL=install.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmExB,eAAO,MAAM,WAAW,6DAA6D,CAAC;AAEtF,eAAO,MAAM,OAAO;;;;;;;;;;;;;iBA8GlB,CAAC;AAEH,eAAO,MAAM,IAAI,gDAUf,CAAC;AAqFH,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAI,EAAE,CAAC,OAAO,CAAC,EACf,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAC9F,EAAE,KAAK,+BAsCP"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmExB,eAAO,MAAM,WAAW,6DAA6D,CAAC;AAEtF,eAAO,MAAM,OAAO;;;;;;;;;;;;;iBA8GlB,CAAC;AAEH,eAAO,MAAM,IAAI,uDAmBd,CAAC;AAmGJ,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EACxB,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAC9F,EAAE,KAAK,+BAuDP"}
@@ -108,7 +108,8 @@ export const options = z.object({
108
108
  description: 'Alias for --all: install every asset from an org scope without prompting',
109
109
  })),
110
110
  });
111
- export const args = z.tuple([
111
+ export const args = z
112
+ .tuple([
112
113
  z
113
114
  .string()
114
115
  .optional()
@@ -116,12 +117,19 @@ export const args = z.tuple([
116
117
  description: 'Asset, bundle, or org scope to install (supports name@version and @org)',
117
118
  name: 'target',
118
119
  })),
119
- ]);
120
- export default function Install({ args: [rawName], options: { adopt, all, dryRun, force, json, org, pin, projectRoot, refresh, tool, user, yes }, }) {
120
+ ])
121
+ .rest(z.string().describe(argument({
122
+ description: 'More assets to install with the first, as one plan (name@version and @org/name)',
123
+ name: 'targets',
124
+ })));
125
+ export default function Install({ args: [rawName, ...more], options: { adopt, all, dryRun, force, json, org, pin, projectRoot, refresh, tool, user, yes }, }) {
121
126
  // No argument provided — delegate to sync behavior
122
127
  if (!rawName) {
123
128
  return _jsx(Sync, { options: { dryRun, force, json, projectRoot, refresh, tool, user } });
124
129
  }
130
+ if (more.length > 0) {
131
+ return (_jsx(InstallAssets, { adopt: adopt, dryRun: dryRun, force: force, json: json, org: org, pin: pin, projectRoot: projectRoot, specs: [rawName, ...more], tool: tool, user: user }));
132
+ }
125
133
  if (isBareOrgScope(rawName)) {
126
134
  const orgName = rawName.slice(1);
127
135
  return (_jsx(InstallOrg, { cliOrg: org, dryRun: dryRun, force: force, json: json, orgName: orgName, pin: pin, projectRoot: projectRoot, skipPicker: all || yes, tool: tool, user: user }));
@@ -502,16 +510,187 @@ function InstallAsset({ adopt, dryRun, force, json, org: cliOrg, pin, projectRoo
502
510
  return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { color: 'green', children: ["\u2713 ", _jsx(Text, { bold: true, children: data.name }), " (v", data.version, ") is now a direct install", where, "."] }), _jsx(Text, { dimColor: true, children: "It will no longer be auto-removed when its parent is uninstalled." })] }));
503
511
  }
504
512
  if (data.outcome === 'dry-run-install') {
505
- return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: data.plan.totalCount, tools: data.tools, where: label }), _jsx(Text, { children: " " }), data.plan.entries.map((entry) => (_jsxs(Text, { children: [' ', entry.reason === 'dependency' ? (_jsxs(Text, { color: 'cyan', children: [formatOrgName(entry.asset.org, entry.asset.name), ' ', _jsxs(Text, { dimColor: true, children: ["(", entry.asset.type, ") v", entry.version, " \u2014 dependency"] })] })) : (_jsxs(Text, { children: [_jsx(Text, { bold: true, children: formatOrgName(entry.asset.org, entry.asset.name) }), _jsxs(Text, { dimColor: true, children: [' ', "(", entry.asset.type, ") v", entry.version] })] }))] }, identityKey(entry.asset)))), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
513
+ return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: data.plan.totalCount, tools: data.tools, where: label }), _jsx(Text, { children: " " }), _jsx(PlanEntryLines, { plan: data.plan }), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
506
514
  }
507
515
  if (data.outcome === 'dry-run-bundle') {
508
- return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: data.plan.totalCount, tools: data.tools, where: label }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsxs(Text, { bold: true, color: 'magenta', children: ["Bundle: ", data.bundleName] }), _jsxs(Text, { dimColor: true, children: [" v", data.version] })] }), _jsx(Text, { children: " " }), data.plan.entries.map((entry) => (_jsxs(Text, { children: [' ', entry.reason === 'dependency' ? (_jsxs(Text, { color: 'cyan', children: [formatOrgName(entry.asset.org, entry.asset.name), ' ', _jsxs(Text, { dimColor: true, children: ["(", entry.asset.type, ") v", entry.version, " \u2014 dependency"] })] })) : (_jsxs(Text, { children: [_jsx(Text, { bold: true, children: formatOrgName(entry.asset.org, entry.asset.name) }), _jsxs(Text, { dimColor: true, children: [' ', "(", entry.asset.type, ") v", entry.version] })] }))] }, identityKey(entry.asset)))), _jsx(BundleReportLines, { bundleName: data.bundleName, dryRun: true, report: data }), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
516
+ return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: data.plan.totalCount, tools: data.tools, where: label }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsxs(Text, { bold: true, color: 'magenta', children: ["Bundle: ", data.bundleName] }), _jsxs(Text, { dimColor: true, children: [" v", data.version] })] }), _jsx(Text, { children: " " }), _jsx(PlanEntryLines, { plan: data.plan }), _jsx(BundleReportLines, { bundleName: data.bundleName, dryRun: true, report: data }), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
509
517
  }
510
518
  if (data.outcome === 'deprecated') {
511
519
  return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { color: 'yellow', children: ["Warning: \"", data.name, "\" is deprecated \u2014 ", data.reason] }), data.replacement && (_jsxs(Text, { children: ["Consider using", ' ', _jsx(Text, { bold: true, color: 'cyan', children: data.replacement }), ' ', "instead."] })), _jsx(Text, { dimColor: true, children: "Use --force to install anyway." })] }));
512
520
  }
513
521
  return (_jsxs(Box, { flexDirection: 'column', children: [data.toolResults.map(({ results, skipped, tool: toolName, warnings }) => (_jsx(InstallSummary, { results: results, skipped: skipped, tools: [toolName], warnings: warnings, where: label }, toolName))), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
514
522
  }
523
+ /**
524
+ * `atk install a b@1.2.0 @org/c`: the named assets resolved together (shared dependencies once,
525
+ * one version per asset) and installed as one plan, so a failure rolls the whole run back, as an
526
+ * `@org` install does. Every name is checked before anything is written. A name already in place
527
+ * for every tool is left out of the plan, and one installed only as a dependency becomes direct
528
+ * once the install succeeds.
529
+ */
530
+ function InstallAssets({ adopt, dryRun, force, json, org: cliOrg, pin, projectRoot, specs, tool, user, }) {
531
+ const { json: effectiveJson } = useNonInteractive(json);
532
+ const { fields, resolve, resolved } = useResolvedScope({ projectRoot, user });
533
+ const state = useCommand(async (progress) => {
534
+ const flags = { dryRun, force, pin, projectRoot, tool, user };
535
+ if (adopt) {
536
+ throw new Error('--adopt records a bundle as the owner of its members, so it works with one bundle only.');
537
+ }
538
+ const orgScope = specs.find(isBareOrgScope);
539
+ if (orgScope) {
540
+ throw new ResolverError(`${orgScope} is an org scope, which installs on its own.`, {
541
+ command: installCommandFor(orgScope, flags),
542
+ });
543
+ }
544
+ const { root: projectDir, scope: installScope } = await resolve();
545
+ progress('Loading configuration...');
546
+ const config = await loadConfig();
547
+ const tools = await resolvePlacingTools(tool, projectDir);
548
+ const toolNames = tools.map((t) => t.tool);
549
+ progress('Fetching registry...');
550
+ const registry = await fetchRegistry({ force: true });
551
+ const currentLockfile = await readLockfile(projectDir);
552
+ // Every name is checked before anything is resolved or written.
553
+ // Each bundle as typed, and the spec that installs it (another scope's, when only that has it).
554
+ const bundles = [];
555
+ const deprecated = [];
556
+ const requests = [];
557
+ for (const spec of specs) {
558
+ const { name: parsedName, version } = parseNameVersion(spec);
559
+ const { name: nameFromOrg, org: inlineOrg } = parseBundleSpec(parsedName);
560
+ const name = inlineOrg ? nameFromOrg : parsedName;
561
+ const org = resolveActiveOrg(inlineOrg ?? cliOrg, currentLockfile.org, config.org);
562
+ const asset = findAsset(registry, name, undefined, undefined, org)?.asset;
563
+ const bundle = findBundle(registry, name, inlineOrg) ??
564
+ (asset ? undefined : (registry.bundles ?? []).find((b) => b.name === name));
565
+ if (bundle) {
566
+ bundles.push({ install: formatOrgName(bundle.org, bundle.name) + (version ? `@${version}` : ''), spec });
567
+ continue;
568
+ }
569
+ const deprecation = isDeprecated(registry, name, asset?.type, asset ? asset.org : inlineOrg);
570
+ if (deprecation.deprecated && !force) {
571
+ deprecated.push(`"${name}" (${deprecation.reason}${deprecation.replacement ? `; use ${deprecation.replacement}` : ''})`);
572
+ }
573
+ requests.push({ name, ...(org ? { org } : {}), spec, ...(version ? { version } : {}) });
574
+ }
575
+ if (bundles.length > 0) {
576
+ throw new ResolverError(bundles.length === 1
577
+ ? `${bundles[0].spec} is a bundle, which installs on its own.`
578
+ : `${bundles.map((b) => b.spec).join(', ')} are bundles, which install on their own.`, { command: installCommandFor(bundles[0].install, flags) });
579
+ }
580
+ if (deprecated.length > 0) {
581
+ throw new ResolverError(`Deprecated: ${deprecated.join(', ')}. Nothing was installed.`, {
582
+ hint: 'Use --force to install them anyway.',
583
+ });
584
+ }
585
+ // A name every targeted tool already has in place is left out of the plan, as it is for one name.
586
+ const assets = [];
587
+ const upgrades = [];
588
+ const toInstall = [];
589
+ for (const request of requests) {
590
+ const match = findAsset(registry, request.name, undefined, request.version, request.org);
591
+ const existing = match
592
+ ? findInstalledAsset(currentLockfile, request.name, match.asset.type, match.asset.org)
593
+ : undefined;
594
+ const supportingTools = existing && match ? tools.filter((t) => placesAsset(t.adapter, existing.type, match.versionData.tools)) : [];
595
+ const inPlace = !force &&
596
+ existing !== undefined &&
597
+ supportingTools.length > 0 &&
598
+ supportingTools.every((t) => isInstalledForTool(existing, t.adapter, projectDir)) &&
599
+ (!request.version || request.version === existing.version);
600
+ if (!inPlace) {
601
+ toInstall.push(request);
602
+ continue;
603
+ }
604
+ if (assets.some((a) => identityKey(a) === identityKey(existing)))
605
+ continue;
606
+ const dependency = (existing.installReason ?? 'direct') === 'dependency';
607
+ if (dependency)
608
+ upgrades.push(existing);
609
+ assets.push({
610
+ name: existing.name,
611
+ ...(existing.org ? { org: existing.org } : {}),
612
+ outcome: dependency ? 'upgraded-to-direct' : 'already-installed',
613
+ type: existing.type,
614
+ version: existing.version,
615
+ });
616
+ }
617
+ progress('Resolving dependencies...');
618
+ const plan = resolveMultipleInstallPlans(registry, toInstall.map(({ name, org, version }) => ({ name, ...(org ? { org } : {}), ...(version ? { version } : {}) })));
619
+ const installed = plan.entries
620
+ .filter((entry) => entry.reason === 'direct')
621
+ .map((entry) => ({
622
+ name: entry.asset.name,
623
+ ...(entry.asset.org ? { org: entry.asset.org } : {}),
624
+ outcome: 'installed',
625
+ type: entry.asset.type,
626
+ version: entry.version,
627
+ }));
628
+ const report = [...installed, ...assets];
629
+ const crossScope = (resolvedPlan, installedAt) => crossScopeOf(resolvedPlan, { installedAt, json: effectiveJson, scope: installScope, tools: toolNames });
630
+ // A dry run says so even when every name is in place, and writes nothing (not even an upgrade).
631
+ if (dryRun) {
632
+ return {
633
+ assets: report,
634
+ outcome: 'dry-run-install',
635
+ plan: withoutKeptDependencies(plan, currentLockfile, tools, {
636
+ onProgress: progress,
637
+ projectDir,
638
+ scope: installScope,
639
+ }),
640
+ tools: toolNames,
641
+ ...(await crossScope(plan)),
642
+ };
643
+ }
644
+ return await withLockfileErrorHandling(projectDir, async () => {
645
+ const toolResults = plan.entries.length > 0
646
+ ? await executeInstallPlanForTools(plan, tools, {
647
+ force,
648
+ onProgress: progress,
649
+ onTool: (toolName) => progress(`Installing for ${toolName}...`),
650
+ pin,
651
+ projectDir,
652
+ scope: installScope,
653
+ })
654
+ : [];
655
+ // After the install, so a failed one leaves even the install reasons as they were.
656
+ if (upgrades.length > 0) {
657
+ let lockfile = await readLockfile(projectDir);
658
+ for (const { name, org, type } of upgrades)
659
+ lockfile = upgradeToDirectInstall(lockfile, name, type, org);
660
+ await writeLockfile(projectDir, lockfile);
661
+ }
662
+ if (plan.entries.length === 0)
663
+ return { assets: report, outcome: 'already-installed' };
664
+ return { assets: report, outcome: 'installed', toolResults, ...(await crossScope(plan, projectDir)) };
665
+ });
666
+ }, [adopt, cliOrg, dryRun, force, pin, specs.join(' '), tool]);
667
+ if (state.status === 'loading') {
668
+ return _jsx(Spinner, { message: state.message });
669
+ }
670
+ if (state.status === 'error') {
671
+ if (effectiveJson) {
672
+ return renderJson({
673
+ ...(state.code ? { code: state.code } : {}),
674
+ ...(state.command ? { command: state.command } : {}),
675
+ ...(state.hint ? { hint: state.hint } : {}),
676
+ message: state.message,
677
+ outcome: 'error',
678
+ ...fields,
679
+ });
680
+ }
681
+ return _jsx(ErrorView, { command: state.command, hint: state.hint, message: state.message });
682
+ }
683
+ const { data } = state;
684
+ const label = resolved && scopeLabel(resolved);
685
+ if (effectiveJson) {
686
+ return renderJson({ ...data, ...fields });
687
+ }
688
+ if (data.outcome === 'dry-run-install') {
689
+ return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: data.plan.totalCount, tools: data.tools, where: label }), _jsx(Text, { children: " " }), _jsx(PlanEntryLines, { plan: data.plan }), _jsx(NamedAssetLines, { assets: data.assets, dryRun: true, where: label }), _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
690
+ }
691
+ return (_jsxs(Box, { flexDirection: 'column', children: [data.outcome === 'installed' &&
692
+ data.toolResults.map(({ results, skipped, tool: toolName, warnings }) => (_jsx(InstallSummary, { results: results, skipped: skipped, tools: [toolName], warnings: warnings, where: label }, toolName))), _jsx(NamedAssetLines, { assets: data.assets, where: label }), data.outcome === 'installed' && _jsx(CrossScopeWarning, { installs: data.crossScope ?? [] })] }));
693
+ }
515
694
  /** `atk install <spec>` with the run's own flags, for a command an error suggests. */
516
695
  function installCommandFor(spec, { adopt, dryRun, force, pin, projectRoot, tool, user }) {
517
696
  return [
@@ -758,7 +937,7 @@ function InstallOrg({ cliOrg, dryRun, force, json, orgName, pin, projectRoot, sk
758
937
  ...fields,
759
938
  });
760
939
  }
761
- return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: state.plan.totalCount, tools: state.tools, where: label }), _jsx(Text, { children: " " }), _jsx(Text, { children: _jsxs(Text, { bold: true, color: 'magenta', children: ["Org: @", orgName] }) }), _jsx(Text, { children: " " }), state.plan.entries.map((entry) => (_jsxs(Text, { children: [' ', entry.reason === 'dependency' ? (_jsxs(Text, { color: 'cyan', children: [formatOrgName(entry.asset.org, entry.asset.name), ' ', _jsxs(Text, { dimColor: true, children: ["(", entry.asset.type, ") v", entry.version, " \u2014 dependency"] })] })) : (_jsxs(Text, { children: [_jsx(Text, { bold: true, children: formatOrgName(entry.asset.org, entry.asset.name) }), _jsxs(Text, { dimColor: true, children: [' ', "(", entry.asset.type, ") v", entry.version] })] }))] }, identityKey(entry.asset)))), _jsx(CrossScopeWarning, { installs: state.crossScope ?? [] })] }));
940
+ return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DryRunBanner, { action: 'install', count: state.plan.totalCount, tools: state.tools, where: label }), _jsx(Text, { children: " " }), _jsx(Text, { children: _jsxs(Text, { bold: true, color: 'magenta', children: ["Org: @", orgName] }) }), _jsx(Text, { children: " " }), _jsx(PlanEntryLines, { plan: state.plan }), _jsx(CrossScopeWarning, { installs: state.crossScope ?? [] })] }));
762
941
  }
763
942
  if (state.phase === 'done') {
764
943
  if (effectiveJson) {
@@ -798,4 +977,17 @@ function membersOutsideBundle(lockfile, members, bundle) {
798
977
  return [{ ...(origin ? { bundle: origin } : {}), ...member }];
799
978
  });
800
979
  }
980
+ /** The names a run of several left out of its plan: already installed, or made a direct install. */
981
+ function NamedAssetLines({ assets, dryRun = false, where, }) {
982
+ const inScope = where ? ` in ${where}` : '';
983
+ return (_jsx(_Fragment, { children: assets
984
+ .filter((a) => a.outcome !== 'installed')
985
+ .map((a) => (_jsxs(Text, { children: [a.outcome === 'upgraded-to-direct' ? _jsx(Text, { color: 'green', children: "\u2713" }) : _jsx(Text, { color: 'yellow', children: "!" }), ' ', _jsx(Text, { bold: true, children: formatOrgName(a.org, a.name) }), " (v", a.version, ")", ' ', a.outcome === 'upgraded-to-direct'
986
+ ? `${dryRun ? 'would become' : 'is now'} a direct install${inScope}.`
987
+ : `is already installed${inScope}.`] }, identityKey(a)))) }));
988
+ }
989
+ /** A plan's entries, each with its type and version, its dependencies marked. */
990
+ function PlanEntryLines({ plan }) {
991
+ return (_jsx(_Fragment, { children: plan.entries.map((entry) => (_jsxs(Text, { children: [' ', entry.reason === 'dependency' ? (_jsxs(Text, { color: 'cyan', children: [formatOrgName(entry.asset.org, entry.asset.name), ' ', _jsxs(Text, { dimColor: true, children: ["(", entry.asset.type, ") v", entry.version, " \u2014 dependency"] })] })) : (_jsxs(Text, { children: [_jsx(Text, { bold: true, children: formatOrgName(entry.asset.org, entry.asset.name) }), _jsxs(Text, { dimColor: true, children: [' ', "(", entry.asset.type, ") v", entry.version] })] }))] }, identityKey(entry.asset)))) }));
992
+ }
801
993
  //# sourceMappingURL=install.js.map