@astryxdesign/cli 0.6.3-canary.7ada42e → 0.6.3-canary.7ec7be0
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 +21 -19
- package/api/build/_adapter.d.mts +50 -0
- package/api/build/_adapter.mjs +60 -0
- package/api/build/build.doc.mjs +13 -7
- package/api/build/build.test.mjs +184 -6
- package/api/build/build.type.d.mts +57 -2
- package/api/build/build.type.mjs +30 -7
- package/api/build/help/help.d.mts +4 -0
- package/api/build/help/help.mjs +24 -11
- package/api/build/kit/kit.d.mts +4 -1
- package/api/build/kit/kit.mjs +165 -49
- package/api/build/kit/rank.d.mts +44 -0
- package/api/build/kit/rank.mjs +432 -0
- package/api/build/kit/rank.test.mjs +196 -0
- package/api/component/_adapter.d.mts +6 -12
- package/api/component/_adapter.mjs +20 -10
- package/api/component/component.mjs +60 -12
- package/api/component/list/list.mjs +3 -2
- package/api/docs/_adapter.d.mts +251 -28
- package/api/docs/_adapter.mjs +918 -35
- package/api/docs/detail/detail.mjs +11 -3
- package/api/docs/detail/section/section.mjs +24 -13
- package/api/docs/detail/section/section.test.mjs +15 -6
- package/api/docs/docs.d.mts +5 -3
- package/api/docs/docs.doc.mjs +38 -17
- package/api/docs/docs.mjs +44 -8
- package/api/docs/docs.test.mjs +158 -4
- package/api/docs/docs.type.d.mts +181 -2
- package/api/docs/docs.type.mjs +117 -3
- package/api/docs/index/index.mjs +11 -3
- package/api/docs/index/index.test.mjs +1 -1
- package/api/docs/integration-tree.test.mjs +555 -0
- package/api/docs/integrationDocs.test.mjs +14 -14
- package/api/docs/list/list.mjs +25 -5
- package/api/docs/node/node.d.mts +43 -0
- package/api/docs/node/node.mjs +192 -0
- package/api/docs/reference-blocks.test.mjs +406 -0
- package/api/doctor/doctor.d.mts +30 -2
- package/api/doctor/doctor.mjs +151 -8
- package/api/doctor/doctor.test.mjs +95 -7
- package/api/index.d.mts +1 -1
- package/api/index.mjs +1 -0
- package/api/init/init.doc.mjs +1 -1
- package/api/integration/add-contribution.d.mts +2 -1
- package/api/integration/add-contribution.mjs +107 -5
- package/api/integration/add-contribution.test.mjs +137 -0
- package/api/integration/authoring-checks.mjs +138 -28
- package/api/integration/authoring-checks.test.mjs +171 -3
- package/api/integration/authoring-checks.type.mjs +6 -1
- package/api/integration/integration-authoring.type.d.mts +2 -0
- package/api/integration/integration-authoring.type.mjs +2 -0
- package/api/integration/integrationAdd.doc.mjs +6 -0
- package/api/integration/integrationAddDoc.doc.mjs +7 -1
- package/api/integration/integrationDocConflicts.doc.mjs +1 -1
- package/api/integration/integrationPackCheck.doc.mjs +1 -1
- package/api/integration/integrationTemplateConflicts.doc.d.mts +3 -0
- package/api/integration/integrationTemplateConflicts.doc.mjs +3 -0
- package/api/integration/pack-check.mjs +34 -0
- package/api/integration/pack-check.test.mjs +121 -0
- package/api/integration/pack-check.type.d.mts +26 -2
- package/api/integration/pack-check.type.mjs +14 -1
- package/api/integration/template-conflict-compatibility.test.mjs +73 -0
- package/api/integration/validate-integration.test.mjs +3 -3
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/json/index.ts +2 -0
- package/api/layout/_adapter.mjs +20 -5
- package/api/search/search.d.mts +59 -1
- package/api/search/search.doc.mjs +4 -3
- package/api/search/search.mjs +442 -71
- package/api/search/search.test.mjs +91 -2
- package/api/search/search.type.d.mts +13 -1
- package/api/search/search.type.mjs +4 -1
- package/api/template/list/list.mjs +1 -0
- package/api/template/table-floating-bulk-actions.test.mjs +66 -0
- package/api/template/template-integration.test.mjs +1072 -3
- package/api/template/template.doc.mjs +27 -7
- package/api/template/template.mjs +45 -8
- package/api/template/template.type.d.mts +6 -8
- package/api/template/template.type.mjs +3 -2
- package/api/theme/template/template.test.mjs +5 -0
- package/api/theme/themeTemplate.doc.mjs +1 -1
- package/assets/docs/getting-started.doc.mjs +2 -2
- package/assets/docs/layout.doc.dense.mjs +2 -2
- package/assets/docs/layout.doc.mjs +1 -1
- package/assets/docs/principles.doc.mjs +6 -6
- package/assets/docs/styling-libraries.doc.mjs +3 -3
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +4 -4
- package/assets/docs/tokens.doc.mjs +1 -1
- package/assets/docs/tree/api.doc.mjs +30 -0
- package/assets/docs/tree/cli.doc.mjs +23 -0
- package/assets/docs/tree/commands.doc.mjs +25 -0
- package/assets/docs/{cli-integrations.doc.mjs → tree/integrations.doc.mjs} +37 -9
- package/assets/docs/tree/integrations.test.mjs +62 -0
- package/assets/docs/tree/writing-docs.doc.mjs +286 -0
- package/assets/docs/working-with-ai.doc.mjs +3 -3
- package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs +1 -1
- package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx +1 -3
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +71 -0
- package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.doc.mjs +19 -0
- package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.tsx +139 -0
- package/authoring/debug/parse.d.mts +3 -3
- package/authoring/doctypes/_schema.d.mts +119 -117
- package/authoring/doctypes/_schema.mjs +54 -3
- package/authoring/doctypes/base/graph-fields.doc.mjs +7 -5
- package/authoring/doctypes/base/type.ts +6 -5
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/command/type.ts +2 -2
- package/authoring/doctypes/enum/enum.doc.mjs +1 -1
- package/authoring/doctypes/enum/type.ts +1 -1
- package/authoring/doctypes/function/function.doc.mjs +3 -2
- package/authoring/doctypes/function/type.ts +3 -2
- package/authoring/doctypes/load-contract.test.mjs +26 -1
- package/authoring/doctypes/namespace/namespace.doc.mjs +6 -10
- package/authoring/doctypes/namespace/parse.test.mjs +23 -25
- package/authoring/doctypes/namespace/type.ts +5 -2
- package/authoring/doctypes/parse.mjs +3 -2
- package/authoring/doctypes/reference/reference.doc.mjs +34 -5
- package/authoring/doctypes/reference/type.ts +28 -11
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/schema/type.ts +1 -1
- package/authoring/doctypes/template/parse.d.mts +2 -0
- package/authoring/doctypes/template/parse.mjs +4 -0
- package/authoring/doctypes/template/parse.test.mjs +18 -0
- package/authoring/doctypes/template/template.doc.mjs +6 -0
- package/authoring/doctypes/template/type.ts +8 -0
- package/authoring/identity/identity.doc.mjs +2 -2
- package/authoring/index.d.ts +1 -0
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/commands/build-theme.adaptations.test.mjs +100 -1
- package/clients/cli/commands/build-theme.mjs +1 -1
- package/clients/cli/commands/build.doc.mjs +11 -6
- package/clients/cli/commands/build.mjs +105 -67
- package/clients/cli/commands/build.text-fields.test.mjs +41 -0
- package/clients/cli/commands/component/index.mjs +1 -1
- package/clients/cli/commands/component-ownership.test.mjs +3 -3
- package/clients/cli/commands/discover.broken-integration.test.mjs +7 -8
- package/clients/cli/commands/discover.mjs +1 -1
- package/clients/cli/commands/docs.doc.mjs +20 -8
- package/clients/cli/commands/docs.mjs +183 -69
- package/clients/cli/commands/docs.test.mjs +120 -16
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +2 -2
- package/clients/cli/commands/doctor-integration-templates.doc.mjs +14 -7
- package/clients/cli/commands/doctor-integration.test.mjs +75 -1
- package/clients/cli/commands/doctor.mjs +53 -16
- package/clients/cli/commands/integration-add.doc.mjs +10 -0
- package/clients/cli/commands/integration.mjs +1 -0
- package/clients/cli/commands/search.mjs +11 -2
- package/clients/cli/commands/setup-nudge.test.mjs +6 -0
- package/clients/cli/commands/template.doc.mjs +23 -6
- package/clients/cli/commands/template.mjs +4 -91
- package/clients/cli/index.mjs +8 -0
- package/clients/cli/lib/manifest.mjs +9 -2
- package/foundation/agent-docs/agent-docs.d.mts +3 -2
- package/foundation/agent-docs/agent-docs.mjs +13 -9
- package/foundation/agent-docs/agent-docs.test.mjs +19 -1
- package/foundation/config/project.d.mts +12 -11
- package/foundation/config/project.mjs +73 -59
- package/foundation/config/project.test.mjs +141 -5
- package/foundation/discovery/authoring-self-docs.d.mts +12 -0
- package/foundation/discovery/authoring-self-docs.mjs +20 -8
- package/foundation/discovery/authoring-self-docs.test.mjs +25 -9
- package/foundation/discovery/cli-self-docs.d.mts +40 -34
- package/foundation/discovery/cli-self-docs.mjs +91 -115
- package/foundation/discovery/cli-self-docs.test.mjs +104 -166
- package/foundation/discovery/component-discovery.d.mts +38 -0
- package/foundation/discovery/component-discovery.mjs +48 -0
- package/foundation/discovery/docs-discovery.d.mts +109 -9
- package/foundation/discovery/docs-discovery.mjs +223 -24
- package/foundation/discovery/docs-discovery.test.mjs +103 -27
- package/foundation/discovery/docs-output-budget.d.mts +2 -2
- package/foundation/discovery/docs-output-budget.mjs +1 -1
- package/foundation/discovery/docs-section-key.d.mts +28 -10
- package/foundation/discovery/docs-section-key.mjs +134 -33
- package/foundation/discovery/docs-section-key.test.mjs +41 -19
- package/foundation/discovery/template-adapter.d.mts +92 -6
- package/foundation/discovery/template-adapter.mjs +453 -17
- package/foundation/discovery/template-adapter.test.mjs +42 -0
- package/foundation/discovery/template-conflict-release.d.mts +13 -0
- package/foundation/discovery/template-conflict-release.mjs +40 -0
- package/foundation/discovery/template-conflict-release.test.mjs +40 -0
- package/foundation/doc-compiler/bundle.mjs +61 -1
- package/foundation/doc-compiler/bundle.test.mjs +21 -10
- package/foundation/doc-compiler/compile.d.mts +113 -132
- package/foundation/doc-compiler/compile.mjs +57 -10
- package/foundation/doc-compiler/diagnostics.mjs +28 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +2 -2
- package/foundation/doc-compiler/inputs.d.mts +2 -2
- package/foundation/doc-compiler/inputs.mjs +6 -1
- package/foundation/doc-compiler/ir.mjs +7 -0
- package/foundation/doc-compiler/lenses.d.mts +8 -5
- package/foundation/doc-compiler/lenses.mjs +50 -4
- package/foundation/doc-compiler/links.d.mts +162 -0
- package/foundation/doc-compiler/links.mjs +294 -0
- package/foundation/doc-compiler/links.test.mjs +192 -0
- package/foundation/doc-compiler/lower-doc.test.mjs +5 -2
- package/foundation/doc-compiler/read.d.mts +3 -2
- package/foundation/doc-compiler/read.mjs +6 -1
- package/foundation/doc-compiler/tree.d.mts +288 -0
- package/foundation/doc-compiler/tree.mjs +876 -0
- package/foundation/doc-compiler/tree.test.mjs +598 -0
- package/foundation/integrations/autolink.test.mjs +1 -1
- package/foundation/integrations/cli-requirement.d.mts +45 -0
- package/foundation/integrations/cli-requirement.mjs +154 -0
- package/foundation/integrations/cli-requirement.test.mjs +84 -0
- package/foundation/integrations/contribution-inventory.d.mts +2 -1
- package/foundation/integrations/contribution-inventory.mjs +10 -4
- package/foundation/integrations/contribution-inventory.test.mjs +19 -0
- package/foundation/integrations/integration-warnings.d.mts +9 -2
- package/foundation/integrations/integration-warnings.mjs +51 -26
- package/foundation/integrations/integration-warnings.test.mjs +74 -1
- package/foundation/integrations/validate-contributions.mjs +25 -27
- package/foundation/response/response-types.doc.d.mts +5 -1
- package/foundation/response/response-types.doc.mjs +19 -10
- package/foundation/text/string-utils.d.mts +8 -0
- package/foundation/text/string-utils.mjs +18 -0
- package/foundation/xle/expand.mjs +1 -1
- package/foundation/xle/xle.test.mjs +13 -0
- package/package.json +9 -9
- package/assets/docs/cli.doc.mjs +0 -15
|
@@ -10,6 +10,25 @@
|
|
|
10
10
|
export function pkgOf(t: {
|
|
11
11
|
package?: string;
|
|
12
12
|
}): string;
|
|
13
|
+
/**
|
|
14
|
+
* Every id that should resolve to a discovered template. Replacements keep
|
|
15
|
+
* their own integration id and also own the Core id they replace.
|
|
16
|
+
* @param {{dirName: string, replaces?: string}} template
|
|
17
|
+
* @returns {string[]}
|
|
18
|
+
*/
|
|
19
|
+
export function templateLookupIds(template: {
|
|
20
|
+
dirName: string;
|
|
21
|
+
replaces?: string;
|
|
22
|
+
}): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Remove entries shadowed in the default discovery view while retaining them in
|
|
25
|
+
* package-scoped views. An active replacement owns its target id. A rejected
|
|
26
|
+
* same-id declaration falls back to Core when a Core template of the same kind
|
|
27
|
+
* owns that id; otherwise the integration template remains available by kind.
|
|
28
|
+
* @param {DiscoveredTemplate[]} templates
|
|
29
|
+
* @returns {DiscoveredTemplate[]}
|
|
30
|
+
*/
|
|
31
|
+
export function effectiveTemplateDiscovery(templates: DiscoveredTemplate[]): DiscoveredTemplate[];
|
|
13
32
|
/**
|
|
14
33
|
* Replace each Astryx template fixture reference with a placeholder so
|
|
15
34
|
* scaffolded pages render with zero setup. Images get a self-contained data
|
|
@@ -51,22 +70,54 @@ export function findPageDocFile(dirPath: string): string | null;
|
|
|
51
70
|
* @returns {Promise<DiscoveredTemplate[]>}
|
|
52
71
|
*/
|
|
53
72
|
export function discoverCoreTemplates(): Promise<DiscoveredTemplate[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Apply valid integration replacements to a raw template set.
|
|
75
|
+
*
|
|
76
|
+
* One declaration owns its Core target. When different configured packages
|
|
77
|
+
* replace the same target, the later package wins and discovery returns a
|
|
78
|
+
* warning, matching integration-doc replacement order. Multiple declarations
|
|
79
|
+
* inside one package are invalid and fail closed. Missing targets and kind
|
|
80
|
+
* mismatches also fail closed: Core stays selected and every integration
|
|
81
|
+
* template remains addressable by its own id.
|
|
82
|
+
*
|
|
83
|
+
* @param {DiscoveredTemplate[]} templates
|
|
84
|
+
* @param {TemplateDiscoveryError[]} [declarationErrors]
|
|
85
|
+
* @returns {{templates: DiscoveredTemplate[], errors: TemplateReplacementError[]}}
|
|
86
|
+
*/
|
|
87
|
+
export function applyTemplateReplacements(templates: DiscoveredTemplate[], declarationErrors?: TemplateDiscoveryError[]): {
|
|
88
|
+
templates: DiscoveredTemplate[];
|
|
89
|
+
errors: TemplateReplacementError[];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Discover every template without hiding replaced Core originals. Internal
|
|
93
|
+
* package-qualified selection uses this view.
|
|
94
|
+
* @param {string} [cwd]
|
|
95
|
+
* @returns {Promise<DiscoveredTemplate[]>}
|
|
96
|
+
*/
|
|
97
|
+
export function discoverAllUnresolved(cwd?: string): Promise<DiscoveredTemplate[]>;
|
|
98
|
+
/**
|
|
99
|
+
* Discover the resolved catalog before default-view shadowing. Internal
|
|
100
|
+
* package-qualified selection uses this view.
|
|
101
|
+
* @param {string} [cwd]
|
|
102
|
+
* @returns {Promise<DiscoveredTemplate[]>}
|
|
103
|
+
*/
|
|
104
|
+
export function discoverAllResolved(cwd?: string): Promise<DiscoveredTemplate[]>;
|
|
54
105
|
/**
|
|
55
106
|
* @param {string} [cwd]
|
|
56
107
|
* @returns {Promise<DiscoveredTemplate[]>}
|
|
57
108
|
*/
|
|
58
109
|
export function discoverAll(cwd?: string): Promise<DiscoveredTemplate[]>;
|
|
59
110
|
/**
|
|
60
|
-
* Like {@link discoverAll} but also returns integration-template discovery
|
|
61
|
-
* errors
|
|
62
|
-
*
|
|
111
|
+
* Like {@link discoverAll} but also returns integration-template discovery and
|
|
112
|
+
* replacement-declaration errors. Use this when the caller wants to warn about
|
|
113
|
+
* malformed integration templates or inactive replacement declarations.
|
|
63
114
|
*
|
|
64
115
|
* @param {string} [cwd]
|
|
65
|
-
* @returns {Promise<{templates: DiscoveredTemplate[], errors: TemplateDiscoveryError
|
|
116
|
+
* @returns {Promise<{templates: DiscoveredTemplate[], errors: Array<TemplateDiscoveryError | TemplateReplacementError>}>}
|
|
66
117
|
*/
|
|
67
118
|
export function discoverAllWithErrors(cwd?: string): Promise<{
|
|
68
119
|
templates: DiscoveredTemplate[];
|
|
69
|
-
errors: TemplateDiscoveryError
|
|
120
|
+
errors: Array<TemplateDiscoveryError | TemplateReplacementError>;
|
|
70
121
|
}>;
|
|
71
122
|
/**
|
|
72
123
|
* Discover the templates contributed by a SINGLE integration. Same per-template
|
|
@@ -74,12 +125,13 @@ export function discoverAllWithErrors(cwd?: string): Promise<{
|
|
|
74
125
|
* page|block type required); broken templates are recorded in `errors` rather
|
|
75
126
|
* than thrown. Exposed for `doctor integration validate` and template authoring checks.
|
|
76
127
|
*
|
|
77
|
-
* @param {{name?: string, __spec?: string, templates?: string}} integration
|
|
128
|
+
* @param {{name?: string, __spec?: string, __autolinked?: boolean, templates?: string}} integration
|
|
78
129
|
* @returns {Promise<{templates: DiscoveredTemplate[], errors: TemplateDiscoveryError[]}>}
|
|
79
130
|
*/
|
|
80
131
|
export function discoverIntegrationTemplatesForOne(integration: {
|
|
81
132
|
name?: string;
|
|
82
133
|
__spec?: string;
|
|
134
|
+
__autolinked?: boolean;
|
|
83
135
|
templates?: string;
|
|
84
136
|
}): Promise<{
|
|
85
137
|
templates: DiscoveredTemplate[];
|
|
@@ -133,6 +185,23 @@ export type DiscoveredTemplate = {
|
|
|
133
185
|
filePath: string;
|
|
134
186
|
docPath: string;
|
|
135
187
|
package?: string | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* whether the owning integration was discovered
|
|
190
|
+
* from package.json rather than named in astryx.config
|
|
191
|
+
*/
|
|
192
|
+
autolinked?: boolean | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* active Core template id this integration template replaces
|
|
195
|
+
*/
|
|
196
|
+
replaces?: string | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* whether an invalid declaration was disabled
|
|
199
|
+
*/
|
|
200
|
+
replacementRejected?: boolean | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* disabled declaration target
|
|
203
|
+
*/
|
|
204
|
+
replacementTarget?: string | undefined;
|
|
136
205
|
};
|
|
137
206
|
/**
|
|
138
207
|
* An integration-template discovery error.
|
|
@@ -141,6 +210,23 @@ export type TemplateDiscoveryError = {
|
|
|
141
210
|
package: string;
|
|
142
211
|
template?: string | undefined;
|
|
143
212
|
message: string;
|
|
213
|
+
code?: string | undefined;
|
|
214
|
+
severity?: "error" | "warning" | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Core target whose replacement set is invalid
|
|
217
|
+
*/
|
|
218
|
+
replacementTarget?: string | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* whether the declaration came from an autolinked integration
|
|
221
|
+
*/
|
|
222
|
+
autolinked?: boolean | undefined;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* A semantic error in an integration template replacement declaration.
|
|
226
|
+
*/
|
|
227
|
+
export type TemplateReplacementError = TemplateDiscoveryError & {
|
|
228
|
+
code: "missing_template_replacement_target" | "ambiguous_template_replacement" | "invalid_template_replacement";
|
|
229
|
+
severity: "warning" | "error";
|
|
144
230
|
};
|
|
145
231
|
/**
|
|
146
232
|
* The loaded metadata object from a template spec (loose — authored shape).
|