@astryxdesign/cli 0.7.2-canary.4932317 → 0.7.2-canary.4a2f608

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 (109) hide show
  1. package/README.md +62 -62
  2. package/api/discover/_adapter.d.mts +119 -12
  3. package/api/discover/_adapter.mjs +449 -10
  4. package/api/discover/_adapter.test.mjs +599 -17
  5. package/api/discover/_catalog-view.d.mts +16 -5
  6. package/api/discover/_catalog-view.mjs +32 -8
  7. package/api/discover/discover.d.mts +11 -0
  8. package/api/discover/discover.doc.mjs +7 -6
  9. package/api/discover/discover.mjs +107 -19
  10. package/api/discover/discover.type.d.mts +18 -7
  11. package/api/discover/discover.type.mjs +15 -7
  12. package/api/discover/list/list.d.mts +4 -3
  13. package/api/discover/list/list.mjs +17 -10
  14. package/api/doctor/theme-checks.test.mjs +136 -0
  15. package/api/gap-report/gap-report.d.mts +3 -0
  16. package/api/gap-report/gap-report.doc.mjs +11 -3
  17. package/api/gap-report/gap-report.mjs +152 -48
  18. package/api/gap-report/gap-report.test.mjs +233 -0
  19. package/api/gap-report/gap-report.type.d.mts +41 -0
  20. package/api/gap-report/gap-report.type.mjs +18 -0
  21. package/api/integration/_adapter.d.mts +20 -0
  22. package/api/integration/_adapter.mjs +26 -0
  23. package/api/integration/authoring-checks.mjs +34 -3
  24. package/api/integration/authoring-checks.test.mjs +476 -0
  25. package/api/integration/authoring-checks.type.d.mts +86 -0
  26. package/api/integration/authoring-checks.type.mjs +39 -1
  27. package/api/integration/integrationComponentConflicts.doc.mjs +9 -3
  28. package/api/integration/integrationDocConflicts.doc.mjs +19 -5
  29. package/api/integration/pack-check.mjs +292 -7
  30. package/api/integration/pack-check.test.mjs +341 -0
  31. package/api/integration/validateIntegration.doc.mjs +3 -1
  32. package/api/search/search.d.mts +9 -7
  33. package/api/search/search.mjs +90 -42
  34. package/api/search/search.test.mjs +11 -0
  35. package/api/upgrade/_adapter.d.mts +40 -2
  36. package/api/upgrade/_adapter.mjs +117 -4
  37. package/api/upgrade/run/cli-behind-core.test.mjs +438 -0
  38. package/api/upgrade/run/run.mjs +30 -1
  39. package/api/upgrade/status/status.d.mts +21 -5
  40. package/api/upgrade/status/status.mjs +45 -8
  41. package/api/upgrade/upgrade.doc.mjs +5 -3
  42. package/api/upgrade/upgrade.type.d.mts +23 -0
  43. package/api/upgrade/upgrade.type.mjs +16 -1
  44. package/assets/codemods/runner.mjs +7 -1
  45. package/assets/discover/official-packages.json +367 -0
  46. package/assets/docs/author-a-theme.doc.mjs +2 -2
  47. package/assets/docs/browser-support.doc.mjs +1 -1
  48. package/assets/docs/styling-overview.doc.mjs +1 -1
  49. package/assets/docs/theme.doc.mjs +1 -1
  50. package/assets/docs/tree/add-a-topic.doc.mjs +1 -1
  51. package/assets/docs/tree/check-the-props.doc.mjs +2 -2
  52. package/assets/docs/tree/check-your-docs.doc.mjs +11 -3
  53. package/assets/docs/tree/checks.doc.mjs +4 -4
  54. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +25 -5
  55. package/assets/docs/tree/layout-spacing.doc.mjs +2 -3
  56. package/assets/docs/tree/layout.doc.mjs +6 -6
  57. package/assets/docs/tree/migration-setup.doc.mjs +2 -2
  58. package/assets/docs/tree/publishing.doc.mjs +3 -3
  59. package/assets/docs/tree/quick-start.doc.mjs +3 -3
  60. package/assets/docs/tree/sections-and-placement.doc.mjs +2 -2
  61. package/assets/docs/tree/template-doc-overview.doc.mjs +1 -1
  62. package/assets/docs/tree/troubleshooting.doc.mjs +5 -5
  63. package/assets/docs/tree/upgrading.doc.mjs +1 -1
  64. package/authoring/discover/discover.doc.mjs +1 -1
  65. package/authoring/doctypes/component/component.doc.mjs +1 -1
  66. package/clients/cli/commands/discover.broken-integration.test.mjs +4 -1
  67. package/clients/cli/commands/discover.doc.mjs +1 -1
  68. package/clients/cli/commands/discover.mjs +144 -93
  69. package/clients/cli/commands/discover.no-source.test.mjs +447 -33
  70. package/clients/cli/commands/discover.sources.test.mjs +20 -1
  71. package/clients/cli/commands/doctor-integration-components.doc.mjs +3 -1
  72. package/clients/cli/commands/doctor-integration-docs.doc.mjs +18 -5
  73. package/clients/cli/commands/doctor-integration-validate.doc.mjs +3 -1
  74. package/clients/cli/commands/doctor.mjs +60 -3
  75. package/clients/cli/commands/gap-report.doc.mjs +14 -2
  76. package/clients/cli/commands/gap-report.mjs +24 -2
  77. package/clients/cli/commands/gap-report.test.mjs +79 -0
  78. package/clients/cli/commands/integration-check.test.mjs +103 -0
  79. package/clients/cli/commands/integration.mjs +2 -3
  80. package/clients/cli/commands/json-contract.test.mjs +5 -1
  81. package/clients/cli/commands/upgrade.doc.mjs +14 -0
  82. package/clients/cli/commands/upgrade.older-cli.test.mjs +160 -0
  83. package/foundation/discovery/copied-passages.d.mts +216 -0
  84. package/foundation/discovery/copied-passages.mjs +720 -0
  85. package/foundation/discovery/copied-passages.test.mjs +124 -0
  86. package/foundation/discovery/doc-fluff.d.mts +112 -0
  87. package/foundation/discovery/doc-fluff.mjs +328 -0
  88. package/foundation/discovery/doc-fluff.test.mjs +142 -0
  89. package/foundation/discovery/doc-types.d.mts +1 -1
  90. package/foundation/discovery/doc-types.mjs +3 -3
  91. package/foundation/discovery/doc-types.test.mjs +48 -0
  92. package/foundation/discovery/docs-discovery.d.mts +7 -0
  93. package/foundation/discovery/docs-discovery.mjs +26 -2
  94. package/foundation/discovery/project-typescript.d.mts +11 -2
  95. package/foundation/discovery/project-typescript.mjs +32 -4
  96. package/foundation/discovery/prop-drift.d.mts +1 -1
  97. package/foundation/discovery/prop-drift.mjs +2 -2
  98. package/foundation/discovery/prop-drift.test.mjs +55 -2
  99. package/foundation/discovery/type-text.mjs +1 -1
  100. package/foundation/discovery/type-text.test.mjs +1 -1
  101. package/foundation/doc-compiler/doc-loads.test.mjs +14 -2
  102. package/foundation/env/package-manager.d.mts +32 -0
  103. package/foundation/env/package-manager.mjs +47 -0
  104. package/foundation/env/package-manager.test.mjs +194 -7
  105. package/foundation/fs/module-loader.d.mts +2 -1
  106. package/foundation/fs/module-loader.mjs +60 -4
  107. package/foundation/fs/module-loader.test.mjs +194 -0
  108. package/foundation/response/response-types.doc.mjs +7 -6
  109. package/package.json +11 -11
