@astryxdesign/cli 0.7.2-canary.9fa2213 → 0.7.2-canary.a3f5dbf
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 +7 -7
- package/api/component/_adapter.d.mts +41 -1
- package/api/component/_adapter.mjs +93 -7
- package/api/component/component.mjs +22 -5
- package/api/component/component.test.mjs +420 -167
- package/api/component/integration-export-name.test.mjs +644 -0
- package/api/component/list/list.mjs +42 -4
- package/api/docs/_adapter.mjs +207 -1
- package/api/docs/integrationDocs.test.mjs +124 -0
- package/api/gap-report/gap-report.mjs +67 -4
- package/api/integration/_adapter.d.mts +12 -0
- package/api/integration/_adapter.mjs +54 -0
- package/api/integration/add-contribution.component-names.test.mjs +66 -0
- package/api/integration/add-contribution.mjs +7 -3
- package/api/integration/authoring-checks.mjs +11 -2
- package/api/integration/authoring-checks.test.mjs +39 -0
- package/api/integration/authoring-checks.type.d.mts +9 -0
- package/api/integration/authoring-checks.type.mjs +14 -1
- package/api/integration/integrationComponentConflicts.doc.mjs +21 -5
- package/api/integration/pack-check.mjs +61 -107
- package/api/integration/pack-check.test.mjs +359 -0
- package/api/integration/validate-integration.test.mjs +11 -0
- package/api/search/search.d.mts +9 -0
- package/api/search/search.mjs +108 -16
- package/api/search/search.test.mjs +36 -0
- package/api/swizzle/copy/copy.mjs +28 -14
- package/api/template/template.test.mjs +120 -3
- package/api/theme/build/build.family.test.mjs +16 -0
- package/api/theme/build/build.mjs +77 -18
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/assets/codemods/transforms/next/__tests__/migrate-list-edge-compensation-to-edge.test.mjs +120 -0
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/migrate-list-edge-compensation-to-edge.mjs +198 -0
- package/assets/docs/tree/add-a-component.doc.mjs +10 -0
- package/assets/docs/tree/check-the-props.doc.mjs +145 -0
- package/assets/docs/tree/checks.doc.mjs +4 -4
- package/assets/docs/tree/component-family.doc.mjs +5 -1
- package/assets/docs/tree/component-imports.doc.mjs +8 -0
- package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
- package/assets/docs/tree/links.doc.mjs +2 -2
- package/assets/docs/tree/single-component.doc.mjs +3 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +9 -1
- package/assets/docs/tree/versioning.doc.mjs +1 -0
- package/assets/docs/working-with-ai.doc.mjs +43 -4
- package/assets/templates/blocks/components/Drawer/DrawerForm.doc.mjs +24 -0
- package/assets/templates/blocks/components/Drawer/DrawerForm.tsx +62 -0
- package/assets/templates/blocks/components/Drawer/DrawerScrim.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerScrim.tsx +68 -0
- package/assets/templates/blocks/components/Drawer/DrawerShowcase.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerShowcase.tsx +41 -0
- package/assets/templates/blocks/components/Drawer/DrawerStart.doc.mjs +21 -0
- package/assets/templates/blocks/components/Drawer/DrawerStart.tsx +41 -0
- package/assets/templates/blocks/components/Drawer/DrawerWidths.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerWidths.tsx +54 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderShowcase.tsx +73 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderSubtitleEndContent.doc.mjs +22 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderSubtitleEndContent.tsx +49 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderWithCloseButton.doc.mjs +21 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderWithCloseButton.tsx +42 -0
- package/assets/templates/pages/detail-page/page.tsx +3 -3
- package/assets/templates/pages/table-inbox/page.tsx +10 -8
- package/authoring/doctypes/base/type.ts +6 -0
- package/authoring/doctypes/component/component.doc.mjs +4 -4
- package/authoring/doctypes/component/type.ts +6 -3
- package/authoring/integration/integration.doc.mjs +8 -1
- package/authoring/integration/parse.test.mjs +10 -0
- package/authoring/integration/schema.d.mts +2 -0
- package/authoring/integration/schema.mjs +1 -0
- package/authoring/integration/type.ts +4 -0
- package/clients/cli/commands/build-theme.path-safety.test.mjs +84 -0
- package/clients/cli/commands/build-theme.registry.test.mjs +5 -2
- package/clients/cli/commands/doctor-integration-components.doc.mjs +9 -3
- package/clients/cli/commands/doctor-integration.test.mjs +392 -0
- package/clients/cli/commands/doctor.mjs +74 -0
- package/clients/cli/commands/theme-build.doc.mjs +2 -2
- package/clients/cli/lib/component-format.mjs +5 -1
- package/foundation/config/project.mjs +82 -0
- package/foundation/discovery/component-discovery.d.mts +190 -10
- package/foundation/discovery/component-discovery.export-names.test.mjs +760 -0
- package/foundation/discovery/component-discovery.mjs +864 -56
- package/foundation/discovery/component-discovery.test.mjs +96 -0
- package/foundation/discovery/component-replacement.mjs +18 -0
- package/foundation/discovery/component-replacement.test.mjs +40 -0
- package/foundation/discovery/docs-discovery.d.mts +81 -0
- package/foundation/discovery/docs-discovery.mjs +57 -0
- package/foundation/discovery/module-exports.d.mts +27 -0
- package/foundation/discovery/module-exports.mjs +356 -31
- package/foundation/discovery/module-exports.test.mjs +172 -0
- package/foundation/discovery/package-tsconfig.d.mts +14 -0
- package/foundation/discovery/package-tsconfig.mjs +228 -0
- package/foundation/discovery/package-tsconfig.test.mjs +210 -0
- package/foundation/discovery/project-typescript.d.mts +23 -0
- package/foundation/discovery/project-typescript.mjs +61 -0
- package/foundation/discovery/prop-drift.d.mts +220 -0
- package/foundation/discovery/prop-drift.mjs +1765 -0
- package/foundation/discovery/prop-drift.test.mjs +1197 -0
- package/foundation/discovery/template-adapter.mjs +74 -5
- package/foundation/discovery/type-match.d.mts +53 -0
- package/foundation/discovery/type-match.mjs +660 -0
- package/foundation/discovery/type-match.test.mjs +169 -0
- package/foundation/discovery/type-text.d.mts +68 -0
- package/foundation/discovery/type-text.mjs +658 -0
- package/foundation/discovery/type-text.test.mjs +196 -0
- package/foundation/discovery/unresolved-references.d.mts +62 -0
- package/foundation/discovery/unresolved-references.mjs +790 -0
- package/foundation/discovery/unresolved-references.test.mjs +567 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +9 -1
- package/foundation/doc-compiler/inputs.mjs +23 -0
- package/foundation/doc-compiler/inputs.test.mjs +0 -1
- package/foundation/doc-compiler/links.d.mts +9 -5
- package/foundation/doc-compiler/links.mjs +4 -2
- package/foundation/integrations/contribution-inventory.mjs +6 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/xle/registry.mjs +4 -0
- package/foundation/xle/registry.test.mjs +28 -0
- package/package.json +10 -10
|
@@ -30,7 +30,7 @@ export const doc = {
|
|
|
30
30
|
name: 'name',
|
|
31
31
|
type: 'string',
|
|
32
32
|
description:
|
|
33
|
-
"Stable machine identity and directory name without the Astryx prefix, PascalCase. e.g. 'Button', 'TextInput', 'AppShell'. Change `displayName`, not `name`, to edit the visible label; registry URLs derive from this identity by default.",
|
|
33
|
+
"Stable machine identity and directory name without the Astryx prefix, PascalCase. e.g. 'Button', 'TextInput', 'AppShell'. For an integration component it is the export apps import: the doc sits beside the file that exports it, and when that file exports nothing under its own name, `name` may name the export it does have. Change `displayName`, not `name`, to edit the visible label; registry URLs derive from this identity by default.",
|
|
34
34
|
required: true,
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -56,7 +56,7 @@ export const doc = {
|
|
|
56
56
|
name: 'replaces',
|
|
57
57
|
type: 'string',
|
|
58
58
|
description:
|
|
59
|
-
|
|
59
|
+
'Integration components only: the exact `name` of the Core ComponentDoc this component takes over for unqualified lookup, so every app that loads the integration gets it from component detail, component lists, search, `swizzle <Name>`, and issue routing; `swizzle --list` keeps listing Core names. The Core original stays reachable with `--package @astryxdesign/core`. It takes effect only when the package\'s peer range starts at the release that applies it, `"@astryxdesign/cli": ">=0.6.7"` or later; without such a range the component keeps its own name and `doctor integration components` warns. Set it only to intentionally own a Core identity; give an alternative or variant its own name instead.',
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
name: 'keywords',
|
|
@@ -181,13 +181,13 @@ export const doc = {
|
|
|
181
181
|
name: 'props',
|
|
182
182
|
type: 'ComponentPropDoc[]',
|
|
183
183
|
description:
|
|
184
|
-
'SingleComponentDoc variant (required there): all public props for the one primary component. Each prop is {name, type, description, default?, required?, slotElements?}. Skip styling props like xstyle/className/style. Also present on SubComponentDoc.',
|
|
184
|
+
'SingleComponentDoc variant (required there): all public props for the one primary component. Each prop is {name, type, description, default?, required?, slotElements?, stability?}. Skip styling props like xstyle/className/style. Also present on SubComponentDoc.',
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
name: 'components',
|
|
188
188
|
type: '(ComponentEntry | ComponentRef)[]',
|
|
189
189
|
description:
|
|
190
|
-
'MultiComponentDoc variant (required there): one entry per public component/hook exported from the directory. Each entry is a full ComponentEntry (inline: name, displayName, description, props | params+returns) or a name-only ComponentRef pointing at a sibling {Name}.doc.mjs.',
|
|
190
|
+
'MultiComponentDoc variant (required there): one entry per public component/hook exported from the directory. Each entry is a full ComponentEntry (inline: name, displayName, description, props | params+returns) or a name-only ComponentRef pointing at a sibling {Name}.doc.mjs. In an integration, each full entry the module named by `import` exports is a component under its own name.',
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
name: 'subComponentOf',
|
|
@@ -33,9 +33,12 @@ export interface ComponentBaseDoc extends AuthoredDocGraphFields {
|
|
|
33
33
|
type?: 'component';
|
|
34
34
|
/**
|
|
35
35
|
* Stable machine identity and directory name without the Astryx prefix,
|
|
36
|
-
* PascalCase (for example `Button`, `Table`, or `AppShell`).
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* PascalCase (for example `Button`, `Table`, or `AppShell`). For an
|
|
37
|
+
* integration component it is the export apps import: the doc sits beside
|
|
38
|
+
* the file that exports it, and when that file exports nothing under its own
|
|
39
|
+
* name, `name` may name the export it does have. Do not change this to edit
|
|
40
|
+
* the visible label; use `displayName` for that. Registry URLs derive from
|
|
41
|
+
* this value by default.
|
|
39
42
|
*/
|
|
40
43
|
name: string;
|
|
41
44
|
/** Human-readable display name with spaces between words, used by the
|
|
@@ -74,6 +74,13 @@ export const doc = {
|
|
|
74
74
|
description: 'Where to file issues/feedback for this integration.',
|
|
75
75
|
example: "'https://github.com/acme/widgets/issues'",
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
name: 'docsiteUrl',
|
|
79
|
+
type: 'string',
|
|
80
|
+
description:
|
|
81
|
+
"Link to this integration's docs site, such as its home page. Catalogs that list the package may show it.",
|
|
82
|
+
example: "'https://widgets.acme.dev'",
|
|
83
|
+
},
|
|
77
84
|
],
|
|
78
85
|
examples: [
|
|
79
86
|
{
|
|
@@ -118,7 +125,7 @@ export const doc = {
|
|
|
118
125
|
text:
|
|
119
126
|
'Validate the manifest with `astryx doctor integration validate`. At the ' +
|
|
120
127
|
'load boundary, a known field of the wrong type is an error, issuesUrl ' +
|
|
121
|
-
'must be
|
|
128
|
+
'and docsiteUrl must be valid URLs, and unknown fields become warnings so an older CLI ' +
|
|
122
129
|
'can still load the fields it understands. Before publishing, also run ' +
|
|
123
130
|
'`templates`, `components`, and `docs` under the same `doctor integration` ' +
|
|
124
131
|
'group. Those leaves compare authored identities with Core and explain ' +
|
|
@@ -87,6 +87,16 @@ describe('parseIntegration (load boundary)', () => {
|
|
|
87
87
|
expect(reason({issuesUrl: 'nope'})).toContain('issuesUrl');
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
+
it('accepts a docsiteUrl as a known key', () => {
|
|
91
|
+
const manifest = {docsiteUrl: 'https://widgets.example.com'};
|
|
92
|
+
expect(parseIntegration(manifest)).toEqual(manifest);
|
|
93
|
+
expect(unknownIntegrationKeys(manifest)).toEqual([]);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('rejects a non-URL docsiteUrl', () => {
|
|
97
|
+
expect(reason({docsiteUrl: 'nope'})).toContain('docsiteUrl');
|
|
98
|
+
});
|
|
99
|
+
|
|
90
100
|
it('rejects a noncanonical providerId', () => {
|
|
91
101
|
expect(reason({providerId: 'Acme Widgets'})).toContain('providerId');
|
|
92
102
|
});
|
|
@@ -39,6 +39,7 @@ export const integrationBaseSchema: z.ZodObject<{
|
|
|
39
39
|
docs: z.ZodOptional<z.ZodString>;
|
|
40
40
|
themes: z.ZodOptional<z.ZodString>;
|
|
41
41
|
issuesUrl: z.ZodOptional<z.ZodString>;
|
|
42
|
+
docsiteUrl: z.ZodOptional<z.ZodString>;
|
|
42
43
|
}, z.core.$strip>;
|
|
43
44
|
export const integrationSchema: z.ZodObject<{
|
|
44
45
|
providerId: z.ZodOptional<z.ZodString>;
|
|
@@ -48,6 +49,7 @@ export const integrationSchema: z.ZodObject<{
|
|
|
48
49
|
docs: z.ZodOptional<z.ZodString>;
|
|
49
50
|
themes: z.ZodOptional<z.ZodString>;
|
|
50
51
|
issuesUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
+
docsiteUrl: z.ZodOptional<z.ZodString>;
|
|
51
53
|
agentDocs: z.ZodOptional<z.ZodObject<{
|
|
52
54
|
append: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
53
55
|
}, z.core.$strip>>;
|
|
@@ -78,6 +78,7 @@ export const integrationBaseSchema = z.object({
|
|
|
78
78
|
docs: z.string().optional(),
|
|
79
79
|
themes: z.string().optional(),
|
|
80
80
|
issuesUrl: z.string().url().optional(),
|
|
81
|
+
docsiteUrl: z.string().url().optional(),
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
// Unknown top-level keys are stripped rather than rejected. `.strict()` made a key from a
|
|
@@ -44,6 +44,10 @@ export interface AstryxIntegration {
|
|
|
44
44
|
};
|
|
45
45
|
/** Where to file issues/feedback for this integration. */
|
|
46
46
|
issuesUrl?: string;
|
|
47
|
+
/** Link to this integration's docs site, such as its home page. The CLI
|
|
48
|
+
* accepts it as a known field; catalogs that list the package may show
|
|
49
|
+
* it. */
|
|
50
|
+
docsiteUrl?: string;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
/**
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* - Multi-file write is atomic: if one file fails, none are left behind.
|
|
10
10
|
* - An `--out` escape, or an output directory that cannot be created, fails
|
|
11
11
|
* with a registered error code.
|
|
12
|
+
* - Every output stays inside the working directory: an absolute `--out`
|
|
13
|
+
* path or a theme file outside it fails before anything is written, while
|
|
14
|
+
* absolute paths inside it build, also through a symlinked spelling.
|
|
12
15
|
*
|
|
13
16
|
* Runs the CLI in-process (shared runCli harness) against a tiny synthetic theme file.
|
|
14
17
|
*/
|
|
@@ -129,6 +132,68 @@ describe('theme build output-path failures carry registered codes', () => {
|
|
|
129
132
|
expect(fs.existsSync(path.join(tmpDir, 'escaped.css'))).toBe(false);
|
|
130
133
|
});
|
|
131
134
|
|
|
135
|
+
it('reports an absolute --out path outside the project as ERR_PATH_TRAVERSAL, with --check too', async () => {
|
|
136
|
+
const project = path.join(tmpDir, 'project');
|
|
137
|
+
const outside = path.join(tmpDir, 'outside');
|
|
138
|
+
fs.mkdirSync(outside, {recursive: true});
|
|
139
|
+
const themeFile = writeTheme(path.join(project, 'themes'), 'ocean');
|
|
140
|
+
const out = path.join(outside, 'ocean.css');
|
|
141
|
+
|
|
142
|
+
for (const extra of [[], ['--check']]) {
|
|
143
|
+
const {result, envelope} = await buildJson(
|
|
144
|
+
[path.relative(project, themeFile), '--out', out, ...extra],
|
|
145
|
+
project,
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
expect(result.code).toBe(1);
|
|
149
|
+
expect(envelope.code).toBe(ERROR_CODES.ERR_PATH_TRAVERSAL);
|
|
150
|
+
}
|
|
151
|
+
expect(fs.readdirSync(outside)).toEqual([]);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('reports a theme file outside the project as ERR_PATH_TRAVERSAL, because its outputs go beside it', async () => {
|
|
155
|
+
const project = path.join(tmpDir, 'project');
|
|
156
|
+
fs.mkdirSync(project, {recursive: true});
|
|
157
|
+
const shared = path.join(tmpDir, 'shared');
|
|
158
|
+
const themeFile = writeTheme(shared, 'ocean');
|
|
159
|
+
|
|
160
|
+
for (const file of [themeFile, path.relative(project, themeFile)]) {
|
|
161
|
+
const {result, envelope} = await buildJson([file], project);
|
|
162
|
+
|
|
163
|
+
expect(result.code).toBe(1);
|
|
164
|
+
expect(envelope.code).toBe(ERROR_CODES.ERR_PATH_TRAVERSAL);
|
|
165
|
+
}
|
|
166
|
+
expect(fs.readdirSync(shared)).toEqual(['theme.mjs']);
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it('builds absolute paths inside the project, also when they reach it through a symlink', async () => {
|
|
170
|
+
const project = path.join(tmpDir, 'project');
|
|
171
|
+
const themeFile = writeTheme(path.join(project, 'themes'), 'ocean');
|
|
172
|
+
const alias = path.join(tmpDir, 'alias');
|
|
173
|
+
fs.symlinkSync(project, alias, 'dir');
|
|
174
|
+
|
|
175
|
+
for (const [args, written] of [
|
|
176
|
+
[
|
|
177
|
+
[themeFile, '--out', path.join(project, 'dist', 'direct.css')],
|
|
178
|
+
path.join(project, 'dist', 'direct.css'),
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
[themeFile, '--out', path.join(alias, 'dist', 'aliased.css')],
|
|
182
|
+
path.join(project, 'dist', 'aliased.css'),
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
[path.join(alias, 'themes', 'theme.mjs')],
|
|
186
|
+
path.join(project, 'themes', 'ocean.css'),
|
|
187
|
+
],
|
|
188
|
+
]) {
|
|
189
|
+
const {result, envelope} = await buildJson(args, project);
|
|
190
|
+
|
|
191
|
+
expect(result.code).toBe(0);
|
|
192
|
+
expect(envelope.type).toBe('theme.build');
|
|
193
|
+
expect(fs.existsSync(written)).toBe(true);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
132
197
|
it('reports an --out path that escapes through a symlink as ERR_PATH_TRAVERSAL', async () => {
|
|
133
198
|
const project = path.join(tmpDir, 'project');
|
|
134
199
|
const outside = path.join(tmpDir, 'outside');
|
|
@@ -177,4 +242,23 @@ describe('theme build output-path failures carry registered codes', () => {
|
|
|
177
242
|
code: ERROR_CODES.ERR_PATH_TRAVERSAL,
|
|
178
243
|
});
|
|
179
244
|
});
|
|
245
|
+
|
|
246
|
+
it('themeBuild() rejects an output outside cwd: an absolute out path, or the default beside a theme file outside cwd', async () => {
|
|
247
|
+
const project = path.join(tmpDir, 'project');
|
|
248
|
+
const inside = writeTheme(path.join(project, 'themes'), 'ocean');
|
|
249
|
+
const shared = path.join(tmpDir, 'shared');
|
|
250
|
+
const outsideTheme = writeTheme(shared, 'ocean');
|
|
251
|
+
const outDir = path.join(tmpDir, 'out');
|
|
252
|
+
|
|
253
|
+
for (const [file, options] of [
|
|
254
|
+
[path.relative(project, inside), {out: path.join(outDir, 'ocean.css')}],
|
|
255
|
+
[outsideTheme, {}],
|
|
256
|
+
]) {
|
|
257
|
+
await expect(
|
|
258
|
+
themeBuild(file, options, {cwd: project}),
|
|
259
|
+
).rejects.toMatchObject({code: ERROR_CODES.ERR_PATH_TRAVERSAL});
|
|
260
|
+
}
|
|
261
|
+
expect(fs.existsSync(outDir)).toBe(false);
|
|
262
|
+
expect(fs.readdirSync(shared)).toEqual(['theme.mjs']);
|
|
263
|
+
});
|
|
180
264
|
});
|
|
@@ -126,7 +126,10 @@ describe('theme build emits a live TextInput selector (#4109)', () => {
|
|
|
126
126
|
`};\n`,
|
|
127
127
|
);
|
|
128
128
|
|
|
129
|
-
const result = await runCli(
|
|
129
|
+
const result = await runCli(
|
|
130
|
+
['theme', 'build', themeFile, '-o', outFile],
|
|
131
|
+
tmpDir,
|
|
132
|
+
);
|
|
130
133
|
const css = fs.readFileSync(outFile, 'utf8');
|
|
131
134
|
|
|
132
135
|
expect(result.status).toBe(0);
|
|
@@ -148,7 +151,7 @@ describe('theme build emits a live TextInput selector (#4109)', () => {
|
|
|
148
151
|
`};\n`,
|
|
149
152
|
);
|
|
150
153
|
|
|
151
|
-
await runCli(['theme', 'build', themeFile, '-o', outFile]);
|
|
154
|
+
await runCli(['theme', 'build', themeFile, '-o', outFile], tmpDir);
|
|
152
155
|
const css = fs.readFileSync(outFile, 'utf8');
|
|
153
156
|
|
|
154
157
|
expect(css).toContain('.astryx-text-input');
|
|
@@ -8,7 +8,8 @@ export const doc = {
|
|
|
8
8
|
name: 'doctor integration components',
|
|
9
9
|
displayName: 'astryx doctor integration components',
|
|
10
10
|
namespace: 'cli/commands',
|
|
11
|
-
summary:
|
|
11
|
+
summary:
|
|
12
|
+
'Check integration component names, replacements, and documented props',
|
|
12
13
|
description:
|
|
13
14
|
'Compares one local or installed integration with Core component names. A ' +
|
|
14
15
|
'conflict is allowed and exits successfully, but the report recommends ' +
|
|
@@ -17,7 +18,12 @@ export const doc = {
|
|
|
17
18
|
'range that turns replacement on, a missing Core target, an invalid value, a ' +
|
|
18
19
|
'component named after a different Core component, or two replacements for one ' +
|
|
19
20
|
'Core component is an error. In a package without that range they are warnings, ' +
|
|
20
|
-
'with a warning for each such component, naming the range to declare.'
|
|
21
|
+
'with a warning for each such component, naming the range to declare. ' +
|
|
22
|
+
"Then it compares each component doc's props with the component's TypeScript " +
|
|
23
|
+
"props, using the project's own `typescript`, and warns about a documented prop " +
|
|
24
|
+
'the code lacks, a prop the package declares that the doc omits, and a wrong ' +
|
|
25
|
+
'`required`. Without TypeScript it prints one ' +
|
|
26
|
+
'line saying the comparison was skipped.',
|
|
21
27
|
fn: 'integrationComponentConflicts',
|
|
22
28
|
args: [
|
|
23
29
|
{
|
|
@@ -38,7 +44,7 @@ export const doc = {
|
|
|
38
44
|
exitCodes: [
|
|
39
45
|
{
|
|
40
46
|
code: 0,
|
|
41
|
-
when: 'the check completed; component name conflicts,
|
|
47
|
+
when: 'the check completed; component name conflicts, replaces findings for a package without the CLI range, and props that differ from the code are warnings',
|
|
42
48
|
},
|
|
43
49
|
{
|
|
44
50
|
code: 1,
|