@astryxdesign/cli 0.6.5 → 0.6.6-canary.1f4eb3c
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/CHANGELOG.md +87 -0
- package/README.md +58 -55
- package/api/build/_adapter.d.mts +55 -2
- package/api/build/_adapter.mjs +100 -10
- package/api/build/build.doc.mjs +2 -2
- package/api/build/build.test.mjs +111 -2
- package/api/build/build.type.d.mts +8 -0
- package/api/build/build.type.mjs +2 -0
- package/api/build/kit/kit.mjs +99 -22
- package/api/build/kit/rank.d.mts +32 -8
- package/api/build/kit/rank.mjs +291 -97
- package/api/build/kit/rank.test.mjs +231 -48
- package/api/build/kit/weights.d.mts +82 -0
- package/api/build/kit/weights.json +1 -0
- package/api/build/kit/weights.mjs +305 -0
- package/api/build/kit/weights.test.mjs +190 -0
- package/api/component/_adapter.d.mts +19 -0
- package/api/component/_adapter.mjs +33 -0
- package/api/component/component-replacement.test.mjs +603 -0
- package/api/component/component.mjs +49 -15
- package/api/component/component.test.mjs +32 -0
- package/api/component/component.type.d.mts +33 -3
- package/api/component/component.type.mjs +10 -3
- package/api/component/detail/blocks/blocks.d.mts +2 -1
- package/api/component/detail/blocks/blocks.mjs +5 -2
- package/api/component/detail/detail.mjs +5 -1
- package/api/component/detail/props/props.d.mts +2 -1
- package/api/component/detail/props/props.mjs +3 -2
- package/api/component/detail/showcase/showcase.d.mts +3 -1
- package/api/component/detail/showcase/showcase.mjs +3 -1
- package/api/component/detail/source/source.d.mts +3 -2
- package/api/component/detail/source/source.mjs +7 -3
- package/api/component/list/list.mjs +128 -10
- package/api/docs/_adapter.d.mts +11 -0
- package/api/docs/_adapter.mjs +25 -0
- package/api/docs/detail/detail.mjs +19 -3
- package/api/docs/detail/section/section.mjs +7 -1
- package/api/docs/docOverlays.test.mjs +10 -6
- package/api/docs/docs.d.mts +6 -0
- package/api/docs/docs.depth.test.mjs +134 -0
- package/api/docs/docs.doc.mjs +31 -2
- package/api/docs/docs.mjs +46 -1
- package/api/docs/docs.test.mjs +279 -0
- package/api/docs/docs.type.d.mts +81 -4
- package/api/docs/docs.type.mjs +41 -4
- package/api/docs/index/index.mjs +11 -2
- package/api/docs/index/index.test.mjs +7 -2
- package/api/docs/integration-tree.test.mjs +572 -0
- package/api/docs/integrationDocs.test.mjs +337 -0
- package/api/docs/node/node.d.mts +28 -3
- package/api/docs/node/node.mjs +149 -23
- package/api/doctor/_adapter.d.mts +43 -0
- package/api/doctor/_adapter.mjs +142 -0
- package/api/doctor/doctor.d.mts +0 -10
- package/api/doctor/doctor.doc.mjs +1 -3
- package/api/doctor/doctor.mjs +6 -123
- package/api/doctor/theme-checks.d.mts +12 -0
- package/api/doctor/theme-checks.mjs +1117 -0
- package/api/doctor/theme-checks.test.mjs +526 -0
- package/api/error.d.mts +22 -0
- package/api/error.mjs +42 -0
- package/api/gap-report/gap-report.d.mts +3 -1
- package/api/gap-report/gap-report.mjs +27 -3
- package/api/gap-report/gap-report.test.mjs +106 -0
- package/api/hook/_adapter.d.mts +1 -0
- package/api/hook/_adapter.mjs +3 -0
- package/api/hook/detail/detail.mjs +2 -2
- package/api/hook/detail/params/params.mjs +2 -2
- package/api/hook/hook.type.d.mts +12 -0
- package/api/hook/hook.type.mjs +3 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/hook/list/list.mjs +8 -8
- package/api/index.d.mts +1 -1
- package/api/index.mjs +4 -0
- package/api/init/run/run.d.mts +3 -5
- package/api/init/run/run.mjs +10 -11
- package/api/integration/__fixtures__/released-0.6.5-ocean.d.mts +14 -0
- package/api/integration/__fixtures__/released-0.6.5-ocean.mjs +15 -0
- package/api/integration/add-contribution.d.mts +2 -1
- package/api/integration/add-contribution.mjs +7 -3
- package/api/integration/add-contribution.test.mjs +3 -3
- package/api/integration/add-helpers.d.mts +26 -5
- package/api/integration/add-helpers.mjs +50 -5
- package/api/integration/add-theme.mjs +354 -28
- package/api/integration/add-theme.test.mjs +380 -16
- package/api/integration/authoring-checks.mjs +31 -8
- package/api/integration/authoring-checks.type.d.mts +8 -0
- package/api/integration/authoring-checks.type.mjs +7 -3
- package/api/integration/integration-authoring.type.d.mts +4 -1
- package/api/integration/integration-authoring.type.mjs +6 -1
- package/api/integration/integrationAdd.doc.mjs +6 -0
- package/api/integration/integrationAddTheme.doc.mjs +10 -0
- package/api/integration/integrationComponentConflicts.doc.mjs +6 -3
- package/api/integration/integrationDocConflicts.doc.mjs +1 -1
- package/api/integration/integrationTemplateConflicts.doc.mjs +1 -1
- package/api/integration/pack-check.component-replaces.test.mjs +126 -0
- package/api/integration/pack-check.d.mts +10 -0
- package/api/integration/pack-check.lifecycle-output.test.mjs +21 -2
- package/api/integration/pack-check.mjs +495 -4
- package/api/integration/pack-check.test.mjs +619 -10
- package/api/integration/validate-integration.d.mts +4 -2
- package/api/integration/validate-integration.mjs +7 -2
- package/api/integration/validate-integration.test.mjs +55 -0
- package/api/integration/validate-integration.type.d.mts +5 -0
- package/api/integration/validate-integration.type.mjs +5 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/layout/expand/expand.mjs +12 -7
- package/api/layout/expand/expand.receipt.test.mjs +74 -0
- package/api/layout/layout.type.d.mts +1 -0
- package/api/layout/layout.type.mjs +1 -0
- package/api/layout/layoutExpand.doc.mjs +1 -1
- package/api/search/search.d.mts +39 -8
- package/api/search/search.doc.mjs +4 -4
- package/api/search/search.mjs +248 -66
- package/api/search/search.test.mjs +829 -0
- package/api/search/search.type.d.mts +6 -6
- package/api/search/search.type.mjs +5 -5
- package/api/swizzle/_adapter.d.mts +10 -0
- package/api/swizzle/_adapter.mjs +23 -0
- package/api/swizzle/copy/copy.d.mts +5 -6
- package/api/swizzle/copy/copy.mjs +95 -13
- package/api/swizzle/list/list.mjs +2 -2
- package/api/swizzle/swizzle.doc.mjs +4 -0
- package/api/swizzle/swizzle.test.mjs +55 -5
- package/api/swizzle/swizzle.type.d.mts +8 -0
- package/api/swizzle/swizzle.type.mjs +2 -0
- package/api/template/copy/copy.mjs +15 -8
- package/api/template/copy/copy.receipt.test.mjs +77 -0
- package/api/template/show/show.mjs +17 -4
- package/api/template/show/show.test.mjs +76 -0
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template-integration.test.mjs +14 -0
- package/api/template/template.d.mts +1 -1
- package/api/template/template.doc.mjs +6 -2
- package/api/template/template.mjs +2 -0
- package/api/template/template.type.d.mts +14 -0
- package/api/template/template.type.mjs +5 -0
- package/api/theme/_adapter.d.mts +106 -6
- package/api/theme/_adapter.mjs +687 -18
- package/api/theme/add/add.binary.test.mjs +76 -3
- package/api/theme/add/add.d.mts +5 -9
- package/api/theme/add/add.mjs +87 -64
- package/api/theme/add/add.rollback.test.mjs +9 -9
- package/api/theme/add/add.staging.test.mjs +9 -9
- package/api/theme/add/add.test.mjs +461 -55
- package/api/theme/add/add.types.test.mjs +151 -0
- package/api/theme/build/build.d.mts +50 -2
- package/api/theme/build/build.family.test.mjs +13 -4
- package/api/theme/build/build.icon-lineage.test.mjs +117 -0
- package/api/theme/build/build.icon-preservation.test.mjs +639 -0
- package/api/theme/build/build.mjs +463 -155
- package/api/theme/build/build.project-core.test.mjs +165 -0
- package/api/theme/build/build.test.mjs +220 -1
- package/api/theme/build/icon-imports.d.mts +47 -0
- package/api/theme/build/icon-imports.mjs +691 -0
- package/api/theme/eject/eject.binary.test.mjs +90 -0
- package/api/theme/eject/eject.d.mts +17 -0
- package/api/theme/eject/eject.mjs +65 -0
- package/api/theme/eject/eject.rollback.test.mjs +158 -0
- package/api/theme/eject/eject.staging.test.mjs +83 -0
- package/api/theme/eject/eject.test.mjs +160 -0
- package/api/theme/integration-themes.test.mjs +30 -6
- package/api/theme/list/list.d.mts +10 -0
- package/api/theme/list/list.mjs +75 -7
- package/api/theme/list/list.test.mjs +155 -4
- package/api/theme/remove/remove.d.mts +12 -0
- package/api/theme/remove/remove.mjs +15 -0
- package/api/theme/remove/remove.test.mjs +94 -0
- package/api/theme/template/template.mjs +3 -4
- package/api/theme/theme.d.mts +5 -2
- package/api/theme/theme.mjs +13 -8
- package/api/theme/theme.type.d.mts +106 -2
- package/api/theme/theme.type.mjs +54 -5
- package/api/theme/themeAdd.doc.d.mts +1 -3
- package/api/theme/themeAdd.doc.mjs +35 -22
- package/api/theme/themeBuild.doc.d.mts +4 -1
- package/api/theme/themeBuild.doc.mjs +15 -4
- package/api/theme/themeEject.doc.d.mts +8 -0
- package/api/theme/themeEject.doc.mjs +89 -0
- package/api/theme/themeListAvailable.doc.mjs +4 -4
- package/api/theme/themeListCopySources.doc.d.mts +8 -0
- package/api/theme/themeListCopySources.doc.mjs +60 -0
- package/api/theme/themeRemove.doc.d.mts +6 -0
- package/api/theme/themeRemove.doc.mjs +50 -0
- package/api/theme/themeTemplate.doc.mjs +4 -3
- package/api/theme/themeUse.doc.d.mts +6 -0
- package/api/theme/themeUse.doc.mjs +47 -0
- package/api/theme/use/use.d.mts +12 -0
- package/api/theme/use/use.mjs +15 -0
- package/api/theme/use/use.test.mjs +98 -0
- package/api/upgrade/_adapter.d.mts +1 -0
- package/api/upgrade/_adapter.mjs +3 -0
- package/api/upgrade/list/list.mjs +9 -3
- package/api/upgrade/run/run.mjs +20 -3
- package/api/upgrade/run/run.test.mjs +45 -1
- package/api/upgrade/upgrade.doc.mjs +1 -1
- package/api/upgrade/upgrade.type.d.mts +5 -0
- package/api/upgrade/upgrade.type.mjs +2 -0
- package/assets/codemods/integration-discovery.mjs +1 -1
- package/assets/codemods/integration-discovery.test.mjs +64 -0
- package/assets/codemods/transforms/next/__tests__/migrate-copied-themes-to-descriptors.test.mjs +129 -0
- package/assets/codemods/transforms/next/index.mjs +14 -1
- package/assets/codemods/transforms/next/migrate-copied-themes-to-descriptors.mjs +54 -0
- package/assets/docs/author-a-theme.doc.mjs +161 -0
- package/assets/docs/getting-started.doc.mjs +59 -15
- package/assets/docs/icons.doc.mjs +1 -0
- package/assets/docs/principles.doc.dense.mjs +2 -2
- package/assets/docs/principles.doc.mjs +2 -2
- package/assets/docs/principles.doc.zh.mjs +2 -2
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling.doc.mjs +2 -2
- package/assets/docs/theme.doc.dense.mjs +10 -198
- package/assets/docs/theme.doc.mjs +13 -770
- package/assets/docs/theme.doc.zh.mjs +31 -12
- package/assets/docs/tokens.doc.mjs +4 -4
- package/assets/docs/tree/add-a-theme.doc.mjs +6 -2
- package/assets/docs/tree/add-a-topic.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
- package/assets/docs/tree/checks.doc.mjs +6 -5
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
- package/assets/docs/tree/define-the-theme.doc.mjs +2 -2
- package/assets/docs/tree/document-the-theme.doc.mjs +4 -4
- package/assets/docs/tree/fonts-and-assets.doc.mjs +25 -20
- package/assets/docs/tree/headers-and-footers.doc.mjs +68 -0
- package/assets/docs/tree/layout-spacing.doc.mjs +168 -0
- package/assets/docs/tree/layout.doc.mjs +32 -0
- package/assets/docs/tree/replace-a-core-component.doc.mjs +21 -4
- package/assets/docs/tree/responsive.doc.mjs +102 -0
- package/assets/docs/tree/scaffold.doc.mjs +145 -0
- package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
- package/assets/docs/tree/side-panels.doc.mjs +82 -0
- package/assets/docs/tree/structure.doc.mjs +144 -0
- package/assets/docs/tree/template-doc-overview.doc.mjs +13 -1
- package/assets/docs/tree/themes.doc.mjs +2 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +13 -5
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +22 -5
- package/assets/docs/tree/versioning.doc.mjs +11 -7
- package/assets/docs/use-a-theme.doc.mjs +97 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +38 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs +20 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx +48 -0
- package/assets/templates/pages/ai-chat/template.doc.mjs +16 -1
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +9 -1
- package/assets/templates/pages/blank/template.doc.mjs +3 -1
- package/assets/templates/pages/canvas-editor/template.doc.mjs +9 -1
- package/assets/templates/pages/centered-hero/template.doc.mjs +3 -1
- package/assets/templates/pages/checkout-wizard/template.doc.mjs +1 -0
- package/assets/templates/pages/classic-gallery/template.doc.mjs +3 -1
- package/assets/templates/pages/contact-form/template.doc.mjs +16 -1
- package/assets/templates/pages/dashboard/template.doc.mjs +15 -1
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +23 -1
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +10 -1
- package/assets/templates/pages/dashboard-comparison/template.doc.mjs +9 -1
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +10 -1
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +17 -1
- package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +2 -1
- package/assets/templates/pages/detail-page/template.doc.mjs +8 -0
- package/assets/templates/pages/documentation/template.doc.mjs +10 -1
- package/assets/templates/pages/documentation-design/template.doc.mjs +10 -1
- package/assets/templates/pages/documentation-technical/template.doc.mjs +10 -1
- package/assets/templates/pages/editor/template.doc.mjs +9 -1
- package/assets/templates/pages/file-explorer/template.doc.mjs +3 -1
- package/assets/templates/pages/form-two-column/template.doc.mjs +17 -1
- package/assets/templates/pages/form-wizard/template.doc.mjs +14 -1
- package/assets/templates/pages/form-wizard-dialog/template.doc.mjs +1 -0
- package/assets/templates/pages/gallery-hero/template.doc.mjs +10 -1
- package/assets/templates/pages/ide/template.doc.mjs +9 -1
- package/assets/templates/pages/incident-console/template.doc.mjs +10 -1
- package/assets/templates/pages/kanban-board/template.doc.mjs +11 -1
- package/assets/templates/pages/library/template.doc.mjs +15 -1
- package/assets/templates/pages/login/template.doc.mjs +10 -1
- package/assets/templates/pages/login-card/template.doc.mjs +11 -1
- package/assets/templates/pages/login-split/template.doc.mjs +10 -1
- package/assets/templates/pages/login-sso/template.doc.mjs +10 -1
- package/assets/templates/pages/messaging-shell/template.doc.mjs +11 -1
- package/assets/templates/pages/mixed-gallery/template.doc.mjs +10 -1
- package/assets/templates/pages/payment-form/template.doc.mjs +3 -1
- package/assets/templates/pages/product-detail/template.doc.mjs +9 -1
- package/assets/templates/pages/product-gallery/template.doc.mjs +10 -1
- package/assets/templates/pages/settings/template.doc.mjs +3 -1
- package/assets/templates/pages/settings-dialog/template.doc.mjs +9 -1
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +9 -1
- package/assets/templates/pages/shell-nav/template.doc.mjs +10 -1
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +14 -1
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +11 -1
- package/assets/templates/pages/side-gallery/template.doc.mjs +3 -1
- package/assets/templates/pages/table/template.doc.mjs +11 -1
- package/assets/templates/pages/table-collapsible/page.tsx +1474 -0
- package/assets/templates/pages/table-collapsible/template.doc.mjs +12 -0
- package/assets/templates/pages/table-comparison/page.tsx +1449 -0
- package/assets/templates/pages/table-comparison/template.doc.mjs +12 -0
- package/assets/templates/pages/table-filter/template.doc.mjs +21 -1
- package/assets/templates/pages/table-grouped/template.doc.mjs +15 -1
- package/assets/templates/pages/table-inbox/template.doc.mjs +18 -6
- package/assets/templates/pages/table-page/template.doc.mjs +20 -1
- package/assets/templates/pages/table-tree/template.doc.mjs +14 -1
- package/assets/templates/pages/theme-showcase/template.doc.mjs +10 -1
- package/assets/templates/pages/work-item-detail/template.doc.mjs +10 -0
- package/assets/templates/themes/butter/icons.tsx +2 -0
- package/assets/templates/themes/chocolate/icons.tsx +2 -0
- package/assets/templates/themes/gothic/icons.tsx +2 -0
- package/assets/templates/themes/matcha/icons.tsx +2 -0
- package/assets/templates/themes/neutral/icons.tsx +2 -0
- package/assets/templates/themes/stone/icons.tsx +2 -0
- package/assets/templates/themes/y2k/icons.tsx +2 -0
- package/authoring/doctypes/command/command.doc.mjs +5 -0
- package/authoring/doctypes/command/type.ts +2 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -4
- package/authoring/doctypes/template/parse.d.mts +2 -0
- package/authoring/doctypes/template/parse.mjs +1 -0
- package/authoring/doctypes/template/parse.test.mjs +21 -0
- package/authoring/doctypes/template/template.doc.mjs +6 -0
- package/authoring/doctypes/template/type.ts +10 -0
- package/authoring/integration/integration.doc.mjs +1 -1
- package/clients/cli/commands/build-theme.mjs +279 -30
- package/clients/cli/commands/build.mjs +7 -6
- package/clients/cli/commands/build.text-fields.test.mjs +1 -1
- package/clients/cli/commands/component/index.mjs +88 -12
- package/clients/cli/commands/component-replacement.text.test.mjs +271 -0
- package/clients/cli/commands/component.doc.mjs +9 -2
- package/clients/cli/commands/discover.mjs +29 -1
- package/clients/cli/commands/discover.no-source.test.mjs +75 -0
- package/clients/cli/commands/docs.depth.test.mjs +219 -0
- package/clients/cli/commands/docs.doc.mjs +15 -2
- package/clients/cli/commands/docs.mjs +273 -16
- package/clients/cli/commands/docs.test.mjs +382 -0
- package/clients/cli/commands/doctor-integration-components.doc.mjs +15 -4
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +4 -4
- package/clients/cli/commands/doctor.test.mjs +9 -51
- package/clients/cli/commands/gap-report.doc.mjs +2 -2
- package/clients/cli/commands/gap-report.mjs +12 -0
- package/clients/cli/commands/gap-report.test.mjs +63 -0
- package/clients/cli/commands/hook/index.mjs +7 -2
- package/clients/cli/commands/import-hint-correctness.test.mjs +5 -5
- package/clients/cli/commands/init.next-steps.test.mjs +18 -23
- package/clients/cli/commands/integration-add.doc.mjs +10 -0
- package/clients/cli/commands/integration-authoring.test.mjs +12 -2
- package/clients/cli/commands/integration-real-world.test.mjs +61 -12
- package/clients/cli/commands/integration.mjs +3 -1
- package/clients/cli/commands/layout-check.doc.mjs +1 -0
- package/clients/cli/commands/layout-expand.doc.mjs +4 -1
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -0
- package/clients/cli/commands/layout.doc.mjs +1 -0
- package/clients/cli/commands/layout.expand-receipt.test.mjs +94 -0
- package/clients/cli/commands/layout.mjs +61 -4
- package/clients/cli/commands/no-prompt-wording.test.mjs +4 -4
- package/clients/cli/commands/search.doc.mjs +5 -4
- package/clients/cli/commands/search.mjs +30 -6
- package/clients/cli/commands/search.test.mjs +63 -17
- package/clients/cli/commands/swizzle.doc.mjs +12 -3
- package/clients/cli/commands/swizzle.mjs +2 -1
- package/clients/cli/commands/template.copy-receipt.test.mjs +60 -0
- package/clients/cli/commands/template.mjs +70 -6
- package/clients/cli/commands/template.show-media.test.mjs +62 -0
- package/clients/cli/commands/text-json-parity.test.mjs +40 -0
- package/clients/cli/commands/theme-add-lifecycle.test.mjs +132 -0
- package/clients/cli/commands/theme-add.doc.mjs +19 -19
- package/clients/cli/commands/theme-eject.doc.mjs +47 -0
- package/clients/cli/commands/theme-list.behavior.test.mjs +44 -0
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -2
- package/clients/cli/commands/theme-remove.doc.mjs +22 -0
- package/clients/cli/commands/theme-template.doc.mjs +4 -3
- package/clients/cli/commands/theme-use.doc.mjs +22 -0
- package/clients/cli/commands/theme.doc.mjs +21 -16
- package/clients/cli/commands/upgrade.ascii-output.test.mjs +14 -0
- package/clients/cli/commands/upgrade.mjs +1 -1
- package/clients/cli/commands/write-failure.test.mjs +175 -0
- package/clients/cli/index.mjs +4 -1
- package/clients/cli/lib/component-format.mjs +19 -2
- package/clients/cli/lib/manifest.mjs +44 -165
- package/clients/cli/lib/manifest.test.mjs +98 -7
- package/clients/cli/lib/resolve-theme.mjs +80 -78
- package/clients/cli/lib/resolve-theme.test.mjs +523 -27
- package/foundation/agent-docs/agent-docs.mjs +31 -28
- package/foundation/agent-docs/agent-docs.test.mjs +1163 -0
- package/foundation/agent-docs/app-theme-workflow.test.mjs +13 -0
- package/foundation/config/project.d.mts +20 -5
- package/foundation/config/project.mjs +43 -6
- package/foundation/config/theme-private-vars.d.mts +12 -0
- package/foundation/config/theme-private-vars.mjs +107 -0
- package/foundation/config/theme-private-vars.test.mjs +55 -0
- package/foundation/config/theme-state.d.mts +145 -0
- package/foundation/config/theme-state.mjs +417 -0
- package/foundation/config/theme-state.test.mjs +182 -0
- package/foundation/discovery/component-discovery.d.mts +5 -2
- package/foundation/discovery/component-discovery.mjs +12 -6
- package/foundation/discovery/component-replacement.d.mts +91 -0
- package/foundation/discovery/component-replacement.mjs +417 -0
- package/foundation/discovery/component-replacement.test.mjs +480 -0
- package/foundation/discovery/docs-output-budget.d.mts +6 -2
- package/foundation/discovery/docs-output-budget.mjs +2 -1
- package/foundation/discovery/docs-section-key.d.mts +4 -2
- package/foundation/discovery/docs-section-key.mjs +1 -1
- package/foundation/discovery/module-exports.d.mts +10 -0
- package/foundation/discovery/module-exports.mjs +146 -0
- package/foundation/discovery/package-exports.d.mts +29 -0
- package/foundation/discovery/package-exports.mjs +200 -0
- package/foundation/discovery/template-adapter.d.mts +14 -0
- package/foundation/discovery/template-adapter.fixture-refs.test.mjs +37 -1
- package/foundation/discovery/template-adapter.mjs +21 -1
- package/foundation/discovery/theme-discovery.d.mts +78 -5
- package/foundation/discovery/theme-discovery.mjs +143 -18
- package/foundation/discovery/theme-discovery.test.mjs +9 -3
- package/foundation/discovery/theme-imports.d.mts +15 -0
- package/foundation/discovery/theme-imports.mjs +217 -0
- package/foundation/discovery/theme-imports.test.mjs +173 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +18 -8
- package/foundation/doc-compiler/inputs.mjs +2 -1
- package/foundation/doc-compiler/inputs.test.mjs +0 -1
- package/foundation/doc-compiler/lenses.d.mts +4 -2
- package/foundation/doc-compiler/lenses.mjs +1 -1
- package/foundation/doc-compiler/tree.test.mjs +649 -0
- package/foundation/fs/module-loader.d.mts +9 -0
- package/foundation/fs/module-loader.mjs +71 -2
- package/foundation/integrations/cli-requirement.d.mts +79 -13
- package/foundation/integrations/cli-requirement.mjs +115 -22
- package/foundation/integrations/cli-requirement.test.mjs +205 -8
- package/foundation/integrations/contribution-inventory.mjs +3 -3
- package/foundation/response/base.d.ts +9 -3
- package/foundation/response/json.d.mts +7 -4
- package/foundation/response/json.mjs +10 -6
- package/foundation/response/response-types.doc.d.mts +5 -5
- package/foundation/response/response-types.doc.mjs +50 -35
- package/foundation/response/response.doc.mjs +18 -4
- package/foundation/text/copyright-header.mjs +1 -1
- package/foundation/text/copyright-header.test.mjs +1 -1
- package/package.json +9 -9
- package/assets/docs/layout.doc.dense.mjs +0 -388
- package/assets/docs/layout.doc.mjs +0 -550
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
+
import fs from 'node:fs';
|
|
3
4
|
import {describe, expect, it} from 'vitest';
|
|
5
|
+
import {semverCompare} from '../env/semver.mjs';
|
|
6
|
+
import * as requirement from './cli-requirement.mjs';
|
|
4
7
|
import {
|
|
5
|
-
|
|
8
|
+
COMPONENT_REPLACES_CLI,
|
|
9
|
+
NAMESPACE_DOCS_CLI,
|
|
10
|
+
REPLACES_CLI,
|
|
11
|
+
SECTION_IDS_CLI,
|
|
12
|
+
cliRangeProblem,
|
|
13
|
+
componentReplacesCliProblem,
|
|
14
|
+
THEMES_CLI,
|
|
6
15
|
lowestAdmitted,
|
|
7
16
|
docsTreeCliProblem,
|
|
17
|
+
keywordsCliProblem,
|
|
8
18
|
replacesCliProblem,
|
|
19
|
+
sectionIdsCliProblem,
|
|
20
|
+
themesCliProblem,
|
|
21
|
+
withCliPeer,
|
|
9
22
|
withDocsTreeCli,
|
|
10
23
|
} from './cli-requirement.mjs';
|
|
11
24
|
|
|
@@ -35,7 +48,7 @@ describe('docsTreeCliProblem', () => {
|
|
|
35
48
|
// Stable releases: a canary built from main before its release reports
|
|
36
49
|
// the older version and reads every feature.
|
|
37
50
|
expect(docsTreeCliProblem({name: '@acme/kit'})).toContain(
|
|
38
|
-
'A stable CLI before 0.
|
|
51
|
+
'A stable CLI before 0.6.4 does not read the docs tree',
|
|
39
52
|
);
|
|
40
53
|
});
|
|
41
54
|
|
|
@@ -48,16 +61,19 @@ describe('docsTreeCliProblem', () => {
|
|
|
48
61
|
},
|
|
49
62
|
);
|
|
50
63
|
|
|
51
|
-
it.each(['>=0.7.0', '^0.7.2', '>=0.7.0 <2'])(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
it.each(['>=0.6.4', '^0.6.4', '>=0.7.0', '^0.7.2', '>=0.7.0 <2'])(
|
|
65
|
+
'accepts %s',
|
|
66
|
+
range => {
|
|
67
|
+
expect(
|
|
68
|
+
docsTreeCliProblem({peerDependencies: {'@astryxdesign/cli': range}}),
|
|
69
|
+
).toBeNull();
|
|
70
|
+
},
|
|
71
|
+
);
|
|
56
72
|
|
|
57
73
|
it('declares the peer as optional, and keeps what the package says of it', () => {
|
|
58
74
|
const declared = withDocsTreeCli({name: '@acme/kit'});
|
|
59
75
|
expect(declared.peerDependencies).toEqual({
|
|
60
|
-
'@astryxdesign/cli':
|
|
76
|
+
'@astryxdesign/cli': '>=0.6.4',
|
|
61
77
|
});
|
|
62
78
|
expect(declared.peerDependenciesMeta).toEqual({
|
|
63
79
|
'@astryxdesign/cli': {optional: true},
|
|
@@ -85,5 +101,186 @@ describe('replacesCliProblem', () => {
|
|
|
85
101
|
expect(
|
|
86
102
|
replacesCliProblem({peerDependencies: {'@astryxdesign/cli': '>=0.7.0'}}),
|
|
87
103
|
).toBeNull();
|
|
104
|
+
// Unlike the docs tree, `replaces` still needs 0.7.0.
|
|
105
|
+
expect(
|
|
106
|
+
replacesCliProblem({peerDependencies: {'@astryxdesign/cli': '>=0.6.4'}}),
|
|
107
|
+
).toContain('admits a stable CLI before 0.7.0');
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
describe('componentReplacesCliProblem', () => {
|
|
112
|
+
// The floor is also the opt-in (spec:AST-035 FR10): a component's `replaces`
|
|
113
|
+
// applies only for a package whose CLI range starts at it. Earlier stable
|
|
114
|
+
// CLIs accept the field and keep the component under its own name.
|
|
115
|
+
it('asks a package whose component sets replaces for the release that applies it', () => {
|
|
116
|
+
expect(componentReplacesCliProblem({name: '@acme/kit'})).toContain(
|
|
117
|
+
'has a component that sets `replaces`',
|
|
118
|
+
);
|
|
119
|
+
expect(componentReplacesCliProblem({name: '@acme/kit'})).toContain(
|
|
120
|
+
'keeps the component under its own name',
|
|
121
|
+
);
|
|
122
|
+
for (const range of ['>=0.6.4', '^0.6.0', '>=0.6.5', '*']) {
|
|
123
|
+
expect(
|
|
124
|
+
componentReplacesCliProblem({
|
|
125
|
+
peerDependencies: {'@astryxdesign/cli': range},
|
|
126
|
+
}),
|
|
127
|
+
).toContain(`admits a stable CLI before ${COMPONENT_REPLACES_CLI}`);
|
|
128
|
+
}
|
|
129
|
+
for (const range of [
|
|
130
|
+
`>=${COMPONENT_REPLACES_CLI}`,
|
|
131
|
+
`^${COMPONENT_REPLACES_CLI}`,
|
|
132
|
+
'>=0.7.0',
|
|
133
|
+
]) {
|
|
134
|
+
expect(
|
|
135
|
+
componentReplacesCliProblem({
|
|
136
|
+
peerDependencies: {'@astryxdesign/cli': range},
|
|
137
|
+
}),
|
|
138
|
+
).toBeNull();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('is the range every shipped doc tells an author to declare', () => {
|
|
143
|
+
// The floor is tied to the next patch slot. If the slot moves, these docs
|
|
144
|
+
// move with the constant and its row in the floor table below.
|
|
145
|
+
for (const file of [
|
|
146
|
+
'../../assets/docs/tree/replace-a-core-component.doc.mjs',
|
|
147
|
+
'../../authoring/doctypes/component/component.doc.mjs',
|
|
148
|
+
'../../authoring/doctypes/component/type.ts',
|
|
149
|
+
]) {
|
|
150
|
+
const text = fs.readFileSync(new URL(file, import.meta.url), 'utf-8');
|
|
151
|
+
const named = [
|
|
152
|
+
...text.matchAll(/"@astryxdesign\/cli\\?":\s*\\?">=(\d+\.\d+\.\d+)/g),
|
|
153
|
+
].map(match => match[1]);
|
|
154
|
+
expect(named.length, file).toBeGreaterThan(0);
|
|
155
|
+
expect(new Set(named), file).toEqual(new Set([COMPONENT_REPLACES_CLI]));
|
|
156
|
+
}
|
|
157
|
+
const troubleshooting = fs.readFileSync(
|
|
158
|
+
new URL(
|
|
159
|
+
'../../assets/docs/tree/troubleshooting.doc.mjs',
|
|
160
|
+
import.meta.url,
|
|
161
|
+
),
|
|
162
|
+
'utf-8',
|
|
163
|
+
);
|
|
164
|
+
const row = troubleshooting
|
|
165
|
+
.split('],')
|
|
166
|
+
.find(part => part.includes('`component_replaces_needs_cli`'));
|
|
167
|
+
expect(row).toContain(`@astryxdesign/cli=>=${COMPONENT_REPLACES_CLI}'`);
|
|
168
|
+
// Every version that row names is the floor.
|
|
169
|
+
expect(new Set(row?.match(/\d+\.\d+\.\d+/g))).toEqual(
|
|
170
|
+
new Set([COMPONENT_REPLACES_CLI]),
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
describe('themesCliProblem and sectionIdsCliProblem', () => {
|
|
176
|
+
// Published 0.6.4 reads typed theme descriptors and section ids. Published
|
|
177
|
+
// 0.6.3 rejects both and hides the package's doc topics.
|
|
178
|
+
it.each([
|
|
179
|
+
['a theme', themesCliProblem, 'ships a theme'],
|
|
180
|
+
['a section id', sectionIdsCliProblem, 'sets `id`'],
|
|
181
|
+
])('asks for a CLI from 0.6.4 for %s', (_name, problem, feature) => {
|
|
182
|
+
expect(problem({name: '@acme/kit'})).toContain(feature);
|
|
183
|
+
expect(problem({name: '@acme/kit'})).toContain('A stable CLI before 0.6.4');
|
|
184
|
+
for (const range of ['>=0.6.4', '^0.6.4', '>=0.6.5', '>=0.7.0']) {
|
|
185
|
+
expect(
|
|
186
|
+
problem({peerDependencies: {'@astryxdesign/cli': range}}),
|
|
187
|
+
).toBeNull();
|
|
188
|
+
}
|
|
189
|
+
for (const range of ['^0.6.0', '>=0.6.3', '*']) {
|
|
190
|
+
expect(
|
|
191
|
+
problem({peerDependencies: {'@astryxdesign/cli': range}}),
|
|
192
|
+
).toContain('admits a stable CLI before 0.6.4');
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it('keeps 0.7.0 for replaces and keywords', () => {
|
|
197
|
+
const pkg = {peerDependencies: {'@astryxdesign/cli': '>=0.6.4'}};
|
|
198
|
+
expect(docsTreeCliProblem(pkg)).toBeNull();
|
|
199
|
+
expect(replacesCliProblem(pkg)).toContain(
|
|
200
|
+
'admits a stable CLI before 0.7.0',
|
|
201
|
+
);
|
|
202
|
+
expect(keywordsCliProblem(pkg)).toContain(
|
|
203
|
+
'admits a stable CLI before 0.7.0',
|
|
204
|
+
);
|
|
205
|
+
expect(
|
|
206
|
+
keywordsCliProblem({peerDependencies: {'@astryxdesign/cli': '>=0.7.0'}}),
|
|
207
|
+
).toBeNull();
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it('names a released CLI for a feature that already shipped', () => {
|
|
211
|
+
const {version} = JSON.parse(
|
|
212
|
+
fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf-8'),
|
|
213
|
+
);
|
|
214
|
+
for (const floor of [NAMESPACE_DOCS_CLI, THEMES_CLI, SECTION_IDS_CLI]) {
|
|
215
|
+
expect(semverCompare(floor, version.split('-')[0])).toBeLessThanOrEqual(
|
|
216
|
+
0,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
it('declares the floor a theme needs as an optional peer', () => {
|
|
222
|
+
const declared = withCliPeer({name: '@acme/kit'}, THEMES_CLI);
|
|
223
|
+
expect(declared.peerDependencies).toEqual({
|
|
224
|
+
'@astryxdesign/cli': '>=0.6.4',
|
|
225
|
+
});
|
|
226
|
+
expect(declared.peerDependenciesMeta).toEqual({
|
|
227
|
+
'@astryxdesign/cli': {optional: true},
|
|
228
|
+
});
|
|
229
|
+
expect(themesCliProblem(declared)).toBeNull();
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
describe('cliRangeProblem', () => {
|
|
234
|
+
it('fails loudly when a caller names no floor', () => {
|
|
235
|
+
expect(() =>
|
|
236
|
+
// @ts-expect-error: the floor is required
|
|
237
|
+
cliRangeProblem({name: '@acme/kit'}, 'ships x', 'drops x'),
|
|
238
|
+
).toThrow(TypeError);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('fails loudly when the floor is not a version', () => {
|
|
242
|
+
expect(() =>
|
|
243
|
+
cliRangeProblem({name: '@acme/kit'}, '0.6.4', 'ships x', 'drops x'),
|
|
244
|
+
).toThrow(TypeError);
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
describe('every feature check names its CLI floor', () => {
|
|
249
|
+
// The first stable CLI release that reads each feature. A new check, or a
|
|
250
|
+
// check whose floor changes, fails here until this table says so on
|
|
251
|
+
// purpose, so a floor never moves as a side effect of another change.
|
|
252
|
+
const FLOORS = {
|
|
253
|
+
componentReplacesCliProblem: COMPONENT_REPLACES_CLI,
|
|
254
|
+
docsTreeCliProblem: '0.6.4',
|
|
255
|
+
replacesCliProblem: REPLACES_CLI,
|
|
256
|
+
keywordsCliProblem: REPLACES_CLI,
|
|
257
|
+
sectionIdsCliProblem: '0.6.4',
|
|
258
|
+
themesCliProblem: '0.6.4',
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
it('asks each feature for the CLI release this table names', () => {
|
|
262
|
+
const named = Object.fromEntries(
|
|
263
|
+
Object.entries(requirement)
|
|
264
|
+
.filter(
|
|
265
|
+
([name, value]) =>
|
|
266
|
+
typeof value === 'function' &&
|
|
267
|
+
/CliProblem$/.test(name) &&
|
|
268
|
+
name !== 'cliRangeProblem',
|
|
269
|
+
)
|
|
270
|
+
.map(([name, check]) => [
|
|
271
|
+
name,
|
|
272
|
+
/A stable CLI before (\d+\.\d+\.\d+)/.exec(
|
|
273
|
+
check({name: '@acme/kit'}) ?? '',
|
|
274
|
+
)?.[1] ?? null,
|
|
275
|
+
]),
|
|
276
|
+
);
|
|
277
|
+
expect(named).toEqual({
|
|
278
|
+
...FLOORS,
|
|
279
|
+
// Tied to the next patch slot: the first stable release that ships
|
|
280
|
+
// component replacement.
|
|
281
|
+
componentReplacesCliProblem: '0.6.7',
|
|
282
|
+
replacesCliProblem: '0.7.0',
|
|
283
|
+
keywordsCliProblem: '0.7.0',
|
|
284
|
+
});
|
|
88
285
|
});
|
|
89
286
|
});
|
|
@@ -71,9 +71,9 @@ function enumerateThemeFiles(root, pkgDir) {
|
|
|
71
71
|
if (!root || !fs.existsSync(root) || !fs.statSync(root).isDirectory()) {
|
|
72
72
|
return [];
|
|
73
73
|
}
|
|
74
|
-
// Exactly what `theme
|
|
75
|
-
// tests and fixtures, but no dot entry
|
|
76
|
-
// beside the theme folders belong to no theme.
|
|
74
|
+
// Exactly what `theme eject` copies and what the package ships as source:
|
|
75
|
+
// each theme folder's files, including tests and fixtures, but no dot entry
|
|
76
|
+
// or file npm never publishes. Files beside the theme folders belong to no theme.
|
|
77
77
|
/** @type {string[]} */
|
|
78
78
|
const files = [];
|
|
79
79
|
for (const entry of fs.readdirSync(root, {withFileTypes: true})) {
|
|
@@ -44,15 +44,21 @@ export interface CLIUnsupportedError {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* A success response: a `type` discriminator,
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* A success response: a `type` discriminator, the `package` that owns what the
|
|
48
|
+
* response is about, its `data` payload, and an optional `meta` sidecar
|
|
49
|
+
* (emitted as a sibling of `data`, never merged in). `--json` prints it with
|
|
50
|
+
* `apiVersion` added (see `parseResponse`).
|
|
51
|
+
*
|
|
52
|
+
* `package` is present when the response is about one thing: one component,
|
|
53
|
+
* one doc, one template. A response that lists things from more than one
|
|
54
|
+
* package leaves it out, and each listed item names its own `package`.
|
|
50
55
|
*
|
|
51
56
|
* Structural by design — there is no central union of every response `type`.
|
|
52
57
|
* A specific command narrows `data` via its own return type.
|
|
53
58
|
*/
|
|
54
59
|
export interface CLIResponse {
|
|
55
60
|
type: string;
|
|
61
|
+
package?: string;
|
|
56
62
|
data: unknown;
|
|
57
63
|
meta?: Record<string, unknown>;
|
|
58
64
|
}
|
|
@@ -31,15 +31,18 @@ export function humanWarn(...args: unknown[]): void;
|
|
|
31
31
|
* Output a JSON response envelope and mark it handled.
|
|
32
32
|
*
|
|
33
33
|
* Structural serializer: pass a command/API result straight through as
|
|
34
|
-
* `{type, data, meta?}`. There is no central response union — the
|
|
35
|
-
* of the `type` discriminator is guaranteed at each API function's
|
|
36
|
-
* (that's the fractal source-of-truth point), not by a map in this
|
|
34
|
+
* `{type, package?, data, meta?}`. There is no central response union — the
|
|
35
|
+
* correctness of the `type` discriminator is guaranteed at each API function's
|
|
36
|
+
* `@returns` (that's the fractal source-of-truth point), not by a map in this
|
|
37
|
+
* file. `package` names the npm package that owns the one thing the result is
|
|
38
|
+
* about (spec cli-surface INV28); it is written directly after `type`.
|
|
37
39
|
*
|
|
38
|
-
* @param {{type: string, data: unknown, meta?: Record<string, unknown>}} response
|
|
40
|
+
* @param {{type: string, package?: string, data: unknown, meta?: Record<string, unknown>}} response
|
|
39
41
|
* @returns {void}
|
|
40
42
|
*/
|
|
41
43
|
export function jsonOut(response: {
|
|
42
44
|
type: string;
|
|
45
|
+
package?: string;
|
|
43
46
|
data: unknown;
|
|
44
47
|
meta?: Record<string, unknown>;
|
|
45
48
|
}): void;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* The contract has four guarantees, enforced here and in index.mjs:
|
|
8
8
|
*
|
|
9
9
|
* 1. EVERY emission in --json mode is a single valid JSON envelope.
|
|
10
|
-
* Success: { apiVersion, type, data }
|
|
10
|
+
* Success: { apiVersion, type, package?, data, meta? }
|
|
11
11
|
* Error: { apiVersion, error, code, suggestions? }
|
|
12
12
|
* The `code` is a stable, machine-readable identifier (see
|
|
13
13
|
* error-codes.mjs). Consumers should branch on `code`, never on the
|
|
@@ -87,16 +87,20 @@ export function humanWarn(...args) {
|
|
|
87
87
|
* Output a JSON response envelope and mark it handled.
|
|
88
88
|
*
|
|
89
89
|
* Structural serializer: pass a command/API result straight through as
|
|
90
|
-
* `{type, data, meta?}`. There is no central response union — the
|
|
91
|
-
* of the `type` discriminator is guaranteed at each API function's
|
|
92
|
-
* (that's the fractal source-of-truth point), not by a map in this
|
|
90
|
+
* `{type, package?, data, meta?}`. There is no central response union — the
|
|
91
|
+
* correctness of the `type` discriminator is guaranteed at each API function's
|
|
92
|
+
* `@returns` (that's the fractal source-of-truth point), not by a map in this
|
|
93
|
+
* file. `package` names the npm package that owns the one thing the result is
|
|
94
|
+
* about (spec cli-surface INV28); it is written directly after `type`.
|
|
93
95
|
*
|
|
94
|
-
* @param {{type: string, data: unknown, meta?: Record<string, unknown>}} response
|
|
96
|
+
* @param {{type: string, package?: string, data: unknown, meta?: Record<string, unknown>}} response
|
|
95
97
|
* @returns {void}
|
|
96
98
|
*/
|
|
97
99
|
export function jsonOut(response) {
|
|
98
100
|
/** @type {any} */
|
|
99
|
-
const envelope = {apiVersion: API_VERSION, type: response.type
|
|
101
|
+
const envelope = {apiVersion: API_VERSION, type: response.type};
|
|
102
|
+
if (response.package !== undefined) envelope.package = response.package;
|
|
103
|
+
envelope.data = response.data;
|
|
100
104
|
if (response.meta !== undefined) envelope.meta = response.meta;
|
|
101
105
|
// Serialize BEFORE marking handled. If JSON.stringify throws (a circular
|
|
102
106
|
// reference or a BigInt in `data` — an author bug in a command's return
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @file EnumDoc for the `type` discriminant carried on every --json success
|
|
6
|
-
* envelope. The vocabulary
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `data` payload. Descriptions follow the currently published
|
|
10
|
-
* projection, not a future package-version boundary.
|
|
6
|
+
* envelope. The vocabulary equals the manifest's response types (each
|
|
7
|
+
* command's FunctionDoc returns; see `clients/cli/lib/manifest.mjs`) plus
|
|
8
|
+
* ROOT_RESPONSE_TYPES (help, version) there; a consumer switches on `type` to
|
|
9
|
+
* narrow the `data` payload. Descriptions follow the currently published
|
|
10
|
+
* response projection, not a future package-version boundary.
|
|
11
11
|
*
|
|
12
12
|
* @input Public response discriminants and their currently released payloads.
|
|
13
13
|
* @output Generated consumer reference for every typed JSON success response.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file EnumDoc for the `type` discriminant carried on every --json success
|
|
5
|
-
* envelope. The vocabulary
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `data` payload. Descriptions follow the currently published
|
|
9
|
-
* projection, not a future package-version boundary.
|
|
5
|
+
* envelope. The vocabulary equals the manifest's response types (each
|
|
6
|
+
* command's FunctionDoc returns; see `clients/cli/lib/manifest.mjs`) plus
|
|
7
|
+
* ROOT_RESPONSE_TYPES (help, version) there; a consumer switches on `type` to
|
|
8
|
+
* narrow the `data` payload. Descriptions follow the currently published
|
|
9
|
+
* response projection, not a future package-version boundary.
|
|
10
10
|
*
|
|
11
11
|
* @input Public response discriminants and their currently released payloads.
|
|
12
12
|
* @output Generated consumer reference for every typed JSON success response.
|
|
@@ -36,7 +36,7 @@ export const doc = {
|
|
|
36
36
|
{
|
|
37
37
|
value: 'component.list',
|
|
38
38
|
description:
|
|
39
|
-
"The component catalog grouped by component group (each component's group field): `detail` (the level: names | compact | full) and `components`, the grouped map of names entries ({name, package, and optional canonical import for integrations}), brief entries, or a full ComponentDoc per entry.",
|
|
39
|
+
"The component catalog grouped by component group (each component's group field): `detail` (the level: names | compact | full) and `components`, the grouped map of names entries ({name, package, and optional canonical import for integrations}), brief entries ({name, package, description, import}), or a full ComponentDoc per entry with its package.",
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
value: 'component.batch',
|
|
@@ -46,25 +46,25 @@ export const doc = {
|
|
|
46
46
|
{
|
|
47
47
|
value: 'component.detail',
|
|
48
48
|
description:
|
|
49
|
-
"One component's authored ComponentDoc plus ownership fields (package, the owner; import, the specifier; sourceAvailable, whether source exists) and parentDoc (present when the component is documented inside another component's doc, naming that doc).",
|
|
49
|
+
"One component's authored ComponentDoc plus ownership fields (package, the owner; import, the specifier; sourceAvailable, whether source exists) and parentDoc (present when the component is documented inside another component's doc, naming that doc). The envelope's package names the same owner.",
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
value: 'component.detail.props',
|
|
53
|
-
description: "Just one component's props table (ComponentPropDoc[]).",
|
|
53
|
+
description: "Just one component's props table (ComponentPropDoc[]). The envelope's package names the npm package that owns the component.",
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
value: 'component.detail.source',
|
|
57
|
-
description: "One component's source file, as {component, source}.",
|
|
57
|
+
description: "One component's source file, as {component, source}. The envelope's package names the npm package that owns the component.",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
value: 'component.detail.showcase',
|
|
61
61
|
description:
|
|
62
|
-
"One component's showcase example, as {component, aspectRatio, source}.",
|
|
62
|
+
"One component's showcase example, as {component, aspectRatio, source}. The envelope's package names the npm package that owns the component.",
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
value: 'component.detail.blocks',
|
|
66
66
|
description:
|
|
67
|
-
"One component's example blocks, as {component, showcase, examples, related} of BlockEntry.",
|
|
67
|
+
"One component's example blocks, as {component, showcase, examples, related} of BlockEntry ({name, package, displayName, description, isShowcase, category}); each block names the package that owns it, and the envelope's package names the component's owner.",
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
// docs
|
|
@@ -76,22 +76,22 @@ export const doc = {
|
|
|
76
76
|
{
|
|
77
77
|
value: 'docs.detail',
|
|
78
78
|
description:
|
|
79
|
-
"One topic's full ReferenceDoc (the JSON read of a topic, --full, --dense, or a topic with one section), with token-ref blocks inlined, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
79
|
+
"One topic's full ReferenceDoc (the JSON read of a topic, --full, --dense, or a topic with one section), with token-ref blocks inlined and each section naming the package that wrote it, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
value: 'docs.index',
|
|
83
83
|
description:
|
|
84
|
-
"One topic's section index, the text read of a topic with more than one section (and --index): the topic's name, title, and description, plus sections, each {id, title, summary} (pass the id as the section argument; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
84
|
+
"One topic's section index, the text read of a topic with more than one section (and --index): the topic's name, title, and description, plus sections, each {id, title, package, summary} (pass the id as the section argument; package is the npm package that wrote the section; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
value: 'docs.detail.section',
|
|
88
88
|
description:
|
|
89
|
-
'One ReferenceSection of a topic, found by key or title, with token-ref blocks inlined, plus links ({up, previous, next}: the commands that open its topic index and the sections before and after it).',
|
|
89
|
+
'One ReferenceSection of a topic, found by key or title, with token-ref blocks inlined, plus links ({up, previous, next}: the commands that open its topic index and the sections before and after it). The envelope\'s package names the npm package that wrote the section.',
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
value: 'docs.node',
|
|
93
93
|
description:
|
|
94
|
-
"One node of the docs tree, read by its route: its id, kind, package, title, summary, and breadcrumb, plus a namespace's slots with their children (one level down) or a typed doc's content, and links ({up, previous, next, related}: the commands that open its parent, its neighbors, and the docs it names).",
|
|
94
|
+
"One node of the docs tree, read by its route: its id, kind, package, title, summary, and breadcrumb, plus a namespace's slots with their children (one level down, each naming its package) or a typed doc's content, and links ({up, previous, next, related}: the commands that open its parent, its neighbors, and the docs it names).",
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
// blog (read from the published RSS feed)
|
|
@@ -137,7 +137,7 @@ export const doc = {
|
|
|
137
137
|
{
|
|
138
138
|
value: 'search',
|
|
139
139
|
description:
|
|
140
|
-
'The echoed query, `matchCount` (total matches, before `limit`), and results, a ranked SearchResultEntry[] bounded by `limit`: each {domain, name, score, reason, description, command}, plus import (components, hooks), title, parent (the command that opens the level above),
|
|
140
|
+
'The echoed query, `matchCount` (total matches, before `limit`), and results, a ranked SearchResultEntry[] bounded by `limit`: each {domain, name, package, score, reason, description, command} (package is the npm package that owns the result), plus import (components, hooks), title, parent (the command that opens the level above), and, for a hit on one section, section (docs), or displayName and kind (templates).',
|
|
141
141
|
},
|
|
142
142
|
|
|
143
143
|
// build
|
|
@@ -149,19 +149,19 @@ export const doc = {
|
|
|
149
149
|
{
|
|
150
150
|
value: 'build.kit',
|
|
151
151
|
description:
|
|
152
|
-
"The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, command, basis, reason, alternatives, ...}, pages (search's closest templates), blocks and domain as SearchResultEntry[], frame
|
|
152
|
+
"The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, package, command, basis, reason, alternatives, ...} (the start and each alternative name the package that owns the template), pages (search's closest templates), blocks and domain as SearchResultEntry[] (each naming its package), frame and foundation (Core component names), and hint {reason, commands} when thin.",
|
|
153
153
|
},
|
|
154
154
|
|
|
155
155
|
// swizzle
|
|
156
156
|
{
|
|
157
157
|
value: 'swizzle.list',
|
|
158
158
|
description:
|
|
159
|
-
"The names of swizzlable components discoverable from cwd's @astryxdesign/core.",
|
|
159
|
+
"The names of swizzlable components discoverable from cwd's @astryxdesign/core. The envelope's package is @astryxdesign/core.",
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
value: 'swizzle.copy',
|
|
163
163
|
description:
|
|
164
|
-
'An eject receipt: component name, owning package, output directory, files-copied count, the written file names, whether any file uses StyleX, and, when the owner has an issues URL, feedback ({issuesUrl, ghCommand?}): where to report the gap that led to swizzling.',
|
|
164
|
+
'An eject receipt: component name, owning package, output directory, files-copied count, the written file names, whether any file uses StyleX, and, when the owner has an issues URL, feedback ({issuesUrl, ghCommand?}): where to report the gap that led to swizzling. The envelope\'s package names the same owning package.',
|
|
165
165
|
},
|
|
166
166
|
|
|
167
167
|
// gap reports
|
|
@@ -184,17 +184,17 @@ export const doc = {
|
|
|
184
184
|
{
|
|
185
185
|
value: 'template.show',
|
|
186
186
|
description:
|
|
187
|
-
"The resolved template's
|
|
187
|
+
"The resolved template's source, exactly as a copy writes it, plus its description, kind, the component names it composes, and demoMediaReplaced (how many Astryx demo media references were replaced with placeholders for you to swap for your own media).",
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
value: 'template.skeleton',
|
|
191
191
|
description:
|
|
192
|
-
"A layout skeleton (structural tags with spatial annotations) plus the template's description and the components it composes.",
|
|
192
|
+
"A layout skeleton (structural tags with spatial annotations) plus the template's description and the components it composes. The envelope's package names the npm package that owns the template.",
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
value: 'template.copy',
|
|
196
196
|
description:
|
|
197
|
-
'A scaffold receipt: template id, output directory, written file name, and
|
|
197
|
+
'A scaffold receipt: template id, output directory, written file name, file count, and demoMediaReplaced (how many Astryx demo media references were replaced with placeholders for you to swap for your own media). The envelope\'s package names the npm package that owns the template.',
|
|
198
198
|
},
|
|
199
199
|
|
|
200
200
|
{
|
|
@@ -207,19 +207,24 @@ export const doc = {
|
|
|
207
207
|
{
|
|
208
208
|
value: 'hook.list',
|
|
209
209
|
description:
|
|
210
|
-
'The hook catalog grouped by category: `detail` (the level: names | compact | full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry.',
|
|
210
|
+
'The hook catalog grouped by category: `detail` (the level: names | compact | full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. The envelope\'s package is @astryxdesign/core, the only package that ships hooks.',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: 'hook.detail',
|
|
214
|
+
description:
|
|
215
|
+
"One hook's full authored HookDoc. The envelope's package is @astryxdesign/core.",
|
|
211
216
|
},
|
|
212
|
-
{value: 'hook.detail', description: "One hook's full authored HookDoc."},
|
|
213
217
|
{
|
|
214
218
|
value: 'hook.detail.params',
|
|
215
|
-
description:
|
|
219
|
+
description:
|
|
220
|
+
"Just one hook's parameters table (HookParamDoc[]). The envelope's package is @astryxdesign/core.",
|
|
216
221
|
},
|
|
217
222
|
|
|
218
223
|
// theme
|
|
219
224
|
{
|
|
220
225
|
value: 'theme.build',
|
|
221
226
|
description:
|
|
222
|
-
'A theme build receipt: name, tokenCount and componentCount (override counts), sizeKB, the written outputs {css, js, dts, and variantsDts when applicable}, warnings (defects to fix), and notices (advisories about a correct theme, such as a named font it does not load).',
|
|
227
|
+
'A theme build receipt: name, tokenCount and componentCount (override counts), sizeKB, the written outputs {css, cssDts, js, dts, and variantsDts when applicable}, warnings (defects to fix), and notices (advisories about a correct theme, such as a named font it does not load).',
|
|
223
228
|
},
|
|
224
229
|
{
|
|
225
230
|
value: 'theme.build.check',
|
|
@@ -234,12 +239,22 @@ export const doc = {
|
|
|
234
239
|
{
|
|
235
240
|
value: 'theme.list',
|
|
236
241
|
description:
|
|
237
|
-
'Every bundled
|
|
242
|
+
'Every bundled, installed package, and local theme as a ThemeListEntry[]. Each entry has slug, displayName, description, maintained, owner package or local root, source, added, and default fields. Optional meta.unmigratedCopies names earlier descriptor-less copies, their missing descriptor, and the upgrade command; those copies are not data entries.',
|
|
238
243
|
},
|
|
239
244
|
{
|
|
240
245
|
value: 'theme.add',
|
|
241
246
|
description:
|
|
242
|
-
'
|
|
247
|
+
'The released source-copy receipt: slug, displayName, maintained flag, owner package, outputDir, source entry, exportName, and files. Its additive meta.deprecations entry names DEP-0005 and the source-fork/import replacements.',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
value: 'theme.app',
|
|
251
|
+
description:
|
|
252
|
+
'The app theme record after add, remove, or use. It includes every added theme and its built imports, the default slug, generated module path, and the command change. After add, the envelope package names the npm package that owns the added theme; a local theme has none.',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
value: 'theme.eject',
|
|
256
|
+
description:
|
|
257
|
+
'A local source-fork receipt with the resolved slug, displayName, source theme maintained flag, source-selector package, outputDir, source entry, exportName, and every file written, including the descriptor. The written local descriptor always uses maintained: false.',
|
|
243
258
|
},
|
|
244
259
|
{
|
|
245
260
|
value: 'theme.template',
|
|
@@ -261,7 +276,7 @@ export const doc = {
|
|
|
261
276
|
{
|
|
262
277
|
value: 'upgrade.list',
|
|
263
278
|
description:
|
|
264
|
-
'Every available codemod, oldest→newest, as {name, title, version, optional}; returned for --list without running anything.',
|
|
279
|
+
'Every available codemod, oldest→newest, as {name, package, title, version, optional}; returned for --list without running anything.',
|
|
265
280
|
},
|
|
266
281
|
{
|
|
267
282
|
value: 'upgrade.registry',
|
|
@@ -276,7 +291,7 @@ export const doc = {
|
|
|
276
291
|
{
|
|
277
292
|
value: 'upgrade.run',
|
|
278
293
|
description:
|
|
279
|
-
'The run receipt: from/to versions, codemod count, integrations processed, the agent-docs summary, and (apply mode) filesChanged, transformsApplied, and per-codemod errors.',
|
|
294
|
+
'The run receipt: from/to versions, codemod count, integrations processed, the agent-docs summary, sourcePathFound (false when the resolved source directory does not exist, so no source file was read), and (apply mode) filesChanged, transformsApplied, and per-codemod errors.',
|
|
280
295
|
},
|
|
281
296
|
|
|
282
297
|
// manifest
|
|
@@ -320,29 +335,29 @@ export const doc = {
|
|
|
320
335
|
{
|
|
321
336
|
value: 'integration.validate',
|
|
322
337
|
description:
|
|
323
|
-
'The validation result: the package name and version (both null when
|
|
338
|
+
'The validation result: validated (false when no integration manifest was found, so nothing was checked and the empty issues list proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message}.',
|
|
324
339
|
},
|
|
325
340
|
{
|
|
326
341
|
value: 'integration.template-conflicts',
|
|
327
342
|
description:
|
|
328
|
-
'
|
|
343
|
+
'validated (false when no integration manifest was found, so nothing was inspected), the integration identity, structural issues, and non-blocking Core template-id conflicts as {id, severity: warning, integrationPackage, integrationType, integrationName, coreMatches, message, command}.',
|
|
329
344
|
},
|
|
330
345
|
{
|
|
331
346
|
value: 'integration.component-conflicts',
|
|
332
347
|
description:
|
|
333
|
-
'
|
|
348
|
+
'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.',
|
|
334
349
|
},
|
|
335
350
|
{
|
|
336
351
|
value: 'integration.doc-conflicts',
|
|
337
352
|
description:
|
|
338
|
-
'
|
|
353
|
+
'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`).',
|
|
339
354
|
},
|
|
340
355
|
|
|
341
356
|
// layout (XLE/XLO)
|
|
342
357
|
{
|
|
343
358
|
value: 'layout.expand',
|
|
344
359
|
description:
|
|
345
|
-
'The expansion: parsed form, generated TSX code, componentsUsed, states (count of useState hooks scaffolded), todos, blocksReferenced (each {name, mode}), warnings,
|
|
360
|
+
'The expansion: parsed form, generated TSX code, componentsUsed, states (count of useState hooks scaffolded), todos, blocksReferenced (each {name, mode}), warnings, written (the output path, or null when nothing was written), and demoMediaReplaced (count of demo media placeholders).',
|
|
346
361
|
},
|
|
347
362
|
{
|
|
348
363
|
value: 'layout.check',
|