@astryxdesign/cli 0.7.3-canary.f94e962 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +115 -0
- package/README.md +68 -68
- package/api/build/_adapter.mjs +37 -25
- package/api/build/blocks/blocks.d.mts +68 -18
- package/api/build/blocks/blocks.mjs +475 -116
- package/api/build/blocks/blocks.test.mjs +191 -61
- package/api/build/blocks/blocks.weights.json +1 -1
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/answer.d.mts +9 -5
- package/api/build/kit/answer.mjs +123 -13
- package/api/build/kit/answer.test.mjs +73 -3
- package/api/build/kit/signals.d.mts +19 -0
- package/api/build/kit/signals.mjs +18 -7
- package/api/build/kit/weights.d.mts +8 -22
- package/api/build/kit/weights.mjs +87 -8
- package/api/build/kit/weights.test.mjs +96 -0
- package/api/build/tree.mjs +2 -1
- package/api/build/tree.test.mjs +37 -29
- package/api/component/_adapter.mjs +39 -5
- package/api/component/component-replacement.test.mjs +1 -0
- package/api/component/component.mjs +1 -1
- package/api/component/doc-links.test.mjs +2 -2
- package/api/discover/_adapter.d.mts +1 -2
- package/api/discover/_adapter.mjs +6 -8
- package/api/discover/discover.mjs +0 -1
- package/api/docs/_adapter.d.mts +2 -2
- package/api/docs/_adapter.mjs +65 -18
- package/api/docs/docs-homes.test.mjs +127 -0
- package/api/docs/docs.doc.mjs +3 -3
- package/api/docs/docs.test.mjs +28 -18
- package/api/docs/integration-tree.test.mjs +20 -20
- package/api/docs/integrationDocs.test.mjs +1 -1
- package/api/docs/namespace-section.test.mjs +6 -6
- package/api/docs/reference-blocks.test.mjs +2 -2
- package/api/doctor/_adapter.d.mts +33 -13
- package/api/doctor/_adapter.mjs +55 -25
- package/api/doctor/doctor.d.mts +23 -5
- package/api/doctor/doctor.mjs +97 -28
- package/api/doctor/doctor.test.mjs +67 -9
- package/api/hook/hook.mjs +1 -1
- package/api/integration/validate-integration-fixes.test.mjs +6 -5
- package/api/integration/validate-integration-gaps.test.mjs +12 -1
- package/api/integration/validate-integration.d.mts +4 -0
- package/api/integration/validate-integration.mjs +48 -7
- package/api/integration/validate-integration.type.d.mts +36 -5
- package/api/integration/validate-integration.type.mjs +27 -6
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/_adapter.d.mts +16 -0
- package/api/search/_adapter.mjs +39 -0
- package/api/search/_adapter.test.mjs +173 -0
- package/api/search/_candidate-score.mjs +1 -1
- package/api/search/_entries.d.mts +11 -0
- package/api/search/_entries.mjs +35 -17
- package/api/search/_entries.test.mjs +48 -0
- package/api/search/_gather-docs.mjs +3 -3
- package/api/search/_gather-templates.d.mts +0 -1
- package/api/search/_gather-templates.mjs +25 -0
- package/api/search/search.doc.mjs +1 -1
- package/api/search/search.integration-block.test.mjs +100 -0
- package/api/search/search.mjs +6 -2
- package/api/search/search.test.mjs +14 -14
- package/api/template/template.mjs +5 -1
- package/assets/docs/author-a-theme.doc.mjs +2 -2
- package/assets/docs/tree/add-a-component.doc.mjs +1 -1
- package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
- package/assets/docs/tree/add-a-topic.doc.mjs +1 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +1 -1
- package/assets/docs/tree/{integrations.doc.mjs → authoring.doc.mjs} +15 -6
- package/assets/docs/tree/block-template.doc.mjs +1 -1
- package/assets/docs/tree/build-the-template.doc.mjs +1 -1
- package/assets/docs/tree/building-blocks.doc.mjs +2 -2
- package/assets/docs/tree/check-the-props.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/ci-and-containers.doc.mjs +13 -0
- package/assets/docs/tree/cli-command.doc.mjs +1 -1
- package/assets/docs/tree/cli.doc.mjs +1 -1
- package/assets/docs/tree/codemods.doc.mjs +1 -1
- package/assets/docs/tree/component-family.doc.mjs +1 -1
- package/assets/docs/tree/component-imports.doc.mjs +1 -1
- package/assets/docs/tree/components.doc.mjs +1 -1
- package/assets/docs/tree/configuration.doc.mjs +1 -1
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
- package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
- package/assets/docs/tree/docs.doc.mjs +1 -1
- package/assets/docs/tree/document-the-template.doc.mjs +1 -1
- package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
- package/assets/docs/tree/extend-or-replace.doc.mjs +1 -1
- package/assets/docs/{authoring.doc.mjs → tree/field-reference.doc.mjs} +4 -3
- package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
- package/assets/docs/tree/global-integrations.doc.mjs +2 -2
- package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
- package/assets/docs/tree/help.doc.mjs +2 -2
- package/assets/docs/tree/links.doc.mjs +1 -1
- package/assets/docs/tree/package-and-test.doc.mjs +1 -1
- package/assets/docs/tree/page-template.doc.mjs +1 -1
- package/assets/docs/tree/publishing.doc.mjs +1 -1
- package/assets/docs/tree/quick-start.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-template.doc.mjs +1 -1
- package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/ship.doc.mjs +2 -2
- package/assets/docs/tree/short-and-findable.doc.mjs +1 -1
- package/assets/docs/tree/single-component.doc.mjs +1 -1
- package/assets/docs/tree/start-a-template.doc.mjs +1 -1
- package/assets/docs/tree/subcomponent.doc.mjs +1 -1
- package/assets/docs/tree/template-assets.doc.mjs +1 -1
- package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
- package/assets/docs/tree/template-fonts.doc.mjs +1 -1
- package/assets/docs/tree/template-grading-rubric.doc.mjs +1 -1
- package/assets/docs/tree/template-icons.doc.mjs +1 -1
- package/assets/docs/tree/template-images-media.doc.mjs +1 -1
- package/assets/docs/tree/template-styles.doc.mjs +1 -1
- package/assets/docs/tree/templates.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
- package/assets/docs/tree/themes.doc.mjs +1 -1
- package/assets/docs/tree/troubleshooting.doc.mjs +1 -1
- package/assets/docs/tree/upgrading.doc.mjs +1 -1
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +5 -1
- package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
- package/assets/docs/tree/write-the-template-file.doc.mjs +1 -1
- package/assets/docs/use-integrations.doc.mjs +120 -0
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/integration/integration.doc.mjs +1 -1
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/command-result-coverage.test.mjs +6 -5
- package/clients/cli/commands/build-theme.color-scheme.test.mjs +1 -1
- package/clients/cli/commands/{component/index.mjs → component.mjs} +37 -37
- package/clients/cli/commands/component.test.mjs +6 -6
- package/clients/cli/commands/docs.doc.mjs +2 -2
- package/clients/cli/commands/docs.mjs +1 -1
- package/clients/cli/commands/docs.test.mjs +14 -14
- package/clients/cli/commands/doctor-integration.test.mjs +49 -1
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +10 -0
- package/clients/cli/commands/{hook/index.mjs → hook.mjs} +22 -22
- package/clients/cli/commands/import-hint-correctness.test.mjs +1 -1
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/manifest.mjs +67 -0
- package/clients/cli/commands/outside-project.test.mjs +99 -0
- package/clients/cli/commands/postinstall.doc.mjs +23 -0
- package/clients/cli/commands/postinstall.mjs +31 -0
- package/clients/cli/commands/setup-nudge.test.mjs +17 -0
- package/clients/cli/commands/{build-theme.mjs → theme.mjs} +1 -1
- package/clients/cli/index.mjs +35 -93
- package/clients/cli/lib/component-format.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +12 -7
- package/clients/cli/lib/exit-codes.test.mjs +5 -0
- package/clients/cli/lib/manifest.test.mjs +12 -0
- package/clients/cli/lib/welcome-box.mjs +50 -0
- package/foundation/agent-docs/agent-doc-state.d.mts +12 -0
- package/foundation/agent-docs/agent-doc-state.mjs +24 -2
- package/foundation/agent-docs/agent-docs.mjs +7 -6
- package/foundation/agent-docs/agent-docs.test.mjs +5 -4
- package/foundation/agent-docs/computer-agent-text.d.mts +39 -2
- package/foundation/agent-docs/computer-agent-text.mjs +135 -8
- package/foundation/agent-docs/computer-agent-text.test.mjs +99 -2
- package/foundation/discovery/authoring-self-docs.d.mts +7 -0
- package/foundation/discovery/authoring-self-docs.mjs +16 -4
- package/foundation/discovery/authoring-self-docs.test.mjs +15 -3
- package/foundation/discovery/authoring-surface.d.mts +1 -1
- package/foundation/discovery/authoring-surface.mjs +2 -2
- package/foundation/discovery/authoring-surface.test.mjs +1 -1
- package/foundation/discovery/cli-self-docs.d.mts +2 -1
- package/foundation/discovery/cli-self-docs.mjs +4 -3
- package/foundation/discovery/cli-self-docs.test.mjs +2 -2
- package/foundation/discovery/runner-commands.mjs +1 -0
- package/foundation/discovery/stray-pointers.test.mjs +1 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +21 -9
- package/foundation/doc-compiler/split-topic-keywords.test.mjs +3 -2
- package/foundation/doc-compiler/tree.d.mts +32 -6
- package/foundation/doc-compiler/tree.mjs +77 -43
- package/foundation/doc-compiler/tree.test.mjs +7 -7
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +131 -0
- package/foundation/fs/read-record.test.mjs +77 -0
- package/foundation/integrations/cli-peer-version.d.mts +36 -0
- package/foundation/integrations/cli-peer-version.mjs +132 -0
- package/foundation/integrations/cli-peer-version.test.mjs +354 -0
- package/foundation/integrations/exports-subpaths.d.mts +57 -0
- package/foundation/integrations/exports-subpaths.mjs +113 -0
- package/foundation/integrations/public-imports.d.mts +118 -0
- package/foundation/integrations/public-imports.mjs +1769 -0
- package/foundation/integrations/public-imports.test.mjs +1793 -0
- package/foundation/release/cache.test.mjs +24 -21
- package/foundation/release/global-state.d.mts +8 -4
- package/foundation/release/global-state.mjs +4 -2
- package/foundation/release/notices.d.mts +62 -8
- package/foundation/release/notices.mjs +136 -25
- package/foundation/release/notices.test.mjs +21 -0
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/text/string-utils.d.mts +2 -1
- package/foundation/text/string-utils.mjs +16 -5
- package/foundation/text/suggest-order.d.mts +72 -0
- package/foundation/text/suggest-order.mjs +363 -0
- package/foundation/text/suggest-order.test.mjs +259 -0
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/global-integrations`: make an
|
|
5
5
|
* integration work when people install it next to their global Astryx
|
|
6
6
|
* install; a checklist and the commands to try it (spec AST-081 FR12).
|
|
7
7
|
*/
|
|
@@ -11,7 +11,7 @@ export const docs = {
|
|
|
11
11
|
type: 'generic',
|
|
12
12
|
name: 'global-integrations',
|
|
13
13
|
placement: {
|
|
14
|
-
parent: 'namespace:
|
|
14
|
+
parent: 'namespace:authoring',
|
|
15
15
|
slot: 'guides',
|
|
16
16
|
order: 25,
|
|
17
17
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/write-good-templates/grade-template-with-agent`:
|
|
5
5
|
* give an agent the canonical rubric and require a reproducible template grade.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -36,11 +36,11 @@ export const docs = {
|
|
|
36
36
|
code: `Grade integration template <id> from <package> at <revision>.
|
|
37
37
|
|
|
38
38
|
Before scoring:
|
|
39
|
-
1. Read \`astryx docs
|
|
40
|
-
2. Read \`astryx docs
|
|
39
|
+
1. Read \`astryx docs authoring/building-blocks/templates/write-good-templates --full\`.
|
|
40
|
+
2. Read \`astryx docs authoring/building-blocks/templates/write-good-templates/template-grading-rubric --full\` and every guide it links.
|
|
41
41
|
3. Inspect the template source, its matching .doc.mjs file, package.json exports and files, and astryx.integration.mjs.
|
|
42
42
|
4. Run \`astryx integration verify\` in the package.
|
|
43
|
-
5. Follow \`astryx docs
|
|
43
|
+
5. Follow \`astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/test-template-in-app --full\`: install the packed package in the clean app, copy the template, build the app, and render the behavior matrix.
|
|
44
44
|
|
|
45
45
|
Score all seven rubric categories. Cite file and line evidence for every deduction. Do not award points for a state you did not inspect. If browser or build evidence is unavailable, say so and mark the template not publishable.
|
|
46
46
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
-
/** @file astryx docs
|
|
3
|
+
/** @file astryx docs authoring/help — find a CLI message and its fix. */
|
|
4
4
|
|
|
5
5
|
/** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
|
|
6
6
|
export const docs = {
|
|
7
7
|
type: 'namespace',
|
|
8
8
|
name: 'help',
|
|
9
|
-
placement: {parent: 'namespace:
|
|
9
|
+
placement: {parent: 'namespace:authoring', slot: 'guides', order: 40},
|
|
10
10
|
title: 'Help',
|
|
11
11
|
summary: 'Find a CLI message and how to fix it.',
|
|
12
12
|
keywords: ['help', 'troubleshooting', 'error'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/docs/links`: link one doc
|
|
5
5
|
* to another by identity, link the CLI's docs, and fix a link that names no
|
|
6
6
|
* doc.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test`:
|
|
5
5
|
* expose a template from its package and prove the copied result in an app.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/document-the-template/page-template`:
|
|
5
5
|
* the page-only fields that help people find a page.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/ship/publishing`: publish an integration to
|
|
5
5
|
* npm, use release tags, and check the package before and after.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/components/replace-a-core-component`:
|
|
5
5
|
* intentionally make an integration component the default for a Core identity.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/document-the-template/replace-a-core-template`:
|
|
5
5
|
* deliberately replace one Core template through template metadata.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/docs/sections-and-placement`:
|
|
5
5
|
* give an integration package its own section in the docs tree, place guides
|
|
6
6
|
* in it, and fix a placement that fails.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/components/see-it-in-an-app`: inspect an
|
|
5
5
|
* integration component from an app that installs the package.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
-
/** @file astryx docs
|
|
3
|
+
/** @file astryx docs authoring/ship — test, publish, and upgrade. */
|
|
4
4
|
|
|
5
5
|
/** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
|
|
6
6
|
export const docs = {
|
|
7
7
|
type: 'namespace',
|
|
8
8
|
name: 'ship',
|
|
9
|
-
placement: {parent: 'namespace:
|
|
9
|
+
placement: {parent: 'namespace:authoring', slot: 'guides', order: 30},
|
|
10
10
|
title: 'Ship',
|
|
11
11
|
summary: 'Test, publish, and upgrade your package.',
|
|
12
12
|
keywords: ['ship', 'publish', 'release', 'upgrade'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/docs/short-and-findable`:
|
|
5
5
|
* keep each read short, lead each section with its summary, and write docs
|
|
6
6
|
* that search finds.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/components/describe-the-component/single-component`:
|
|
5
5
|
* write and maintain the default ComponentDoc for one public component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/start-a-template`:
|
|
5
5
|
* what a template is, why an integration shares one, whether it is a page or
|
|
6
6
|
* a block, and how to add one.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/components/describe-the-component/subcomponent`:
|
|
5
5
|
* give one member of a component family its own ComponentDoc.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/template-assets`:
|
|
5
5
|
* make every style, font, icon, and media dependency survive a template copy.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/document-the-template/template-doc-overview`:
|
|
5
5
|
* the source and doc file pair, the fields every template doc shares, and how
|
|
6
6
|
* to check what Astryx lists.
|
|
7
7
|
*/
|
|
@@ -67,7 +67,7 @@ export const docs = {
|
|
|
67
67
|
'Set `type` to the kind you chose in {@link generic:start-a-template}. It decides which other fields the doc accepts.',
|
|
68
68
|
'The file name sets the template id ({@link generic:start-a-template}). Labels live in the doc: the terminal list prints `name`, and JSON listings print `displayName`. Changing either never changes the id.',
|
|
69
69
|
'Write the description for someone choosing between templates. The Doc metadata category in {@link generic:template-grading-rubric} defines what a complete description covers.',
|
|
70
|
-
"Name the ideas the template serves in `keywords`: the domains, tasks, and other names a builder might use for it, in lowercase, such as `['monitoring', 'uptime', 'on-call']` for a service-health dashboard. How search and build use them is in {@link generic:
|
|
70
|
+
"Name the ideas the template serves in `keywords`: the domains, tasks, and other names a builder might use for it, in lowercase, such as `['monitoring', 'uptime', 'on-call']` for a service-health dashboard. How search and build use them is in {@link generic:field-reference}, so the description can stay about the layout.",
|
|
71
71
|
'Add `isReady: false` as soon as you generate the doc, because a doc without `isReady` is listed as ready. Keep it until the template passes {@link generic:test-template-in-app} and the quality review.',
|
|
72
72
|
],
|
|
73
73
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/template-assets/template-fonts`:
|
|
5
5
|
* use the app typeface by default, and ship every font file a template needs
|
|
6
6
|
* when it must bring its own.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/templates/template-grading-rubric`:
|
|
5
5
|
* complete scoring rules for page and block template quality.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/template-assets/template-icons`:
|
|
5
5
|
* render template icons through Astryx and ship custom product icons from the
|
|
6
6
|
* package.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/template-assets/template-images-media`:
|
|
5
5
|
* keep template images and video working after the copy, or make them clear
|
|
6
6
|
* placeholders.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/template-assets/template-styles`:
|
|
5
5
|
* style a template with Astryx first, keep editable styles in the file, and
|
|
6
6
|
* ship shared CSS from the package.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates`: guides for adding,
|
|
5
5
|
* documenting, packaging, and testing templates in an integration package.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/ship/test-in-an-app`: install the packed
|
|
5
5
|
* package in an app and run the commands its users run.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/test-template-in-app`:
|
|
5
5
|
* copy the packed template into a clean app, build it, and render it the way
|
|
6
6
|
* apps will.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/themes`: author a theme
|
|
5
5
|
* in an integration; apps install, apply, and extend it like any theme.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/help/troubleshooting`: the messages the CLI
|
|
5
5
|
* prints while you build, verify, and install an integration, and the fix
|
|
6
6
|
* for each.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/ship/upgrading`: update an integration
|
|
5
5
|
* package for each Astryx release, and the command apps run to upgrade with
|
|
6
6
|
* it.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/themes/use-a-theme-in-an-app`:
|
|
5
5
|
* an app installs the integration and applies or extends the theme, like any theme.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/verify-packed-template`:
|
|
5
5
|
* what `integration verify` checks for templates, and what it leaves to the
|
|
6
6
|
* app test.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/ship/versioning`: version an integration
|
|
5
5
|
* package, know which changes break apps, declare peer ranges, keep apps on
|
|
6
6
|
* older CLIs working, and match codemod folders to versions.
|
|
7
7
|
*/
|
|
@@ -120,6 +120,10 @@ export const docs = {
|
|
|
120
120
|
type: 'prose',
|
|
121
121
|
text: '`integration verify` fails a package that needs the CLI peer and lacks it, or whose range admits a stable CLI too old for what it ships. `integration add doc --parent` and `integration add theme` write the peer for you.',
|
|
122
122
|
},
|
|
123
|
+
{
|
|
124
|
+
type: 'prose',
|
|
125
|
+
text: "When the CLI is outside that range, `doctor integration validate` and `integration check` list a `cli_peer_version` note naming your package. A note fails nothing, `--strict` included, and `integration verify` does not report it. Below the range the note gives the commands that install a newer Core and CLI together, as dev dependencies in your own package folder, and then run `upgrade --apply`. Above it, in an app the note asks for a release of your package that supports that CLI, and in your own package folder it asks you to test your package with that CLI and widen the range.",
|
|
126
|
+
},
|
|
123
127
|
],
|
|
124
128
|
},
|
|
125
129
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/write-good-templates`:
|
|
5
5
|
* what makes a template good, the rubric that scores it, and grading with an agent.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
4
|
+
* @file `astryx docs authoring/building-blocks/templates/build-the-template/write-the-template-file`:
|
|
5
5
|
* what gets copied, where the copied file lands, and the imports and
|
|
6
6
|
* export a copied template needs.
|
|
7
7
|
*/
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
4
|
+
|
|
5
|
+
export const docs = {
|
|
6
|
+
type: 'generic',
|
|
7
|
+
name: 'use-integrations',
|
|
8
|
+
title: 'Use integrations',
|
|
9
|
+
category: 'guide',
|
|
10
|
+
description:
|
|
11
|
+
'Install, discover, and use integration packages that add components, templates, themes, and docs to your app.',
|
|
12
|
+
keywords: [
|
|
13
|
+
'install an integration',
|
|
14
|
+
'add an integration',
|
|
15
|
+
'install a package',
|
|
16
|
+
'use an integration',
|
|
17
|
+
'discover integrations',
|
|
18
|
+
'integration',
|
|
19
|
+
'package',
|
|
20
|
+
'third party',
|
|
21
|
+
'plugin',
|
|
22
|
+
'extension',
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
sections: [
|
|
26
|
+
{
|
|
27
|
+
title: 'Discover integrations',
|
|
28
|
+
content: [
|
|
29
|
+
{
|
|
30
|
+
type: 'prose',
|
|
31
|
+
text: 'Integration packages extend Astryx with extra components, templates, themes, docs, and codemods. They are published as regular npm packages.',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'prose',
|
|
35
|
+
text: 'Search for what you need:',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'code',
|
|
39
|
+
lang: 'bash',
|
|
40
|
+
code: 'astryx search carousel\nastryx discover',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'prose',
|
|
44
|
+
text: '`search` looks across everything the CLI knows (components, docs, templates, themes, and hooks), so a word like "carousel" finds it whether it is a component, a template, or a doc page. `discover` lists every integration the project has, and, with a discover source, packages it could add.',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: 'Install an integration',
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'prose',
|
|
53
|
+
text: 'Install the package with your package manager. Integrations autolink: the CLI finds them among your dependencies, so installing is all it takes:',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'code',
|
|
57
|
+
lang: 'bash',
|
|
58
|
+
code: 'npm install @acme/brand-integration',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'prose',
|
|
62
|
+
text: 'Run `astryx doctor` to confirm everything is wired up. If you need to load a package that is not a direct dependency, add it explicitly to `astryx.config.mjs`:',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'code',
|
|
66
|
+
lang: 'js',
|
|
67
|
+
label: 'Optional: explicit config entry',
|
|
68
|
+
code: "export default {\n integrations: ['@acme/brand-integration'],\n};",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: 'Use what it adds',
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'prose',
|
|
77
|
+
text: 'Once installed, the integration\'s contributions appear alongside Core:',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'list',
|
|
81
|
+
style: 'unordered',
|
|
82
|
+
items: [
|
|
83
|
+
'`astryx component --list` shows its components next to Core components.',
|
|
84
|
+
'`astryx template --list` includes its page and block templates.',
|
|
85
|
+
'`astryx theme list` lists its themes; add one with `astryx theme add <slug> --package @acme/brand-integration`.',
|
|
86
|
+
'`astryx docs` shows any guides it provides.',
|
|
87
|
+
'`astryx search <query>` finds everything, from every installed integration.',
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'prose',
|
|
92
|
+
text: 'Import components at the subpath the integration documents. Run `astryx component <Name>` to see the exact import:',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'code',
|
|
96
|
+
lang: 'jsx',
|
|
97
|
+
code: "import {AcmeCarousel} from '@acme/brand-integration/components/AcmeCarousel';",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'prose',
|
|
101
|
+
text: 'For themes, see {@link generic:use-a-theme}. To build an integration of your own, see {@link namespace:authoring}.',
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'Check for problems',
|
|
107
|
+
content: [
|
|
108
|
+
{
|
|
109
|
+
type: 'prose',
|
|
110
|
+
text: 'Run `astryx doctor` to see integration issues: missing roots, invalid contributions, or a CLI version mismatch. The doctor check is the one place every issue for every package is listed.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'code',
|
|
114
|
+
lang: 'bash',
|
|
115
|
+
code: 'astryx doctor',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
};
|
|
@@ -49,7 +49,7 @@ export const doc = {
|
|
|
49
49
|
name: 'namespace',
|
|
50
50
|
type: 'string',
|
|
51
51
|
description:
|
|
52
|
-
"The group that reads this doc: 'authoring' for a file an author writes (a section of {@link generic:
|
|
52
|
+
"The group that reads this doc: 'authoring' for a file an author writes (a section of {@link generic:field-reference}), or 'cli/api' for a shape the CLI returns (the docs tree adopts it by kind, as the leaf `cli/api/schemas/<name>`). Every schema doc the CLI ships declares one, and `astryx doctor` fails on one that is missing or that nothing reads.",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
name: 'aliases',
|
|
@@ -131,7 +131,7 @@ export const doc = {
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
type: 'prose',
|
|
134
|
-
text: "Set `cliCommand` only when your users run the CLI with a command other than their package manager's, such as `acme astryx`. The CLI picks the command it prints in this order: the `cliCommand` of the loaded integrations when they name one command, then the command a host tool names, then the package manager's. Two different `cliCommand` values cancel out, and `astryx doctor` warns in its `cli-command` check. See `astryx docs
|
|
134
|
+
text: "Set `cliCommand` only when your users run the CLI with a command other than their package manager's, such as `acme astryx`. The CLI picks the command it prints in this order: the `cliCommand` of the loaded integrations when they name one command, then the command a host tool names, then the package manager's. Two different `cliCommand` values cancel out, and `astryx doctor` warns in its `cli-command` check. See `astryx docs authoring/building-blocks/configuration/cli-command`.",
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
type: 'prose',
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* The manifest module may also carry `debug` and `gapReport` NAMED exports.
|
|
12
12
|
* They are not fields here on purpose: a CLI released before a given manifest
|
|
13
13
|
* field existed could reject it and lose every contribution, while an unknown
|
|
14
|
-
* named export is simply not read. See `astryx docs
|
|
14
|
+
* named export is simply not read. See `astryx docs authoring`.
|
|
15
15
|
*/
|
|
16
16
|
export interface AstryxIntegration {
|
|
17
17
|
/** Stable logical provider ID. Omit to use package.json#name. Set this only
|
|
@@ -44,12 +44,13 @@ const NO_ACTION_OF_THEIR_OWN = [];
|
|
|
44
44
|
/**
|
|
45
45
|
* Commands that record for themselves instead of returning a descriptor.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
47
|
+
* Empty: every command, `manifest` and the hidden `postinstall` hook included,
|
|
48
|
+
* registers through defineCommand. The mark is a hatch, and a hatch nobody
|
|
49
|
+
* watches is a hole: this list is the watch. The root program is checked
|
|
50
|
+
* separately below.
|
|
51
|
+
* @type {string[]}
|
|
51
52
|
*/
|
|
52
|
-
const RECORD_FOR_THEMSELVES = [
|
|
53
|
+
const RECORD_FOR_THEMSELVES = [];
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* Every command in the program, depth first, with its fully qualified name.
|
|
@@ -73,7 +73,7 @@ describe('theme build color-scheme output', () => {
|
|
|
73
73
|
const project = path.join(tmpDir, 'project');
|
|
74
74
|
const themesDir = path.join(project, 'themes');
|
|
75
75
|
// A raw light-dark() token value is what triggers the color-scheme
|
|
76
|
-
// injection in
|
|
76
|
+
// injection in theme.mjs. `defineTheme.test.ts` already covers the
|
|
77
77
|
// separate [light, dark] tuple -> light-dark() conversion; this fixture
|
|
78
78
|
// writes the string directly so this test stays focused on the CLI's own
|
|
79
79
|
// color-scheme decision, not on that conversion.
|