@@ -32,7 +32,7 @@ export const docs = {
32
32
  '`npx astryx doctor integration validate`',
33
33
  'The manifest loads, each root holds contributions the CLI can read, and each doc matches its authoring type',
34
34
  'A declared root is missing (`missing_root`), a contribution does not load (`invalid_doc`, `invalid_component`, `invalid_theme`), or two templates in the package replace one Core id (`ambiguous_template_replacement`)',
35
- "The manifest has a key this CLI does not know (`unknown_manifest_key`), or a doc field does not match the doc's authoring type: a field the type does not have, a missing required field, or a value outside the field's type. It checks docs with your installed `typescript`; without it, it prints `[skip] Docs not type-checked`. With no `astryx.integration.mjs` it prints a hint and exits 0",
35
+ "The manifest has a key this CLI does not know (`unknown_manifest_key`), or a doc field does not match the doc's authoring type: a field the type does not have, a missing required field, or a value outside the field's type. It checks docs with your installed `typescript`, or, where that is missing or has no JavaScript compiler API (TypeScript 7), with an installed `@typescript/typescript6`; without either, it prints `[skip] Docs not type-checked`. With no `astryx.integration.mjs` it prints a hint and exits 0",
36
36
  ],
37
37
  [
38
38
  '`npx astryx doctor integration components`',
@@ -48,9 +48,9 @@ export const docs = {
48
48
  ],
49
49
  [
50
50
  '`npx astryx doctor integration docs`',
51
- 'Your docs tree, every link, and topic names against Core',
51
+ 'Your docs tree, every link, topic names against Core, passages two topics repeat word for word, and padding phrases and low-density topics',
52
52
  'A topic takes a Core topic name without `replaces` or `extends`, a doc is invalid (`invalid_doc`), or a namespace or placement fails, which hides the doc (`invalid_doc_graph`)',
53
- 'A link names no doc (`invalid_doc_graph`)',
53
+ 'A link names no doc (`invalid_doc_graph`), two topics repeat a passage word for word (`copied_passage`), or prose pads with a listed phrase or falls under the density floor (`doc_fluff`)',
54
54
  ],
55
55
  [
56
56
  '`npx astryx integration check`',
@@ -78,7 +78,7 @@ export const docs = {
78
78
  content: [
79
79
  {
80
80
  type: 'prose',
81
- text: 'Every integration runs `integration check --strict` in its own build, so every build keeps your docs, types, and links in sync; this is required, not optional. Run `integration verify` before you publish. Install devDependencies first, because the components check needs Core, and `tsc --noEmit` needs `typescript` and a `tsconfig.json`. In package.json:',
81
+ text: 'Every integration runs `integration check --strict` in its own build, so every build keeps your docs, types, and links in sync; this is required, not optional. The strict check fails on every copied passage the docs check lists ({@link generic:check-your-docs}). Run `integration verify` before you publish. Install devDependencies first, because the components check needs Core, and `tsc --noEmit` needs `typescript` and a `tsconfig.json`. In package.json:',
82
82
  },
83
83
  {
84
84
  type: 'code',
@@ -23,7 +23,7 @@ export const docs = {
23
23
  content: [
24
24
  {
25
25
  type: 'prose',
26
- text: 'Export a `debug` function from `astryx.integration.mjs`, and the CLI calls it once for each command run in an app that loads your package.',
26
+ text: 'Export a `debug` function from `astryx.integration.mjs`; the CLI calls it once per command run in an app loading your package.',
27
27
  },
28
28
  {
29
29
  type: 'code',
@@ -52,11 +52,11 @@ export default {
52
52
  },
53
53
  {
54
54
  type: 'prose',
55
- text: "An app records every command only when its `astryx.config` names `integrations` or `debug`, as listing your package does. Otherwise your handler runs only for commands that load the app's project, such as `component` and `docs`, and not for `--version` or a mistyped command. In an app whose config names neither word, each of those commands also prints a warning on stderr.",
55
+ text: "An app records every command only when its `astryx.config` names `integrations` or `debug`, as listing your package does. Otherwise your handler runs only for commands loading the app's project, such as `component` and `docs`, never for `--version` or a mistyped command. In an app whose config names neither word, those commands also print a stderr warning.",
56
56
  },
57
57
  {
58
58
  type: 'prose',
59
- text: '`debug` is a named export, not a manifest field, so a CLI that does not know it ignores it and loads the rest of your manifest.',
59
+ text: '`debug` is a named export, not a manifest field, so an older CLI ignores it and loads the rest of your manifest.',
60
60
  },
61
61
  ],
62
62
  },
@@ -75,7 +75,7 @@ export default {
75
75
  },
76
76
  {
77
77
  type: 'prose',
78
- text: 'From then on, your handler no longer runs in that app.',
78
+ text: 'Your handler then no longer runs in that app.',
79
79
  },
80
80
  ],
81
81
  },
@@ -150,7 +150,7 @@ message: Rerun with --confirm-public to file this report.`,
150
150
  content: [
151
151
  {
152
152
  type: 'prose',
153
- text: "When the app has no `gapReport` handler at all, the CLI routes the report to the target package's `issuesUrl` from its manifest instead.",
153
+ text: "With no `gapReport` handler in the app, the CLI routes the report to the target package's manifest `issuesUrl`.",
154
154
  },
155
155
  {
156
156
  type: 'list',
@@ -167,5 +167,25 @@ message: Rerun with --confirm-public to file this report.`,
167
167
  },
168
168
  ],
169
169
  },
170
+ {
171
+ id: 'choose-a-destination',
172
+ title: 'Let the person choose where a report goes',
173
+ content: [
174
+ {
175
+ type: 'prose',
176
+ text: 'When an app loads packages naming their own `issuesUrl`, a report can go to the default (the handlers, or the fallback above) or to one of those packages. `astryx gap-report --list-categories` and the receipt of a report filed without `--to` list every destination, with a line telling the agent to ask the person.',
177
+ },
178
+ {
179
+ type: 'list',
180
+ style: 'unordered',
181
+ items: [
182
+ 'An agent asks the person where to file. It never picks a package destination on its own.',
183
+ "`--to <package>` carries the person's choice: the report goes only to that package's `issuesUrl`, under the same `--confirm-public` rule, and no handler runs.",
184
+ 'Without a choice, leave out `--to`; the report goes to the default.',
185
+ 'A `--to` that names no destination fails before anything is sent and lists the destinations.',
186
+ ],
187
+ },
188
+ ],
189
+ },
170
190
  ],
