@astryxdesign/cli 0.7.3-canary.31e06f4 → 0.7.3-canary.641d08e
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 +68 -68
- package/api/component/doc-links.test.mjs +2 -2
- package/api/docs/_adapter.d.mts +2 -2
- package/api/docs/_adapter.mjs +61 -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/doctor.mjs +16 -12
- package/api/doctor/doctor.test.mjs +9 -9
- package/api/integration/_adapter.d.mts +8 -0
- package/api/integration/_adapter.mjs +21 -1
- package/api/integration/authoring-checks.test.mjs +220 -0
- package/api/integration/validate-integration.mjs +24 -0
- package/api/integration/validate-integration.type.d.mts +2 -1
- package/api/integration/validate-integration.type.mjs +2 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/_candidate-score.mjs +1 -1
- package/api/search/_entries.mjs +57 -1
- package/api/search/_gather-docs.mjs +3 -3
- package/api/search/search.doc.mjs +1 -1
- package/api/search/search.test.mjs +14 -14
- 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 +2 -2
- 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/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 +1 -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/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/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/integration-check.test.mjs +48 -0
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/foundation/agent-docs/agent-docs.mjs +2 -1
- package/foundation/agent-docs/agent-docs.test.mjs +5 -4
- 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-allowlist.d.mts +2 -4
- package/foundation/discovery/runner-allowlist.mjs +2 -4
- package/foundation/discovery/runner-commands.d.mts +77 -0
- package/foundation/discovery/runner-commands.mjs +293 -0
- package/foundation/discovery/runner-commands.test.mjs +128 -0
- package/foundation/discovery/stray-pointers.test.mjs +1 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +4 -0
- 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/response/response-types.doc.mjs +1 -1
- package/package.json +9 -9
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the one adoption rule in its package that matches its group and kind. A
|
|
10
10
|
* placement that fails withdraws the doc; it never falls back to adoption. A
|
|
11
11
|
* doc with neither is a flat topic: it keeps its flat name as its route, and its
|
|
12
|
-
* home is the generated
|
|
12
|
+
* home is the generated level for its category. The CLI keeps its own routes: an
|
|
13
13
|
* integration's node that would take one is withdrawn with a diagnostic.
|
|
14
14
|
*
|
|
15
15
|
* @param {{namespaces: TreeNamespaceInput[], docs: TreeDocInput[], topics?: TreeTopicInput[]}} inputs
|
|
@@ -117,19 +117,39 @@ export const KIND_GROUPS: Readonly<Record<string, {
|
|
|
117
117
|
*/
|
|
118
118
|
/**
|
|
119
119
|
* A flat topic: a reference topic that no namespace places. The tree gives it
|
|
120
|
-
* a home in the generated
|
|
120
|
+
* a home in the generated level for its category (Guides or Foundations),
|
|
121
|
+
* under its own name.
|
|
121
122
|
* @typedef {object} TreeTopicInput
|
|
122
123
|
* @property {string} provider the package that owns the topic
|
|
123
124
|
* @property {string} providerId the provider's ProviderId
|
|
124
125
|
* @property {string} name the topic's name, which stays its route
|
|
125
126
|
* @property {string} title
|
|
126
127
|
* @property {string} summary
|
|
128
|
+
* @property {string | null} [category] the topic's sidebar group:
|
|
129
|
+
* `foundations` puts it in Foundations; anything else, in Guides
|
|
127
130
|
* @property {string} source where the topic comes from, for diagnostics
|
|
128
131
|
* @property {string[]} [aliases] every other name the topic answers to: the
|
|
129
132
|
* topics it replaced, directly or through a chain
|
|
130
133
|
*/
|
|
131
|
-
/**
|
|
132
|
-
|
|
134
|
+
/**
|
|
135
|
+
* The generated levels that hold the flat topics, by category
|
|
136
|
+
* (spec:AST-046 FR12). A topic keeps its own name as its route; its level is
|
|
137
|
+
* only where it sits. Readers see these titles in a topic's path, so each is
|
|
138
|
+
* a plain name for what the topics are.
|
|
139
|
+
*/
|
|
140
|
+
export const TOPIC_LEVELS: Readonly<{
|
|
141
|
+
guides: Readonly<{
|
|
142
|
+
route: "guides";
|
|
143
|
+
title: "Guides";
|
|
144
|
+
summary: "Guides that stand on their own: getting started, principles, theming, and working with AI. Each topic keeps its own name; open one by it.";
|
|
145
|
+
}>;
|
|
146
|
+
foundations: Readonly<{
|
|
147
|
+
route: "foundations";
|
|
148
|
+
title: "Foundations";
|
|
149
|
+
summary: "Color, elevation, icons, illustrations, motion, shape, and spacing: the visual foundations every component builds on. Each topic keeps its own name; open one by it.";
|
|
150
|
+
}>;
|
|
151
|
+
}>;
|
|
152
|
+
export function topicLevel(category: string | null | undefined): "guides" | "foundations";
|
|
133
153
|
export type NamespaceDoc = import("../../authoring/doctypes/namespace/type").NamespaceDoc;
|
|
134
154
|
export type DocPlacement = import("../../authoring/doctypes/base/type").DocPlacement;
|
|
135
155
|
export type CompilerDiagnostic = import("./diagnostics.mjs").CompilerDiagnostic;
|
|
@@ -200,7 +220,8 @@ export type TreeSlot = {
|
|
|
200
220
|
};
|
|
201
221
|
/**
|
|
202
222
|
* A flat topic: a reference topic that no namespace places. The tree gives it
|
|
203
|
-
* a home in the generated
|
|
223
|
+
* a home in the generated level for its category (Guides or Foundations),
|
|
224
|
+
* under its own name.
|
|
204
225
|
*/
|
|
205
226
|
export type TreeTopicInput = {
|
|
206
227
|
/**
|
|
@@ -217,6 +238,11 @@ export type TreeTopicInput = {
|
|
|
217
238
|
name: string;
|
|
218
239
|
title: string;
|
|
219
240
|
summary: string;
|
|
241
|
+
/**
|
|
242
|
+
* the topic's sidebar group:
|
|
243
|
+
* `foundations` puts it in Foundations; anything else, in Guides
|
|
244
|
+
*/
|
|
245
|
+
category?: string | null | undefined;
|
|
220
246
|
/**
|
|
221
247
|
* where the topic comes from, for diagnostics
|
|
222
248
|
*/
|
|
@@ -265,7 +291,7 @@ export type TreeNode = {
|
|
|
265
291
|
order: number | null;
|
|
266
292
|
/**
|
|
267
293
|
* made by the compiler (a `groupBy: 'kind'`
|
|
268
|
-
* level, or
|
|
294
|
+
* level, or a flat topics' level), not authored
|
|
269
295
|
*/
|
|
270
296
|
generated: boolean;
|
|
271
297
|
/**
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @position Between discovery and the readers: `astryx docs <route>`,
|
|
13
13
|
* `astryx doctor`, and the docsite build all read this tree. The CLI's docs
|
|
14
14
|
* and each integration's have a home here, and a flat topic's home is the
|
|
15
|
-
* generated
|
|
15
|
+
* generated level for its category: Guides or Foundations.
|
|
16
16
|
* A namespace never scans files and never lists its children: a child names
|
|
17
17
|
* its parent, or a namespace adopts a discovery group.
|
|
18
18
|
*/
|
|
@@ -113,20 +113,49 @@ export const KIND_GROUPS = Object.freeze({
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* A flat topic: a reference topic that no namespace places. The tree gives it
|
|
116
|
-
* a home in the generated
|
|
116
|
+
* a home in the generated level for its category (Guides or Foundations),
|
|
117
|
+
* under its own name.
|
|
117
118
|
* @typedef {object} TreeTopicInput
|
|
118
119
|
* @property {string} provider the package that owns the topic
|
|
119
120
|
* @property {string} providerId the provider's ProviderId
|
|
120
121
|
* @property {string} name the topic's name, which stays its route
|
|
121
122
|
* @property {string} title
|
|
122
123
|
* @property {string} summary
|
|
124
|
+
* @property {string | null} [category] the topic's sidebar group:
|
|
125
|
+
* `foundations` puts it in Foundations; anything else, in Guides
|
|
123
126
|
* @property {string} source where the topic comes from, for diagnostics
|
|
124
127
|
* @property {string[]} [aliases] every other name the topic answers to: the
|
|
125
128
|
* topics it replaced, directly or through a chain
|
|
126
129
|
*/
|
|
127
130
|
|
|
128
|
-
/**
|
|
129
|
-
|
|
131
|
+
/**
|
|
132
|
+
* The generated levels that hold the flat topics, by category
|
|
133
|
+
* (spec:AST-046 FR12). A topic keeps its own name as its route; its level is
|
|
134
|
+
* only where it sits. Readers see these titles in a topic's path, so each is
|
|
135
|
+
* a plain name for what the topics are.
|
|
136
|
+
*/
|
|
137
|
+
export const TOPIC_LEVELS = Object.freeze({
|
|
138
|
+
guides: Object.freeze({
|
|
139
|
+
route: 'guides',
|
|
140
|
+
title: 'Guides',
|
|
141
|
+
summary:
|
|
142
|
+
'Guides that stand on their own: getting started, principles, theming, and working with AI. Each topic keeps its own name; open one by it.',
|
|
143
|
+
}),
|
|
144
|
+
foundations: Object.freeze({
|
|
145
|
+
route: 'foundations',
|
|
146
|
+
title: 'Foundations',
|
|
147
|
+
summary:
|
|
148
|
+
'Color, elevation, icons, illustrations, motion, shape, and spacing: the visual foundations every component builds on. Each topic keeps its own name; open one by it.',
|
|
149
|
+
}),
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The generated level a flat topic sits in.
|
|
154
|
+
* @param {string | null | undefined} category
|
|
155
|
+
* @returns {'guides' | 'foundations'}
|
|
156
|
+
*/
|
|
157
|
+
export const topicLevel = category =>
|
|
158
|
+
category === 'foundations' ? 'foundations' : 'guides';
|
|
130
159
|
|
|
131
160
|
/**
|
|
132
161
|
* @typedef {object} TreeNode
|
|
@@ -145,7 +174,7 @@ export const UNORGANIZED = 'unorganized';
|
|
|
145
174
|
* @property {string | null} slot the parent slot this node sits in
|
|
146
175
|
* @property {number | null} order
|
|
147
176
|
* @property {boolean} generated made by the compiler (a `groupBy: 'kind'`
|
|
148
|
-
* level, or
|
|
177
|
+
* level, or a flat topics' level), not authored
|
|
149
178
|
* @property {TreeSlot[]} slots a namespace's slots; empty for a leaf
|
|
150
179
|
* @property {string} source
|
|
151
180
|
* @property {any} [ref]
|
|
@@ -216,7 +245,7 @@ function resolveParent(parent, provider, declared) {
|
|
|
216
245
|
* the one adoption rule in its package that matches its group and kind. A
|
|
217
246
|
* placement that fails withdraws the doc; it never falls back to adoption. A
|
|
218
247
|
* doc with neither is a flat topic: it keeps its flat name as its route, and its
|
|
219
|
-
* home is the generated
|
|
248
|
+
* home is the generated level for its category. The CLI keeps its own routes: an
|
|
220
249
|
* integration's node that would take one is withdrawn with a diagnostic.
|
|
221
250
|
*
|
|
222
251
|
* @param {{namespaces: TreeNamespaceInput[], docs: TreeDocInput[], topics?: TreeTopicInput[]}} inputs
|
|
@@ -237,10 +266,15 @@ export function buildDocsTree({namespaces, docs, topics = []}) {
|
|
|
237
266
|
);
|
|
238
267
|
|
|
239
268
|
// Routes the CLI's own docs keep (spec:AST-046 FR11): the name of each of
|
|
240
|
-
// its flat topics, and the generated
|
|
241
|
-
// theirs by rank, because they go into the tree first.
|
|
242
|
-
// without case, as topic names do, so `CLI` claims `cli`.
|
|
243
|
-
|
|
269
|
+
// its flat topics, and the generated levels that hold flat topics. Its
|
|
270
|
+
// namespaces keep theirs by rank, because they go into the tree first.
|
|
271
|
+
// Routes compare without case, as topic names do, so `CLI` claims `cli`.
|
|
272
|
+
/** @type {Set<string>} */
|
|
273
|
+
const cliRoutes = new Set(
|
|
274
|
+
topics.length > 0
|
|
275
|
+
? Object.values(TOPIC_LEVELS).map(level => level.route)
|
|
276
|
+
: [],
|
|
277
|
+
);
|
|
244
278
|
for (const topic of topics) {
|
|
245
279
|
if (topic.provider === CLI_PROVIDER)
|
|
246
280
|
cliRoutes.add(topic.name.toLowerCase());
|
|
@@ -592,20 +626,21 @@ export function buildDocsTree({namespaces, docs, topics = []}) {
|
|
|
592
626
|
);
|
|
593
627
|
}
|
|
594
628
|
|
|
595
|
-
// The generated
|
|
596
|
-
//
|
|
597
|
-
// tree. A topic keeps its own name as its route.
|
|
598
|
-
|
|
629
|
+
// The generated levels (spec:AST-046 FR12): every flat topic sits in the
|
|
630
|
+
// level for its category, in the order the topic list reads, so every doc
|
|
631
|
+
// has a named home in the tree. A topic keeps its own name as its route.
|
|
632
|
+
for (const [key, level] of Object.entries(TOPIC_LEVELS)) {
|
|
633
|
+
const members = topics.filter(topic => topicLevel(topic.category) === key);
|
|
634
|
+
if (members.length === 0) continue;
|
|
599
635
|
const home = {
|
|
600
636
|
id: null,
|
|
601
|
-
route:
|
|
637
|
+
route: level.route,
|
|
602
638
|
kind: 'namespace',
|
|
603
639
|
provider: CLI_PROVIDER,
|
|
604
640
|
providerId: CLI_PROVIDER_ID,
|
|
605
|
-
name:
|
|
606
|
-
title:
|
|
607
|
-
summary:
|
|
608
|
-
'Every topic that no section places yet. Each keeps its own name; open one by it.',
|
|
641
|
+
name: level.route,
|
|
642
|
+
title: level.title,
|
|
643
|
+
summary: level.summary,
|
|
609
644
|
parent: null,
|
|
610
645
|
slot: null,
|
|
611
646
|
order: null,
|
|
@@ -613,30 +648,29 @@ export function buildDocsTree({namespaces, docs, topics = []}) {
|
|
|
613
648
|
slots: [{name: 'topics', title: 'Topics', children: []}],
|
|
614
649
|
source: 'generated',
|
|
615
650
|
};
|
|
616
|
-
if (addNode(home, {provider: CLI_PROVIDER, source: 'generated'}))
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
651
|
+
if (!addNode(home, {provider: CLI_PROVIDER, source: 'generated'})) continue;
|
|
652
|
+
members.forEach((topic, i) => {
|
|
653
|
+
addNode(
|
|
654
|
+
{
|
|
655
|
+
id: createDocId(topic.providerId, 'generic', topic.name),
|
|
656
|
+
route: topic.name,
|
|
657
|
+
kind: 'generic',
|
|
658
|
+
provider: topic.provider,
|
|
659
|
+
providerId: topic.providerId,
|
|
660
|
+
name: topic.name,
|
|
661
|
+
title: topic.title,
|
|
662
|
+
summary: topic.summary,
|
|
663
|
+
parent: level.route,
|
|
664
|
+
slot: 'topics',
|
|
665
|
+
order: i,
|
|
666
|
+
generated: false,
|
|
667
|
+
slots: [],
|
|
668
|
+
source: topic.source,
|
|
669
|
+
ref: {flatTopic: topic.name},
|
|
670
|
+
},
|
|
671
|
+
topic,
|
|
672
|
+
);
|
|
673
|
+
});
|
|
640
674
|
}
|
|
641
675
|
|
|
642
676
|
// Children, per slot, in reading order: order, then title, then id.
|
|
@@ -154,21 +154,21 @@ describe('buildDocsTree', () => {
|
|
|
154
154
|
source: `${provider}/${name}.doc.mjs`,
|
|
155
155
|
});
|
|
156
156
|
const cliNs = {...ns('cli'), provider: CLI, providerId: CLI, source: `${CLI}/tree/cli.doc.mjs`};
|
|
157
|
-
// An integration's topics named `CLI` and `
|
|
158
|
-
// namespace and
|
|
157
|
+
// An integration's topics named `CLI` and `GUIDES` claim the CLI's
|
|
158
|
+
// namespace and a generated level; both are withdrawn.
|
|
159
159
|
const tree = buildDocsTree({
|
|
160
160
|
namespaces: [cliNs],
|
|
161
161
|
docs: [],
|
|
162
|
-
topics: [topic('theme', CLI), topic('CLI'), topic('
|
|
162
|
+
topics: [topic('theme', CLI), topic('CLI'), topic('GUIDES')],
|
|
163
163
|
});
|
|
164
164
|
expect(tree.get('cli')?.provider).toBe(CLI);
|
|
165
|
-
expect(tree.get('
|
|
165
|
+
expect(tree.get('guides')?.provider).toBe(CLI);
|
|
166
166
|
expect(routes(tree)).not.toContain('CLI');
|
|
167
|
-
expect(routes(tree)).not.toContain('
|
|
167
|
+
expect(routes(tree)).not.toContain('GUIDES');
|
|
168
168
|
expect(problems(tree)).toEqual(
|
|
169
169
|
expect.arrayContaining([
|
|
170
170
|
['duplicate_route', expect.stringContaining('both have the route "CLI"')],
|
|
171
|
-
['duplicate_route', expect.stringContaining('takes the route "
|
|
171
|
+
['duplicate_route', expect.stringContaining('takes the route "GUIDES", which the CLI\'s own docs keep')],
|
|
172
172
|
]),
|
|
173
173
|
);
|
|
174
174
|
// It names both docs as their authors know them, never by artifact id,
|
|
@@ -502,7 +502,7 @@ describe("the CLI's own docs tree", () => {
|
|
|
502
502
|
async () => {
|
|
503
503
|
const tree = await loadDocsTree({fresh: true});
|
|
504
504
|
expect(tree.diagnostics).toEqual([]);
|
|
505
|
-
expect(tree.roots().map(node => node.route)).toEqual(['cli', 'global', 'internationalization', 'layout', 'migration', 'styling', 'styling-libraries', 'tokens', 'typography']);
|
|
505
|
+
expect(tree.roots().map(node => node.route)).toEqual(['authoring', 'cli', 'global', 'internationalization', 'layout', 'migration', 'styling', 'styling-libraries', 'tokens', 'typography']);
|
|
506
506
|
// Every slot child is a node one level below the namespace that places
|
|
507
507
|
// it, and every node but the root is placed. Read from the tree, so a
|
|
508
508
|
// restructure of the guides does not need this test edited.
|
|
@@ -338,7 +338,7 @@ export const doc = {
|
|
|
338
338
|
{
|
|
339
339
|
value: 'integration.validate',
|
|
340
340
|
description:
|
|
341
|
-
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message} information that fails nothing, such as invalid_cli_command for a malformed cliCommand, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed).',
|
|
341
|
+
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message} information that fails nothing, such as invalid_cli_command for a malformed cliCommand, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. A runner_command note lists each Astryx command a topic writes with a package runner (its file, line and the bare command to write). When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed).',
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
344
|
value: 'integration.template-conflicts',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.3-canary.
|
|
3
|
+
"version": "0.7.3-canary.641d08e",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"zod": "^4.4.3"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@astryxdesign/charts": "0.7.3-canary.
|
|
110
|
-
"@astryxdesign/core": "0.7.3-canary.
|
|
111
|
-
"@astryxdesign/lab": "0.7.3-canary.
|
|
112
|
-
"@astryxdesign/theme-neutral": "0.7.3-canary.
|
|
109
|
+
"@astryxdesign/charts": "0.7.3-canary.641d08e",
|
|
110
|
+
"@astryxdesign/core": "0.7.3-canary.641d08e",
|
|
111
|
+
"@astryxdesign/lab": "0.7.3-canary.641d08e",
|
|
112
|
+
"@astryxdesign/theme-neutral": "0.7.3-canary.641d08e"
|
|
113
113
|
},
|
|
114
114
|
"peerDependenciesMeta": {
|
|
115
115
|
"@astryxdesign/charts": {
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
|
-
"@astryxdesign/charts": "0.7.3-canary.
|
|
130
|
-
"@astryxdesign/core": "0.7.3-canary.
|
|
131
|
-
"@astryxdesign/lab": "0.7.3-canary.
|
|
132
|
-
"@astryxdesign/theme-neutral": "0.7.3-canary.
|
|
129
|
+
"@astryxdesign/charts": "0.7.3-canary.641d08e",
|
|
130
|
+
"@astryxdesign/core": "0.7.3-canary.641d08e",
|
|
131
|
+
"@astryxdesign/lab": "0.7.3-canary.641d08e",
|
|
132
|
+
"@astryxdesign/theme-neutral": "0.7.3-canary.641d08e",
|
|
133
133
|
"@heroicons/react": "^2.2.0",
|
|
134
134
|
"@stylexjs/stylex": "^0.19.0",
|
|
135
135
|
"@types/babel__core": "^7.20.5",
|