@astryxdesign/cli 0.7.2-canary.6a3ff0f → 0.7.2-canary.6c792d8

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/component/_adapter.d.mts +31 -0
  3. package/api/component/_adapter.mjs +116 -0
  4. package/api/component/component.mjs +60 -10
  5. package/api/component/doc-links.test.mjs +386 -0
  6. package/api/discover/_adapter.d.mts +119 -12
  7. package/api/discover/_adapter.mjs +449 -10
  8. package/api/discover/_adapter.test.mjs +599 -17
  9. package/api/discover/_catalog-view.d.mts +16 -5
  10. package/api/discover/_catalog-view.mjs +32 -8
  11. package/api/discover/detail/doc/doc.mjs +9 -1
  12. package/api/discover/discover.d.mts +11 -0
  13. package/api/discover/discover.doc.mjs +7 -6
  14. package/api/discover/discover.mjs +107 -19
  15. package/api/discover/discover.type.d.mts +18 -7
  16. package/api/discover/discover.type.mjs +15 -7
  17. package/api/discover/list/list.d.mts +4 -3
  18. package/api/discover/list/list.mjs +17 -10
  19. package/api/docs/_adapter.d.mts +63 -0
  20. package/api/docs/_adapter.mjs +309 -16
  21. package/api/docs/integration-tree.test.mjs +22 -0
  22. package/api/docs/list/list.mjs +12 -2
  23. package/api/doctor/theme-checks.test.mjs +136 -0
  24. package/api/integration/_adapter.d.mts +33 -0
  25. package/api/integration/_adapter.mjs +58 -0
  26. package/api/integration/authoring-checks.mjs +98 -3
  27. package/api/integration/authoring-checks.test.mjs +769 -0
  28. package/api/integration/authoring-checks.type.d.mts +134 -0
  29. package/api/integration/authoring-checks.type.mjs +60 -1
  30. package/api/integration/integrationComponentConflicts.doc.mjs +3 -1
  31. package/api/integration/integrationDocConflicts.doc.mjs +22 -5
  32. package/api/integration/pack-check.mjs +296 -7
  33. package/api/integration/pack-check.test.mjs +367 -0
  34. package/api/integration/validate-integration-fixes.test.mjs +67 -0
  35. package/api/integration/validate-integration.mjs +28 -3
  36. package/api/integration/validate-integration.test.mjs +77 -8
  37. package/api/integration/validateIntegration.doc.mjs +1 -1
  38. package/api/search/search.mjs +2 -1
  39. package/assets/discover/official-packages.json +367 -0
  40. package/assets/docs/author-a-theme.doc.mjs +2 -2
  41. package/assets/docs/browser-support.doc.mjs +1 -1
  42. package/assets/docs/styling-overview.doc.mjs +1 -1
  43. package/assets/docs/theme.doc.mjs +1 -1
  44. package/assets/docs/tree/add-a-topic.doc.mjs +3 -3
  45. package/assets/docs/tree/check-the-props.doc.mjs +7 -2
  46. package/assets/docs/tree/check-your-docs.doc.mjs +15 -3
  47. package/assets/docs/tree/checks.doc.mjs +5 -5
  48. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +7 -7
  49. package/assets/docs/tree/document-the-theme.doc.mjs +2 -2
  50. package/assets/docs/tree/layout-spacing.doc.mjs +2 -3
  51. package/assets/docs/tree/layout.doc.mjs +6 -6
  52. package/assets/docs/tree/migration-setup.doc.mjs +2 -2
  53. package/assets/docs/tree/publishing.doc.mjs +3 -3
  54. package/assets/docs/tree/quick-start.doc.mjs +2 -2
  55. package/assets/docs/tree/sections-and-placement.doc.mjs +2 -2
  56. package/assets/docs/tree/template-doc-overview.doc.mjs +1 -1
  57. package/assets/docs/tree/troubleshooting.doc.mjs +5 -5
  58. package/assets/docs/tree/upgrading.doc.mjs +1 -1
  59. package/authoring/discover/discover.doc.mjs +1 -1
  60. package/authoring/doctypes/component/component.doc.mjs +1 -1
  61. package/authoring/doctypes/component/type.ts +8 -0
  62. package/authoring/doctypes/hook/type.ts +4 -0
  63. package/clients/cli/commands/discover.broken-integration.test.mjs +4 -1
  64. package/clients/cli/commands/discover.doc.mjs +1 -1
  65. package/clients/cli/commands/discover.mjs +144 -93
  66. package/clients/cli/commands/discover.no-source.test.mjs +447 -33
  67. package/clients/cli/commands/discover.sources.test.mjs +20 -1
  68. package/clients/cli/commands/doctor-integration-components.doc.mjs +3 -2
  69. package/clients/cli/commands/doctor-integration-docs.doc.mjs +19 -5
  70. package/clients/cli/commands/doctor-integration.test.mjs +48 -1
  71. package/clients/cli/commands/doctor.mjs +91 -5
  72. package/clients/cli/commands/integration-authoring.test.mjs +46 -0
  73. package/clients/cli/commands/integration-check.test.mjs +127 -0
  74. package/clients/cli/commands/integration.mjs +10 -4
  75. package/clients/cli/commands/json-contract.test.mjs +5 -1
  76. package/foundation/discovery/copied-passages.d.mts +216 -0
  77. package/foundation/discovery/copied-passages.mjs +720 -0
  78. package/foundation/discovery/copied-passages.test.mjs +124 -0
  79. package/foundation/discovery/doc-consistency.d.mts +34 -0
  80. package/foundation/discovery/doc-consistency.mjs +513 -0
  81. package/foundation/discovery/doc-consistency.test.mjs +347 -0
  82. package/foundation/discovery/doc-fluff.d.mts +112 -0
  83. package/foundation/discovery/doc-fluff.mjs +328 -0
  84. package/foundation/discovery/doc-fluff.test.mjs +142 -0
  85. package/foundation/discovery/doc-types.mjs +12 -5
  86. package/foundation/discovery/doc-types.test.mjs +46 -2
  87. package/foundation/discovery/docs-discovery.d.mts +7 -0
  88. package/foundation/discovery/docs-discovery.mjs +26 -2
  89. package/foundation/discovery/prop-drift.d.mts +25 -6
  90. package/foundation/discovery/prop-drift.mjs +171 -6
  91. package/foundation/discovery/prop-drift.test.mjs +65 -0
  92. package/foundation/discovery/stray-pointers.d.mts +52 -0
  93. package/foundation/discovery/stray-pointers.mjs +293 -0
  94. package/foundation/discovery/stray-pointers.test.mjs +86 -0
  95. package/foundation/doc-compiler/doc-loads.test.mjs +16 -0
  96. package/foundation/doc-compiler/links.d.mts +32 -0
  97. package/foundation/doc-compiler/links.mjs +163 -26
  98. package/foundation/doc-compiler/links.test.mjs +97 -4
  99. package/foundation/doc-compiler/tree.mjs +30 -1
  100. package/foundation/doc-compiler/tree.test.mjs +7 -0
  101. package/foundation/fs/module-loader.d.mts +2 -1
  102. package/foundation/fs/module-loader.mjs +60 -4
  103. package/foundation/fs/module-loader.test.mjs +194 -0
  104. package/foundation/integrations/contribution-inventory.d.mts +11 -0
  105. package/foundation/integrations/contribution-inventory.mjs +50 -2
  106. package/foundation/integrations/issue.ts +6 -0
  107. package/foundation/integrations/validate-contributions.mjs +30 -1
  108. package/foundation/response/response-types.doc.mjs +5 -5
  109. package/package.json +11 -11
