@astryxdesign/cli 0.7.4-canary.3f6ea7d → 0.7.4-canary.ac8260d
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 +63 -63
- package/api/docs/_adapter.d.mts +80 -0
- package/api/docs/_adapter.mjs +248 -5
- package/api/docs/detail/detail.mjs +8 -0
- package/api/docs/docs.doc.mjs +1 -1
- package/api/docs/docs.type.d.mts +28 -2
- package/api/docs/docs.type.mjs +13 -3
- package/api/docs/guide-route-targets.test.mjs +998 -0
- package/api/docs/index/index.mjs +9 -0
- package/api/docs/list/list.mjs +7 -1
- package/api/docs/node/node.mjs +9 -1
- package/api/doctor/built-checks.mjs +43 -13
- package/api/doctor/built-checks.test.mjs +29 -0
- package/api/doctor/doctor.doc.mjs +1 -1
- package/api/integration/_adapter.d.mts +8 -0
- package/api/integration/_adapter.mjs +25 -0
- package/api/integration/authoring-checks.mjs +29 -2
- package/api/integration/pack-check.mjs +32 -1
- package/api/integration/pack-check.test.mjs +33 -0
- package/api/integration/validate-integration.mjs +66 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/_candidate-score.d.mts +3 -2
- package/api/search/_candidate-score.mjs +66 -3
- package/api/search/_gather-docs.mjs +12 -2
- package/api/search/_priority.mjs +2 -1
- package/api/search/_score.d.mts +2 -1
- package/api/search/_score.mjs +2 -2
- package/api/search/search.family-members.test.mjs +124 -0
- package/assets/discover/official-packages.json +16 -0
- package/assets/docs/tree/extend-or-replace.doc.mjs +36 -4
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +54 -0
- package/assets/templates/themes/butter/butterPalettes.generated.receipt.json +1499 -0
- package/assets/templates/themes/butter/butterPalettes.generated.ts +550 -0
- package/assets/templates/themes/butter/butterTheme.ts +274 -234
- package/assets/templates/themes/butter/palette.config.json +484 -0
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +51 -0
- package/assets/templates/themes/matcha/matchaPalettes.generated.receipt.json +1502 -0
- package/assets/templates/themes/matcha/matchaPalettes.generated.ts +501 -0
- package/assets/templates/themes/matcha/matchaPalettes.ts +21 -0
- package/assets/templates/themes/matcha/matchaTheme.ts +164 -103
- package/assets/templates/themes/matcha/palette.config.json +448 -0
- package/assets/templates/themes/y2k/palette.config.json +166 -0
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +54 -0
- package/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json +872 -0
- package/assets/templates/themes/y2k/y2kPalettes.generated.ts +550 -0
- package/assets/templates/themes/y2k/y2kPalettes.ts +257 -0
- package/assets/templates/themes/y2k/y2kTheme.ts +164 -391
- package/authoring/doctypes/_schema.d.mts +4 -0
- package/authoring/doctypes/_schema.mjs +4 -0
- package/authoring/doctypes/reference/type.ts +14 -2
- package/clients/cli/commands/docs.mjs +27 -2
- package/foundation/discovery/docs-discovery.d.mts +93 -2
- package/foundation/discovery/docs-discovery.mjs +236 -8
- package/foundation/doc-compiler/compile.mjs +8 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +3 -0
- package/foundation/doc-compiler/tree.d.mts +5 -0
- package/foundation/doc-compiler/tree.mjs +3 -0
- package/foundation/integrations/cli-requirement.d.mts +14 -0
- package/foundation/integrations/cli-requirement.mjs +23 -0
- package/foundation/integrations/cli-requirement.test.mjs +1 -0
- package/foundation/response/response-types.doc.mjs +5 -5
- package/package.json +9 -9
|
@@ -71,6 +71,13 @@ export const THEMES_CLI = '0.6.4';
|
|
|
71
71
|
*/
|
|
72
72
|
export const SECTION_IDS_CLI = '0.6.4';
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* The first CLI release that reads a doc section's `before` and `after`.
|
|
76
|
+
* Earlier releases reject the fields and hide every doc topic the package
|
|
77
|
+
* ships.
|
|
78
|
+
*/
|
|
79
|
+
export const SECTION_POSITION_CLI = '0.7.4';
|
|
80
|
+
|
|
74
81
|
const VERSION_RE = /^v?(\d+|[xX*])(?:\.(\d+|[xX*]))?(?:\.(\d+|[xX*]))?(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
75
82
|
|
|
76
83
|
/**
|
|
@@ -226,6 +233,22 @@ export function sectionIdsCliProblem(pkg) {
|
|
|
226
233
|
);
|
|
227
234
|
}
|
|
228
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Why a package with a doc section that sets `before` or `after` would lose
|
|
238
|
+
* its doc topics on an older CLI, or null when its declared CLI range admits
|
|
239
|
+
* only CLIs that read the fields (spec:AST-046 FR11).
|
|
240
|
+
* @param {any} pkg package.json
|
|
241
|
+
* @returns {string | null}
|
|
242
|
+
*/
|
|
243
|
+
export function sectionPositionCliProblem(pkg) {
|
|
244
|
+
return cliRangeProblem(
|
|
245
|
+
pkg,
|
|
246
|
+
'has a doc section that sets `before` or `after`',
|
|
247
|
+
'rejects the fields, and can hide every doc topic the package ships',
|
|
248
|
+
SECTION_POSITION_CLI,
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
229
252
|
/**
|
|
230
253
|
* Why a package that ships a theme would lose its themes and doc topics on an
|
|
231
254
|
* older CLI, or null when its declared CLI range admits only CLIs that read
|
|
@@ -320,6 +320,7 @@ describe('every feature check names its CLI floor', () => {
|
|
|
320
320
|
replacesCliProblem: TEMPLATE_REPLACES_CLI,
|
|
321
321
|
keywordsCliProblem: KEYWORDS_CLI,
|
|
322
322
|
sectionIdsCliProblem: '0.6.4',
|
|
323
|
+
sectionPositionCliProblem: '0.7.4',
|
|
323
324
|
themesCliProblem: '0.6.4',
|
|
324
325
|
};
|
|
325
326
|
|
|
@@ -78,17 +78,17 @@ export const doc = {
|
|
|
78
78
|
{
|
|
79
79
|
value: 'docs.list',
|
|
80
80
|
description:
|
|
81
|
-
"All reference-doc topics as DocsListEntry[] ({topic, description, package, replaces?}), in read order; meta.namespaces lists the docs tree's top-level namespaces, and meta.notLoaded each package whose docs did not load.",
|
|
81
|
+
"All reference-doc topics as DocsListEntry[] ({topic, description, package, replaces?, replacedPackage?}), in read order; meta.namespaces lists the docs tree's top-level namespaces, and meta.notLoaded each package whose docs did not load.",
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
value: 'docs.detail',
|
|
85
85
|
description:
|
|
86
|
-
"One topic's full ReferenceDoc (the JSON read of a topic, --full, --dense, or a topic with one section), with token-ref blocks inlined and each section naming the package that wrote it, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
86
|
+
"One topic's full ReferenceDoc (the JSON read of a topic, --full, --dense, or a topic with one section), with token-ref blocks inlined and each section naming the package that wrote it, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there). A topic or guide that took another's place carries replaces and replacedPackage, the package whose topic or guide it replaced.",
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
value: 'docs.index',
|
|
90
90
|
description:
|
|
91
|
-
"One topic's section index, the text read of a topic with more than one section (and --index): the topic's name, title, and description, plus sections, each {id, title, package, summary} (pass the id as the section argument; package is the npm package that wrote the section; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
|
|
91
|
+
"One topic's section index, the text read of a topic with more than one section (and --index): the topic's name, title, and description, plus sections, each {id, title, package, summary} (pass the id as the section argument; package is the npm package that wrote the section; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there); replaces and replacedPackage when the topic or guide took another's place.",
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
value: 'docs.detail.section',
|
|
@@ -98,7 +98,7 @@ export const doc = {
|
|
|
98
98
|
{
|
|
99
99
|
value: 'docs.node',
|
|
100
100
|
description:
|
|
101
|
-
"One node of the docs tree, read by its route: its id, kind, package, title, summary, and breadcrumb, plus a namespace's slots with their children (one level down, each naming its package) or a typed doc's content, and links ({up, previous, next, related}: the commands that open its parent, its neighbors, and the docs it names).",
|
|
101
|
+
"One node of the docs tree, read by its route: its id, kind, package, title, summary, and breadcrumb, plus a namespace's slots with their children (one level down, each naming its package, and a guide an integration replaced its replaces and replacedPackage) or a typed doc's content, and links ({up, previous, next, related}: the commands that open its parent, its neighbors, and the docs it names).",
|
|
102
102
|
},
|
|
103
103
|
|
|
104
104
|
// blog (read from the published RSS feed)
|
|
@@ -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 cli_peer_version when the running CLI is outside the @astryxdesign/cli peer range of the package, 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). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on.',
|
|
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 cli_peer_version when the running CLI is outside the @astryxdesign/cli peer range of the package, 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). A doc_target_not_found note names a doc whose replaces or extends names no topic and no guide of the CLI docs or the docs of the package (such as a namespace), and a doc_section_unplaced note a section whose before or after names no section of what it extends (it is added at the end), and a duplicate_guide_replacement note two docs of the package that replace one guide; 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). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on.',
|
|
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.4-canary.
|
|
3
|
+
"version": "0.7.4-canary.ac8260d",
|
|
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.4-canary.
|
|
110
|
-
"@astryxdesign/core": "0.7.4-canary.
|
|
111
|
-
"@astryxdesign/lab": "0.7.4-canary.
|
|
112
|
-
"@astryxdesign/theme-neutral": "0.7.4-canary.
|
|
109
|
+
"@astryxdesign/charts": "0.7.4-canary.ac8260d",
|
|
110
|
+
"@astryxdesign/core": "0.7.4-canary.ac8260d",
|
|
111
|
+
"@astryxdesign/lab": "0.7.4-canary.ac8260d",
|
|
112
|
+
"@astryxdesign/theme-neutral": "0.7.4-canary.ac8260d"
|
|
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.4-canary.
|
|
130
|
-
"@astryxdesign/core": "0.7.4-canary.
|
|
131
|
-
"@astryxdesign/lab": "0.7.4-canary.
|
|
132
|
-
"@astryxdesign/theme-neutral": "0.7.4-canary.
|
|
129
|
+
"@astryxdesign/charts": "0.7.4-canary.ac8260d",
|
|
130
|
+
"@astryxdesign/core": "0.7.4-canary.ac8260d",
|
|
131
|
+
"@astryxdesign/lab": "0.7.4-canary.ac8260d",
|
|
132
|
+
"@astryxdesign/theme-neutral": "0.7.4-canary.ac8260d",
|
|
133
133
|
"@heroicons/react": "^2.2.0",
|
|
134
134
|
"@stylexjs/stylex": "^0.19.0",
|
|
135
135
|
"@types/babel__core": "^7.20.5",
|