@astryxdesign/cli 0.6.3-canary.ea2f048 → 0.6.3-canary.ee13359
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 +114 -76
- 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/_adapter.d.mts +6 -12
- package/api/component/_adapter.mjs +20 -10
- package/api/component/component.doc.mjs +13 -3
- package/api/component/component.mjs +91 -14
- 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 +40 -11
- 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 +230 -41
- package/api/docs/_adapter.mjs +734 -108
- package/api/docs/compiled-topics.test.mjs +78 -0
- package/api/docs/detail/detail.mjs +22 -63
- package/api/docs/detail/section/section.d.mts +1 -1
- package/api/docs/detail/section/section.mjs +54 -19
- package/api/docs/detail/section/section.test.mjs +50 -0
- package/api/docs/docs.d.mts +10 -3
- package/api/docs/docs.doc.mjs +54 -16
- package/api/docs/docs.mjs +53 -10
- package/api/docs/docs.test.mjs +164 -4
- package/api/docs/docs.type.d.mts +205 -5
- package/api/docs/docs.type.mjs +137 -11
- package/api/docs/index/index.d.mts +18 -0
- package/api/docs/index/index.mjs +40 -0
- package/api/docs/index/index.test.mjs +62 -0
- package/api/docs/integration-tree.test.mjs +547 -0
- package/api/docs/integrationDocs.test.mjs +114 -8
- package/api/docs/list/list.mjs +28 -12
- package/api/docs/node/node.d.mts +43 -0
- package/api/docs/node/node.mjs +192 -0
- package/api/doctor/doctor.d.mts +99 -1
- package/api/doctor/doctor.doc.mjs +1 -0
- package/api/doctor/doctor.mjs +544 -1
- package/api/doctor/doctor.test.mjs +610 -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/index.d.mts +1 -1
- package/api/index.mjs +1 -0
- package/api/init/init.doc.mjs +6 -1
- 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.d.mts +2 -1
- package/api/integration/add-contribution.mjs +130 -15
- package/api/integration/add-contribution.test.mjs +258 -7
- package/api/integration/add-theme.mjs +34 -64
- package/api/integration/add-theme.test.mjs +105 -21
- package/api/integration/authoring-checks.mjs +108 -31
- package/api/integration/authoring-checks.test.mjs +171 -6
- package/api/integration/authoring-checks.type.d.mts +3 -1
- package/api/integration/authoring-checks.type.mjs +3 -1
- package/api/integration/integration-authoring.type.d.mts +3 -1
- package/api/integration/integration-authoring.type.mjs +2 -0
- package/api/integration/integration-block-exports.test.mjs +10 -6
- package/api/integration/integrationAdd.doc.mjs +14 -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 +8 -1
- 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 +2 -1
- package/api/integration/integrationPackCheck.doc.mjs +2 -1
- package/api/integration/integrationTemplateConflicts.doc.mjs +7 -5
- package/api/integration/pack-check.mjs +83 -7
- package/api/integration/pack-check.test.mjs +387 -47
- package/api/integration/pack-check.type.d.mts +26 -2
- package/api/integration/pack-check.type.mjs +14 -1
- 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 +179 -26
- package/api/integration/validate-unread-theme-folders.test.mjs +110 -0
- package/api/integration/validateIntegration.doc.mjs +3 -2
- package/api/json/assertResponse.doc.mjs +1 -0
- package/api/json/envelope-types.test.mjs +76 -0
- package/api/json/index.ts +2 -0
- package/api/json/isError.doc.mjs +1 -0
- package/api/json/parseResponse.doc.mjs +3 -2
- package/api/layout/_adapter.mjs +20 -5
- 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 +29 -11
- package/api/search/search.doc.mjs +8 -2
- package/api/search/search.mjs +337 -41
- package/api/search/search.test.mjs +124 -1
- package/api/search/search.type.d.mts +15 -3
- package/api/search/search.type.mjs +5 -2
- 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/list/list.mjs +1 -0
- package/api/template/template-integration.test.mjs +1022 -3
- package/api/template/template-suffix.test.mjs +41 -21
- package/api/template/template.d.mts +1 -1
- package/api/template/template.doc.mjs +30 -8
- package/api/template/template.mjs +45 -8
- package/api/template/template.type.d.mts +12 -14
- package/api/template/template.type.mjs +15 -14
- 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 +20 -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 +6 -2
- package/api/upgrade/_adapter.d.mts +32 -5
- package/api/upgrade/_adapter.mjs +139 -22
- 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 +356 -59
- package/api/upgrade/status/status.mjs +2 -2
- package/api/upgrade/upgrade.doc.mjs +12 -5
- package/api/upgrade/upgrade.type.d.mts +43 -5
- package/api/upgrade/upgrade.type.mjs +27 -11
- package/assets/codemods/__tests__/runner.test.mjs +330 -8
- package/assets/codemods/integration-discovery.mjs +48 -4
- package/assets/codemods/integration-discovery.test.mjs +73 -0
- package/assets/codemods/integration-runner.mjs +56 -4
- package/assets/codemods/integration-runner.protection.test.mjs +153 -0
- package/assets/codemods/run-codemod.mjs +177 -34
- package/assets/codemods/runner.mjs +350 -102
- 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-native-picker-to-presentation.test.mjs +63 -0
- package/assets/codemods/transforms/next/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +220 -0
- package/assets/codemods/transforms/next/index.mjs +19 -1
- package/assets/codemods/transforms/next/migrate-native-picker-to-presentation.mjs +148 -0
- 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/getting-started.doc.mjs +2 -2
- package/assets/docs/principles.doc.mjs +6 -6
- package/assets/docs/styling-libraries.doc.mjs +3 -3
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +4 -4
- package/assets/docs/tokens.doc.mjs +1 -1
- package/assets/docs/tree/api.doc.mjs +30 -0
- package/assets/docs/tree/cli.doc.mjs +23 -0
- package/assets/docs/tree/commands.doc.mjs +25 -0
- package/assets/docs/{cli-integrations.doc.mjs → tree/integrations.doc.mjs} +124 -25
- package/assets/docs/tree/integrations.test.mjs +62 -0
- package/assets/docs/tree/writing-docs.doc.mjs +286 -0
- package/assets/docs/working-with-ai.doc.mjs +1 -1
- package/assets/templates/blocks/components/DateInput/DateInputDateRange.tsx +1 -1
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.doc.mjs +14 -0
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.tsx +100 -0
- 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/blocks/components/TimeInput/TimeInputConstrained.tsx +1 -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/codemod/type.ts +12 -0
- 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 +8 -8
- package/authoring/debug/parse.mjs +3 -3
- package/authoring/doctypes/_schema.d.mts +718 -23
- package/authoring/doctypes/_schema.mjs +519 -39
- package/authoring/doctypes/base/graph-fields.doc.d.mts +9 -0
- package/authoring/doctypes/base/graph-fields.doc.mjs +64 -0
- package/authoring/doctypes/base/type.ts +41 -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 +5 -4
- 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 +7 -2
- package/authoring/doctypes/function/parse.d.mts +2 -2
- package/authoring/doctypes/function/parse.mjs +1 -1
- package/authoring/doctypes/function/type.ts +9 -4
- 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 +128 -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 +163 -0
- package/authoring/doctypes/namespace/type.ts +74 -0
- package/authoring/doctypes/parse.d.mts +22 -18
- package/authoring/doctypes/parse.mjs +22 -11
- 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 +20 -5
- package/authoring/doctypes/reference/type.ts +53 -5
- 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 +94 -1
- package/authoring/doctypes/template/parse.mjs +40 -2
- package/authoring/doctypes/template/parse.test.mjs +26 -2
- package/authoring/doctypes/template/template.doc.mjs +13 -3
- package/authoring/doctypes/template/type.ts +13 -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 +52 -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 +19 -8
- 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.adaptations.test.mjs +100 -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 +16 -50
- 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 +37 -49
- 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 +3 -8
- package/clients/cli/commands/component-ownership.test.mjs +3 -3
- 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 +52 -5
- 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 +4 -4
- package/clients/cli/commands/discover.text-projection.test.mjs +103 -0
- package/clients/cli/commands/docs.doc.mjs +28 -6
- package/clients/cli/commands/docs.mjs +238 -24
- package/clients/cli/commands/docs.test.mjs +193 -1
- package/clients/cli/commands/doctor-integration-components.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +3 -3
- package/clients/cli/commands/doctor-integration-templates.doc.mjs +15 -8
- 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 +83 -8
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +30 -25
- 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 +32 -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/integration.mjs +1 -0
- 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 +28 -9
- package/clients/cli/commands/search.test.mjs +75 -0
- package/clients/cli/commands/setup-nudge.test.mjs +6 -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 +52 -13
- package/clients/cli/commands/template.flag-help.test.mjs +117 -0
- package/clients/cli/commands/template.mjs +4 -91
- package/clients/cli/commands/template.path-help.test.mjs +40 -0
- package/clients/cli/commands/text-json-parity.test.mjs +719 -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.behavior.test.mjs +4 -3
- 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 +22 -10
- package/clients/cli/commands/upgrade.file-protection.test.mjs +228 -0
- 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/commands/upgrade.mjs +29 -7
- package/clients/cli/formatters/index.mjs +164 -1
- package/clients/cli/formatters/index.test.mjs +97 -0
- package/clients/cli/index.mjs +21 -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 +36 -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 +70 -3
- package/foundation/agent-docs/agent-docs.path-safety.test.mjs +266 -4
- package/foundation/agent-docs/agent-docs.test.mjs +10 -1
- package/foundation/config/integration-debug.test.mjs +28 -3
- package/foundation/config/project-themes.test.mjs +11 -19
- package/foundation/config/project.d.mts +20 -11
- package/foundation/config/project.mjs +263 -91
- package/foundation/config/project.test.mjs +270 -21
- 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 +165 -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 +119 -0
- package/foundation/discovery/cli-self-docs.mjs +490 -0
- package/foundation/discovery/cli-self-docs.test.mjs +375 -0
- package/foundation/discovery/component-discovery.d.mts +39 -1
- package/foundation/discovery/component-discovery.mjs +50 -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 +116 -11
- package/foundation/discovery/docs-discovery.mjs +389 -108
- package/foundation/discovery/docs-discovery.test.mjs +325 -20
- 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 +116 -0
- package/foundation/discovery/docs-section-key.mjs +322 -0
- package/foundation/discovery/docs-section-key.test.mjs +246 -0
- package/foundation/discovery/template-adapter.d.mts +113 -11
- 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 +774 -83
- package/foundation/discovery/template-adapter.test.mjs +57 -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 +278 -0
- package/foundation/doc-compiler/bundle.test.mjs +266 -0
- package/foundation/doc-compiler/compile.d.mts +343 -0
- package/foundation/doc-compiler/compile.mjs +558 -0
- package/foundation/doc-compiler/diagnostics.d.mts +126 -0
- package/foundation/doc-compiler/diagnostics.mjs +305 -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 +291 -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 +471 -0
- package/foundation/doc-compiler/lenses.d.mts +34 -0
- package/foundation/doc-compiler/lenses.mjs +128 -0
- package/foundation/doc-compiler/links.d.mts +135 -0
- package/foundation/doc-compiler/links.mjs +253 -0
- package/foundation/doc-compiler/links.test.mjs +139 -0
- package/foundation/doc-compiler/lower-doc.test.mjs +495 -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 +127 -0
- package/foundation/doc-compiler/read.mjs +325 -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/doc-compiler/tree.d.mts +288 -0
- package/foundation/doc-compiler/tree.mjs +876 -0
- package/foundation/doc-compiler/tree.test.mjs +598 -0
- package/foundation/fs/file-protection.d.mts +33 -0
- package/foundation/fs/file-protection.mjs +825 -0
- package/foundation/fs/file-protection.test.mjs +250 -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/autolink.test.mjs +1 -1
- package/foundation/integrations/cli-requirement.d.mts +45 -0
- package/foundation/integrations/cli-requirement.mjs +154 -0
- package/foundation/integrations/cli-requirement.test.mjs +109 -0
- package/foundation/integrations/contribution-fixes.d.mts +145 -0
- package/foundation/integrations/contribution-fixes.mjs +1284 -0
- package/foundation/integrations/contribution-inventory.d.mts +3 -2
- package/foundation/integrations/contribution-inventory.mjs +27 -24
- package/foundation/integrations/contribution-inventory.test.mjs +86 -27
- package/foundation/integrations/integration-warnings.d.mts +9 -2
- package/foundation/integrations/integration-warnings.mjs +52 -21
- package/foundation/integrations/integration-warnings.test.mjs +74 -1
- 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 +131 -29
- package/foundation/response/base.d.ts +8 -4
- package/foundation/response/error-codes.d.mts +3 -1
- package/foundation/response/error-codes.d.ts +2 -0
- package/foundation/response/error-codes.doc.mjs +13 -4
- package/foundation/response/error-codes.mjs +8 -2
- package/foundation/response/error-codes.test.mjs +137 -10
- 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 +26 -16
- 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 +4 -3
- package/foundation/xle/expand.test.mjs +54 -0
- package/foundation/xle/xle.test.mjs +13 -0
- package/package.json +10 -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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
6
|
-
* import('../_shared/contract').MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>
|
|
5
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
6
|
+
* import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>
|
|
7
7
|
* >} _GapReportReceiptDriftLock
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
@@ -25,23 +25,23 @@ export function parseGapReportHandler(input: unknown, label?: string): GapReport
|
|
|
25
25
|
* @returns {GapReportHandlerReceipt | null}
|
|
26
26
|
*/
|
|
27
27
|
export function parseGapReportReceipt(input: unknown): GapReportHandlerReceipt | null;
|
|
28
|
-
export type _GapReportReceiptDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>>;
|
|
29
|
-
export type GapReportHandler = import("./type").GapReportHandler;
|
|
30
|
-
export type GapReportHandlerReceipt = import("./type").GapReportHandlerReceipt;
|
|
28
|
+
export type _GapReportReceiptDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>>;
|
|
29
|
+
export type GapReportHandler = import("./type.js").GapReportHandler;
|
|
30
|
+
export type GapReportHandlerReceipt = import("./type.js").GapReportHandlerReceipt;
|
|
31
31
|
/**
|
|
32
32
|
* Compile-time drift-lock: the sealed schema must infer EXACTLY the public
|
|
33
33
|
* {@link GapReportHandler} type. If they drift, `MutuallyAssignable` becomes
|
|
34
34
|
* `false` and `Expect<false>` fails `tsconfig.authoring-contract.json`.
|
|
35
35
|
*/
|
|
36
|
-
export type _GapReportHandlerDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>>;
|
|
36
|
+
export type _GapReportHandlerDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>>;
|
|
37
37
|
import { z } from 'zod';
|
|
38
38
|
/**
|
|
39
39
|
* Compile-time drift-lock: the sealed schema must infer EXACTLY the public
|
|
40
40
|
* {@link GapReportHandler} type. If they drift, `MutuallyAssignable` becomes
|
|
41
41
|
* `false` and `Expect<false>` fails `tsconfig.authoring-contract.json`.
|
|
42
42
|
*
|
|
43
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
44
|
-
* import('../_shared/contract').MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>
|
|
43
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
44
|
+
* import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>
|
|
45
45
|
* >} _GapReportHandlerDriftLock
|
|
46
46
|
*/
|
|
47
47
|
declare const receiptSchema: z.ZodObject<{
|
|
@@ -55,9 +55,9 @@ declare const receiptSchema: z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strict>;
|
|
56
56
|
declare const handlerSchema: z.ZodObject<{
|
|
57
57
|
audience: z.ZodEnum<{
|
|
58
|
-
internal: "internal";
|
|
59
58
|
public: "public";
|
|
59
|
+
internal: "internal";
|
|
60
60
|
}>;
|
|
61
|
-
handle: z.ZodType<(report: import("./type").GapReport, context: import("./type").GapReportHandlerContext) => import("./type").GapReportHandlerReceipt | Promise<import("./type").GapReportHandlerReceipt>, any, z.core.$ZodTypeInternals<(report: import("./type").GapReport, context: import("./type").GapReportHandlerContext) => import("./type").GapReportHandlerReceipt | Promise<import("./type").GapReportHandlerReceipt>, any>>;
|
|
61
|
+
handle: z.ZodType<(report: import("./type.js").GapReport, context: import("./type.js").GapReportHandlerContext) => import("./type.js").GapReportHandlerReceipt | Promise<import("./type.js").GapReportHandlerReceipt>, any, z.core.$ZodTypeInternals<(report: import("./type.js").GapReport, context: import("./type.js").GapReportHandlerContext) => import("./type.js").GapReportHandlerReceipt | Promise<import("./type.js").GapReportHandlerReceipt>, any>>;
|
|
62
62
|
}, z.core.$strict>;
|
|
63
63
|
export {};
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
import {z} from 'zod';
|
|
14
14
|
import {formatZodError} from '../_shared/errors.mjs';
|
|
15
15
|
|
|
16
|
-
/** @typedef {import('./type').GapReportHandler} GapReportHandler */
|
|
17
|
-
/** @typedef {import('./type').GapReportHandlerReceipt} GapReportHandlerReceipt */
|
|
16
|
+
/** @typedef {import('./type.js').GapReportHandler} GapReportHandler */
|
|
17
|
+
/** @typedef {import('./type.js').GapReportHandlerReceipt} GapReportHandlerReceipt */
|
|
18
18
|
|
|
19
19
|
// Typed z.custom so z.infer reproduces the real function type, matching the
|
|
20
20
|
// pattern used by the debug handler and post-codemod hook parsers.
|
|
@@ -36,8 +36,8 @@ const handlerSchema = z
|
|
|
36
36
|
* {@link GapReportHandler} type. If they drift, `MutuallyAssignable` becomes
|
|
37
37
|
* `false` and `Expect<false>` fails `tsconfig.authoring-contract.json`.
|
|
38
38
|
*
|
|
39
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
40
|
-
* import('../_shared/contract').MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>
|
|
39
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
40
|
+
* import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof handlerSchema>, GapReportHandler>
|
|
41
41
|
* >} _GapReportHandlerDriftLock
|
|
42
42
|
*/
|
|
43
43
|
|
|
@@ -50,8 +50,8 @@ const receiptSchema = z
|
|
|
50
50
|
.strict();
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* @typedef {import('../_shared/contract').Expect<
|
|
54
|
-
* import('../_shared/contract').MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>
|
|
53
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
54
|
+
* import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof receiptSchema>, GapReportHandlerReceipt>
|
|
55
55
|
* >} _GapReportReceiptDriftLock
|
|
56
56
|
*/
|
|
57
57
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file SchemaDoc for provider, artifact, and immutable instance identity.
|
|
6
|
+
* @position packages/cli/authoring/identity — identity documentation
|
|
7
|
+
*/
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
|
|
9
|
+
export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
|
|
@@ -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. Provider identity names integration manifests and settles provider conflicts. Docs-tree nodes are identified by doc identity; the tree covers the CLI\'s own docs. Artifact, instance, and compiler-input identities are defined for every provider-owned artifact; no command reads them.',
|
|
16
|
+
appliesTo:
|
|
17
|
+
'Integration manifests, provider conflicts, and docs-tree node ids.',
|
|
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,
|
|
@@ -107,8 +131,19 @@ export type {
|
|
|
107
131
|
// reference
|
|
108
132
|
ReferenceSection,
|
|
109
133
|
ReferenceContentBlock,
|
|
134
|
+
GraphContentBlock,
|
|
110
135
|
ReferenceTokenPreviewType,
|
|
111
136
|
ReferenceTranslationDoc,
|
|
137
|
+
WorkflowStep,
|
|
138
|
+
WorkflowDocBlock,
|
|
139
|
+
CollectionDocBlock,
|
|
140
|
+
ReferenceDocBlock,
|
|
141
|
+
// namespace
|
|
142
|
+
NamespaceProviderScope,
|
|
143
|
+
NamespaceSlotAcceptance,
|
|
144
|
+
NamespaceSlot,
|
|
145
|
+
NamespaceAdoptionSource,
|
|
146
|
+
NamespaceAdoptionRule,
|
|
112
147
|
// template
|
|
113
148
|
TemplateCategory,
|
|
114
149
|
// schema
|
|
@@ -119,8 +154,8 @@ export type {
|
|
|
119
154
|
CommandExampleDoc,
|
|
120
155
|
// enum
|
|
121
156
|
EnumMemberDoc,
|
|
122
|
-
} from './doctypes/types';
|
|
123
|
-
export type {PostCodemodHook, DebugConfig} from './config/type';
|
|
157
|
+
} from './doctypes/types.js';
|
|
158
|
+
export type {PostCodemodHook, DebugConfig} from './config/type.js';
|
|
124
159
|
export type {
|
|
125
160
|
// debug
|
|
126
161
|
DebugSchemaVersion,
|
|
@@ -133,11 +168,11 @@ export type {
|
|
|
133
168
|
DebugEventEnv,
|
|
134
169
|
DebugEventProject,
|
|
135
170
|
DebugEventHandler,
|
|
136
|
-
} from './debug/type';
|
|
171
|
+
} from './debug/type.js';
|
|
137
172
|
export type {
|
|
138
173
|
AstryxCodemodDef,
|
|
139
174
|
AstryxConfigCodemodDef,
|
|
140
175
|
AstryxCodemodFile,
|
|
141
176
|
AstryxCodemodApi,
|
|
142
177
|
AstryxCodemodTransform,
|
|
143
|
-
} from './codemod/type';
|
|
178
|
+
} 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
|
|