@astryxdesign/cli 0.6.3-canary.ea2f048 → 0.6.3-canary.f04b501
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/README.md +106 -72
- package/api/blog/blog.doc.mjs +1 -0
- package/api/build/build.doc.mjs +4 -3
- package/api/build/build.test.mjs +14 -3
- package/api/build/build.type.d.mts +36 -2
- package/api/build/build.type.mjs +25 -4
- package/api/build/help/help.d.mts +8 -5
- package/api/build/help/help.mjs +56 -6
- package/api/component/component.doc.mjs +13 -3
- package/api/component/component.mjs +31 -2
- package/api/component/component.test.mjs +38 -0
- package/api/component/component.type.d.mts +22 -11
- package/api/component/component.type.mjs +32 -24
- package/api/component/detail/blocks/blocks.d.mts +2 -1
- package/api/component/detail/blocks/blocks.mjs +4 -3
- package/api/component/list/list.d.mts +0 -5
- package/api/component/list/list.mjs +37 -9
- package/api/discover/discover.doc.mjs +2 -1
- package/api/discover/discover.type.d.mts +4 -4
- package/api/discover/discover.type.mjs +10 -10
- package/api/docs/_adapter.d.mts +32 -24
- package/api/docs/_adapter.mjs +81 -87
- package/api/docs/compiled-topics.test.mjs +78 -0
- package/api/docs/detail/detail.mjs +14 -63
- package/api/docs/detail/section/section.d.mts +1 -1
- package/api/docs/detail/section/section.mjs +44 -20
- package/api/docs/detail/section/section.test.mjs +41 -0
- package/api/docs/docs.d.mts +7 -2
- package/api/docs/docs.doc.mjs +28 -10
- package/api/docs/docs.mjs +16 -9
- package/api/docs/docs.test.mjs +6 -0
- package/api/docs/docs.type.d.mts +40 -3
- package/api/docs/docs.type.mjs +36 -8
- package/api/docs/index/index.d.mts +18 -0
- package/api/docs/index/index.mjs +32 -0
- package/api/docs/index/index.test.mjs +62 -0
- package/api/docs/integrationDocs.test.mjs +106 -0
- package/api/docs/list/list.mjs +3 -7
- package/api/doctor/doctor.d.mts +70 -0
- package/api/doctor/doctor.doc.mjs +1 -0
- package/api/doctor/doctor.mjs +404 -0
- package/api/doctor/doctor.test.mjs +522 -1
- package/api/gap-report/gap-report.doc.mjs +8 -4
- package/api/hook/_adapter.mjs +19 -5
- package/api/hook/hook.doc.mjs +1 -0
- package/api/hook/hook.type.d.mts +3 -3
- package/api/hook/hook.type.mjs +11 -11
- package/api/hook/list/list.d.mts +2 -2
- package/api/hook/list/list.mjs +69 -17
- package/api/init/init.doc.mjs +5 -0
- package/api/init/init.test.mjs +41 -1
- package/api/init/remove/remove.mjs +1 -1
- package/api/init/run/run.mjs +20 -10
- package/api/integration/add-contribution.component-names.test.mjs +120 -0
- package/api/integration/add-contribution.mjs +23 -10
- package/api/integration/add-contribution.test.mjs +121 -7
- package/api/integration/add-theme.mjs +34 -64
- package/api/integration/add-theme.test.mjs +105 -21
- package/api/integration/authoring-checks.test.mjs +8 -4
- package/api/integration/integration-authoring.type.d.mts +1 -1
- package/api/integration/integration-block-exports.test.mjs +10 -6
- package/api/integration/integrationAdd.doc.mjs +8 -4
- package/api/integration/integrationAddAgentDoc.doc.mjs +1 -0
- package/api/integration/integrationAddCodemod.doc.mjs +1 -0
- package/api/integration/integrationAddComponent.doc.mjs +2 -1
- package/api/integration/integrationAddDoc.doc.mjs +1 -0
- package/api/integration/integrationAddTemplate.doc.mjs +1 -0
- package/api/integration/integrationAddTheme.doc.mjs +6 -5
- package/api/integration/integrationComponentConflicts.doc.mjs +1 -0
- package/api/integration/integrationDocConflicts.doc.mjs +1 -0
- package/api/integration/integrationPackCheck.doc.mjs +1 -0
- package/api/integration/integrationTemplateConflicts.doc.mjs +1 -0
- package/api/integration/pack-check.mjs +49 -7
- package/api/integration/pack-check.test.mjs +266 -47
- package/api/integration/summarizeIssues.doc.mjs +1 -0
- package/api/integration/validate-integration-fixes.test.mjs +1389 -0
- package/api/integration/validate-integration.mjs +52 -102
- package/api/integration/validate-integration.test.mjs +176 -23
- package/api/integration/validate-unread-theme-folders.test.mjs +110 -0
- package/api/integration/validateIntegration.doc.mjs +2 -1
- package/api/json/assertResponse.doc.mjs +1 -0
- package/api/json/envelope-types.test.mjs +76 -0
- package/api/json/isError.doc.mjs +1 -0
- package/api/json/parseResponse.doc.mjs +3 -2
- package/api/layout/expand/expand.mjs +7 -5
- package/api/layout/expand/expand.path-safety.test.mjs +53 -0
- package/api/layout/grammar/grammar.mjs +2 -1
- package/api/layout/layoutCheck.doc.mjs +1 -0
- package/api/layout/layoutExpand.doc.mjs +2 -1
- package/api/layout/layoutGrammar.doc.mjs +1 -0
- package/api/search/search-return-type.test.mjs +54 -0
- package/api/search/search.d.mts +3 -10
- package/api/search/search.doc.mjs +6 -1
- package/api/search/search.mjs +31 -14
- package/api/search/search.test.mjs +34 -0
- package/api/search/search.type.d.mts +2 -2
- package/api/search/search.type.mjs +1 -1
- package/api/swizzle/copy/copy.mjs +28 -11
- package/api/swizzle/swizzle.doc.mjs +2 -1
- package/api/swizzle/swizzle.type.d.mts +2 -2
- package/api/swizzle/swizzle.type.mjs +2 -2
- package/api/template/copy/copy.mjs +17 -23
- package/api/template/copy/copy.test.mjs +17 -0
- package/api/template/template-suffix.test.mjs +41 -21
- package/api/template/template.d.mts +1 -1
- package/api/template/template.doc.mjs +3 -1
- package/api/template/template.type.d.mts +6 -6
- package/api/template/template.type.mjs +12 -12
- package/api/theme/_adapter.d.mts +2 -3
- package/api/theme/_adapter.mjs +4 -5
- package/api/theme/add/add.binary.test.mjs +84 -0
- package/api/theme/add/add.mjs +20 -3
- package/api/theme/add/add.staging.test.mjs +66 -0
- package/api/theme/add/add.test.mjs +14 -1
- package/api/theme/build/build.mjs +133 -42
- package/api/theme/build/build.public-component-vars.test.mjs +1 -1
- package/api/theme/build/build.receipt-doc.test.mjs +111 -0
- package/api/theme/build/build.test.mjs +127 -0
- package/api/theme/build/font-warning.mjs +3 -3
- package/api/theme/build/font-warning.test.mjs +5 -2
- package/api/theme/generateTonalPalette.doc.mjs +1 -0
- package/api/theme/integration-themes.test.mjs +39 -28
- package/api/theme/list/list.test.mjs +19 -20
- package/api/theme/listThemes.doc.mjs +6 -5
- package/api/theme/palette/generate/generate.mjs +8 -3
- package/api/theme/palette/generate/generate.test.mjs +96 -0
- package/api/theme/palette/generate/generator.d.mts +10 -13
- package/api/theme/palette/generate/generator.mjs +15 -4
- package/api/theme/palette/generate/generator.test.mjs +10 -0
- package/api/theme/template/template.mjs +11 -2
- package/api/theme/template/template.test.mjs +15 -0
- package/api/theme/theme.type.d.mts +170 -11
- package/api/theme/theme.type.mjs +94 -27
- package/api/theme/themeAdd.doc.mjs +4 -3
- package/api/theme/themeBuild.doc.mjs +8 -4
- package/api/theme/themeList.doc.mjs +6 -3
- package/api/theme/themeListAvailable.doc.mjs +5 -3
- package/api/theme/themePaletteGenerate.doc.mjs +1 -0
- package/api/theme/themeTargets.doc.mjs +1 -0
- package/api/theme/themeTemplate.doc.mjs +5 -1
- package/api/upgrade/_adapter.d.mts +12 -3
- package/api/upgrade/_adapter.mjs +123 -19
- package/api/upgrade/list/list.mjs +2 -1
- package/api/upgrade/list/list.test.mjs +73 -0
- package/api/upgrade/project-context.test.mjs +272 -0
- package/api/upgrade/provider-agreement.test.mjs +152 -0
- package/api/upgrade/run/run.mjs +1 -0
- package/api/upgrade/status/status.mjs +2 -2
- package/api/upgrade/upgrade.doc.mjs +7 -4
- package/api/upgrade/upgrade.type.d.mts +9 -5
- package/api/upgrade/upgrade.type.mjs +12 -11
- package/assets/codemods/integration-discovery.mjs +48 -4
- package/assets/codemods/integration-discovery.test.mjs +73 -0
- package/assets/codemods/runner.mjs +115 -5
- package/assets/codemods/term-log.mjs +32 -8
- package/assets/codemods/term-log.test.mjs +19 -1
- package/assets/codemods/transform-prop.mjs +109 -0
- package/assets/codemods/transform-prop.test.mjs +95 -0
- package/assets/codemods/transforms/next/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +216 -0
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/migrate-theme-catalog-to-descriptors.mjs +141 -0
- package/assets/codemods/transforms/v0.0.14/__tests__/rename-status-variants.test.mjs +86 -165
- package/assets/codemods/transforms/v0.0.14/rename-status-variants.mjs +72 -210
- package/assets/codemods/transforms/v0.1.8/__tests__/rename-avatar-size-scale.test.mjs +83 -115
- package/assets/codemods/transforms/v0.1.8/rename-avatar-size-scale.mjs +57 -186
- package/assets/codemods/transforms/v0.3.0/__tests__/unwrap-authoring-factories.test.mjs +27 -5
- package/assets/codemods/transforms/v0.3.0/unwrap-authoring-factories.mjs +20 -5
- package/assets/codemods/transforms/v0.6.0/__tests__/next-codemods.test.mjs +47 -0
- package/assets/codemods/transforms/v0.6.0/rename-resizable-pixel-bounds.mjs +57 -10
- package/assets/docs/README.md +9 -0
- package/assets/docs/authoring.doc.mjs +14 -0
- package/assets/docs/cli-integrations.doc.mjs +78 -20
- package/assets/docs/cli.doc.mjs +15 -0
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.tsx +61 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.tsx +126 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.tsx +86 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.tsx +99 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.tsx +122 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.tsx +95 -0
- package/assets/templates/pages/table-tree/page.tsx +1704 -0
- package/assets/templates/pages/table-tree/template.doc.mjs +12 -0
- package/assets/templates/themes/butter/butterTheme.doc.mjs +11 -0
- package/assets/templates/themes/chocolate/chocolateTheme.doc.mjs +11 -0
- package/assets/templates/themes/gothic/gothicTheme.doc.mjs +11 -0
- package/assets/templates/themes/matcha/matchaTheme.doc.mjs +11 -0
- package/assets/templates/themes/neutral/neutralTheme.doc.mjs +11 -0
- package/assets/templates/themes/stone/stoneTheme.doc.mjs +11 -0
- package/assets/templates/themes/y2k/y2kTheme.doc.mjs +11 -0
- package/authoring/_shared/contract.ts +22 -0
- package/authoring/codemod/codemod.doc.mjs +7 -2
- package/authoring/codemod/parse.d.mts +8 -8
- package/authoring/codemod/parse.mjs +8 -6
- package/authoring/config/config.doc.mjs +2 -2
- package/authoring/config/debug-composition.test.mjs +92 -0
- package/authoring/config/parse.d.mts +13 -13
- package/authoring/config/parse.mjs +8 -8
- package/authoring/config/type.ts +18 -6
- package/authoring/debug/debug.doc.d.mts +11 -0
- package/authoring/debug/debug.doc.mjs +182 -0
- package/authoring/debug/parse.d.mts +5 -5
- package/authoring/debug/parse.mjs +3 -3
- package/authoring/doctypes/_schema.d.mts +788 -23
- package/authoring/doctypes/_schema.mjs +492 -39
- package/authoring/doctypes/base/graph-fields.doc.d.mts +9 -0
- package/authoring/doctypes/base/graph-fields.doc.mjs +62 -0
- package/authoring/doctypes/base/type.ts +40 -0
- package/authoring/doctypes/command/command.doc.mjs +4 -3
- package/authoring/doctypes/command/parse.d.mts +2 -2
- package/authoring/doctypes/command/parse.mjs +1 -1
- package/authoring/doctypes/command/type.ts +4 -3
- package/authoring/doctypes/component/component.doc.mjs +6 -3
- package/authoring/doctypes/component/parse.d.mts +2 -2
- package/authoring/doctypes/component/parse.mjs +1 -1
- package/authoring/doctypes/component/type.ts +6 -5
- package/authoring/doctypes/doctypes-new.test.mjs +48 -6
- package/authoring/doctypes/enum/enum.doc.mjs +1 -1
- package/authoring/doctypes/enum/parse.d.mts +2 -2
- package/authoring/doctypes/enum/parse.mjs +1 -1
- package/authoring/doctypes/enum/type.ts +4 -2
- package/authoring/doctypes/function/function.doc.mjs +5 -1
- package/authoring/doctypes/function/parse.d.mts +2 -2
- package/authoring/doctypes/function/parse.mjs +1 -1
- package/authoring/doctypes/function/type.ts +7 -3
- package/authoring/doctypes/hook/hook.doc.mjs +4 -0
- package/authoring/doctypes/hook/parse.d.mts +2 -2
- package/authoring/doctypes/hook/parse.mjs +1 -1
- package/authoring/doctypes/hook/type.ts +5 -4
- package/authoring/doctypes/legacy.d.mts +8 -6
- package/authoring/doctypes/legacy.mjs +5 -4
- package/authoring/doctypes/load-contract.test.mjs +208 -0
- package/authoring/doctypes/namespace/namespace.doc.d.mts +9 -0
- package/authoring/doctypes/namespace/namespace.doc.mjs +132 -0
- package/authoring/doctypes/namespace/parse.d.mts +12 -0
- package/authoring/doctypes/namespace/parse.mjs +25 -0
- package/authoring/doctypes/namespace/parse.test.mjs +165 -0
- package/authoring/doctypes/namespace/type.ts +71 -0
- package/authoring/doctypes/parse.d.mts +22 -18
- package/authoring/doctypes/parse.mjs +22 -12
- package/authoring/doctypes/parse.test.mjs +77 -3
- package/authoring/doctypes/reference/parse.d.mts +2 -2
- package/authoring/doctypes/reference/parse.mjs +8 -5
- package/authoring/doctypes/reference/reference.doc.mjs +18 -5
- package/authoring/doctypes/reference/type.ts +53 -7
- package/authoring/doctypes/schema/parse.d.mts +2 -2
- package/authoring/doctypes/schema/parse.mjs +1 -1
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/schema/type.ts +4 -4
- package/authoring/doctypes/template/parse.d.mts +92 -1
- package/authoring/doctypes/template/parse.mjs +36 -2
- package/authoring/doctypes/template/parse.test.mjs +8 -2
- package/authoring/doctypes/template/template.doc.mjs +7 -3
- package/authoring/doctypes/template/type.ts +5 -2
- package/authoring/doctypes/theme/parse.d.mts +35 -0
- package/authoring/doctypes/theme/parse.mjs +76 -0
- package/authoring/doctypes/theme/theme.doc.d.mts +9 -0
- package/authoring/doctypes/theme/theme.doc.mjs +79 -0
- package/authoring/doctypes/theme/type.ts +42 -0
- package/authoring/doctypes/types.ts +12 -10
- package/authoring/gap-report/gap-report.doc.d.mts +12 -0
- package/authoring/gap-report/gap-report.doc.mjs +183 -0
- package/authoring/gap-report/parse.d.mts +10 -10
- package/authoring/gap-report/parse.mjs +6 -6
- package/authoring/gap-report/type.ts +1 -1
- package/authoring/identity/identity.doc.d.mts +9 -0
- package/authoring/identity/identity.doc.mjs +61 -0
- package/authoring/identity/type.ts +132 -0
- package/authoring/index.d.mts +2 -0
- package/authoring/index.d.ts +51 -17
- package/authoring/index.mjs +3 -1
- package/authoring/integration/integration.doc.mjs +15 -8
- package/authoring/integration/parse.d.mts +2 -2
- package/authoring/integration/parse.mjs +1 -1
- package/authoring/integration/parse.test.mjs +10 -1
- package/authoring/integration/schema.d.mts +6 -4
- package/authoring/integration/schema.mjs +9 -3
- package/authoring/integration/type.ts +18 -7
- package/authoring/shadcn/receipt.d.mts +6 -6
- package/clients/cli/__tests__/cliManifest.test.ts +27 -29
- package/clients/cli/command-load-failure.test.mjs +83 -0
- package/clients/cli/commands/blog.doc.mjs +1 -1
- package/clients/cli/commands/blog.mjs +23 -8
- package/clients/cli/commands/blog.test.mjs +42 -1
- package/clients/cli/commands/build-theme.ascii-output.test.mjs +161 -0
- package/clients/cli/commands/build-theme.flag-docs.test.mjs +110 -0
- package/clients/cli/commands/build-theme.mjs +5 -5
- package/clients/cli/commands/build-theme.path-safety.test.mjs +86 -1
- package/clients/cli/commands/build-theme.variants.test.mjs +76 -0
- package/clients/cli/commands/build.doc.mjs +5 -2
- package/clients/cli/commands/build.exit-codes-doc.test.mjs +50 -0
- package/clients/cli/commands/build.mjs +32 -47
- package/clients/cli/commands/build.playbook.test.mjs +75 -0
- package/clients/cli/commands/build.text-fields.test.mjs +40 -0
- package/clients/cli/commands/component/index.mjs +2 -7
- package/clients/cli/commands/component-package.test.mjs +46 -0
- package/clients/cli/commands/component-resolution.test.mjs +21 -0
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/component.test.mjs +19 -0
- package/clients/cli/commands/detail-levels.test.mjs +2 -2
- package/clients/cli/commands/discover.broken-integration.test.mjs +48 -0
- package/clients/cli/commands/discover.components-flag.test.mjs +97 -0
- package/clients/cli/commands/discover.doc.mjs +5 -3
- package/clients/cli/commands/discover.mjs +3 -3
- package/clients/cli/commands/discover.text-projection.test.mjs +103 -0
- package/clients/cli/commands/docs.doc.mjs +14 -4
- package/clients/cli/commands/docs.mjs +121 -21
- package/clients/cli/commands/docs.test.mjs +88 -0
- package/clients/cli/commands/doctor-integration-components.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-templates.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-validate.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.package-json.test.mjs +53 -0
- package/clients/cli/commands/doctor-integration.test.mjs +15 -7
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +6 -16
- package/clients/cli/commands/doctor.test.mjs +42 -0
- package/clients/cli/commands/gap-report.doc.mjs +17 -6
- package/clients/cli/commands/gap-report.test.mjs +72 -0
- package/clients/cli/commands/hook/index.mjs +7 -17
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/hook.text-projection.test.mjs +45 -0
- package/clients/cli/commands/init.doc.mjs +20 -9
- package/clients/cli/commands/init.flag-help.test.mjs +153 -0
- package/clients/cli/commands/integration-add.controls.test.mjs +132 -0
- package/clients/cli/commands/integration-add.doc.mjs +22 -6
- package/clients/cli/commands/integration-authoring.test.mjs +13 -9
- package/clients/cli/commands/integration-pack.doc.mjs +1 -1
- package/clients/cli/commands/integration-real-world.test.mjs +3 -9
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/interactive-guard.test.mjs +101 -24
- package/clients/cli/commands/json-contract.test.mjs +33 -0
- package/clients/cli/commands/layout-check.doc.mjs +15 -4
- package/clients/cli/commands/layout-expand.doc.mjs +22 -5
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -1
- package/clients/cli/commands/layout.doc.mjs +3 -3
- package/clients/cli/commands/layout.mjs +21 -9
- package/clients/cli/commands/layout.path-help.test.mjs +33 -0
- package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
- package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/no-prompt-wording.test.mjs +94 -0
- package/clients/cli/commands/search.doc.mjs +7 -4
- package/clients/cli/commands/search.mjs +17 -7
- package/clients/cli/commands/search.test.mjs +75 -0
- package/clients/cli/commands/swizzle.doc.mjs +3 -2
- package/clients/cli/commands/swizzle.path-safety.test.mjs +42 -0
- package/clients/cli/commands/template.doc.mjs +29 -7
- package/clients/cli/commands/template.flag-help.test.mjs +117 -0
- package/clients/cli/commands/template.path-help.test.mjs +40 -0
- package/clients/cli/commands/theme-add.doc.mjs +4 -3
- package/clients/cli/commands/theme-build.doc.mjs +8 -7
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +9 -5
- package/clients/cli/commands/theme-palette-generate.test.mjs +19 -0
- package/clients/cli/commands/theme-palette.doc.mjs +1 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/theme-template.behavior.test.mjs +12 -0
- package/clients/cli/commands/theme-template.doc.mjs +2 -2
- package/clients/cli/commands/theme.doc.mjs +1 -1
- package/clients/cli/commands/upgrade.ascii-output.test.mjs +87 -0
- package/clients/cli/commands/upgrade.doc.mjs +20 -9
- package/clients/cli/commands/upgrade.flag-help.test.mjs +188 -0
- package/clients/cli/commands/upgrade.hook-output.test.mjs +88 -0
- package/clients/cli/formatters/index.mjs +162 -1
- package/clients/cli/formatters/index.test.mjs +91 -0
- package/clients/cli/index.mjs +13 -30
- package/clients/cli/latest-version-env.test.mjs +50 -0
- package/clients/cli/lib/cli-error.test.mjs +7 -0
- package/clients/cli/lib/component-format.mjs +9 -9
- package/clients/cli/lib/component-format.test.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +32 -6
- package/clients/cli/lib/doc-text-ascii.test.mjs +82 -0
- package/clients/cli/lib/exit-codes.test.mjs +97 -0
- package/clients/cli/lib/hook-format.mjs +19 -10
- package/clients/cli/lib/json-shim.mjs +38 -2
- package/clients/cli/lib/json-shim.test.mjs +83 -0
- package/clients/cli/lib/manifest.d.ts +2 -0
- package/clients/cli/lib/manifest.mjs +29 -2
- package/clients/cli/lib/manifest.test.mjs +17 -0
- package/foundation/agent-docs/agent-docs.d.mts +4 -0
- package/foundation/agent-docs/agent-docs.mjs +69 -3
- package/foundation/agent-docs/agent-docs.path-safety.test.mjs +266 -4
- package/foundation/config/integration-debug.test.mjs +28 -3
- package/foundation/config/project-themes.test.mjs +11 -19
- package/foundation/config/project.d.mts +8 -0
- package/foundation/config/project.mjs +190 -32
- package/foundation/config/project.test.mjs +129 -16
- package/foundation/discovery/authoring-self-docs.d.mts +75 -0
- package/foundation/discovery/authoring-self-docs.mjs +224 -0
- package/foundation/discovery/authoring-self-docs.test.mjs +154 -0
- package/foundation/discovery/authoring-surface.d.mts +74 -0
- package/foundation/discovery/authoring-surface.mjs +525 -0
- package/foundation/discovery/authoring-surface.test.mjs +392 -0
- package/foundation/discovery/cli-self-docs.d.mts +113 -0
- package/foundation/discovery/cli-self-docs.mjs +514 -0
- package/foundation/discovery/cli-self-docs.test.mjs +437 -0
- package/foundation/discovery/component-discovery.d.mts +1 -1
- package/foundation/discovery/component-discovery.mjs +2 -1
- package/foundation/discovery/component-loader.d.mts +35 -38
- package/foundation/discovery/component-loader.mjs +53 -222
- package/foundation/discovery/docs-discovery.d.mts +12 -4
- package/foundation/discovery/docs-discovery.mjs +214 -98
- package/foundation/discovery/docs-discovery.test.mjs +284 -15
- package/foundation/discovery/docs-output-budget.d.mts +28 -0
- package/foundation/discovery/docs-output-budget.mjs +50 -0
- package/foundation/discovery/docs-section-key.d.mts +98 -0
- package/foundation/discovery/docs-section-key.mjs +221 -0
- package/foundation/discovery/docs-section-key.test.mjs +224 -0
- package/foundation/discovery/template-adapter.d.mts +21 -5
- package/foundation/discovery/template-adapter.fixture-refs.test.mjs +248 -0
- package/foundation/discovery/template-adapter.integration-isolation.test.mjs +94 -0
- package/foundation/discovery/template-adapter.mjs +321 -66
- package/foundation/discovery/template-adapter.test.mjs +15 -0
- package/foundation/discovery/theme-discovery.d.mts +67 -7
- package/foundation/discovery/theme-discovery.mjs +916 -186
- package/foundation/discovery/theme-discovery.test.mjs +613 -219
- package/foundation/discovery/theming-targets.test.mjs +4 -0
- package/foundation/doc-compiler/bundle.d.mts +47 -0
- package/foundation/doc-compiler/bundle.mjs +218 -0
- package/foundation/doc-compiler/bundle.test.mjs +255 -0
- package/foundation/doc-compiler/compile.d.mts +362 -0
- package/foundation/doc-compiler/compile.mjs +511 -0
- package/foundation/doc-compiler/diagnostics.d.mts +126 -0
- package/foundation/doc-compiler/diagnostics.mjs +277 -0
- package/foundation/doc-compiler/doc-compiler.test.mjs +714 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +1642 -0
- package/foundation/doc-compiler/import.d.mts +24 -0
- package/foundation/doc-compiler/import.mjs +59 -0
- package/foundation/doc-compiler/inputs.d.mts +102 -0
- package/foundation/doc-compiler/inputs.mjs +286 -0
- package/foundation/doc-compiler/inputs.test.mjs +299 -0
- package/foundation/doc-compiler/ir.d.mts +22 -0
- package/foundation/doc-compiler/ir.mjs +464 -0
- package/foundation/doc-compiler/lenses.d.mts +33 -0
- package/foundation/doc-compiler/lenses.mjs +127 -0
- package/foundation/doc-compiler/lower-doc.test.mjs +492 -0
- package/foundation/doc-compiler/overlays.d.mts +37 -0
- package/foundation/doc-compiler/overlays.mjs +206 -0
- package/foundation/doc-compiler/parse-readable.d.mts +9 -0
- package/foundation/doc-compiler/parse-readable.mjs +29 -0
- package/foundation/doc-compiler/read.d.mts +126 -0
- package/foundation/doc-compiler/read.mjs +320 -0
- package/foundation/doc-compiler/read.test.mjs +313 -0
- package/foundation/doc-compiler/source.d.mts +33 -0
- package/foundation/doc-compiler/source.mjs +128 -0
- package/foundation/fs/module-loader.d.mts +1 -0
- package/foundation/fs/module-loader.mjs +50 -1
- package/foundation/fs/module-loader.stdout.test.mjs +332 -0
- package/foundation/fs/path-safety.d.mts +3 -2
- package/foundation/fs/path-safety.mjs +49 -19
- package/foundation/fs/path-safety.test.mjs +50 -0
- package/foundation/fs/publish-file-hardlink-unavailable.test.mjs +129 -94
- package/foundation/identity/provider-identity.d.mts +90 -0
- package/foundation/identity/provider-identity.mjs +320 -0
- package/foundation/identity/provider-identity.test.mjs +254 -0
- package/foundation/identity/providers.d.mts +7 -0
- package/foundation/identity/providers.mjs +16 -0
- package/foundation/integrations/autolink.d.mts +58 -1
- package/foundation/integrations/autolink.mjs +143 -45
- package/foundation/integrations/contribution-fixes.d.mts +145 -0
- package/foundation/integrations/contribution-fixes.mjs +1284 -0
- package/foundation/integrations/contribution-inventory.d.mts +1 -1
- package/foundation/integrations/contribution-inventory.mjs +17 -20
- package/foundation/integrations/contribution-inventory.test.mjs +67 -27
- package/foundation/integrations/integration-warnings.mjs +6 -0
- package/foundation/integrations/integrations.d.mts +49 -2
- package/foundation/integrations/integrations.mjs +81 -8
- package/foundation/integrations/integrations.test.mjs +384 -1
- package/foundation/integrations/provider-conflicts.test.mjs +125 -0
- package/foundation/integrations/provider-ledger.test.mjs +275 -0
- package/foundation/integrations/provider-resolution.d.mts +152 -0
- package/foundation/integrations/provider-resolution.mjs +576 -0
- package/foundation/integrations/provider-resolution.test.mjs +369 -0
- package/foundation/integrations/theme-descriptor.d.mts +8 -0
- package/foundation/integrations/theme-descriptor.mjs +44 -0
- package/foundation/integrations/validate-contributions.d.mts +2 -0
- package/foundation/integrations/validate-contributions.mjs +114 -10
- package/foundation/response/base.d.ts +8 -4
- package/foundation/response/error-codes.doc.mjs +3 -4
- package/foundation/response/error-codes.mjs +2 -2
- package/foundation/response/error-codes.test.mjs +83 -0
- package/foundation/response/json-contract.test.mjs +57 -17
- package/foundation/response/json.d.mts +4 -2
- package/foundation/response/json.mjs +8 -10
- package/foundation/response/response-types.doc.mjs +16 -11
- package/foundation/response/response-types.doc.test.mjs +158 -0
- package/foundation/response/response.doc.mjs +1 -1
- package/foundation/text/string-utils.mjs +22 -10
- package/foundation/xle/expand.d.mts +2 -0
- package/foundation/xle/expand.mjs +3 -2
- package/foundation/xle/expand.test.mjs +54 -0
- package/package.json +9 -11
- package/assets/templates/themes/manifest.json +0 -95
- package/clients/cli/lib/update-check.mjs +0 -83
- package/clients/cli/lib/update-check.test.mjs +0 -137
- package/clients/cli/update-hint-commands.test.mjs +0 -54
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file SchemaDoc for provider, artifact, and immutable instance identity.
|
|
5
|
+
* @position packages/cli/authoring/identity — identity documentation
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
|
|
9
|
+
export const doc = {
|
|
10
|
+
type: 'schema',
|
|
11
|
+
name: 'provider-identity',
|
|
12
|
+
displayName: 'Provider and artifact identity',
|
|
13
|
+
namespace: 'authoring',
|
|
14
|
+
description:
|
|
15
|
+
'Separates stable provider/artifact identity from package instances and runtime lifecycle state. providerId is in use today: an integration manifest may declare it, and Doctor and every command report two packages that claim one. The artifact, doc, instance, and compiler-input identities are defined for the docs graph, which is not built yet, and no command reads them.',
|
|
16
|
+
appliesTo:
|
|
17
|
+
'Integration manifests and provider conflicts today; the docs graph once it ships',
|
|
18
|
+
fields: [
|
|
19
|
+
{
|
|
20
|
+
name: 'ProviderId',
|
|
21
|
+
type: 'string',
|
|
22
|
+
description:
|
|
23
|
+
'Canonical logical provider ID. It defaults to the lowercase npm package name; Core uses the same model without publishing an integration manifest.',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'ArtifactId',
|
|
28
|
+
type: 'string',
|
|
29
|
+
description:
|
|
30
|
+
'Versioned serialization of provider ID, contribution kind, and stable artifact name. Every segment uses RFC 3986 escaping.',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'DocId',
|
|
35
|
+
type: 'ArtifactId',
|
|
36
|
+
description:
|
|
37
|
+
'Artifact ID restricted to one authored doc kind. Navigation changes do not change it.',
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'ProviderInstance',
|
|
42
|
+
type: '{ id; providerId; packageName; packageVersion; sourceDigest }',
|
|
43
|
+
description:
|
|
44
|
+
'One immutable package version and source/content digest. Installed, configured, loaded, selected, and healthy state is a separate runtime overlay.',
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'AuthoredDocEntry',
|
|
49
|
+
type: '{ id; provider; kind; stableName; source; authored }',
|
|
50
|
+
description:
|
|
51
|
+
'Normalized compiler input. Discovery supplies stableName independently from the authored display name, source paths remain package-relative, and provider provenance plus the authored snapshot are immutable.',
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
notes: [
|
|
56
|
+
{
|
|
57
|
+
type: 'prose',
|
|
58
|
+
text: 'Provider package renames require an explicit mapping: a ProviderInstance may retain its stable providerId while packageName changes. Silent identity changes are not inferred.',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file Stable provider, artifact, and authored-doc entry contracts.
|
|
5
|
+
*
|
|
6
|
+
* Logical IDs exclude installed/configured/loaded/healthy state. A concrete
|
|
7
|
+
* provider instance adds package version and a content digest, while an
|
|
8
|
+
* artifact ID stays stable across those instances.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {AuthoredDocKind} from '../doctypes/base/type.js';
|
|
12
|
+
import type {CommandDoc} from '../doctypes/command/type.js';
|
|
13
|
+
import type {ComponentDoc} from '../doctypes/component/type.js';
|
|
14
|
+
import type {EnumDoc} from '../doctypes/enum/type.js';
|
|
15
|
+
import type {FunctionDoc} from '../doctypes/function/type.js';
|
|
16
|
+
import type {HookDoc} from '../doctypes/hook/type.js';
|
|
17
|
+
import type {NamespaceDoc} from '../doctypes/namespace/type.js';
|
|
18
|
+
import type {ReferenceDoc} from '../doctypes/reference/type.js';
|
|
19
|
+
import type {SchemaDoc} from '../doctypes/schema/type.js';
|
|
20
|
+
import type {TemplateDoc} from '../doctypes/template/type.js';
|
|
21
|
+
|
|
22
|
+
declare const providerIdBrand: unique symbol;
|
|
23
|
+
declare const artifactIdBrand: unique symbol;
|
|
24
|
+
declare const docIdBrand: unique symbol;
|
|
25
|
+
declare const providerInstanceIdBrand: unique symbol;
|
|
26
|
+
declare const contentDigestBrand: unique symbol;
|
|
27
|
+
|
|
28
|
+
/** Canonical provider identity. It defaults to the normalized npm package name. */
|
|
29
|
+
export type ProviderId = string & {readonly [providerIdBrand]: true};
|
|
30
|
+
|
|
31
|
+
/** Stable provider + contribution kind + artifact-name identity. */
|
|
32
|
+
export type ArtifactId = string & {readonly [artifactIdBrand]: true};
|
|
33
|
+
|
|
34
|
+
/** ArtifactId narrowed to an authored documentation kind. */
|
|
35
|
+
export type DocId = ArtifactId & {readonly [docIdBrand]: true};
|
|
36
|
+
|
|
37
|
+
/** Immutable provider version + source/content digest identity. */
|
|
38
|
+
export type ProviderInstanceId = string & {
|
|
39
|
+
readonly [providerInstanceIdBrand]: true;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** Lowercase `sha256:<64 hex characters>` digest. */
|
|
43
|
+
export type ContentDigest = string & {readonly [contentDigestBrand]: true};
|
|
44
|
+
|
|
45
|
+
/** Every stable artifact kind owned by a provider. */
|
|
46
|
+
export type ContributionKind =
|
|
47
|
+
AuthoredDocKind | 'theme' | 'codemod' | 'agent-doc';
|
|
48
|
+
|
|
49
|
+
/** Stable logical identity for one provider-owned artifact. */
|
|
50
|
+
export interface ArtifactIdentity {
|
|
51
|
+
readonly id: ArtifactId;
|
|
52
|
+
readonly providerId: ProviderId;
|
|
53
|
+
readonly kind: ContributionKind;
|
|
54
|
+
readonly name: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** One immutable package instance. Runtime lifecycle state does not belong here. */
|
|
58
|
+
export interface ProviderInstance {
|
|
59
|
+
readonly id: ProviderInstanceId;
|
|
60
|
+
readonly providerId: ProviderId;
|
|
61
|
+
readonly packageName: string;
|
|
62
|
+
readonly packageVersion: string;
|
|
63
|
+
readonly sourceDigest: ContentDigest;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Every authored value accepted by the documentation compiler boundary. */
|
|
67
|
+
export type AuthoredDoc =
|
|
68
|
+
| ComponentDoc
|
|
69
|
+
| HookDoc
|
|
70
|
+
| FunctionDoc
|
|
71
|
+
| ReferenceDoc
|
|
72
|
+
| TemplateDoc
|
|
73
|
+
| SchemaDoc
|
|
74
|
+
| CommandDoc
|
|
75
|
+
| EnumDoc
|
|
76
|
+
| NamespaceDoc;
|
|
77
|
+
|
|
78
|
+
/** Provenance attached by discovery before compilation. */
|
|
79
|
+
export interface AuthoredDocSource {
|
|
80
|
+
/** Provider-local logical discovery group. */
|
|
81
|
+
readonly group: string;
|
|
82
|
+
/** Package-relative source path; excluded from compiled renderer data. */
|
|
83
|
+
readonly path: string;
|
|
84
|
+
/** Digest of the authored source bytes. */
|
|
85
|
+
readonly digest: ContentDigest;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Authored kind that corresponds to one public document type. */
|
|
89
|
+
export type AuthoredDocKindOf<TDoc extends AuthoredDoc> =
|
|
90
|
+
TDoc extends ComponentDoc
|
|
91
|
+
? 'component'
|
|
92
|
+
: TDoc extends HookDoc | FunctionDoc
|
|
93
|
+
? 'function'
|
|
94
|
+
: TDoc extends ReferenceDoc
|
|
95
|
+
? 'generic'
|
|
96
|
+
: TDoc extends TemplateDoc
|
|
97
|
+
? TDoc['type']
|
|
98
|
+
: TDoc extends SchemaDoc
|
|
99
|
+
? 'schema'
|
|
100
|
+
: TDoc extends CommandDoc
|
|
101
|
+
? 'command'
|
|
102
|
+
: TDoc extends EnumDoc
|
|
103
|
+
? 'enum'
|
|
104
|
+
: TDoc extends NamespaceDoc
|
|
105
|
+
? 'namespace'
|
|
106
|
+
: never;
|
|
107
|
+
|
|
108
|
+
type DeepReadonly<Value> = Value extends (...args: never[]) => unknown
|
|
109
|
+
? Value
|
|
110
|
+
: Value extends readonly (infer Item)[]
|
|
111
|
+
? readonly DeepReadonly<Item>[]
|
|
112
|
+
: Value extends object
|
|
113
|
+
? {readonly [Key in keyof Value]: DeepReadonly<Value[Key]>}
|
|
114
|
+
: Value;
|
|
115
|
+
|
|
116
|
+
/** Immutable authored-data snapshot stored in a compiler entry. */
|
|
117
|
+
export type AuthoredDocSnapshot<TDoc extends AuthoredDoc = AuthoredDoc> =
|
|
118
|
+
DeepReadonly<TDoc>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* One normalized compiler input. Stable identity is provider + authored kind +
|
|
122
|
+
* stable name; provider version and source bytes remain explicit provenance.
|
|
123
|
+
*/
|
|
124
|
+
export interface AuthoredDocEntry<TDoc extends AuthoredDoc = AuthoredDoc> {
|
|
125
|
+
readonly id: DocId;
|
|
126
|
+
readonly provider: ProviderInstance;
|
|
127
|
+
readonly kind: AuthoredDocKindOf<TDoc>;
|
|
128
|
+
/** Stable provider-local key used in the DocId; it need not equal a display name. */
|
|
129
|
+
readonly stableName: string;
|
|
130
|
+
readonly source: AuthoredDocSource;
|
|
131
|
+
readonly authored: AuthoredDocSnapshot<TDoc>;
|
|
132
|
+
}
|
package/authoring/index.d.mts
CHANGED
|
@@ -14,5 +14,7 @@ export { parseTemplate } from "./doctypes/template/parse.mjs";
|
|
|
14
14
|
export { parseSchema } from "./doctypes/schema/parse.mjs";
|
|
15
15
|
export { parseCommand } from "./doctypes/command/parse.mjs";
|
|
16
16
|
export { parseEnum } from "./doctypes/enum/parse.mjs";
|
|
17
|
+
export { parseNamespace } from "./doctypes/namespace/parse.mjs";
|
|
18
|
+
export { parseTheme } from "./doctypes/theme/parse.mjs";
|
|
17
19
|
export { parseLegacyDoc } from "./doctypes/legacy.mjs";
|
|
18
20
|
export { parseGapReportHandler, parseGapReportReceipt } from "./gap-report/parse.mjs";
|
package/authoring/index.d.ts
CHANGED
|
@@ -23,17 +23,19 @@
|
|
|
23
23
|
// ═══════════════════════════════════════════════════════════════════════
|
|
24
24
|
// AUTHOR THESE — each is the default export of one authored file.
|
|
25
25
|
// ═══════════════════════════════════════════════════════════════════════
|
|
26
|
-
export type {ComponentDoc} from './doctypes/types'; // Button.doc.
|
|
27
|
-
export type {HookDoc} from './doctypes/types'; // useToast.doc.
|
|
28
|
-
export type {FunctionDoc} from './doctypes/types'; // search.doc.mjs (hook | api)
|
|
29
|
-
export type {ReferenceDoc} from './doctypes/types'; // theming.doc.
|
|
30
|
-
export type {TemplateDoc} from './doctypes/types'; // Foo.
|
|
31
|
-
export type {SchemaDoc} from './doctypes/types'; // config.doc.mjs (object shape)
|
|
32
|
-
export type {CommandDoc} from './doctypes/types'; // search.doc.mjs (CLI command)
|
|
33
|
-
export type {EnumDoc} from './doctypes/types'; // error-codes.doc.mjs (vocabulary)
|
|
34
|
-
export type {
|
|
35
|
-
export type {
|
|
36
|
-
export type {
|
|
26
|
+
export type {ComponentDoc} from './doctypes/types.js'; // Button.doc.mjs
|
|
27
|
+
export type {HookDoc} from './doctypes/types.js'; // useToast.doc.mjs
|
|
28
|
+
export type {FunctionDoc} from './doctypes/types.js'; // search.doc.mjs (hook | api)
|
|
29
|
+
export type {ReferenceDoc} from './doctypes/types.js'; // theming.doc.mjs
|
|
30
|
+
export type {TemplateDoc} from './doctypes/types.js'; // Foo.doc.mjs
|
|
31
|
+
export type {SchemaDoc} from './doctypes/types.js'; // config.doc.mjs (object shape)
|
|
32
|
+
export type {CommandDoc} from './doctypes/types.js'; // search.doc.mjs (CLI command)
|
|
33
|
+
export type {EnumDoc} from './doctypes/types.js'; // error-codes.doc.mjs (vocabulary)
|
|
34
|
+
export type {NamespaceDoc} from './doctypes/types.js'; // cli.doc.mjs (hierarchy)
|
|
35
|
+
export type {ThemeDoc} from './doctypes/types.js'; // oceanTheme.doc.mjs
|
|
36
|
+
export type {AstryxConfig} from './config/type.js'; // astryx.config.{ts,mjs}
|
|
37
|
+
export type {DebugEvent} from './debug/type.js'; // one recorded CLI run
|
|
38
|
+
export type {AstryxIntegration} from './integration/type.js'; // astryx.integration.{ts,mjs}
|
|
37
39
|
export type {
|
|
38
40
|
GapReportHandler,
|
|
39
41
|
GapReportHandlerContext,
|
|
@@ -41,8 +43,8 @@ export type {
|
|
|
41
43
|
GapReportCategory,
|
|
42
44
|
GapReportTarget,
|
|
43
45
|
GapReportHandlerReceipt,
|
|
44
|
-
} from './gap-report/type'; // gap-report handler contract
|
|
45
|
-
export type {AstryxCodemod, AstryxConfigCodemod} from './codemod/type'; // codemods/*
|
|
46
|
+
} from './gap-report/type.js'; // gap-report handler contract
|
|
47
|
+
export type {AstryxCodemod, AstryxConfigCodemod} from './codemod/type.js'; // codemods/*
|
|
46
48
|
|
|
47
49
|
// ═══════════════════════════════════════════════════════════════════════
|
|
48
50
|
// PARSERS — the CLI's load boundary (types come from each parser's JSDoc).
|
|
@@ -56,6 +58,8 @@ export {parseTemplate} from './doctypes/template/parse.mjs';
|
|
|
56
58
|
export {parseSchema} from './doctypes/schema/parse.mjs';
|
|
57
59
|
export {parseCommand} from './doctypes/command/parse.mjs';
|
|
58
60
|
export {parseEnum} from './doctypes/enum/parse.mjs';
|
|
61
|
+
export {parseNamespace} from './doctypes/namespace/parse.mjs';
|
|
62
|
+
export {parseTheme} from './doctypes/theme/parse.mjs';
|
|
59
63
|
export {parseLegacyDoc} from './doctypes/legacy.mjs';
|
|
60
64
|
export {parseConfig} from './config/parse.mjs';
|
|
61
65
|
export {parseIntegration} from './integration/parse.mjs';
|
|
@@ -72,6 +76,26 @@ export {parseDebugEvent} from './debug/parse.mjs';
|
|
|
72
76
|
// need them to author. Names carry the doc kind they belong to.
|
|
73
77
|
// ═══════════════════════════════════════════════════════════════════════
|
|
74
78
|
export type {
|
|
79
|
+
ProviderId,
|
|
80
|
+
ArtifactId,
|
|
81
|
+
DocId,
|
|
82
|
+
ProviderInstanceId,
|
|
83
|
+
ContentDigest,
|
|
84
|
+
ContributionKind,
|
|
85
|
+
ArtifactIdentity,
|
|
86
|
+
ProviderInstance,
|
|
87
|
+
AuthoredDoc,
|
|
88
|
+
AuthoredDocKindOf,
|
|
89
|
+
AuthoredDocSnapshot,
|
|
90
|
+
AuthoredDocSource,
|
|
91
|
+
AuthoredDocEntry,
|
|
92
|
+
} from './identity/type.js';
|
|
93
|
+
export type {
|
|
94
|
+
// shared graph
|
|
95
|
+
AuthoredDocKind,
|
|
96
|
+
DocAudience,
|
|
97
|
+
DocPlacement,
|
|
98
|
+
AuthoredDocGraphFields,
|
|
75
99
|
// component
|
|
76
100
|
SingleComponentDoc,
|
|
77
101
|
MultiComponentDoc,
|
|
@@ -109,6 +133,16 @@ export type {
|
|
|
109
133
|
ReferenceContentBlock,
|
|
110
134
|
ReferenceTokenPreviewType,
|
|
111
135
|
ReferenceTranslationDoc,
|
|
136
|
+
WorkflowStep,
|
|
137
|
+
WorkflowDocBlock,
|
|
138
|
+
CollectionDocBlock,
|
|
139
|
+
ReferenceDocBlock,
|
|
140
|
+
// namespace
|
|
141
|
+
NamespaceProviderScope,
|
|
142
|
+
NamespaceSlotAcceptance,
|
|
143
|
+
NamespaceSlot,
|
|
144
|
+
NamespaceAdoptionSource,
|
|
145
|
+
NamespaceAdoptionRule,
|
|
112
146
|
// template
|
|
113
147
|
TemplateCategory,
|
|
114
148
|
// schema
|
|
@@ -119,8 +153,8 @@ export type {
|
|
|
119
153
|
CommandExampleDoc,
|
|
120
154
|
// enum
|
|
121
155
|
EnumMemberDoc,
|
|
122
|
-
} from './doctypes/types';
|
|
123
|
-
export type {PostCodemodHook, DebugConfig} from './config/type';
|
|
156
|
+
} from './doctypes/types.js';
|
|
157
|
+
export type {PostCodemodHook, DebugConfig} from './config/type.js';
|
|
124
158
|
export type {
|
|
125
159
|
// debug
|
|
126
160
|
DebugSchemaVersion,
|
|
@@ -133,11 +167,11 @@ export type {
|
|
|
133
167
|
DebugEventEnv,
|
|
134
168
|
DebugEventProject,
|
|
135
169
|
DebugEventHandler,
|
|
136
|
-
} from './debug/type';
|
|
170
|
+
} from './debug/type.js';
|
|
137
171
|
export type {
|
|
138
172
|
AstryxCodemodDef,
|
|
139
173
|
AstryxConfigCodemodDef,
|
|
140
174
|
AstryxCodemodFile,
|
|
141
175
|
AstryxCodemodApi,
|
|
142
176
|
AstryxCodemodTransform,
|
|
143
|
-
} from './codemod/type';
|
|
177
|
+
} from './codemod/type.js';
|
package/authoring/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* `type` directly.
|
|
12
12
|
*
|
|
13
13
|
* Types (config, integration, codemod, and the doc vocabulary —
|
|
14
|
-
* component/hook/reference/template) are re-exported via `./index.ts`.
|
|
14
|
+
* component/hook/reference/template/theme) are re-exported via `./index.ts`.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
export {parseConfig} from './config/parse.mjs';
|
|
@@ -31,4 +31,6 @@ export {parseTemplate} from './doctypes/template/parse.mjs';
|
|
|
31
31
|
export {parseSchema} from './doctypes/schema/parse.mjs';
|
|
32
32
|
export {parseCommand} from './doctypes/command/parse.mjs';
|
|
33
33
|
export {parseEnum} from './doctypes/enum/parse.mjs';
|
|
34
|
+
export {parseNamespace} from './doctypes/namespace/parse.mjs';
|
|
35
|
+
export {parseTheme} from './doctypes/theme/parse.mjs';
|
|
34
36
|
export {parseLegacyDoc} from './doctypes/legacy.mjs';
|
|
@@ -11,14 +11,21 @@ export const doc = {
|
|
|
11
11
|
type: 'schema',
|
|
12
12
|
name: 'integration',
|
|
13
13
|
displayName: 'Astryx Integration',
|
|
14
|
-
namespace: '
|
|
14
|
+
namespace: 'authoring',
|
|
15
15
|
description:
|
|
16
16
|
'The astryx.integration.* manifest that sits beside an integration ' +
|
|
17
|
-
"package's package.json.
|
|
18
|
-
'templates, codemods, doc topics,
|
|
19
|
-
'
|
|
17
|
+
"package's package.json. It can preserve a stable provider identity across a package rename, " +
|
|
18
|
+
"and points the CLI at the package's components, templates, codemods, doc topics, " +
|
|
19
|
+
'source themes, managed agent guidance, and issue tracker. Every field is optional.',
|
|
20
20
|
appliesTo: 'astryx.integration.{ts,mjs,js}',
|
|
21
21
|
fields: [
|
|
22
|
+
{
|
|
23
|
+
name: 'providerId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
description:
|
|
26
|
+
'Stable logical provider ID. Omit to use package.json#name; set it to the prior package name only when an explicit rename must preserve artifact IDs. If two packages claim the same ID, the package being authored is used, otherwise the first-loaded one, and the CLI warns about the other.',
|
|
27
|
+
example: "'@acme/widgets'",
|
|
28
|
+
},
|
|
22
29
|
{
|
|
23
30
|
name: 'components',
|
|
24
31
|
type: 'string',
|
|
@@ -50,7 +57,7 @@ export const doc = {
|
|
|
50
57
|
name: 'themes',
|
|
51
58
|
type: 'string',
|
|
52
59
|
description:
|
|
53
|
-
'Relative path to a source-theme
|
|
60
|
+
'Relative path to a source-theme root with one directory per theme slug. Each directory contains a source module and mandatory same-stem, strongly typed .doc.mjs descriptor. Installed themes appear in `astryx theme list` and can be copied with `astryx theme add`.',
|
|
54
61
|
example: "'./themes'",
|
|
55
62
|
},
|
|
56
63
|
{
|
|
@@ -87,9 +94,9 @@ export const doc = {
|
|
|
87
94
|
{
|
|
88
95
|
type: 'prose',
|
|
89
96
|
text:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
'
|
|
97
|
+
'Provider identity defaults to package.json#name. During an explicit ' +
|
|
98
|
+
'package rename, set `providerId` to the prior canonical package name so ' +
|
|
99
|
+
'existing artifact IDs remain stable. Package version always comes from package.json.',
|
|
93
100
|
},
|
|
94
101
|
{
|
|
95
102
|
type: 'prose',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
|
-
/** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
|
|
4
|
+
/** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
|
|
5
5
|
/**
|
|
6
6
|
* Validate an unknown value as an Astryx integration manifest, or throw.
|
|
7
7
|
*
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* @returns {AstryxIntegration}
|
|
15
15
|
*/
|
|
16
16
|
export function parseIntegration(input: unknown, label?: string): AstryxIntegration;
|
|
17
|
-
export type AstryxIntegration = import("./type").AstryxIntegration;
|
|
17
|
+
export type AstryxIntegration = import("./type.js").AstryxIntegration;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import {formatZodError} from '../_shared/errors.mjs';
|
|
15
15
|
import {integrationSchema} from './schema.mjs';
|
|
16
16
|
|
|
17
|
-
/** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
|
|
17
|
+
/** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Validate an unknown value as an Astryx integration manifest, or throw.
|
|
@@ -28,6 +28,9 @@ describe('parseIntegration (load boundary)', () => {
|
|
|
28
28
|
components: './src',
|
|
29
29
|
});
|
|
30
30
|
expect(parseIntegration({docs: './docs'})).toEqual({docs: './docs'});
|
|
31
|
+
expect(parseIntegration({providerId: '@acme/legacy-widgets'})).toEqual({
|
|
32
|
+
providerId: '@acme/legacy-widgets',
|
|
33
|
+
});
|
|
31
34
|
expect(parseIntegration({themes: './themes'})).toEqual({
|
|
32
35
|
themes: './themes',
|
|
33
36
|
});
|
|
@@ -66,7 +69,9 @@ describe('parseIntegration (load boundary)', () => {
|
|
|
66
69
|
? 'https://example.com/issues'
|
|
67
70
|
: key === 'agentDocs'
|
|
68
71
|
? {}
|
|
69
|
-
: '
|
|
72
|
+
: key === 'providerId'
|
|
73
|
+
? '@acme/widgets'
|
|
74
|
+
: './x',
|
|
70
75
|
]),
|
|
71
76
|
);
|
|
72
77
|
expect(unknownIntegrationKeys(everyKnownKey)).toEqual([]);
|
|
@@ -82,6 +87,10 @@ describe('parseIntegration (load boundary)', () => {
|
|
|
82
87
|
expect(reason({issuesUrl: 'nope'})).toContain('issuesUrl');
|
|
83
88
|
});
|
|
84
89
|
|
|
90
|
+
it('rejects a noncanonical providerId', () => {
|
|
91
|
+
expect(reason({providerId: 'Acme Widgets'})).toContain('providerId');
|
|
92
|
+
});
|
|
93
|
+
|
|
85
94
|
it('accepts an optional append array as manifest data', () => {
|
|
86
95
|
expect(
|
|
87
96
|
parseIntegration({
|
|
@@ -32,6 +32,7 @@ export const agentDocsSchema: z.ZodObject<{
|
|
|
32
32
|
append: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export const integrationBaseSchema: z.ZodObject<{
|
|
35
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
35
36
|
components: z.ZodOptional<z.ZodString>;
|
|
36
37
|
templates: z.ZodOptional<z.ZodString>;
|
|
37
38
|
codemods: z.ZodOptional<z.ZodString>;
|
|
@@ -40,6 +41,7 @@ export const integrationBaseSchema: z.ZodObject<{
|
|
|
40
41
|
issuesUrl: z.ZodOptional<z.ZodString>;
|
|
41
42
|
}, z.core.$strip>;
|
|
42
43
|
export const integrationSchema: z.ZodObject<{
|
|
44
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
43
45
|
components: z.ZodOptional<z.ZodString>;
|
|
44
46
|
templates: z.ZodOptional<z.ZodString>;
|
|
45
47
|
codemods: z.ZodOptional<z.ZodString>;
|
|
@@ -53,8 +55,8 @@ export const integrationSchema: z.ZodObject<{
|
|
|
53
55
|
/**
|
|
54
56
|
* Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
|
|
55
57
|
*
|
|
56
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
57
|
-
* import('../_shared/contract').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
|
|
58
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
59
|
+
* import('../_shared/contract.js').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
|
|
58
60
|
* >} _IntegrationDriftLock
|
|
59
61
|
*/
|
|
60
62
|
/**
|
|
@@ -67,9 +69,9 @@ export const integrationSchema: z.ZodObject<{
|
|
|
67
69
|
* @type {string[]}
|
|
68
70
|
*/
|
|
69
71
|
export const KNOWN_INTEGRATION_KEYS: string[];
|
|
70
|
-
export type AstryxIntegration = import("./type").AstryxIntegration;
|
|
72
|
+
export type AstryxIntegration = import("./type.js").AstryxIntegration;
|
|
71
73
|
/**
|
|
72
74
|
* Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
|
|
73
75
|
*/
|
|
74
|
-
export type _IntegrationDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof integrationSchema>, AstryxIntegration>>;
|
|
76
|
+
export type _IntegrationDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof integrationSchema>, AstryxIntegration>>;
|
|
75
77
|
import { z } from 'zod';
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
import {z} from 'zod';
|
|
17
17
|
import {formatZodError} from '../_shared/errors.mjs';
|
|
18
18
|
|
|
19
|
-
/** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
|
|
19
|
+
/** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
|
|
20
20
|
|
|
21
21
|
const MAX_AGENT_DOC_LINES = 8;
|
|
22
22
|
const MAX_AGENT_DOC_LINE_CODE_POINTS = 240;
|
|
23
23
|
const MANAGED_MARKER_TEXT = /(?:ASTRYX|XDS):(START|END)/u;
|
|
24
|
+
const PROVIDER_ID_RE =
|
|
25
|
+
/^(?:@[a-z0-9][a-z0-9._~!*'()-]*\/)?[a-z0-9][a-z0-9._~!*'()-]*$/u;
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* @param {string} value
|
|
@@ -66,6 +68,10 @@ export const agentDocsSchema = z.object({
|
|
|
66
68
|
});
|
|
67
69
|
|
|
68
70
|
export const integrationBaseSchema = z.object({
|
|
71
|
+
providerId: z
|
|
72
|
+
.string()
|
|
73
|
+
.regex(PROVIDER_ID_RE, 'providerId must be a canonical npm package name')
|
|
74
|
+
.optional(),
|
|
69
75
|
components: z.string().optional(),
|
|
70
76
|
templates: z.string().optional(),
|
|
71
77
|
codemods: z.string().optional(),
|
|
@@ -115,8 +121,8 @@ export function parseAgentDocsField(input, label) {
|
|
|
115
121
|
/**
|
|
116
122
|
* Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
|
|
117
123
|
*
|
|
118
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
119
|
-
* import('../_shared/contract').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
|
|
124
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
125
|
+
* import('../_shared/contract.js').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
|
|
120
126
|
* >} _IntegrationDriftLock
|
|
121
127
|
*/
|
|
122
128
|
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Public type surface for an Astryx integration manifest
|
|
5
5
|
* (`astryx.integration.{ts,mjs,js}`, sibling to the integration package's
|
|
6
|
-
* package.json). Identity
|
|
7
|
-
*
|
|
8
|
-
* the CLI validates it via
|
|
6
|
+
* package.json). Identity defaults to the package name, but `providerId` can keep
|
|
7
|
+
* a stable logical identity across an explicit package rename. Authors write a
|
|
8
|
+
* plain object against {@link AstryxIntegration}; the CLI validates it via
|
|
9
|
+
* `parseIntegration` at the load boundary.
|
|
9
10
|
*
|
|
10
11
|
* The manifest module may also carry `debug` and `gapReport` NAMED exports.
|
|
11
12
|
* They are not fields here on purpose: a CLI released before a given manifest
|
|
@@ -13,19 +14,29 @@
|
|
|
13
14
|
* named export is simply not read. See the `cli-integrations` doc topic.
|
|
14
15
|
*/
|
|
15
16
|
export interface AstryxIntegration {
|
|
17
|
+
/** Stable logical provider ID. Omit to use package.json#name. Set this only
|
|
18
|
+
* when a package rename must preserve existing artifact IDs. */
|
|
19
|
+
providerId?: string;
|
|
16
20
|
/** Relative path to the components/docs root (resolved to absolute). */
|
|
17
21
|
components?: string;
|
|
18
22
|
/** Relative path to the templates root (resolved to absolute). */
|
|
19
23
|
templates?: string;
|
|
20
|
-
/** Relative path to the codemods root (resolved to absolute).
|
|
24
|
+
/** Relative path to the codemods root (resolved to absolute).
|
|
25
|
+
* The root uses a version-folder-first layout:
|
|
26
|
+
* `<codemodsRoot>/<version>/<id>.<ext>`, where `<version>` is an exact
|
|
27
|
+
* semver string (e.g. `0.2.0`, no `v` prefix) and `<id>` is a kebab-case
|
|
28
|
+
* module basename. Each module default-exports a codemod envelope stamped
|
|
29
|
+
* `type: 'code'` or `type: 'config'`. Codemod ids must be unique within
|
|
30
|
+
* a package across all versions. */
|
|
21
31
|
codemods?: string;
|
|
22
32
|
/** Relative path to the reference-docs (topics) root (resolved to
|
|
23
33
|
* absolute). Every `{topic}.doc.{ts,mjs,js}` under it is a topic the CLI
|
|
24
34
|
* serves from `astryx docs`, alongside the built-in ones. A topic may also
|
|
25
35
|
* `replace` or `extend` a built-in topic; see the ReferenceDoc type. */
|
|
26
36
|
docs?: string;
|
|
27
|
-
/** Relative path to the source-theme
|
|
28
|
-
*
|
|
37
|
+
/** Relative path to the source-theme root (resolved to absolute). Each
|
|
38
|
+
* lower-kebab theme directory contains a source module and mandatory
|
|
39
|
+
* same-stem, strongly typed `.doc.mjs` descriptor. */
|
|
29
40
|
themes?: string;
|
|
30
41
|
/** Static package guidance appended to the CLI-owned managed agent block. */
|
|
31
42
|
agentDocs?: {
|
|
@@ -49,4 +60,4 @@ export type {
|
|
|
49
60
|
GapReportCategory,
|
|
50
61
|
GapReportTarget,
|
|
51
62
|
GapReportHandlerReceipt,
|
|
52
|
-
} from '../gap-report/type';
|
|
63
|
+
} from '../gap-report/type.js';
|
|
@@ -63,7 +63,7 @@ export function createRegistryReceipt(input: {
|
|
|
63
63
|
name: string;
|
|
64
64
|
path: string;
|
|
65
65
|
aliases: string[];
|
|
66
|
-
kind: "
|
|
66
|
+
kind: "page" | "block" | "example" | "showcase";
|
|
67
67
|
};
|
|
68
68
|
source: {
|
|
69
69
|
package: "@astryxdesign/cli";
|
|
@@ -83,7 +83,7 @@ export function createRegistryReceipt(input: {
|
|
|
83
83
|
name: string;
|
|
84
84
|
path: string;
|
|
85
85
|
aliases: string[];
|
|
86
|
-
kind: "
|
|
86
|
+
kind: "page" | "block" | "example" | "showcase";
|
|
87
87
|
};
|
|
88
88
|
source: {
|
|
89
89
|
package: "@astryxdesign/cli";
|
|
@@ -112,7 +112,7 @@ export function parseRegistryReceipt(input: unknown): {
|
|
|
112
112
|
name: string;
|
|
113
113
|
path: string;
|
|
114
114
|
aliases: string[];
|
|
115
|
-
kind: "
|
|
115
|
+
kind: "page" | "block" | "example" | "showcase";
|
|
116
116
|
};
|
|
117
117
|
source: {
|
|
118
118
|
package: "@astryxdesign/cli";
|
|
@@ -132,7 +132,7 @@ export function parseRegistryReceipt(input: unknown): {
|
|
|
132
132
|
name: string;
|
|
133
133
|
path: string;
|
|
134
134
|
aliases: string[];
|
|
135
|
-
kind: "
|
|
135
|
+
kind: "page" | "block" | "example" | "showcase";
|
|
136
136
|
};
|
|
137
137
|
source: {
|
|
138
138
|
package: "@astryxdesign/cli";
|
|
@@ -165,8 +165,8 @@ export const registryReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
165
165
|
path: z.ZodString;
|
|
166
166
|
aliases: z.ZodArray<z.ZodString>;
|
|
167
167
|
kind: z.ZodEnum<{
|
|
168
|
-
block: "block";
|
|
169
168
|
page: "page";
|
|
169
|
+
block: "block";
|
|
170
170
|
example: "example";
|
|
171
171
|
showcase: "showcase";
|
|
172
172
|
}>;
|
|
@@ -190,8 +190,8 @@ export const registryReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
190
190
|
path: z.ZodString;
|
|
191
191
|
aliases: z.ZodArray<z.ZodString>;
|
|
192
192
|
kind: z.ZodEnum<{
|
|
193
|
-
block: "block";
|
|
194
193
|
page: "page";
|
|
194
|
+
block: "block";
|
|
195
195
|
example: "example";
|
|
196
196
|
showcase: "showcase";
|
|
197
197
|
}>;
|