@astryxdesign/cli 0.7.17-canary.g4ea41ce → 0.7.17-canary.g5a3fd39
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 +7 -2
- package/api/build/_adapter.d.mts +7 -6
- package/api/build/_adapter.mjs +18 -11
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/kind.d.mts +6 -0
- package/api/build/kit/kind.mjs +1 -1
- package/api/build/kit/rank.d.mts +7 -1
- package/api/build/kit/rank.mjs +15 -5
- package/api/build/kit/signals.mjs +58 -57
- package/api/build/kit/start.d.mts +2 -1
- package/api/build/kit/start.mjs +62 -9
- package/api/build/kit/words.d.mts +6 -2
- package/api/build/kit/words.mjs +7 -3
- package/api/component/__fixtures__/resolutions/modules.txt +2 -2
- package/api/component/_adapter.d.mts +30 -24
- package/api/component/_adapter.mjs +72 -31
- package/api/component/component.mjs +4 -4
- package/api/component/detail/detail.d.mts +2 -2
- package/api/component/detail/detail.mjs +1 -1
- package/api/component/list/list.d.mts +2 -2
- package/api/component/list/list.mjs +4 -4
- package/api/discover/_adapter.mjs +15 -15
- package/api/docs/_adapter.d.mts +13 -5
- package/api/docs/_adapter.mjs +37 -10
- package/api/doctor/_adapter.d.mts +32 -0
- package/api/doctor/_adapter.mjs +56 -1
- package/api/doctor/doctor.mjs +28 -5
- package/api/doctor/theme-checks.mjs +165 -83
- package/api/error.d.mts +4 -3
- package/api/error.mjs +3 -2
- package/api/hook/_adapter.d.mts +5 -4
- package/api/hook/_adapter.mjs +6 -5
- package/api/icon/_options.d.mts +17 -0
- package/api/icon/_options.mjs +54 -0
- package/api/icon/exportIconIndex.doc.d.mts +10 -0
- package/api/icon/exportIconIndex.doc.mjs +59 -0
- package/api/icon/icon.mjs +11 -34
- package/api/icon/icon.type.d.mts +49 -0
- package/api/icon/icon.type.mjs +24 -0
- package/api/icon/rankIconIndex.doc.d.mts +10 -0
- package/api/icon/rankIconIndex.doc.mjs +79 -0
- package/api/icon/search/icon-index.d.mts +41 -0
- package/api/icon/search/icon-index.mjs +139 -0
- package/api/icon/search/search.d.mts +18 -0
- package/api/icon/search/search.mjs +13 -0
- package/api/index.d.mts +1 -0
- package/api/index.mjs +1 -0
- package/api/search/_adapter.d.mts +8 -5
- package/api/search/_adapter.mjs +14 -10
- package/api/search/_gather-components.d.mts +4 -4
- package/api/search/_gather-components.mjs +4 -3
- package/api/search/_gather-hooks.d.mts +2 -2
- package/api/search/_gather-hooks.mjs +1 -1
- package/api/search/_lexical.mjs +12 -2
- package/api/search/_priority.d.mts +10 -2
- package/api/search/_priority.mjs +37 -7
- package/api/search/_score.d.mts +12 -3
- package/api/search/_score.mjs +6 -3
- package/api/search/_words.mjs +12 -3
- package/api/search/search.d.mts +7 -1
- package/api/search/search.mjs +37 -4
- package/api/swizzle/_adapter.d.mts +7 -5
- package/api/swizzle/_adapter.mjs +7 -3
- package/api/swizzle/copy/copy.mjs +5 -4
- package/api/theme/build/build.d.mts +5 -0
- package/api/theme/build/build.mjs +400 -21
- package/api/theme/build/family.mjs +18 -7
- package/api/theme/build/font-warning.mjs +5 -4
- package/api/theme/build/input-fields.d.mts +21 -6
- package/api/theme/build/input-fields.mjs +104 -13
- package/api/theme/build/typography-values.d.mts +22 -0
- package/api/theme/build/typography-values.mjs +172 -22
- package/api/theme/build/written-values.d.mts +7 -0
- package/api/theme/build/written-values.mjs +57 -8
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/palette/generate/generator.d.mts +14 -2
- package/api/theme/palette/generate/generator.mjs +94 -8
- package/api/theme/theme.type.d.mts +21 -4
- package/api/theme/theme.type.mjs +14 -5
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeTemplate.doc.mjs +18 -3
- package/api/theme-edit/_adapter.d.mts +1 -1
- package/api/theme-edit/_adapter.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +10 -4
- package/api/theme-edit/_catalog.mjs +81 -22
- package/api/theme-edit/_check.mjs +402 -88
- package/api/theme-edit/_color.d.mts +11 -2
- package/api/theme-edit/_color.mjs +23 -7
- package/api/theme-edit/_compiler.mjs +11 -3
- package/api/theme-edit/_context.d.mts +87 -6
- package/api/theme-edit/_context.mjs +224 -17
- package/api/theme-edit/_css.mjs +4 -0
- package/api/theme-edit/_edit.mjs +331 -58
- package/api/theme-edit/_how-question.d.mts +11 -0
- package/api/theme-edit/_how-question.mjs +2514 -234
- package/api/theme-edit/_how.mjs +79 -14
- package/api/theme-edit/_missed.mjs +294 -32
- package/api/theme-edit/_normal.d.mts +3 -1
- package/api/theme-edit/_normal.mjs +4 -1
- package/api/theme-edit/_palette.mjs +36 -5
- package/api/theme-edit/_part-words.mjs +20 -2
- package/api/theme-edit/_parts.d.mts +12 -1
- package/api/theme-edit/_parts.mjs +116 -11
- package/api/theme-edit/_preview-app.mjs +40 -2
- package/api/theme-edit/_preview.d.mts +45 -5
- package/api/theme-edit/_preview.mjs +173 -21
- package/api/theme-edit/_settings.d.mts +20 -0
- package/api/theme-edit/_settings.mjs +1033 -94
- package/api/theme-edit/_tables.mjs +2 -2
- package/api/theme-edit/theme-edit.type.d.mts +6 -5
- package/api/theme-edit/theme-edit.type.mjs +8 -8
- package/api/upgrade/_adapter.mjs +13 -2
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/authoring.doc.mjs +1 -0
- package/assets/docs/tree/cli.doc.mjs +1 -0
- package/assets/docs/tree/computer-agent-guide.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +2 -2
- package/assets/docs/tree/global.doc.mjs +1 -0
- package/assets/docs/tree/single-component.doc.mjs +40 -2
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/who-answers.doc.mjs +2 -2
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -1
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +4 -4
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx +1 -0
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx +2 -2
- package/assets/templates/blocks/components/Card/CardElevations.tsx +1 -1
- package/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx +19 -3
- package/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx +11 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardMulti.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +8 -0
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +8 -2
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +1 -0
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleCustomContent.tsx +9 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleMetadata.tsx +12 -2
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +28 -7
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +35 -7
- package/assets/templates/blocks/components/Collapsible/CollapsibleShowcase.tsx +1 -1
- package/assets/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +20 -4
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.tsx +15 -3
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.tsx +29 -6
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +2 -2
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Divider/DividerFullBleed.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerVariants.tsx +1 -1
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +23 -4
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +18 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +20 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +16 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +11 -1
- package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +12 -2
- package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx +1 -1
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +17 -3
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx +17 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx +15 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +9 -2
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +1 -1
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx +1 -1
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/MultiSelector/MultiSelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Outline/OutlineDensity.tsx +2 -0
- package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +6 -1
- package/assets/templates/blocks/components/Pagination/PaginationVariants.tsx +4 -0
- package/assets/templates/blocks/components/Popover/PopoverHookUsage.tsx +17 -2
- package/assets/templates/blocks/components/SegmentedControl/SegmentedControlFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/Selector/SelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +8 -1
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +2 -2
- package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.tsx +2 -0
- package/assets/templates/blocks/components/Switch/SwitchWithStatus.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsWithActions.tsx +12 -1
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +11 -1
- package/assets/templates/blocks/components/Table/TableInCard.tsx +2 -2
- package/assets/templates/blocks/components/Text/TextTruncation.tsx +1 -1
- package/assets/templates/blocks/components/Text/TextWordBreak.tsx +12 -2
- package/assets/templates/blocks/components/Text/TextWrap.tsx +19 -4
- package/assets/templates/blocks/components/TextArea/TextAreaCharacterCount.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaValidation.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +1 -1
- package/assets/templates/blocks/components/TextInput/TextInputStatusVariant.tsx +2 -2
- package/assets/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx +15 -1
- package/assets/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx +15 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +8 -0
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +12 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +18 -3
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +6 -0
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -1
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +2 -2
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +9 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +102 -6
- package/assets/templates/pages/canvas-editor/page.tsx +73 -2
- package/assets/templates/pages/centered-hero/page.tsx +10 -4
- package/assets/templates/pages/course-detail/page.tsx +46 -2
- package/assets/templates/pages/dashboard/page.tsx +45 -16
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +31 -20
- package/assets/templates/pages/dashboard-comparison/page.tsx +9 -0
- package/assets/templates/pages/dashboard-composition/page.tsx +22 -9
- package/assets/templates/pages/dashboard-progress/page.tsx +27 -15
- package/assets/templates/pages/dashboard-scorecard/page.tsx +9 -0
- package/assets/templates/pages/detail-page/page.tsx +105 -77
- package/assets/templates/pages/documentation/page.tsx +15 -2
- package/assets/templates/pages/documentation-design/page.tsx +7 -34
- package/assets/templates/pages/documentation-technical/page.tsx +76 -12
- package/assets/templates/pages/editor/page.tsx +26 -21
- package/assets/templates/pages/file-explorer/page.tsx +35 -1
- package/assets/templates/pages/form-two-column/page.tsx +2 -3
- package/assets/templates/pages/form-wizard/page.tsx +31 -3
- package/assets/templates/pages/form-wizard-vertical/page.tsx +32 -3
- package/assets/templates/pages/gallery-hero/page.tsx +2 -1
- package/assets/templates/pages/ide/page.tsx +15 -1
- package/assets/templates/pages/incident-console/page.tsx +2 -1
- package/assets/templates/pages/incident-console/template.doc.mjs +1 -1
- package/assets/templates/pages/kanban-board/page.tsx +39 -2
- package/assets/templates/pages/payment-form/page.tsx +77 -39
- package/assets/templates/pages/product-gallery/page.tsx +16 -14
- package/assets/templates/pages/settings/page.tsx +35 -3
- package/assets/templates/pages/settings-dialog/page.tsx +34 -5
- package/assets/templates/pages/settings-sidebar/page.tsx +23 -3
- package/assets/templates/pages/shell-nav/page.tsx +28 -12
- package/assets/templates/pages/shell-side-nav/page.tsx +16 -1
- package/assets/templates/pages/shell-top-nav/page.tsx +27 -1
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -1
- package/assets/templates/pages/table/template.doc.mjs +1 -1
- package/assets/templates/pages/table-collapsible/page.tsx +1 -1
- package/assets/templates/pages/table-comparison/page.tsx +1 -1
- package/assets/templates/pages/table-filter/page.tsx +9 -2
- package/assets/templates/pages/table-grouped/page.tsx +16 -6
- package/assets/templates/pages/table-inbox/page.tsx +60 -1
- package/assets/templates/pages/table-page/page.tsx +10 -2
- package/assets/templates/pages/table-tree/page.tsx +95 -13
- package/assets/templates/pages/theme-showcase/page.tsx +107 -11
- package/assets/templates/pages/work-item-detail/page.tsx +88 -74
- package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -1
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/gothic/gothicTheme.ts +5 -0
- package/assets/templates/themes/neutral/neutralTheme.ts +1 -1
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/y2k/y2kTheme.ts +1 -1
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +22 -8
- package/authoring/doctypes/_schema.mjs +31 -0
- package/authoring/doctypes/command/command.doc.mjs +24 -0
- package/authoring/doctypes/command/type.ts +31 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -5
- package/authoring/doctypes/namespace/namespace.doc.mjs +6 -0
- package/authoring/doctypes/namespace/type.ts +4 -0
- package/authoring/doctypes/template/type.ts +0 -7
- package/authoring/index.d.ts +6 -1
- package/authoring/integration/integration.doc.mjs +7 -0
- package/authoring/integration/schema.d.mts +6 -0
- package/authoring/integration/schema.mjs +3 -0
- package/authoring/integration/type.ts +34 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -0
- package/clients/cli/commands/component.mjs +5 -1
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/experimental/index.mjs +4 -1
- package/clients/cli/commands/experimental/theme.mjs +139 -64
- package/clients/cli/commands/experimental-render.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-add.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +3 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-template.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-use.doc.mjs +2 -0
- package/clients/cli/commands/gap-report.doc.mjs +1 -0
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +1 -1
- package/clients/cli/commands/integration-add.doc.mjs +1 -0
- package/clients/cli/commands/manifest.mjs +10 -3
- package/clients/cli/commands/swizzle.doc.mjs +8 -1
- package/clients/cli/commands/swizzle.mjs +13 -6
- package/clients/cli/commands/template.doc.mjs +3 -0
- package/clients/cli/commands/theme-add.doc.mjs +2 -1
- package/clients/cli/commands/theme-build.doc.mjs +2 -1
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
- package/clients/cli/commands/theme-remove.doc.mjs +2 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/theme-template.doc.mjs +1 -0
- package/clients/cli/commands/theme-use.doc.mjs +2 -1
- package/clients/cli/commands/theme.doc.mjs +7 -2
- package/clients/cli/commands/theme.mjs +21 -5
- package/clients/cli/index.mjs +167 -59
- package/clients/cli/lib/base-gate.mjs +522 -0
- package/clients/cli/lib/command-path.mjs +26 -0
- package/clients/cli/lib/define-command.mjs +161 -12
- package/clients/cli/lib/json-shim.mjs +34 -31
- package/clients/cli/lib/manifest.d.ts +14 -0
- package/clients/cli/lib/manifest.mjs +78 -22
- package/clients/cli/lib/root-args.mjs +79 -0
- package/clients/cli/lib/stray-option.mjs +21 -8
- package/clients/cli/lib/unknown-command.mjs +27 -6
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +13 -1
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core-docs.d.mts +10 -0
- package/foundation/bases/core-docs.mjs +42 -0
- package/foundation/bases/core.d.mts +11 -0
- package/foundation/bases/core.mjs +32 -0
- package/foundation/bases/requirements.d.mts +128 -0
- package/foundation/bases/requirements.mjs +193 -0
- package/foundation/bases/resolve.d.mts +134 -0
- package/foundation/bases/resolve.mjs +295 -0
- package/foundation/bases/state.d.mts +24 -0
- package/foundation/bases/state.mjs +46 -0
- package/foundation/bases/steps.d.mts +49 -0
- package/foundation/bases/steps.mjs +88 -0
- package/foundation/config/project.d.mts +14 -0
- package/foundation/config/project.mjs +68 -1
- package/foundation/discovery/cli-self-docs.mjs +9 -1
- package/foundation/discovery/command-pointers.d.mts +28 -0
- package/foundation/discovery/command-pointers.mjs +31 -0
- package/foundation/discovery/component-discovery.d.mts +9 -8
- package/foundation/discovery/component-discovery.mjs +9 -4
- package/foundation/discovery/docs-discovery.d.mts +13 -5
- package/foundation/discovery/docs-discovery.mjs +25 -6
- package/foundation/discovery/hook-discovery.d.mts +6 -6
- package/foundation/discovery/hook-discovery.mjs +6 -4
- package/foundation/discovery/template-adapter.mjs +5 -0
- package/foundation/discovery/template-ids.d.mts +1 -1
- package/foundation/discovery/template-ids.mjs +5 -1
- package/foundation/discovery/theme-discovery.mjs +3 -0
- package/foundation/discovery/theme-imports.mjs +19 -1
- package/foundation/doc-compiler/tree.d.mts +4 -2
- package/foundation/doc-compiler/tree.mjs +46 -1
- package/foundation/env/package-manager.d.mts +7 -0
- package/foundation/env/package-manager.mjs +21 -0
- package/foundation/fonts/font-stylesheet.d.mts +8 -0
- package/foundation/fonts/font-stylesheet.mjs +26 -2
- package/foundation/fs/gather-cache.mjs +44 -13
- package/foundation/fs/own-modules.d.mts +29 -0
- package/foundation/fs/own-modules.mjs +57 -0
- package/foundation/fs/paths.d.mts +30 -2
- package/foundation/fs/paths.mjs +49 -2
- package/foundation/integrations/integrations.d.mts +4 -0
- package/foundation/integrations/integrations.mjs +6 -1
- package/foundation/release/choose.d.mts +7 -0
- package/foundation/release/choose.mjs +16 -2
- package/foundation/release/notices.d.mts +26 -0
- package/foundation/release/notices.mjs +48 -19
- package/foundation/release/project.d.mts +3 -2
- package/foundation/release/project.mjs +4 -5
- package/foundation/release/run-context.d.mts +7 -2
- package/foundation/release/run-context.mjs +6 -2
- package/foundation/render/css-cut.mjs +86 -6
- package/foundation/render/cut-short.d.mts +35 -0
- package/foundation/render/cut-short.mjs +124 -0
- package/foundation/render/font-probe.d.mts +27 -0
- package/foundation/render/font-probe.mjs +77 -0
- package/foundation/render/layers.d.mts +1 -9
- package/foundation/render/layers.mjs +2 -111
- package/foundation/render/page-worker.mjs +83 -6
- package/foundation/render/picture-chrome.mjs +24 -2
- package/foundation/render/picture-playwright.mjs +22 -2
- package/foundation/render/picture-window.d.mts +20 -4
- package/foundation/render/picture-window.mjs +137 -4
- package/foundation/response/base.d.ts +25 -0
- package/foundation/response/error-codes.d.mts +4 -1
- package/foundation/response/error-codes.d.ts +4 -1
- package/foundation/response/error-codes.doc.mjs +17 -0
- package/foundation/response/error-codes.mjs +21 -0
- package/foundation/response/json.d.mts +3 -1
- package/foundation/response/json.mjs +7 -2
- package/foundation/response/response-types.doc.mjs +2 -2
- package/foundation/suggest/name-index.d.mts +2 -1
- package/foundation/suggest/name-index.mjs +1 -1
- package/foundation/suggest/other-command.d.mts +4 -1
- package/foundation/suggest/other-command.mjs +23 -6
- package/foundation/text/string-utils.d.mts +7 -2
- package/foundation/text/string-utils.mjs +24 -10
- package/package.json +6 -6
- package/assets/templates/pages/access-denied/page.tsx +0 -101
- package/assets/templates/pages/access-denied/template.doc.mjs +0 -24
- package/assets/templates/pages/error-page/page.tsx +0 -130
- package/assets/templates/pages/error-page/template.doc.mjs +0 -22
- package/assets/templates/pages/not-found/page.tsx +0 -124
- package/assets/templates/pages/not-found/template.doc.mjs +0 -30
- package/assets/templates/pages/review-workspace/page.tsx +0 -551
- package/assets/templates/pages/review-workspace/template.doc.mjs +0 -31
- package/assets/templates/pages/run-console/page.tsx +0 -945
- package/assets/templates/pages/run-console/template.doc.mjs +0 -27
- package/assets/templates/pages/welcome-portal/page.tsx +0 -538
- package/assets/templates/pages/welcome-portal/template.doc.mjs +0 -38
package/clients/cli/index.mjs
CHANGED
|
@@ -30,7 +30,11 @@ import {cliError, themeGroupUnknownSubcommand} from './lib/cli-error.mjs';
|
|
|
30
30
|
import {section, text, records} from './formatters/index.mjs';
|
|
31
31
|
import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
|
|
32
32
|
import {installJsonShim} from './lib/json-shim.mjs';
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
describeCommand,
|
|
35
|
+
describeOption,
|
|
36
|
+
markReportsResult,
|
|
37
|
+
} from './lib/define-command.mjs';
|
|
34
38
|
// The light modules, not agent-docs.mjs: that one loads discovery and the
|
|
35
39
|
// project config, which every run would pay for at startup.
|
|
36
40
|
import {
|
|
@@ -45,6 +49,16 @@ import {
|
|
|
45
49
|
} from '../../foundation/agent-docs/agent-doc-state.mjs';
|
|
46
50
|
import * as debug from '../../foundation/debug/index.mjs';
|
|
47
51
|
import {intlDefaults} from '../../foundation/env/intl-defaults.mjs';
|
|
52
|
+
import {setRequestedBase} from '../../foundation/bases/resolve.mjs';
|
|
53
|
+
import {
|
|
54
|
+
addBaseHelpText,
|
|
55
|
+
baseHelpSettings,
|
|
56
|
+
checkRun,
|
|
57
|
+
commandAvailable,
|
|
58
|
+
helpBase,
|
|
59
|
+
} from './lib/base-gate.mjs';
|
|
60
|
+
import {commandPath} from './lib/command-path.mjs';
|
|
61
|
+
import {scanRootArgs} from './lib/root-args.mjs';
|
|
48
62
|
|
|
49
63
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
50
64
|
|
|
@@ -155,23 +169,6 @@ export const JSON_SUPPORTED = new Set([
|
|
|
155
169
|
'doctor integration docs',
|
|
156
170
|
]);
|
|
157
171
|
|
|
158
|
-
/**
|
|
159
|
-
* Compute the fully qualified command name, e.g. "theme build" or "swizzle".
|
|
160
|
-
* @param {import('commander').Command} actionCommand
|
|
161
|
-
* @param {import('commander').Command} root the root program
|
|
162
|
-
* @returns {string}
|
|
163
|
-
*/
|
|
164
|
-
function fullCommandName(actionCommand, root) {
|
|
165
|
-
const parts = [];
|
|
166
|
-
/** @type {import('commander').Command | null} */
|
|
167
|
-
let cmd = actionCommand;
|
|
168
|
-
while (cmd && cmd !== root) {
|
|
169
|
-
parts.unshift(cmd.name());
|
|
170
|
-
cmd = cmd.parent;
|
|
171
|
-
}
|
|
172
|
-
return parts.join(' ');
|
|
173
|
-
}
|
|
174
|
-
|
|
175
172
|
/**
|
|
176
173
|
* Load the handlers that will receive this run, before Commander parses.
|
|
177
174
|
*
|
|
@@ -230,6 +227,35 @@ export async function loadProjectDebugHandler() {
|
|
|
230
227
|
}
|
|
231
228
|
}
|
|
232
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Load the project in the working folder, unless this process already did.
|
|
232
|
+
* A project that cannot load is the command's to report.
|
|
233
|
+
* @returns {Promise<void>}
|
|
234
|
+
*/
|
|
235
|
+
async function loadProjectOnce() {
|
|
236
|
+
try {
|
|
237
|
+
const cwd = process.cwd();
|
|
238
|
+
if (hasRecordedProject(cwd)) return;
|
|
239
|
+
const {Project} = await import('../../foundation/config/project.mjs');
|
|
240
|
+
await Project.load(cwd);
|
|
241
|
+
} catch {
|
|
242
|
+
// Reported by the command that needs the project.
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The first word of a run that is not an option or an option's value.
|
|
248
|
+
* Without the program, only `--base` is known to take a value.
|
|
249
|
+
* @param {string[]} argv
|
|
250
|
+
* @param {import('commander').Command} [program] the root, with its options
|
|
251
|
+
* @returns {string | undefined}
|
|
252
|
+
*/
|
|
253
|
+
function firstOperand(argv, program) {
|
|
254
|
+
return scanRootArgs(argv, program?.options ?? [{long: '--base', required: true}], {
|
|
255
|
+
unknown: 'skip',
|
|
256
|
+
}).operand;
|
|
257
|
+
}
|
|
258
|
+
|
|
233
259
|
/**
|
|
234
260
|
* Load the project's integrations before a help run, so help prints commands
|
|
235
261
|
* with the `cliCommand` they declare (spec:AST-081 FR5). Help is printed while
|
|
@@ -242,11 +268,13 @@ export async function loadProjectDebugHandler() {
|
|
|
242
268
|
* bin before Commander parses.
|
|
243
269
|
*
|
|
244
270
|
* @param {string[]} [argv] arguments after the binary.
|
|
271
|
+
* @param {import('commander').Command} [program] the root, which says
|
|
272
|
+
* which of its options take a value
|
|
245
273
|
* @returns {Promise<void>}
|
|
246
274
|
*/
|
|
247
|
-
export async function loadProjectForHelp(argv = process.argv.slice(2)) {
|
|
275
|
+
export async function loadProjectForHelp(argv = process.argv.slice(2), program) {
|
|
248
276
|
const help =
|
|
249
|
-
argv.includes('--help') || argv.includes('-h') || argv
|
|
277
|
+
argv.includes('--help') || argv.includes('-h') || firstOperand(argv, program) === 'help';
|
|
250
278
|
if (!help) return;
|
|
251
279
|
try {
|
|
252
280
|
const cwd = process.cwd();
|
|
@@ -263,6 +291,26 @@ export async function loadProjectForHelp(argv = process.argv.slice(2)) {
|
|
|
263
291
|
}
|
|
264
292
|
}
|
|
265
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Fail a help run whose base does not resolve, as every other run fails:
|
|
296
|
+
* help lists what the run's base serves, so with no base it has nothing true
|
|
297
|
+
* to list. Called from the bin after the help preload.
|
|
298
|
+
* @param {string[]} [argv] arguments after the binary.
|
|
299
|
+
* @param {import('commander').Command} [program] the root, which says
|
|
300
|
+
* which of its options take a value
|
|
301
|
+
* @returns {Promise<void>}
|
|
302
|
+
*/
|
|
303
|
+
export async function refuseHelpWithoutBase(argv = process.argv.slice(2), program) {
|
|
304
|
+
const help =
|
|
305
|
+
argv.includes('--help') || argv.includes('-h') || firstOperand(argv, program) === 'help';
|
|
306
|
+
if (!help) return;
|
|
307
|
+
const {runBase} = await import('../../foundation/bases/resolve.mjs');
|
|
308
|
+
const resolution = runBase();
|
|
309
|
+
if (resolution.ok) return;
|
|
310
|
+
if (argv.includes('--json')) setJsonMode(true);
|
|
311
|
+
cliError(resolution.message, {code: resolution.code});
|
|
312
|
+
}
|
|
313
|
+
|
|
266
314
|
/**
|
|
267
315
|
* Hand the whole invocation to the debug recorder: which command ran, its
|
|
268
316
|
* positional arguments by name, its options and where each value came from,
|
|
@@ -277,7 +325,7 @@ export async function loadProjectForHelp(argv = process.argv.slice(2)) {
|
|
|
277
325
|
* @param {import('commander').Command} root
|
|
278
326
|
*/
|
|
279
327
|
function captureInvocation(actionCommand, root) {
|
|
280
|
-
const name =
|
|
328
|
+
const name = commandPath(actionCommand);
|
|
281
329
|
debug.setCommand(name);
|
|
282
330
|
debug.setGlobalOptions(root.opts());
|
|
283
331
|
|
|
@@ -387,32 +435,18 @@ const READS_EVERY_COMMAND = new Set(['manifest']);
|
|
|
387
435
|
* @returns {Set<string> | null}
|
|
388
436
|
*/
|
|
389
437
|
export function commandsForArgs(program, argv) {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
const equals = arg.startsWith('--') ? arg.indexOf('=') : -1;
|
|
401
|
-
const flag = equals === -1 ? arg : arg.slice(0, equals);
|
|
402
|
-
const option = program.options.find(o => o.long === flag || o.short === flag);
|
|
403
|
-
// Help flags, `--`, combined short flags and unknown flags read the whole
|
|
404
|
-
// list, or make Commander stop dispatching by name.
|
|
405
|
-
if (option == null) return null;
|
|
406
|
-
const takesValue = option.required || option.optional;
|
|
407
|
-
if (equals !== -1 && !takesValue) return null;
|
|
408
|
-
if (equals === -1 && option.required) i += 1;
|
|
409
|
-
const next = argv[i + 1];
|
|
410
|
-
if (equals === -1 && option.optional && next != null && !(next.length > 1 && next[0] === '-')) {
|
|
411
|
-
i += 1;
|
|
412
|
-
}
|
|
413
|
-
if (option.long === '--version') printsVersion = true;
|
|
438
|
+
const scan = scanRootArgs(argv, program.options);
|
|
439
|
+
// Help flags, `--`, combined short flags and unknown flags read the whole
|
|
440
|
+
// list, or make Commander stop dispatching by name.
|
|
441
|
+
if (scan.stopped) return null;
|
|
442
|
+
const arg = scan.operand;
|
|
443
|
+
if (arg != null) {
|
|
444
|
+
return commands.some(cmd => cmd.name === arg) &&
|
|
445
|
+
(!READS_EVERY_COMMAND.has(arg) || (arg === 'manifest' && storedManifest() != null))
|
|
446
|
+
? new Set([arg])
|
|
447
|
+
: null;
|
|
414
448
|
}
|
|
415
|
-
return printsVersion ? new Set() : null;
|
|
449
|
+
return scan.printsVersion ? new Set() : null;
|
|
416
450
|
}
|
|
417
451
|
|
|
418
452
|
/**
|
|
@@ -463,6 +497,30 @@ function printsRootHelp(argv) {
|
|
|
463
497
|
return argv.length === 1 && ['--help', '-h', 'help'].includes(argv[0]);
|
|
464
498
|
}
|
|
465
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Does a run in the working folder read Core? Loads the project, as the
|
|
502
|
+
* preAction hook would, to see which base it reads.
|
|
503
|
+
* @returns {Promise<boolean>}
|
|
504
|
+
*/
|
|
505
|
+
async function readsCore() {
|
|
506
|
+
const {runBase, requestedBase} = await import(
|
|
507
|
+
'../../foundation/bases/resolve.mjs'
|
|
508
|
+
);
|
|
509
|
+
const {CORE_BASE_NAME} = await import('../../foundation/bases/core.mjs');
|
|
510
|
+
// A base is an integration, so where none can load, and no --base names
|
|
511
|
+
// another, the run reads Core with no project load.
|
|
512
|
+
const named = requestedBase();
|
|
513
|
+
if (
|
|
514
|
+
!mayHaveIntegrations(process.cwd()) &&
|
|
515
|
+
(named == null || named === CORE_BASE_NAME)
|
|
516
|
+
) {
|
|
517
|
+
return true;
|
|
518
|
+
}
|
|
519
|
+
await loadProjectOnce();
|
|
520
|
+
const run = runBase();
|
|
521
|
+
return run.ok && run.base.core;
|
|
522
|
+
}
|
|
523
|
+
|
|
466
524
|
/**
|
|
467
525
|
* The stored command list, or null when there is none or it cannot be read.
|
|
468
526
|
* @returns {Array<{name: string, term: string, description: string}> | null}
|
|
@@ -550,7 +608,8 @@ export async function createProgram({argv} = {}) {
|
|
|
550
608
|
// no-op so every item stays on one line — matching the rest of the CLI's
|
|
551
609
|
// plain, unwrapped, width-independent output. Set before subcommands are
|
|
552
610
|
// registered so they inherit it via copyInheritedSettings.
|
|
553
|
-
|
|
611
|
+
// Help lists only the commands and options the run's base serves.
|
|
612
|
+
program.configureHelp({wrap: (str) => str, ...baseHelpSettings()});
|
|
554
613
|
|
|
555
614
|
// Document the text-output contract in --help so agents know how to parse/grep
|
|
556
615
|
// it (and when to reach for --json instead). Kept in sync with the formatter
|
|
@@ -592,10 +651,26 @@ export async function createProgram({argv} = {}) {
|
|
|
592
651
|
.map(block => block.toString())
|
|
593
652
|
.join('\n\n'),
|
|
594
653
|
);
|
|
654
|
+
addBaseHelpText(program);
|
|
655
|
+
|
|
656
|
+
// The theme editor paragraph names commands, so help shows it only where
|
|
657
|
+
// the run's base serves them.
|
|
658
|
+
describeCommand(program, [
|
|
659
|
+
'Design system CLI — components, themes, and tooling',
|
|
660
|
+
{
|
|
661
|
+
commands: [
|
|
662
|
+
'experimental theme editor new',
|
|
663
|
+
'experimental theme editor set',
|
|
664
|
+
'experimental theme editor how',
|
|
665
|
+
'experimental theme editor show',
|
|
666
|
+
'experimental theme preview app',
|
|
667
|
+
],
|
|
668
|
+
text: '\n\nMaking or changing a theme? Use the experimental theme editor: astryx experimental theme editor new <name> --like neutral, then editor set / editor how "<what you want>"; after each change look at it with astryx experimental theme editor show <name> --png (takes pictures of real components): a theme change is not done until you have looked. No app yet: astryx experimental theme preview app <dir>.',
|
|
669
|
+
},
|
|
670
|
+
]);
|
|
595
671
|
|
|
596
672
|
program
|
|
597
673
|
.name('astryx')
|
|
598
|
-
.description('Design system CLI — components, themes, and tooling\n\nMaking or changing a theme? Use the experimental theme editor: astryx experimental theme editor new <name> --like neutral, then editor set / editor how "<what you want>"; after each change look at it with astryx experimental theme editor show <name> --png (takes pictures of real components): a theme change is not done until you have looked. No app yet: astryx experimental theme preview app <dir>.')
|
|
599
674
|
.version(pkg.version)
|
|
600
675
|
// These four change only the reads named in their text; every other
|
|
601
676
|
// command ignores them.
|
|
@@ -611,13 +686,22 @@ export async function createProgram({argv} = {}) {
|
|
|
611
686
|
).choices(['en', 'zh', 'dense']),
|
|
612
687
|
)
|
|
613
688
|
.addOption(
|
|
614
|
-
new Option(
|
|
615
|
-
'
|
|
616
|
-
'
|
|
617
|
-
|
|
689
|
+
describeOption(new Option('--detail <level>'), [
|
|
690
|
+
'Detail level for component, hook, and docs tree reads (e.g. docs cli/commands/build)',
|
|
691
|
+
{commands: ['theme build'], text: ', and for theme build reports'},
|
|
692
|
+
'. Lists default to brief',
|
|
693
|
+
{
|
|
694
|
+
commands: ['theme build'],
|
|
695
|
+
text: '; theme build prints one line per built theme unless full, which adds the install example and font recipe',
|
|
696
|
+
},
|
|
697
|
+
])
|
|
618
698
|
.choices(['full', 'compact', 'brief'])
|
|
619
699
|
.default('full'),
|
|
620
700
|
)
|
|
701
|
+
.option(
|
|
702
|
+
'--base <package>',
|
|
703
|
+
"The base library this run reads: @astryxdesign/core, or an installed package whose integration manifest declares base. Default: in an integration package, the base it is or builds on; else the project's Core; else its one installed base; else Core",
|
|
704
|
+
)
|
|
621
705
|
.option(
|
|
622
706
|
'--json',
|
|
623
707
|
'Output as typed JSON. Success envelope: { apiVersion, type, package?, data, meta? }. Error envelope: { apiVersion, error, code, suggestions? }.',
|
|
@@ -709,6 +793,7 @@ export async function createProgram({argv} = {}) {
|
|
|
709
793
|
* must never be the reason a command fails.
|
|
710
794
|
*/
|
|
711
795
|
program.hook('preAction', (thisCommand, actionCommand) => {
|
|
796
|
+
setRequestedBase(program.opts().base);
|
|
712
797
|
try {
|
|
713
798
|
captureInvocation(actionCommand, program);
|
|
714
799
|
} catch {
|
|
@@ -716,15 +801,15 @@ export async function createProgram({argv} = {}) {
|
|
|
716
801
|
}
|
|
717
802
|
});
|
|
718
803
|
|
|
719
|
-
program.hook('preAction', (thisCommand, actionCommand) => {
|
|
804
|
+
program.hook('preAction', async (thisCommand, actionCommand) => {
|
|
720
805
|
if (!program.opts().json) return;
|
|
721
806
|
// Engage global JSON mode so humanLog()/humanWarn() across commands become
|
|
722
807
|
// no-ops — stdout now carries only the JSON envelope.
|
|
723
808
|
setJsonMode(true);
|
|
724
809
|
// The root program's own action (no subcommand) is handled directly in
|
|
725
|
-
// its action handler — let it through.
|
|
810
|
+
// its action handler — let it through. its path is '' there.
|
|
726
811
|
if (actionCommand === program) return;
|
|
727
|
-
const fullName =
|
|
812
|
+
const fullName = commandPath(actionCommand);
|
|
728
813
|
if (JSON_SUPPORTED.has(fullName)) return;
|
|
729
814
|
process.__xdsJsonHandled = true;
|
|
730
815
|
// A group given a word it does not have reports an unknown subcommand and
|
|
@@ -732,7 +817,12 @@ export async function createProgram({argv} = {}) {
|
|
|
732
817
|
const extras = actionCommand.commands.length > 0 ? actionCommand.args : [];
|
|
733
818
|
const unknown = extras.find(arg => !String(arg).startsWith('-'));
|
|
734
819
|
if (unknown != null) {
|
|
735
|
-
|
|
820
|
+
// The suggestions name only what the run's base serves, so its
|
|
821
|
+
// integrations load first.
|
|
822
|
+
await loadProjectOnce();
|
|
823
|
+
const names = actionCommand.commands
|
|
824
|
+
.filter(child => commandAvailable(child, helpBase()))
|
|
825
|
+
.map(child => child.name());
|
|
736
826
|
if (fullName === 'theme' || fullName === 'experimental') {
|
|
737
827
|
// The theme groups name whole commands, closest first, and point at
|
|
738
828
|
// `experimental theme <word>` when the word is one of its commands.
|
|
@@ -776,7 +866,7 @@ export async function createProgram({argv} = {}) {
|
|
|
776
866
|
program.hook('postAction', (thisCommand, actionCommand) => {
|
|
777
867
|
if (!program.opts().json) return;
|
|
778
868
|
if (process.__xdsJsonHandled) return;
|
|
779
|
-
const fullName =
|
|
869
|
+
const fullName = commandPath(actionCommand);
|
|
780
870
|
console.log(JSON.stringify({
|
|
781
871
|
apiVersion: API_VERSION,
|
|
782
872
|
error: `Internal: '${fullName}' completed without emitting a JSON envelope`,
|
|
@@ -813,6 +903,16 @@ export async function createProgram({argv} = {}) {
|
|
|
813
903
|
}
|
|
814
904
|
});
|
|
815
905
|
|
|
906
|
+
/**
|
|
907
|
+
* The one requirement check, after JSON mode is set and the project is
|
|
908
|
+
* loaded, before any command body: the run's base resolves, and it serves
|
|
909
|
+
* every step the command and the options and argument values given to it
|
|
910
|
+
* declare. No command checks its own requirement.
|
|
911
|
+
*/
|
|
912
|
+
program.hook('preAction', (thisCommand, actionCommand) =>
|
|
913
|
+
checkRun(program, actionCommand),
|
|
914
|
+
);
|
|
915
|
+
|
|
816
916
|
/**
|
|
817
917
|
* Enforcement layer 3 — setup nudge. If this project hasn't run `astryx init`
|
|
818
918
|
* yet (no Astryx marker in any agent-doc file between the project and its
|
|
@@ -926,8 +1026,16 @@ export async function createProgram({argv} = {}) {
|
|
|
926
1026
|
}
|
|
927
1027
|
});
|
|
928
1028
|
|
|
929
|
-
const
|
|
930
|
-
|
|
1029
|
+
const scanned = argv == null ? null : commandsForArgs(program, argv);
|
|
1030
|
+
// A run that only prints the version reads no project. Every other run on a
|
|
1031
|
+
// base other than Core loads every command, so help, examples, and
|
|
1032
|
+
// suggestions can name only what that base serves.
|
|
1033
|
+
const versionOnly = scanned != null && scanned.size === 0;
|
|
1034
|
+
const onCore = argv == null || versionOnly || (await readsCore());
|
|
1035
|
+
const loads = onCore ? scanned : null;
|
|
1036
|
+
// The stored list holds Core's commands, so only a run on Core prints it.
|
|
1037
|
+
const listed =
|
|
1038
|
+
argv != null && onCore && printsRootHelp(argv) ? storedCommandList() : null;
|
|
931
1039
|
if (listed) listStoredCommands(program, listed);
|
|
932
1040
|
for (const cmd of listed ? [] : commands) {
|
|
933
1041
|
if (loads != null && !loads.has(cmd.name)) continue;
|