@@ -112,7 +112,7 @@ export const doc = {
112
112
  {
113
113
  value: 'discover.list',
114
114
  description:
115
- 'The integrations the project loads (name, category, components, version, a list per other kind they add, and latest when a source knows it); with a discover source, meta.available lists what the project could add and meta.sources reports each source; when empty it carries meta.configured to tell "nothing configured" from "nothing discovered".',
115
+ 'What the project has, the integrations it loads and the official packages it declares, official packages first (name, category, components, version, a list per other kind they add, and latest when a source knows it); meta.available lists what the project could add, the official packages first, each with the command that adds it, and meta.sources reports each source, the official list last; when it lists no integration it carries meta.configured to tell "nothing configured" from "nothing discovered".',
116
116
  },
117
117
  {
118
118
  value: 'discover.detail',
@@ -328,12 +328,12 @@ export const doc = {
328
328
  {
329
329
  value: 'integration.pack-check',
330
330
  description:
331
- 'The packed-package check: name, version, packable, tarball {filename, fileCount, size, unpackedSize} or null, inventory {manifest, roots [{kind, path, expectedFiles, missingFiles, complete}], expectedFiles, packedFiles}, contributions {local, packed}, each null or {themes [{slug, exportName}], components, templates [{id, type, name}], codemods [{version, id}], docs, agentDocsAppend}, and issues [{code, severity, message}].',
331
+ 'The packed-package check: name, version, packable, tarball {filename, fileCount, size, unpackedSize} or null, inventory {manifest, roots [{kind, path, expectedFiles, missingFiles, complete}], expectedFiles, packedFiles}, contributions {local, packed}, each null or {themes [{slug, exportName}], components, templates [{id, type, name}], codemods [{version, id}], docs, agentDocsAppend}, and issues [{code, severity, message, fix?, file?, line?}] (the issues validation finds in the source and, prefixed packed_, in the packed tree, with the fix and the place when the check knows them).',
332
332
  },
333
333
  {
334
334
  value: 'integration.validate',
335
335
  description:
336
- 'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message}. When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked).',
336
+ 'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package). When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked).',
337
337
  },
338
338
  {
339
339
  value: 'integration.template-conflicts',
@@ -343,12 +343,12 @@ export const doc = {
343
343
  {
344
344
  value: 'integration.component-conflicts',
345
345
  description:
346
- 'validated (false when no integration manifest was found, so nothing was inspected), the integration identity, structural issues, and non-blocking conflicts where an integration component name is also owned by Core; each conflict includes the exact package-qualified command. When the manifest loads and declares a components root, propDrift compares documented props with the TypeScript props: status (checked | skipped), reason, typescript, components, typesCompared, typesSkipped, findings (all warnings), unchecked, typesNotCompared, and propsNotChecked.',
346
+ 'validated (false when no integration manifest was found, so nothing was inspected), the integration identity, structural issues, and non-blocking conflicts where an integration component name is also owned by Core; each conflict includes the exact package-qualified command. When the manifest loads and declares a components root, propDrift compares documented props with the TypeScript props: status (checked | skipped), reason, typescript, components, typesCompared, typesSkipped, findings (all warnings; a default_mismatch carries docDefault, codeDefault, and a fix), unchecked, typesNotCompared, and propsNotChecked.',
347
347
  },
348
348
  {
349
349
  value: 'integration.doc-conflicts',
350
350
  description:
351
- 'validated (false when no integration manifest was found, so nothing was inspected), the integration identity, structural issues, and Core doc overlaps. Each finding includes `severity` (`info` | `error`) and `relationship` (`replaces` | `extends` | `accidental`).',
351
+ 'validated (false when no integration manifest was found, so nothing was inspected), the integration identity, structural issues, and Core doc overlaps. Each finding includes `severity` (`info` | `error`) and `relationship` (`replaces` | `extends` | `accidental`). copiedPassages lists each pair of topics that repeat 10 or more words of prose word for word: topic, section, otherTopic, otherOwner (package | core), words, passages, owner (the topic that should keep the text), text (the passage as the topic writes it), line (where the copy starts in the topic to change, or null), and message (the exact replacement); each is also a copied_passage warning in issues. fluff lists padding phrases and low-density topics: topic, kind (phrase | density), phrase, section, file (relative to the package root), line, density, and message (what to cut or write instead); each is also a doc_fluff warning in issues. strayPointers lists each code span that is exactly `astryx docs <name>` for a doc that exists, in the prose, description or summary of a topic or the text fields of a component doc: topic (the topic or component doc), kind (topic | component), section, field (the field outside any section, such as description or usage.bestPractices[0].description, else null), file (relative to the package root), line, pointer (the written command), link (the {@link} that replaces it), and message; each is also a stray_doc_pointer warning in issues.',
352
352
  },
353
353
  {
354
354
  value: 'integration.check',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.7.2-canary.6a3ff0f",
3
+ "version": "0.7.2-canary.6c792d8",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -101,10 +101,10 @@
101
101
  "zod": "^4.4.3"
102
102
  },
103
103
  "peerDependencies": {
104
- "@astryxdesign/charts": "0.7.2-canary.6a3ff0f",
105
- "@astryxdesign/core": "0.7.2-canary.6a3ff0f",
106
- "@astryxdesign/lab": "0.7.2-canary.6a3ff0f",
107
- "@astryxdesign/theme-neutral": "0.7.2-canary.6a3ff0f"
104
+ "@astryxdesign/charts": "0.7.2-canary.6c792d8",
105
+ "@astryxdesign/core": "0.7.2-canary.6c792d8",
106
+ "@astryxdesign/lab": "0.7.2-canary.6c792d8",
107
+ "@astryxdesign/theme-neutral": "0.7.2-canary.6c792d8"
108
108
  },
109
109
  "peerDependenciesMeta": {
110
110
  "@astryxdesign/charts": {
@@ -121,10 +121,10 @@
121
121
  }
122
122
  },
123
123
  "devDependencies": {
124
- "@astryxdesign/charts": "0.7.2-canary.6a3ff0f",
125
- "@astryxdesign/core": "0.7.2-canary.6a3ff0f",
126
- "@astryxdesign/lab": "0.7.2-canary.6a3ff0f",
127
- "@astryxdesign/theme-neutral": "0.7.2-canary.6a3ff0f",
124
+ "@astryxdesign/charts": "0.7.2-canary.6c792d8",
125
+ "@astryxdesign/core": "0.7.2-canary.6c792d8",
126
+ "@astryxdesign/lab": "0.7.2-canary.6c792d8",
127
+ "@astryxdesign/theme-neutral": "0.7.2-canary.6c792d8",
128
128
  "@heroicons/react": "^2.2.0",
129
129
  "@stylexjs/stylex": "^0.19.0",
130
130
  "@types/babel__core": "^7.20.5",
@@ -134,8 +134,8 @@
134
134
  "scripts": {
135
135
  "astryx": "node clients/cli/bin/astryx.mjs",
136
136
  "postinstall": "node scripts/postinstall.mjs",
137
- "test": "vitest run --root ../.. packages/cli",
138
- "test:watch": "vitest --root ../.. packages/cli",
137
+ "test": "cd ../.. && vitest run packages/cli",
138
+ "test:watch": "cd ../.. && vitest packages/cli",
139
139
  "typecheck:template-docs": "tsc --project tsconfig.template-docs.json",
140
140
  "typecheck:json-api": "tsc --project tsconfig.json-api.json",
141
141
  "typecheck:strict": "tsc --project tsconfig.strict.json",