171
191
  };
@@ -13,8 +13,7 @@ export const docs = {
13
13
  title: 'Layout spacing',
14
14
  placement: {parent: 'namespace:layout', slot: 'guides', order: 40},
15
15
  category: 'guide',
16
- description:
17
- 'Hold one content line per region, then tune gaps and density.',
16
+ description: 'Hold one content line per region, then tune gaps and density.',
18
17
  keywords: [
19
18
  'alignment',
20
19
  'content line',
@@ -35,7 +34,7 @@ export const docs = {
35
34
  content: [
36
35
  {
37
36
  type: 'prose',
38
- text: 'Hold one content line per region, then tune gaps and density. Alignment, Rhythm, and Density and size cover each step; these rules hold for all of them.',
37
+ text: 'Hold one content line per region, then tune gaps and density. Alignment, Rhythm, and Density and size each build on these rules.',
39
38
  },
40
39
  {
41
40
  type: 'list',
@@ -32,21 +32,21 @@ export const docs = {
32
32
  blocks: [
33
33
  {
34
34
  type: 'prose',
35
- text: "Build a layout outside-in. Settle the shell and its region budgets before any content exists, then work inward. Content-first layouts drift into a padded column of cards, because every section ends up inventing its own container.",
35
+ text: 'Build a layout outside-in. Settle the shell and its region budgets before any content exists, then work inward. Content-first layouts drift into a padded column of cards, because every section ends up inventing its own container.',
36
36
  },
37
37
  {
38
38
  type: 'list',
39
39
  style: 'ordered',
40
40
  items: [
41
- "Scaffold: pick the shell, budget each region, and choose navigation",
42
- "Structure: rank the content in each region, then pick the weakest container that groups it",
43
- "Spacing: hold one content line per region, then tune gaps and density",
44
- "Breakpoints: decide what each region does as width changes",
41
+ 'Scaffold: pick the shell, budget each region, and choose navigation',
42
+ "Structure: rank each region's content and choose its container",
43
+ 'Spacing: align each region to one content line, then set gaps and density',
44
+ 'Breakpoints: decide what each region does as width changes',
45
45
  ],
46
46
  },
47
47
  {
48
48
  type: 'prose',
49
- text: "This guide decides layout, not component APIs. Run `npx astryx build \"<idea>\"` to start from the closest template for your app type, and `npx astryx component <Name>` for a component's props.",
49
+ text: 'This guide decides layout, not component APIs. Run `npx astryx build "<idea>"` to start from the closest template for your app type, and `npx astryx component <Name>` for a component\'s props.',
50
50
  },
51
51
  ],
52
52
  slots: {
@@ -85,7 +85,7 @@ astryx component TextInput`,
85
85
  },
86
86
  {
87
87
  type: 'prose',
88
- text: 'For a shorter read to paste into an AI coding tool, add `--detail brief` (one line per section) or `--detail compact`. Use `--json` when building automated migration reports.',
88
+ text: 'For a shorter read to paste into an AI coding tool, see {@link generic:working-with-ai}. Use `--json` when building automated migration reports.',
89
89
  },
90
90
  {
91
91
  type: 'code',
@@ -130,7 +130,7 @@ export function AppRoot({children}: {children: React.ReactNode}) {
130
130
  },
131
131
  {
132
132
  type: 'prose',
133
- text: 'A layer\'s rank is set by the first stylesheet on the page that names it, so the global CSS file (or a `layers.css` holding only the `@layer` line) must be the first import in the root layout or app entry. Import it before any module that imports Astryx or theme CSS, including the `astryx-themes` module generated by `astryx theme add` and a root component like the `AppRoot` above that imports `theme.css`. If a theme stylesheet loads first, Tailwind preflight overrides Astryx base styles and theme overrides lose.',
133
+ text: 'Import the global CSS file first in the root layout or app entry, before anything that imports Astryx or theme CSS, including the `astryx-themes` module and a root component like the `AppRoot` above. Why the order matters, and what to do when it cannot come first, is in {@link generic:tailwind}.',
134
134
  },
135
135
  {
136
136
  type: 'code',
@@ -14,7 +14,7 @@ export const docs = {
14
14
  category: 'guide',
15
15
  keywords: ['publish an integration', 'npm publish', 'release'],
16
16
  description:
17
- 'Publish your package to npm under the right release tag, and check it before and after.',
17
+ 'Publish your package to npm under the right release tag, checking it before and after.',
18
18
  sections: [
19
19
  {
20
20
  id: 'check-before-you-publish',
@@ -59,7 +59,7 @@ export const docs = {
59
59
  items: [
60
60
  'List only the roots you ship, and always `astryx.integration.mjs`. npm adds package.json, and a README and LICENSE when you have them.',
61
61
  'Each later `integration add` appends its root to the list.',
62
- '`integration verify` fails when a root is missing from the list: `Declared templates root "templates" has 0 of 2 expected files in the pack list. Add "templates" to "files" in package.json.`',
62
+ '`integration verify` fails when a root is missing from the list, and names the root to add to `files` (the message is in {@link generic:troubleshooting}).',
63
63
  ],
64
64
  },
65
65
  ],
@@ -79,7 +79,7 @@ export const docs = {
79
79
  },
80
80
  {
81
81
  type: 'prose',
82
- text: 'To let apps try a release first, publish it under `next`, then point `latest` at it when it is ready.',
82
+ text: 'To let apps try a release first, publish it under `next`, then point `latest` at it once ready.',
83
83
  },
84
84
  {
85
85
  type: 'code',
@@ -49,7 +49,7 @@ export const docs = {
49
49
  'Start with `"exports": {}`: each component and template you add then writes the public import that `integration verify` resolves.',
50
50
  'Run the CLI as `npx astryx`, which runs the `@astryxdesign/cli` you installed as a devDependency.',
51
51
  'Component commands read Core, so they need `@astryxdesign/core` installed.',
52
- "The checks compare your docs with your code through TypeScript's JavaScript compiler API, so they need `typescript` 5.0 through 6 installed. TypeScript 7 does not ship that API, and with it the checks skip those comparisons.",
52
+ "The checks compare your docs with your code through TypeScript's JavaScript compiler API, which `typescript` 5.0 through 6 has. TypeScript 7 does not ship that API: on TypeScript 7, also install `@typescript/typescript6`, its TypeScript 6 API package, and the checks use it.",
53
53
  ],
54
54
  },
55
55
  {
@@ -95,7 +95,7 @@ export const docs = {
95
95
  },
96
96
  {
97
97
  type: 'prose',
98
- text: 'Every integration runs `integration check --strict` in its own build, so a doc, prop, template, or link that stops matching the code fails your build instead of reaching the apps that install your package. Set it up now, as the `typecheck` script, and run it.',
98
+ text: "Run `integration check --strict` in every build ({@link generic:checks}): a doc, prop, template, or link that drifts from the code then fails your build, not your users' apps. Set it up now, as the `typecheck` script, and run it.",
99
99
  },
100
100
  {
101
101
  type: 'code',
@@ -136,7 +136,7 @@ export const docs = {
136
136
  },
137
137
  {
138
138
  type: 'prose',
139
- text: '`integration verify` packs the package, unpacks it into a temporary app, and checks that the component resolves through its public import there. It publishes nothing and leaves no `.tgz` file, so `npm pack` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
139
+ text: '`integration verify` installs the packed package in a temporary app and confirms the component resolves through its public import there ({@link generic:checks}). It publishes nothing and leaves no `.tgz` file, so `npm pack` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
140
140
  },
141
141
  {
142
142
  type: 'heading',
@@ -95,8 +95,8 @@ export const docs = {
95
95
  type: 'list',
96
96
  style: 'unordered',
97
97
  items: [
98
- 'A `parent` that your package does not ship, such as `namespace:cli`, "names no namespace".',
99
- 'A `slot` that the namespace does not declare "is not a slot of namespace"; the message lists the slots it does declare.',
98
+ 'A `parent` your package does not ship, such as `namespace:cli`, "names no namespace".',
99
+ 'A `slot` the namespace does not declare "is not a slot of namespace"; the message lists the declared slots.',
100
100
  'The check exits 1; see {@link generic:check-your-docs}.',
101
101
  ],
102
102
  },
@@ -67,7 +67,7 @@ export const docs = {
67
67
  'Set `type` to the kind you chose in {@link generic:start-a-template}. It decides which other fields the doc accepts.',
68
68
  'The file name sets the template id ({@link generic:start-a-template}). Labels live in the doc: the terminal list prints `name`, and JSON listings print `displayName`. Changing either never changes the id.',
69
69
  'Write the description for someone choosing between templates. The Doc metadata category in {@link generic:template-grading-rubric} defines what a complete description covers.',
70
- "Name the ideas the template serves in `keywords`: the domains, tasks, and other names a builder might use for it, in lowercase, such as `['monitoring', 'uptime', 'on-call']` for a service-health dashboard. `astryx search` matches them as it matches the description, and `astryx build` ranks page templates on them, so the description can stay about the layout.",
70
+ "Name the ideas the template serves in `keywords`: the domains, tasks, and other names a builder might use for it, in lowercase, such as `['monitoring', 'uptime', 'on-call']` for a service-health dashboard. How search and build use them is in {@link generic:authoring}, so the description can stay about the layout.",
71
71
  'Add `isReady: false` as soon as you generate the doc, because a doc without `isReady` is listed as ready. Keep it until the template passes {@link generic:test-template-in-app} and the quality review.',
72
72
  ],
73
73
  },
@@ -78,7 +78,7 @@ export const docs = {
78
78
  "The `exports` map has no entry for it. Run `npm pkg set 'exports[./components/AcmeCarousel]=./components/AcmeCarousel.tsx'`, or `'exports[./templates/acme-dashboard]=./templates/acme-dashboard.tsx'` for a template.",
79
79
  ],
80
80
  [
81
- '`component_import_unresolvable`: `…but a consumer cannot resolve it: Cannot find package \'@acme/old-name\'`',
81
+ "`component_import_unresolvable`: `…but a consumer cannot resolve it: Cannot find package '@acme/old-name'`",
82
82
  "You renamed the package after the add wrote each doc's `import`. Change `import` in every component doc to the new name.",
83
83
  ],
84
84
  [
@@ -95,11 +95,11 @@ export const docs = {
95
95
  ],
96
96
  [
97
97
  '`component_replaces_needs_cli` (a warning): The package has a component that sets `replaces` but declares no @astryxdesign/cli peer, or a peer range that admits an earlier CLI.',
98
- "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.7'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json` to turn the replacement on. Until then the component keeps its own name and the Core component stays selected; a component named like its target stays ambiguous by that bare name.",
98
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.7'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json` to turn the replacement on. Until then apps see no change ({@link generic:replace-a-core-component}).",
99
99
  ],
100
100
  [
101
101
  '`keywords_needs_cli`: The package has a template that sets `keywords` but declares no @astryxdesign/cli peer.',
102
- "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.6'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`. A stable CLI before 0.6.6 rejects `keywords` and drops that template, and one before 0.6.4 also hides your doc topics.",
102
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.6'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`. What an older CLI does with the field is in {@link generic:template-doc-overview}.",
103
103
  ],
104
104
  [
105
105
  '`themes_need_cli`: The package ships a theme but declares no @astryxdesign/cli peer.',
@@ -130,7 +130,7 @@ export const docs = {
130
130
  "Its doc still names its file. Set `name` to the export, such as `name: 'AcmeCarousel'` in `acme-carousel.doc.mjs`. A family member is listed only when the module its family doc imports exports it ({@link generic:component-family}).",
131
131
  ],
132
132
  [
133
- '`npx astryx component Dialog` opens Core\'s `Dialog`, not yours.',
133
+ "`npx astryx component Dialog` opens Core's `Dialog`, not yours.",
134
134
  "A name that Core, a legacy docs package, or another package's file already has stays theirs. Run `npx astryx component Dialog --package @acme/astryx-widgets`, or give your component a name of its own.",
135
135
  ],
136
136
  [
@@ -151,7 +151,7 @@ export const docs = {
151
151
  ],
152
152
  [
153
153
  'Your docs section, templates, or themes are missing only in some apps',
154
- "Those apps run a CLI too old to read them: a stable CLI before 0.6.6 for a template that sets `keywords`, or before 0.6.4 for a template that sets `replaces`, a docs section, or a theme. Update `@astryxdesign/cli` there, and keep your optional `@astryxdesign/cli` peer so npm checks the app's CLI against it when the app installs your package.",
154
+ "Those apps run a CLI too old to read them ({@link generic:checks} lists which field needs which CLI). Update `@astryxdesign/cli` there, and keep your optional `@astryxdesign/cli` peer so npm checks the app's CLI against it when the app installs your package.",
155
155
  ],
156
156
  ],
157
157
  },
@@ -35,7 +35,7 @@ export const docs = {
35
35
  style: 'unordered',
36
36
  items: [
37
37
  'Run every check in {@link generic:checks}, not only the ones shown.',
38
- 'Name each codemod folder after the Core version whose upgrade should run it; see {@link generic:codemods}.',
38
+ 'Codemod folders are named for Core versions: {@link generic:codemods}.',
39
39
  'Release the result as a new version of your package; see {@link generic:publishing}.',
40
40
  ],
41
41
  },
@@ -16,7 +16,7 @@ export const doc = {
16
16
  displayName: 'DiscoverSource',
17
17
  namespace: 'authoring',
18
18
  description:
19
- 'A source for `astryx discover`: an async function that returns a catalog of packages a project could add, their versions, and what each version adds. Set it as `discover` in astryx.config, or export it as `discover` from an integration manifest. Discover calls every source, the project one first, and one that throws, runs past 30 seconds, or returns an invalid catalog never hides the others; discover then uses the last good answer that source gave for the same request, or reports the source as failed when it saved none. Discover only reads: it prints the command that adds a package and never runs it.',
19
+ 'A source for `astryx discover`: an async function that returns a catalog of packages a project could add, their versions, and what each version adds. Set it as `discover` in astryx.config, or export it as `discover` from an integration manifest. Discover calls every source, the project one first, and then reads the official list the CLI carries; another source\'s entry for an official package is kept. A source that throws, runs past 30 seconds, or returns an invalid catalog never hides the others; discover then uses the last good answer that source gave for the same request, or reports the source as failed when it saved none. Discover only reads: it prints the command that adds a package and never runs it.',
20
20
  appliesTo:
21
21
  '`discover` in astryx.config.*, or the `discover` named export of astryx.integration.*',
22
22
  fields: [
@@ -56,7 +56,7 @@ export const doc = {
56
56
  name: 'replaces',
57
57
  type: 'string',
58
58
  description:
59
- 'Integration components only: the exact `name` of the Core ComponentDoc this component takes over for unqualified lookup, so every app that loads the integration gets it from component detail, component lists, search, `swizzle <Name>`, and issue routing; `swizzle --list` keeps listing Core names. The Core original stays reachable with `--package @astryxdesign/core`. It takes effect only when the package\'s peer range starts at the release that applies it, `"@astryxdesign/cli": ">=0.6.7"` or later; without such a range the component keeps its own name and `doctor integration components` warns. Set it only to intentionally own a Core identity; give an alternative or variant its own name instead.',
59
+ 'Integration components only: the exact `name` of the Core ComponentDoc this component takes over for unqualified lookup, so every app that loads the integration gets it from component detail, component lists, search, `swizzle <Name>`, and issue routing; `swizzle --list` keeps listing Core names. The Core original stays reachable with `--package @astryxdesign/core`. It takes effect only when the package\'s peer range starts at the release that applies it, `"@astryxdesign/cli": ">=0.6.7"` or later; with a lower range nothing changes and `doctor integration components` warns ({@link generic:replace-a-core-component}). Set it only to intentionally own a Core identity; give an alternative or variant its own name instead.',
60
60
  },
61
61
  {
62
62
  name: 'keywords',
@@ -83,7 +83,10 @@ describe('astryx discover with a manifest that fails to load', () => {
83
83
  });
84
84
 
85
85
  expect(status).toBe(0);
86
- expect(JSON.parse(stdout).meta).toEqual({configured: true});
86
+ const {meta} = JSON.parse(stdout);
87
+ expect(meta.configured).toBe(true);
88
+ // The official list still answers; nothing else is claimed.
89
+ expect(meta.sources.map(s => s.name)).toEqual(['Astryx']);
87
90
  expect(stderr).not.toContain('integration issue');
88
91
  });
89
92
  });
@@ -17,7 +17,7 @@ export const doc = {
17
17
  summary:
18
18
  'Browse and search integrations: the ones you have and the ones you could add',
19
19
  description:
20
- 'Lists the integrations this project loads and, when it has a discover source, the ones it could add, with what each one adds. ' +
20
+ 'Lists what this project has, the integrations it loads and the official packages it declares, then what it could add: the official Astryx packages first, then whatever its discover sources list, with what each one adds. ' +
21
21
  'A package query shows one package: what it adds, every version a source knows, and the command that adds it. ' +
22
22
  "An @scope/name/Component path prints an installed component's doc; any other item path shows that item. " +
23
23
  'Anything else, even an exact component name, searches every item and package and lists the matches. Discover only reads: your package manager installs, updates, and removes packages.',