@astryxdesign/cli 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5cf5d69
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 +64 -63
- package/api/build/_adapter.d.mts +51 -0
- package/api/build/_adapter.mjs +122 -6
- package/api/build/build.doc.mjs +1 -1
- package/api/build/build.mjs +23 -14
- package/api/build/build.type.d.mts +1 -1
- package/api/build/build.type.mjs +3 -3
- package/api/build/help/help.d.mts +15 -14
- package/api/build/help/help.mjs +62 -3
- package/api/build/kit/answer.mjs +2 -3
- package/api/build/kit/signals.d.mts +10 -0
- package/api/build/kit/signals.mjs +15 -2
- package/api/component/detail/blocks/blocks.mjs +2 -1
- package/api/discover/_adapter.d.mts +57 -6
- package/api/discover/_adapter.mjs +278 -49
- package/api/discover/_catalog-view.d.mts +7 -0
- package/api/discover/_catalog-view.mjs +10 -1
- package/api/discover/detail/detail.d.mts +3 -2
- package/api/discover/detail/detail.mjs +3 -2
- package/api/discover/detail/doc/doc.mjs +1 -1
- package/api/discover/discover.d.mts +24 -0
- package/api/discover/discover.doc.mjs +1 -1
- package/api/discover/discover.mjs +146 -25
- package/api/discover/discover.type.d.mts +6 -4
- package/api/discover/discover.type.mjs +6 -4
- package/api/discover/search/search.d.mts +22 -0
- package/api/discover/search/search.mjs +290 -70
- package/api/docs/_entry-names.mjs +4 -3
- package/api/doctor/_adapter.d.mts +43 -3
- package/api/doctor/_adapter.mjs +142 -18
- package/api/doctor/built-checks.d.mts +30 -3
- package/api/doctor/built-checks.mjs +132 -5
- package/api/doctor/doctor.d.mts +93 -6
- package/api/doctor/doctor.doc.mjs +2 -2
- package/api/doctor/doctor.mjs +524 -33
- package/api/doctor/doctor.type.d.mts +2 -1
- package/api/doctor/doctor.type.mjs +2 -1
- package/api/doctor/theme-checks.d.mts +19 -0
- package/api/doctor/theme-checks.mjs +74 -6
- package/api/hook/hook.type.d.mts +1 -1
- package/api/hook/hook.type.mjs +1 -1
- package/api/hook/list/list.mjs +11 -7
- package/api/icon/_adapter.d.mts +2 -1
- package/api/icon/_adapter.mjs +10 -15
- package/api/icon/_records.d.mts +3 -1
- package/api/icon/_records.mjs +30 -3
- package/api/icon/exportIconIndex.doc.mjs +1 -1
- package/api/icon/icon.doc.mjs +3 -3
- package/api/icon/icon.type.d.mts +32 -1
- package/api/icon/icon.type.mjs +19 -3
- package/api/icon/list/list.mjs +4 -1
- package/api/icon/rankIconIndex.doc.mjs +1 -1
- package/api/icon/search/icon-index.mjs +18 -8
- package/api/icon/search/search.d.mts +26 -3
- package/api/icon/search/search.mjs +155 -9
- package/api/init/_adapter.d.mts +14 -0
- package/api/init/_adapter.mjs +26 -4
- package/api/init/init.d.mts +1 -1
- package/api/init/init.doc.mjs +2 -2
- package/api/init/init.mjs +1 -1
- package/api/init/init.type.d.mts +29 -1
- package/api/init/init.type.mjs +14 -1
- package/api/init/run/run.d.mts +11 -1
- package/api/init/run/run.mjs +84 -5
- package/api/integration/_adapter.d.mts +5 -4
- package/api/integration/_adapter.mjs +7 -5
- package/api/integration/integrationCheck.doc.mjs +1 -1
- package/api/integration/pack-check.mjs +8 -9
- package/api/integration/validate-integration.d.mts +1 -1
- package/api/integration/validate-integration.mjs +26 -24
- package/api/integration/validate-integration.type.d.mts +5 -2
- package/api/integration/validate-integration.type.mjs +5 -2
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/render/_adapter.d.mts +4 -2
- package/api/render/_adapter.mjs +62 -21
- package/api/render/render.doc.mjs +8 -5
- package/api/render/render.mjs +1 -1
- package/api/render/render.type.d.mts +2 -0
- package/api/render/render.type.mjs +2 -0
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.d.mts +3 -0
- package/api/search/_candidate-score.mjs +36 -3
- package/api/search/_gather-docs.mjs +29 -2
- package/api/search/_gather-templates.mjs +2 -1
- package/api/search/_main-searcher.mjs +13 -0
- package/api/search/_named-keywords.d.mts +2 -1
- package/api/search/_named-keywords.mjs +48 -6
- package/api/search/_order.d.mts +36 -1
- package/api/search/_order.mjs +141 -3
- package/api/swizzle/list/list.mjs +8 -1
- package/api/swizzle/swizzle.type.d.mts +1 -1
- package/api/swizzle/swizzle.type.mjs +1 -1
- package/api/template/copy/copy.mjs +3 -4
- package/api/template/list/list.mjs +2 -1
- package/api/template/show/show.mjs +2 -1
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template.doc.mjs +1 -1
- package/api/template/template.mjs +19 -1
- package/api/template/template.type.d.mts +1 -0
- package/api/template/template.type.mjs +2 -1
- package/api/theme/_adapter.d.mts +1 -0
- package/api/theme/_adapter.mjs +3 -5
- package/api/theme/_app-provider.d.mts +42 -0
- package/api/theme/_app-provider.mjs +61 -27
- package/api/theme/build/build.d.mts +4 -10
- package/api/theme/build/build.mjs +165 -116
- package/api/theme/build/input-fields.d.mts +9 -0
- package/api/theme/build/input-fields.mjs +155 -16
- package/api/theme/build/radius-values.d.mts +18 -0
- package/api/theme/build/radius-values.mjs +76 -0
- package/api/theme/build/typography-values.mjs +7 -23
- package/api/theme/build/written-values.d.mts +18 -0
- package/api/theme/build/written-values.mjs +107 -31
- package/api/theme/eject/eject.mjs +6 -1
- package/api/theme/palette/generate/generator.mjs +24 -0
- package/api/theme/theme.type.d.mts +4 -2
- package/api/theme/theme.type.mjs +3 -2
- package/api/theme/themeBuild.doc.mjs +2 -2
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +40 -0
- package/api/theme-edit/_catalog.mjs +100 -22
- package/api/theme-edit/_check.mjs +213 -43
- package/api/theme-edit/_color.d.mts +14 -0
- package/api/theme-edit/_color.mjs +22 -0
- package/api/theme-edit/_compiler.mjs +52 -0
- package/api/theme-edit/_context.d.mts +20 -2
- package/api/theme-edit/_context.mjs +157 -29
- package/api/theme-edit/_edit.mjs +426 -58
- package/api/theme-edit/_how-question.d.mts +14 -0
- package/api/theme-edit/_how-question.mjs +1541 -127
- package/api/theme-edit/_how.mjs +43 -0
- package/api/theme-edit/_missed.mjs +107 -27
- package/api/theme-edit/_normal.d.mts +18 -4
- package/api/theme-edit/_normal.mjs +84 -3
- package/api/theme-edit/_palette.d.mts +9 -0
- package/api/theme-edit/_palette.mjs +158 -33
- package/api/theme-edit/_part-words.mjs +16 -3
- package/api/theme-edit/_parts.d.mts +8 -0
- package/api/theme-edit/_parts.mjs +120 -36
- package/api/theme-edit/_png.d.mts +24 -0
- package/api/theme-edit/_png.mjs +99 -0
- package/api/theme-edit/_preview-app.d.mts +16 -0
- package/api/theme-edit/_preview-app.mjs +52 -18
- package/api/theme-edit/_preview.d.mts +44 -26
- package/api/theme-edit/_preview.mjs +255 -67
- package/api/theme-edit/_project.d.mts +12 -1
- package/api/theme-edit/_project.mjs +16 -1
- package/api/theme-edit/_settings.d.mts +116 -0
- package/api/theme-edit/_settings.mjs +1197 -58
- package/api/theme-edit/_tables.d.mts +16 -0
- package/api/theme-edit/_tables.mjs +34 -4
- package/api/theme-edit/theme-edit.type.d.mts +15 -2
- package/api/theme-edit/theme-edit.type.mjs +8 -6
- package/api/upgrade/_adapter.d.mts +46 -7
- package/api/upgrade/_adapter.mjs +110 -15
- package/api/upgrade/registry/registry.d.mts +6 -3
- package/api/upgrade/registry/registry.mjs +21 -6
- package/api/upgrade/run/run.mjs +23 -11
- package/api/upgrade/upgrade.doc.mjs +4 -3
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +3 -2
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +4 -0
- package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
- package/assets/docs/tree/icon-sets.doc.mjs +6 -6
- package/assets/docs/tree/problems.doc.mjs +3 -3
- package/assets/docs/tree/render-pages.doc.mjs +17 -3
- package/assets/docs/tree/share-a-page.doc.mjs +5 -5
- package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
- package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +40 -5
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/installed-icon-set.doc.mjs +30 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
- package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
- package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +6 -2
- package/assets/templates/pages/ai-chat-landing/page.tsx +1 -1
- package/assets/templates/pages/blank/page.tsx +4 -2
- package/assets/templates/pages/canvas-editor/page.tsx +3 -1
- package/assets/templates/pages/centered-hero/page.tsx +1 -1
- package/assets/templates/pages/checkout-wizard/page.tsx +1 -1
- package/assets/templates/pages/classic-gallery/page.tsx +1 -1
- package/assets/templates/pages/contact-form/page.tsx +2 -2
- package/assets/templates/pages/course-detail/page.tsx +1 -1
- package/assets/templates/pages/dashboard/page.tsx +24 -8
- package/assets/templates/pages/dashboard-alert-rail/page.tsx +4 -2
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -3
- package/assets/templates/pages/dashboard-comparison/page.tsx +5 -2
- package/assets/templates/pages/dashboard-composition/page.tsx +10 -4
- package/assets/templates/pages/dashboard-progress/page.tsx +6 -3
- package/assets/templates/pages/dashboard-scorecard/page.tsx +17 -8
- package/assets/templates/pages/detail-page/page.tsx +22 -5
- package/assets/templates/pages/documentation/page.tsx +4 -2
- package/assets/templates/pages/documentation-design/page.tsx +5 -2
- package/assets/templates/pages/documentation-technical/page.tsx +4 -2
- package/assets/templates/pages/editor/page.tsx +28 -9
- package/assets/templates/pages/file-explorer/page.tsx +3 -1
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/form-wizard/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-dialog/page.tsx +3 -1
- package/assets/templates/pages/form-wizard-inline/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-vertical/page.tsx +1 -1
- package/assets/templates/pages/gallery-hero/page.tsx +1 -1
- package/assets/templates/pages/ide/page.tsx +7 -2
- package/assets/templates/pages/kanban-board/page.tsx +10 -4
- package/assets/templates/pages/library/page.tsx +31 -61
- package/assets/templates/pages/login/page.tsx +4 -2
- package/assets/templates/pages/login-card/page.tsx +4 -2
- package/assets/templates/pages/login-split/page.tsx +3 -2
- package/assets/templates/pages/login-sso/page.tsx +4 -4
- package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
- package/assets/templates/pages/payment-form/page.tsx +1 -1
- package/assets/templates/pages/product-detail/page.tsx +16 -4
- package/assets/templates/pages/product-gallery/page.tsx +1 -1
- package/assets/templates/pages/settings/page.tsx +10 -4
- package/assets/templates/pages/settings-dialog/page.tsx +5 -6
- package/assets/templates/pages/settings-sidebar/page.tsx +39 -13
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -2
- package/assets/templates/pages/table-filter/page.tsx +21 -6
- package/assets/templates/pages/table-grouped/page.tsx +23 -2
- package/assets/templates/pages/table-inbox/page.tsx +82 -32
- package/assets/templates/pages/theme-showcase/page.tsx +3 -2
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
- package/assets/templates/themes/butter/butterTheme.ts +197 -4
- package/assets/templates/themes/chocolate/chocolateTheme.ts +72 -8
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
- package/assets/templates/themes/gothic/gothicTheme.ts +114 -4
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
- package/assets/templates/themes/matcha/matchaTheme.ts +48 -12
- package/assets/templates/themes/neutral/neutralTheme.ts +29 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/stone/stoneTheme.ts +69 -0
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
- package/assets/templates/themes/y2k/y2kTheme.ts +249 -14
- package/authoring/codemod/parse.d.mts +0 -36
- package/authoring/codemod/parse.mjs +62 -41
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/config/parse.d.mts +0 -47
- package/authoring/config/parse.mjs +128 -103
- package/authoring/config/type.ts +4 -3
- package/authoring/debug/parse.d.mts +2 -2
- package/authoring/discover/parse.d.mts +2 -2
- package/authoring/discover/parse.mjs +52 -38
- package/authoring/discover/type.ts +2 -1
- package/authoring/doctypes/_schema.d.mts +834 -950
- package/authoring/doctypes/_schema.mjs +863 -825
- package/authoring/doctypes/command/parse.mjs +2 -2
- package/authoring/doctypes/component/parse.mjs +2 -2
- package/authoring/doctypes/enum/parse.mjs +2 -2
- package/authoring/doctypes/hook/parse.mjs +2 -2
- package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +1 -1
- package/authoring/doctypes/icon-definition/parse.d.mts +0 -24
- package/authoring/doctypes/icon-definition/parse.mjs +59 -43
- package/authoring/doctypes/icon-set/parse.d.mts +0 -75
- package/authoring/doctypes/icon-set/parse.mjs +239 -210
- package/authoring/doctypes/legacy.mjs +3 -3
- package/authoring/doctypes/namespace/parse.mjs +2 -2
- package/authoring/doctypes/reference/parse.mjs +2 -2
- package/authoring/doctypes/schema/parse.mjs +2 -2
- package/authoring/doctypes/template/parse.d.mts +0 -101
- package/authoring/doctypes/template/parse.mjs +131 -106
- package/authoring/doctypes/theme/parse.d.mts +0 -23
- package/authoring/doctypes/theme/parse.mjs +52 -36
- package/authoring/gap-report/parse.d.mts +1 -1
- package/authoring/integration/integration.doc.mjs +8 -0
- package/authoring/integration/schema.d.mts +14 -3
- package/authoring/integration/schema.mjs +20 -2
- package/authoring/integration/type.ts +14 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.mjs +27 -13
- package/clients/cli/commands/component.mjs +14 -3
- package/clients/cli/commands/discover.doc.mjs +2 -2
- package/clients/cli/commands/discover.mjs +20 -3
- package/clients/cli/commands/docs.doc.mjs +11 -9
- package/clients/cli/commands/docs.mjs +50 -21
- package/clients/cli/commands/experimental/icon.mjs +330 -227
- package/clients/cli/commands/experimental/render.mjs +16 -1
- package/clients/cli/commands/experimental/theme.mjs +42 -17
- package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon-map.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-render.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +36 -24
- package/clients/cli/commands/integration-check.doc.mjs +1 -1
- package/clients/cli/commands/mcp.doc.mjs +53 -0
- package/clients/cli/commands/mcp.mjs +51 -0
- package/clients/cli/commands/search.mjs +46 -9
- package/clients/cli/commands/template.mjs +3 -2
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +12 -2
- package/clients/cli/commands/upgrade.doc.mjs +3 -2
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/formatters/index.mjs +52 -6
- package/clients/cli/index.mjs +23 -17
- package/clients/cli/lib/base-gate.mjs +37 -5
- package/clients/cli/lib/define-command.mjs +82 -4
- package/clients/cli/lib/json-shim.mjs +61 -4
- package/clients/cli/lib/manifest.mjs +9 -1
- package/clients/cli/lib/mcp-server.mjs +286 -0
- package/clients/cli/lib/mcp-tools.mjs +405 -0
- package/clients/cli/lib/other-cli-words.mjs +99 -0
- package/clients/cli/lib/stray-option.mjs +27 -1
- package/clients/cli/lib/unknown-command.mjs +326 -11
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +49 -1
- package/foundation/agent-docs/agent-docs.mjs +108 -7
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core.d.mts +1 -1
- package/foundation/bases/core.mjs +3 -3
- package/foundation/bases/resolve.d.mts +4 -8
- package/foundation/bases/resolve.mjs +15 -21
- package/foundation/bases/state.d.mts +15 -9
- package/foundation/bases/state.mjs +33 -6
- package/foundation/config/project.d.mts +5 -4
- package/foundation/config/project.mjs +33 -17
- package/foundation/discovery/component-discovery.mjs +15 -28
- package/foundation/discovery/icon-imports.d.mts +66 -0
- package/foundation/discovery/icon-imports.mjs +225 -0
- package/foundation/discovery/icon-ranking.d.mts +12 -2
- package/foundation/discovery/icon-ranking.mjs +197 -10
- package/foundation/discovery/icon-set-checks.mjs +2 -1
- package/foundation/discovery/icon-set-discovery.d.mts +28 -0
- package/foundation/discovery/icon-set-discovery.mjs +42 -0
- package/foundation/discovery/icon-set-writer.d.mts +2 -11
- package/foundation/discovery/icon-set-writer.mjs +3 -29
- package/foundation/discovery/module-exports.d.mts +1 -1
- package/foundation/discovery/module-exports.mjs +136 -33
- package/foundation/discovery/name-roots.d.mts +5 -0
- package/foundation/discovery/name-roots.mjs +11 -0
- package/foundation/discovery/runner-allowlist.d.mts +1 -0
- package/foundation/discovery/runner-allowlist.mjs +2 -0
- package/foundation/discovery/runner-commands.mjs +1 -0
- package/foundation/discovery/template-adapter.d.mts +1 -1
- package/foundation/discovery/template-destination.d.mts +14 -6
- package/foundation/discovery/template-destination.mjs +42 -8
- package/foundation/discovery/template-icons.d.mts +45 -2
- package/foundation/discovery/template-icons.mjs +26 -54
- package/foundation/discovery/template-needs.d.mts +28 -2
- package/foundation/discovery/template-needs.mjs +92 -11
- package/foundation/discovery/theme-discovery.d.mts +8 -0
- package/foundation/discovery/theme-discovery.mjs +23 -6
- package/foundation/discovery/theme-imports.mjs +2 -4
- package/foundation/doc-compiler/parse-readable.mjs +4 -3
- package/foundation/doc-compiler/stored-docs.d.mts +13 -0
- package/foundation/doc-compiler/stored-docs.mjs +74 -3
- package/foundation/env/cli-command.d.mts +68 -10
- package/foundation/env/cli-command.mjs +116 -22
- package/foundation/env/project-scope.d.mts +9 -0
- package/foundation/env/project-scope.mjs +28 -2
- package/foundation/fs/gather-cache.d.mts +23 -0
- package/foundation/fs/gather-cache.mjs +94 -2
- package/foundation/fs/module-loader.d.mts +3 -1
- package/foundation/fs/module-loader.mjs +85 -5
- package/foundation/fs/read-record.mjs +9 -5
- package/foundation/identity/package-names.d.mts +18 -0
- package/foundation/identity/package-names.mjs +19 -0
- package/foundation/identity/providers.mjs +3 -2
- package/foundation/integrations/icon-features.d.mts +63 -0
- package/foundation/integrations/icon-features.mjs +54 -0
- package/foundation/integrations/integrations.d.mts +13 -1
- package/foundation/integrations/integrations.mjs +47 -6
- package/foundation/integrations/pack-state.d.mts +21 -0
- package/foundation/integrations/pack-state.mjs +42 -19
- package/foundation/integrations/validate-contributions.d.mts +11 -3
- package/foundation/integrations/validate-contributions.mjs +51 -13
- package/foundation/release/cache.d.mts +13 -1
- package/foundation/release/cache.mjs +94 -14
- package/foundation/release/notices.d.mts +15 -0
- package/foundation/release/notices.mjs +111 -7
- package/foundation/release/project.d.mts +3 -4
- package/foundation/release/project.mjs +5 -6
- package/foundation/render/client-bundle.d.mts +126 -0
- package/foundation/render/client-bundle.mjs +565 -0
- package/foundation/render/cut-short.d.mts +7 -1
- package/foundation/render/cut-short.mjs +46 -6
- package/foundation/render/embedded-imports.d.mts +4 -3
- package/foundation/render/embedded-imports.mjs +13 -8
- package/foundation/render/esbuild-dependency.d.mts +14 -0
- package/foundation/render/esbuild-dependency.mjs +41 -0
- package/foundation/render/file-header.mjs +5 -4
- package/foundation/render/page-worker.mjs +562 -86
- package/foundation/render/picture-chrome.mjs +54 -29
- package/foundation/render/picture-playwright.mjs +78 -42
- package/foundation/render/picture-window.d.mts +33 -0
- package/foundation/render/picture-window.mjs +78 -0
- package/foundation/render/render-page.d.mts +55 -4
- package/foundation/render/render-page.mjs +199 -28
- package/foundation/render/restore-folder.d.mts +13 -0
- package/foundation/render/restore-folder.mjs +30 -0
- package/foundation/render/served-packages.d.mts +2 -1
- package/foundation/render/served-packages.mjs +5 -3
- package/foundation/render/ts-paths.d.mts +11 -0
- package/foundation/render/ts-paths.mjs +27 -2
- package/foundation/render/value-uses.d.mts +43 -0
- package/foundation/render/value-uses.mjs +110 -0
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.doc.mjs +7 -1
- package/foundation/response/error-codes.mjs +10 -2
- package/foundation/response/response-types.doc.mjs +12 -12
- package/foundation/runtime/package-root.d.mts +8 -0
- package/foundation/runtime/package-root.mjs +20 -0
- package/foundation/suggest/other-command.d.mts +11 -0
- package/foundation/suggest/other-command.mjs +1 -1
- package/foundation/text/icon-id.d.mts +20 -0
- package/foundation/text/icon-id.mjs +40 -0
- package/foundation/text/icon-set-next.d.mts +25 -0
- package/foundation/text/icon-set-next.mjs +29 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +7 -6
|
@@ -87,6 +87,20 @@ export interface AstryxIntegration {
|
|
|
87
87
|
* `astryx doctor` warns. An invalid value is ignored with a warning; the
|
|
88
88
|
* rest of the manifest still loads. JSON output keeps commands bare. */
|
|
89
89
|
cliCommand?: string;
|
|
90
|
+
/** How an app that uses this package adds a dependency, when its package
|
|
91
|
+
* manager's add command is the wrong step there: one line, such as `Add
|
|
92
|
+
* {packages} to package.json, commit, then run the repository's relock
|
|
93
|
+
* script`. `{packages}` stands for the packages to add. The CLI prints it
|
|
94
|
+
* in place of the package-manager command wherever it prints a step that
|
|
95
|
+
* adds packages the app lacks (template readiness, `astryx init`'s theme
|
|
96
|
+
* step, `astryx doctor` fixes, theme hints and errors, `astryx theme
|
|
97
|
+
* eject`, the theme editor's notes, `astryx discover` add commands). A
|
|
98
|
+
* step that moves Astryx's own packages to another release, or adds
|
|
99
|
+
* `@astryxdesign/cli` at the release of the project's Core, keeps the
|
|
100
|
+
* package-manager command. When two loaded integrations give different
|
|
101
|
+
* guidance, neither is used and `astryx doctor` warns. An invalid value
|
|
102
|
+
* is ignored with a warning; the rest of the manifest still loads. */
|
|
103
|
+
installGuidance?: string;
|
|
90
104
|
/** Makes this package a base: a component library that stands in for
|
|
91
105
|
* Core in a project that uses it. `adapters` maps a capability to the
|
|
92
106
|
* module, relative to the package, that performs its platform steps; the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"47c6ab1c8c6d6503ab6dbe9df9fea24518a4f8b34184cc801ffaf9d307853d09"}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import {jsonOut} from '../../../foundation/response/json.mjs';
|
|
21
21
|
import {resultSet, resultSetOf} from '../../../foundation/debug/index.mjs';
|
|
22
22
|
import {
|
|
23
|
+
docText,
|
|
23
24
|
emit,
|
|
24
25
|
formatDeprecation,
|
|
25
26
|
section,
|
|
@@ -104,9 +105,9 @@ export function registerBuild(program) {
|
|
|
104
105
|
/** @type {import('../../../api/build/build.type.mjs').BuildHelpResponse} */ (
|
|
105
106
|
await buildApi(undefined, {cwd: process.cwd()})
|
|
106
107
|
);
|
|
107
|
-
// The playbook is a document, not a lookup: one doc,
|
|
108
|
-
//
|
|
109
|
-
// true for the no-argument form too.
|
|
108
|
+
// The playbook is a document, not a lookup: one doc, whose theme
|
|
109
|
+
// wiring follows the project. Counting it as a result keeps "what did
|
|
110
|
+
// this run answer with" true for the no-argument form too.
|
|
110
111
|
const playbook = resultSet({count: 1, resultKind: 'doc'});
|
|
111
112
|
pointToSearch(options.type, json);
|
|
112
113
|
if (json) {
|
|
@@ -210,14 +211,19 @@ export function registerBuild(program) {
|
|
|
210
211
|
'description',
|
|
211
212
|
'command',
|
|
212
213
|
],
|
|
213
|
-
format: {
|
|
214
|
+
format: {
|
|
215
|
+
command: formatCliCommand,
|
|
216
|
+
description: docText,
|
|
217
|
+
deprecated: formatDeprecation,
|
|
218
|
+
},
|
|
214
219
|
};
|
|
215
220
|
/** @param {string[]} fields */
|
|
216
221
|
const brief = fields => ({
|
|
217
222
|
fields,
|
|
218
223
|
format: {
|
|
219
224
|
command: formatCliCommand,
|
|
220
|
-
description:
|
|
225
|
+
description: (/** @type {string} */ value) =>
|
|
226
|
+
docText(firstSentence(value)),
|
|
221
227
|
deprecated: formatDeprecation,
|
|
222
228
|
},
|
|
223
229
|
});
|
|
@@ -265,7 +271,7 @@ export function registerBuild(program) {
|
|
|
265
271
|
'fit',
|
|
266
272
|
'command',
|
|
267
273
|
],
|
|
268
|
-
format: {command: formatCliCommand},
|
|
274
|
+
format: {command: formatCliCommand, description: docText},
|
|
269
275
|
}
|
|
270
276
|
: brief(['name', 'package', 'description', 'command']),
|
|
271
277
|
),
|
|
@@ -313,11 +319,7 @@ export function registerBuild(program) {
|
|
|
313
319
|
),
|
|
314
320
|
);
|
|
315
321
|
}
|
|
316
|
-
|
|
317
|
-
section(
|
|
318
|
-
'COMPONENTS',
|
|
319
|
-
`For what the template and blocks do not cover${more(domain)}. Read one: ${formatCliCommand('component <name>')}`,
|
|
320
|
-
),
|
|
322
|
+
const componentLines = [
|
|
321
323
|
...(domain.length
|
|
322
324
|
? [
|
|
323
325
|
records(
|
|
@@ -328,8 +330,20 @@ export function registerBuild(program) {
|
|
|
328
330
|
),
|
|
329
331
|
]
|
|
330
332
|
: []),
|
|
331
|
-
|
|
332
|
-
|
|
333
|
+
...(frame.length + foundation.length
|
|
334
|
+
? [record({frame, foundation})]
|
|
335
|
+
: []),
|
|
336
|
+
];
|
|
337
|
+
// A section with no lines under it is left out.
|
|
338
|
+
if (componentLines.length > 0) {
|
|
339
|
+
out.push(
|
|
340
|
+
section(
|
|
341
|
+
'COMPONENTS',
|
|
342
|
+
`For what the template and blocks do not cover${more(domain)}. Read one: ${formatCliCommand('component <name>')}`,
|
|
343
|
+
),
|
|
344
|
+
...componentLines,
|
|
345
|
+
);
|
|
346
|
+
}
|
|
333
347
|
|
|
334
348
|
// Last, so it is the line the reader leaves with — and only when the kit
|
|
335
349
|
// was thin enough that "the package has nothing" is the wrong conclusion.
|
|
@@ -20,6 +20,7 @@ import {resolveTheme} from '../lib/resolve-theme.mjs';
|
|
|
20
20
|
import {getCliInvocation} from '../../../foundation/env/package-manager.mjs';
|
|
21
21
|
import {jsonOut} from '../../../foundation/response/json.mjs';
|
|
22
22
|
import {
|
|
23
|
+
docText,
|
|
23
24
|
emit,
|
|
24
25
|
section,
|
|
25
26
|
text,
|
|
@@ -41,6 +42,9 @@ import {doc as componentFn} from '../../../api/component/component.doc.mjs';
|
|
|
41
42
|
import {currentNonCoreBase} from '../../../foundation/bases/state.mjs';
|
|
42
43
|
import {compareText} from '../../../foundation/text/compare-text.mjs';
|
|
43
44
|
|
|
45
|
+
/** Component docs print as Markdown: doc text whose commands show with the project's runner. */
|
|
46
|
+
const MARKDOWN = {lang: 'markdown'};
|
|
47
|
+
|
|
44
48
|
/**
|
|
45
49
|
* The api layer's component() widens its return to `{type: string, data: unknown}`,
|
|
46
50
|
* so annotate the command-local result with the precise discriminated union from
|
|
@@ -145,12 +149,14 @@ function componentDetailBlocks(
|
|
|
145
149
|
formatBrief(result.data, resolvedName, result.data.import, {
|
|
146
150
|
themeData,
|
|
147
151
|
}),
|
|
152
|
+
MARKDOWN,
|
|
148
153
|
)
|
|
149
154
|
: detail === 'compact'
|
|
150
155
|
? code(
|
|
151
156
|
formatCompact(result.data, resolvedName, result.data.import, {
|
|
152
157
|
propsCommand,
|
|
153
158
|
}),
|
|
159
|
+
MARKDOWN,
|
|
154
160
|
)
|
|
155
161
|
: code(
|
|
156
162
|
formatFull(result.data, {
|
|
@@ -158,6 +164,7 @@ function componentDetailBlocks(
|
|
|
158
164
|
importHint: result.data.import,
|
|
159
165
|
propsCommand,
|
|
160
166
|
}),
|
|
167
|
+
MARKDOWN,
|
|
161
168
|
),
|
|
162
169
|
);
|
|
163
170
|
return out;
|
|
@@ -165,7 +172,7 @@ function componentDetailBlocks(
|
|
|
165
172
|
case 'component.detail.props':
|
|
166
173
|
return [
|
|
167
174
|
record({package: result.package}),
|
|
168
|
-
code(formatProps({props: result.data}, resolvedName)),
|
|
175
|
+
code(formatProps({props: result.data}, resolvedName), MARKDOWN),
|
|
169
176
|
];
|
|
170
177
|
case 'component.detail.source':
|
|
171
178
|
case 'component.detail.showcase':
|
|
@@ -191,7 +198,10 @@ function componentDetailBlocks(
|
|
|
191
198
|
markNotReady(showcase.displayName, showcase.isReady),
|
|
192
199
|
),
|
|
193
200
|
},
|
|
194
|
-
{
|
|
201
|
+
{
|
|
202
|
+
fields: ['displayName', 'description'],
|
|
203
|
+
format: {description: docText},
|
|
204
|
+
},
|
|
195
205
|
),
|
|
196
206
|
);
|
|
197
207
|
}
|
|
@@ -203,7 +213,7 @@ function componentDetailBlocks(
|
|
|
203
213
|
...block,
|
|
204
214
|
name: owned(block, markNotReady(block.name, block.isReady)),
|
|
205
215
|
})),
|
|
206
|
-
{fields: ['name', 'description']},
|
|
216
|
+
{fields: ['name', 'description'], format: {description: docText}},
|
|
207
217
|
),
|
|
208
218
|
);
|
|
209
219
|
}
|
|
@@ -375,6 +385,7 @@ export function registerComponent(program) {
|
|
|
375
385
|
categories: Object.keys(result.data.components),
|
|
376
386
|
}),
|
|
377
387
|
),
|
|
388
|
+
MARKDOWN,
|
|
378
389
|
),
|
|
379
390
|
);
|
|
380
391
|
break;
|
|
@@ -21,9 +21,9 @@ export const doc = {
|
|
|
21
21
|
'Inside a project, integrations installed for the computer, beside the CLI installed for it, are listed as ones the project could add, with its install command; outside one they load. ' +
|
|
22
22
|
'A package query shows one package: what it adds, every version a source knows, and the command that adds it. ' +
|
|
23
23
|
"An @scope/name/Component path prints an installed component's doc; any other item path shows that item. " +
|
|
24
|
-
'Anything else, even an exact component name, searches every item and package and lists the matches. Discover only reads: your package manager installs, updates, and removes packages.',
|
|
24
|
+
'Anything else, even an exact component name, searches every item and package word by word, as `astryx search` does, and lists the matches; every word is part of the query. Discover only reads: your package manager installs, updates, and removes packages.',
|
|
25
25
|
fn: 'discover',
|
|
26
|
-
args: [{name: 'query', param: 'query', required: false}],
|
|
26
|
+
args: [{name: 'query', param: 'query', required: false, variadic: true}],
|
|
27
27
|
options: [
|
|
28
28
|
{
|
|
29
29
|
flag: '--components',
|
|
@@ -311,6 +311,9 @@ function addBlocks(install, themes, addsOther, run, note) {
|
|
|
311
311
|
return blocks;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
/** A whole scoped package name, `@scope/name`. */
|
|
315
|
+
const SCOPED_NAME = /^@[^/\s]+\/[^/\s]+$/;
|
|
316
|
+
|
|
314
317
|
/**
|
|
315
318
|
* @param {import('commander').Command} program
|
|
316
319
|
*/
|
|
@@ -319,10 +322,21 @@ export function registerDiscover(program) {
|
|
|
319
322
|
fn: discoverFn,
|
|
320
323
|
action:
|
|
321
324
|
/**
|
|
322
|
-
* @param {string | undefined}
|
|
325
|
+
* @param {string[] | string | undefined} words
|
|
323
326
|
* @param {{components?: boolean, type?: string, installed?: boolean, available?: boolean, limit?: string}} options
|
|
324
327
|
*/
|
|
325
|
-
async (
|
|
328
|
+
async (words, options) => {
|
|
329
|
+
// The query is variadic, as search's is: `astryx discover bar chart`
|
|
330
|
+
// is one query, "bar chart". A scoped package name and one word after
|
|
331
|
+
// it name an item: `astryx discover @acme/charts BarChart` opens
|
|
332
|
+
// `@acme/charts/BarChart`.
|
|
333
|
+
const query = Array.isArray(words)
|
|
334
|
+
? words.length > 0
|
|
335
|
+
? words.join(
|
|
336
|
+
words.length === 2 && SCOPED_NAME.test(words[0]) ? '/' : ' ',
|
|
337
|
+
)
|
|
338
|
+
: undefined
|
|
339
|
+
: words;
|
|
326
340
|
rejectEmptyArgument('query', query, 'astryx discover');
|
|
327
341
|
const detail = program.opts().detail || 'full';
|
|
328
342
|
const json = program.opts().json || false;
|
|
@@ -547,7 +561,10 @@ export function registerDiscover(program) {
|
|
|
547
561
|
: detail === 'compact'
|
|
548
562
|
? formatCompact(docs, docs.name, '')
|
|
549
563
|
: formatFull(docs);
|
|
550
|
-
emit(
|
|
564
|
+
emit(
|
|
565
|
+
record({package: result.package}),
|
|
566
|
+
code(md, {lang: 'markdown'}),
|
|
567
|
+
);
|
|
551
568
|
break;
|
|
552
569
|
}
|
|
553
570
|
|
|
@@ -15,11 +15,12 @@ export const doc = {
|
|
|
15
15
|
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Print reference docs',
|
|
17
17
|
description:
|
|
18
|
-
'Reads the reference docs
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'does, and `--index` its section
|
|
18
|
+
'Reads the reference docs: with no topic it lists every topic; a topic prints whole, ' +
|
|
19
|
+
'unless its whole text is over 16 KB, and then it lists its sections, each with the ' +
|
|
20
|
+
'key to read it by; `--index` lists the sections of any topic, ' +
|
|
21
|
+
'and `--full` prints any topic whole; a topic plus a section prints that section. With ' +
|
|
22
|
+
'`--json`, a topic returns its whole doc, as docs() does, and `--index` its section ' +
|
|
23
|
+
'index. A route ' +
|
|
23
24
|
'opens a node of the docs tree: `cli` lists its guides and reference, ' +
|
|
24
25
|
'`cli/api/functions` lists every API function, and `cli/api/functions/search` prints ' +
|
|
25
26
|
'one. A namespace plus a section prints that section from the one guide below it ' +
|
|
@@ -40,12 +41,12 @@ export const doc = {
|
|
|
40
41
|
{
|
|
41
42
|
flag: '--index',
|
|
42
43
|
param: 'options.index',
|
|
43
|
-
description: "List the topic's sections and their keys
|
|
44
|
+
description: "List the topic's sections and their keys instead of printing the topic",
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
flag: '--full',
|
|
47
48
|
description:
|
|
48
|
-
'Print the whole topic
|
|
49
|
+
'Print the whole topic, even one whose whole text is over 16 KB, which otherwise lists its sections (`--json` returns the whole topic unless --index). Cannot be set with --index',
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
52
|
flag: '--depth <levels>',
|
|
@@ -57,7 +58,8 @@ export const doc = {
|
|
|
57
58
|
examples: [
|
|
58
59
|
{label: 'List topics', cli: 'astryx docs'},
|
|
59
60
|
{label: 'The same list, asked for by flag', cli: 'astryx docs --list'},
|
|
60
|
-
{label:
|
|
61
|
+
{label: 'A topic', cli: 'astryx docs theme'},
|
|
62
|
+
{label: "A topic's sections", cli: 'astryx docs theme --index'},
|
|
61
63
|
{label: 'A whole topic as JSON', cli: 'astryx docs spacing --json'},
|
|
62
64
|
{label: 'One section', cli: 'astryx docs theme quick-start'},
|
|
63
65
|
{label: 'The CLI docs tree', cli: 'astryx docs cli'},
|
|
@@ -71,7 +73,7 @@ export const doc = {
|
|
|
71
73
|
cli: 'astryx docs authoring --depth all --detail full',
|
|
72
74
|
},
|
|
73
75
|
{label: 'One API function', cli: 'astryx docs cli/api/functions/search'},
|
|
74
|
-
{label: 'A
|
|
76
|
+
{label: 'A guide', cli: 'astryx docs authoring/quick-start'},
|
|
75
77
|
],
|
|
76
78
|
outsideProject: 'same',
|
|
77
79
|
exitCodes: [
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file docs command — Print Astryx reference docs
|
|
5
5
|
*
|
|
6
|
-
* In text,
|
|
7
|
-
*
|
|
6
|
+
* In text, a topic prints whole, unless its whole text is over
|
|
7
|
+
* WHOLE_READ_MAX_BYTES: then it lists its sections, so a reader opens one by
|
|
8
|
+
* its key. `--index` lists the sections of any topic, and `--full` prints any
|
|
9
|
+
* topic whole. `--depth`
|
|
8
10
|
* reads a docs-tree namespace as many levels down as asked, each doc below it
|
|
9
11
|
* at --detail (brief by default: one line each). `--json` keeps the docs()
|
|
10
12
|
* contract: a topic returns its whole doc, and `--index` its sections.
|
|
@@ -17,8 +19,9 @@
|
|
|
17
19
|
* Usage:
|
|
18
20
|
* astryx docs List available topics
|
|
19
21
|
* astryx docs --list The same list, asked for by flag
|
|
20
|
-
* astryx docs <topic>
|
|
21
|
-
*
|
|
22
|
+
* astryx docs <topic> Print the topic (its sections when
|
|
23
|
+
* its whole text is over 16 KB)
|
|
24
|
+
* astryx docs <topic> --index List the topic's sections
|
|
22
25
|
* astryx docs <topic> <section> Print one section
|
|
23
26
|
* astryx docs <topic> --full Print the whole topic
|
|
24
27
|
* astryx docs <route> Open a node of the docs tree, such as
|
|
@@ -49,6 +52,16 @@ import {docs as docsApi} from '../../../api/docs/docs.mjs';
|
|
|
49
52
|
import {doc as docsCommand} from './docs.doc.mjs';
|
|
50
53
|
import {doc as docsFn} from '../../../api/docs/docs.doc.mjs';
|
|
51
54
|
|
|
55
|
+
/**
|
|
56
|
+
* The longest whole topic a bare text read prints, in bytes of the topic's own
|
|
57
|
+
* text at the read's detail: its title, description and sections, without the
|
|
58
|
+
* package line and the moves that frame the read. Up to this size, reading the
|
|
59
|
+
* whole topic costs no more than a reader who wants the answer reads through
|
|
60
|
+
* the section list and the sections it opens; a longer topic lists its
|
|
61
|
+
* sections.
|
|
62
|
+
*/
|
|
63
|
+
export const WHOLE_READ_MAX_BYTES = 16 * 1024;
|
|
64
|
+
|
|
52
65
|
// ─── Formatting ──────────────────────────────────────────────────────────────
|
|
53
66
|
|
|
54
67
|
/**
|
|
@@ -717,16 +730,17 @@ export function registerDocs(program) {
|
|
|
717
730
|
// its default, each is one line.
|
|
718
731
|
const childDetail =
|
|
719
732
|
program.getOptionValueSource('detail') === 'default' ? 'brief' : detail;
|
|
720
|
-
//
|
|
721
|
-
//
|
|
722
|
-
//
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
733
|
+
// A text read prints a topic whole, as JSON and docs() do: agents act
|
|
734
|
+
// on the first read, and most never open a section from an index. Only
|
|
735
|
+
// a topic whose whole text is over WHOLE_READ_MAX_BYTES lists its
|
|
736
|
+
// sections instead. --index always lists them, --full always prints
|
|
737
|
+
// the whole topic, and the dense variant is written to be read whole.
|
|
738
|
+
const mayList =
|
|
739
|
+
!json &&
|
|
740
|
+
!options.full &&
|
|
741
|
+
!dense &&
|
|
742
|
+
lang !== 'dense' &&
|
|
743
|
+
sectionName == null;
|
|
730
744
|
let result;
|
|
731
745
|
try {
|
|
732
746
|
result = await docsApi(topic, sectionName, {
|
|
@@ -734,15 +748,18 @@ export function registerDocs(program) {
|
|
|
734
748
|
zh,
|
|
735
749
|
dense,
|
|
736
750
|
list: options.list,
|
|
737
|
-
index:
|
|
751
|
+
index: Boolean(options.index),
|
|
738
752
|
...(depth != null ? {depth, detail: childDetail} : {}),
|
|
739
753
|
});
|
|
740
754
|
if (
|
|
755
|
+
mayList &&
|
|
741
756
|
!options.index &&
|
|
742
|
-
result.type === 'docs.
|
|
743
|
-
result.data.sections.length
|
|
757
|
+
result.type === 'docs.detail' &&
|
|
758
|
+
result.data.sections.length > 1 &&
|
|
759
|
+
Buffer.byteLength(formatReferenceFull(result.data, detail), 'utf8') >
|
|
760
|
+
WHOLE_READ_MAX_BYTES
|
|
744
761
|
) {
|
|
745
|
-
result = await docsApi(topic, sectionName, {lang, zh,
|
|
762
|
+
result = await docsApi(topic, sectionName, {lang, zh, index: true});
|
|
746
763
|
}
|
|
747
764
|
} catch (e) {
|
|
748
765
|
// docs API throws structured errors with {name, reason} suggestions —
|
|
@@ -788,9 +805,9 @@ export function registerDocs(program) {
|
|
|
788
805
|
}),
|
|
789
806
|
text(
|
|
790
807
|
[
|
|
791
|
-
`Usage: ${run} docs <topic>
|
|
808
|
+
`Usage: ${run} docs <topic> read a topic`,
|
|
809
|
+
` ${run} docs <topic> --index list a topic's sections`,
|
|
792
810
|
` ${run} docs <topic> <section> read one section`,
|
|
793
|
-
` ${run} docs <topic> --full read the whole topic`,
|
|
794
811
|
` ${run} docs cli/api go down the docs tree one level at a time`,
|
|
795
812
|
` ${run} docs cli --depth all every doc below cli, one line each`,
|
|
796
813
|
`With --json, a topic returns its whole doc; add --index for its section list.`,
|
|
@@ -839,7 +856,19 @@ export function registerDocs(program) {
|
|
|
839
856
|
detail,
|
|
840
857
|
),
|
|
841
858
|
),
|
|
842
|
-
text(
|
|
859
|
+
text(
|
|
860
|
+
[
|
|
861
|
+
// A whole read ends with its moves too: down to one section
|
|
862
|
+
// and to the section list, then up and across.
|
|
863
|
+
...(result.data.sections.length > 1
|
|
864
|
+
? [
|
|
865
|
+
`Read one section: ${run} docs ${result.data.name} <section>`,
|
|
866
|
+
`List its sections: ${run} docs ${result.data.name} --index`,
|
|
867
|
+
]
|
|
868
|
+
: []),
|
|
869
|
+
...linkLines(result.data.links),
|
|
870
|
+
].join('\n'),
|
|
871
|
+
),
|
|
843
872
|
);
|
|
844
873
|
break;
|
|
845
874
|
}
|