@astryxdesign/cli 0.6.5-canary.f27f749 → 0.6.5-canary.f2f43e1
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 +45 -43
- package/api/build/_adapter.d.mts +19 -0
- package/api/build/_adapter.mjs +60 -1
- package/api/build/build.test.mjs +74 -1
- package/api/build/build.type.d.mts +8 -0
- package/api/build/build.type.mjs +2 -0
- package/api/build/kit/kit.mjs +40 -7
- package/api/build/kit/rank.d.mts +8 -0
- package/api/build/kit/rank.mjs +14 -0
- package/api/build/kit/weights.d.mts +82 -0
- package/api/build/kit/weights.json +1 -0
- package/api/build/kit/weights.mjs +305 -0
- package/api/build/kit/weights.test.mjs +190 -0
- package/api/component/_adapter.d.mts +19 -0
- package/api/component/_adapter.mjs +33 -0
- package/api/component/component-replacement.test.mjs +603 -0
- package/api/component/component.mjs +49 -15
- package/api/component/component.test.mjs +32 -0
- package/api/component/component.type.d.mts +33 -3
- package/api/component/component.type.mjs +10 -3
- package/api/component/detail/blocks/blocks.d.mts +2 -1
- package/api/component/detail/blocks/blocks.mjs +5 -2
- package/api/component/detail/detail.mjs +5 -1
- package/api/component/detail/props/props.d.mts +2 -1
- package/api/component/detail/props/props.mjs +3 -2
- package/api/component/detail/showcase/showcase.d.mts +3 -1
- package/api/component/detail/showcase/showcase.mjs +3 -1
- package/api/component/detail/source/source.d.mts +3 -2
- package/api/component/detail/source/source.mjs +7 -3
- package/api/component/list/list.mjs +128 -10
- package/api/docs/_adapter.d.mts +11 -0
- package/api/docs/_adapter.mjs +25 -0
- package/api/docs/detail/detail.mjs +19 -3
- package/api/docs/detail/section/section.mjs +7 -1
- package/api/docs/docOverlays.test.mjs +10 -6
- package/api/docs/docs.d.mts +6 -0
- package/api/docs/docs.depth.test.mjs +134 -0
- package/api/docs/docs.doc.mjs +31 -2
- package/api/docs/docs.mjs +46 -1
- package/api/docs/docs.test.mjs +1 -1
- package/api/docs/docs.type.d.mts +81 -4
- package/api/docs/docs.type.mjs +41 -4
- package/api/docs/index/index.mjs +11 -2
- package/api/docs/index/index.test.mjs +7 -2
- package/api/docs/integrationDocs.test.mjs +6 -5
- package/api/docs/node/node.d.mts +28 -3
- package/api/docs/node/node.mjs +149 -23
- package/api/doctor/_adapter.d.mts +43 -0
- package/api/doctor/_adapter.mjs +142 -0
- package/api/doctor/doctor.d.mts +0 -10
- package/api/doctor/doctor.doc.mjs +1 -3
- package/api/doctor/doctor.mjs +6 -123
- package/api/doctor/theme-checks.d.mts +12 -0
- package/api/doctor/theme-checks.mjs +1117 -0
- package/api/doctor/theme-checks.test.mjs +526 -0
- package/api/gap-report/gap-report.d.mts +3 -1
- package/api/gap-report/gap-report.mjs +27 -3
- package/api/gap-report/gap-report.test.mjs +106 -0
- package/api/hook/_adapter.d.mts +1 -0
- package/api/hook/_adapter.mjs +3 -0
- package/api/hook/detail/detail.mjs +2 -2
- package/api/hook/detail/params/params.mjs +2 -2
- package/api/hook/hook.type.d.mts +12 -0
- package/api/hook/hook.type.mjs +3 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/hook/list/list.mjs +8 -8
- package/api/index.d.mts +1 -1
- package/api/index.mjs +4 -0
- package/api/init/run/run.d.mts +3 -5
- package/api/init/run/run.mjs +10 -11
- package/api/integration/__fixtures__/released-0.6.5-ocean.d.mts +14 -0
- package/api/integration/__fixtures__/released-0.6.5-ocean.mjs +15 -0
- package/api/integration/add-helpers.d.mts +26 -5
- package/api/integration/add-helpers.mjs +50 -5
- package/api/integration/add-theme.mjs +109 -5
- package/api/integration/add-theme.test.mjs +166 -15
- package/api/integration/authoring-checks.mjs +21 -1
- package/api/integration/integrationAddTheme.doc.mjs +1 -1
- package/api/integration/integrationComponentConflicts.doc.mjs +6 -3
- package/api/integration/pack-check.component-replaces.test.mjs +126 -0
- package/api/integration/pack-check.d.mts +10 -0
- package/api/integration/pack-check.lifecycle-output.test.mjs +21 -2
- package/api/integration/pack-check.mjs +483 -1
- package/api/integration/pack-check.test.mjs +568 -8
- package/api/search/search.d.mts +15 -8
- package/api/search/search.doc.mjs +4 -4
- package/api/search/search.mjs +179 -67
- package/api/search/search.test.mjs +128 -9
- package/api/search/search.type.d.mts +6 -6
- package/api/search/search.type.mjs +5 -5
- package/api/swizzle/_adapter.d.mts +10 -0
- package/api/swizzle/_adapter.mjs +23 -0
- package/api/swizzle/copy/copy.d.mts +5 -6
- package/api/swizzle/copy/copy.mjs +29 -10
- package/api/swizzle/list/list.mjs +2 -2
- package/api/swizzle/swizzle.test.mjs +55 -5
- package/api/swizzle/swizzle.type.d.mts +8 -0
- package/api/swizzle/swizzle.type.mjs +2 -0
- package/api/template/copy/copy.mjs +2 -1
- package/api/template/show/show.mjs +2 -0
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template.d.mts +1 -1
- package/api/template/template.mjs +1 -0
- package/api/template/template.type.d.mts +12 -0
- package/api/template/template.type.mjs +3 -0
- package/api/theme/_adapter.d.mts +106 -6
- package/api/theme/_adapter.mjs +687 -18
- package/api/theme/add/add.binary.test.mjs +76 -3
- package/api/theme/add/add.d.mts +5 -9
- package/api/theme/add/add.mjs +87 -64
- package/api/theme/add/add.rollback.test.mjs +9 -9
- package/api/theme/add/add.staging.test.mjs +9 -9
- package/api/theme/add/add.test.mjs +461 -55
- package/api/theme/add/add.types.test.mjs +151 -0
- package/api/theme/build/build.d.mts +26 -2
- package/api/theme/build/build.family.test.mjs +13 -4
- package/api/theme/build/build.icon-lineage.test.mjs +117 -0
- package/api/theme/build/build.icon-preservation.test.mjs +639 -0
- package/api/theme/build/build.mjs +228 -147
- package/api/theme/build/build.test.mjs +220 -1
- package/api/theme/build/icon-imports.d.mts +47 -0
- package/api/theme/build/icon-imports.mjs +691 -0
- package/api/theme/eject/eject.binary.test.mjs +90 -0
- package/api/theme/eject/eject.d.mts +17 -0
- package/api/theme/eject/eject.mjs +65 -0
- package/api/theme/eject/eject.rollback.test.mjs +158 -0
- package/api/theme/eject/eject.staging.test.mjs +83 -0
- package/api/theme/eject/eject.test.mjs +160 -0
- package/api/theme/integration-themes.test.mjs +30 -6
- package/api/theme/list/list.d.mts +10 -0
- package/api/theme/list/list.mjs +75 -7
- package/api/theme/list/list.test.mjs +155 -4
- package/api/theme/remove/remove.d.mts +12 -0
- package/api/theme/remove/remove.mjs +15 -0
- package/api/theme/remove/remove.test.mjs +94 -0
- package/api/theme/template/template.mjs +3 -4
- package/api/theme/theme.d.mts +5 -2
- package/api/theme/theme.mjs +13 -8
- package/api/theme/theme.type.d.mts +106 -2
- package/api/theme/theme.type.mjs +54 -5
- package/api/theme/themeAdd.doc.d.mts +1 -3
- package/api/theme/themeAdd.doc.mjs +35 -22
- package/api/theme/themeBuild.doc.d.mts +4 -1
- package/api/theme/themeBuild.doc.mjs +15 -4
- package/api/theme/themeEject.doc.d.mts +8 -0
- package/api/theme/themeEject.doc.mjs +89 -0
- package/api/theme/themeListAvailable.doc.mjs +4 -4
- package/api/theme/themeListCopySources.doc.d.mts +8 -0
- package/api/theme/themeListCopySources.doc.mjs +60 -0
- package/api/theme/themeRemove.doc.d.mts +6 -0
- package/api/theme/themeRemove.doc.mjs +50 -0
- package/api/theme/themeTemplate.doc.mjs +4 -3
- package/api/theme/themeUse.doc.d.mts +6 -0
- package/api/theme/themeUse.doc.mjs +47 -0
- package/api/theme/use/use.d.mts +12 -0
- package/api/theme/use/use.mjs +15 -0
- package/api/theme/use/use.test.mjs +98 -0
- package/api/upgrade/_adapter.d.mts +1 -0
- package/api/upgrade/_adapter.mjs +3 -0
- package/api/upgrade/list/list.mjs +9 -3
- package/api/upgrade/upgrade.type.d.mts +4 -0
- package/api/upgrade/upgrade.type.mjs +1 -0
- package/assets/codemods/integration-discovery.mjs +1 -1
- package/assets/codemods/integration-discovery.test.mjs +64 -0
- package/assets/codemods/transforms/next/__tests__/migrate-copied-themes-to-descriptors.test.mjs +129 -0
- package/assets/codemods/transforms/next/index.mjs +14 -1
- package/assets/codemods/transforms/next/migrate-copied-themes-to-descriptors.mjs +54 -0
- package/assets/docs/author-a-theme.doc.mjs +161 -0
- package/assets/docs/getting-started.doc.mjs +59 -15
- package/assets/docs/principles.doc.dense.mjs +2 -2
- package/assets/docs/principles.doc.mjs +2 -2
- package/assets/docs/principles.doc.zh.mjs +2 -2
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling.doc.mjs +2 -2
- package/assets/docs/theme.doc.dense.mjs +10 -198
- package/assets/docs/theme.doc.mjs +13 -770
- package/assets/docs/theme.doc.zh.mjs +31 -12
- package/assets/docs/tokens.doc.mjs +4 -4
- package/assets/docs/tree/add-a-theme.doc.mjs +6 -2
- package/assets/docs/tree/checks.doc.mjs +5 -4
- 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/document-the-theme.doc.mjs +4 -4
- package/assets/docs/tree/fonts-and-assets.doc.mjs +25 -20
- package/assets/docs/tree/headers-and-footers.doc.mjs +68 -0
- package/assets/docs/tree/layout-spacing.doc.mjs +168 -0
- package/assets/docs/tree/layout.doc.mjs +32 -0
- package/assets/docs/tree/replace-a-core-component.doc.mjs +21 -4
- package/assets/docs/tree/responsive.doc.mjs +102 -0
- package/assets/docs/tree/scaffold.doc.mjs +145 -0
- package/assets/docs/tree/side-panels.doc.mjs +82 -0
- package/assets/docs/tree/structure.doc.mjs +144 -0
- package/assets/docs/tree/themes.doc.mjs +2 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +4 -0
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +22 -5
- package/assets/docs/tree/versioning.doc.mjs +4 -1
- package/assets/docs/use-a-theme.doc.mjs +97 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +38 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs +20 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx +48 -0
- package/assets/templates/pages/table-collapsible/page.tsx +1474 -0
- package/assets/templates/pages/table-collapsible/template.doc.mjs +12 -0
- package/assets/templates/pages/table-comparison/page.tsx +1449 -0
- package/assets/templates/pages/table-comparison/template.doc.mjs +12 -0
- package/authoring/doctypes/command/command.doc.mjs +5 -0
- package/authoring/doctypes/command/type.ts +2 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -4
- package/authoring/integration/integration.doc.mjs +1 -1
- package/clients/cli/commands/build-theme.mjs +279 -30
- package/clients/cli/commands/build.mjs +7 -6
- package/clients/cli/commands/build.text-fields.test.mjs +1 -1
- package/clients/cli/commands/component/index.mjs +88 -12
- package/clients/cli/commands/component-replacement.text.test.mjs +271 -0
- package/clients/cli/commands/component.doc.mjs +9 -2
- package/clients/cli/commands/discover.mjs +29 -1
- package/clients/cli/commands/discover.no-source.test.mjs +75 -0
- package/clients/cli/commands/docs.depth.test.mjs +219 -0
- package/clients/cli/commands/docs.doc.mjs +15 -2
- package/clients/cli/commands/docs.mjs +273 -16
- package/clients/cli/commands/docs.test.mjs +2 -3
- package/clients/cli/commands/doctor-integration-components.doc.mjs +15 -4
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.test.mjs +9 -51
- package/clients/cli/commands/gap-report.doc.mjs +2 -2
- package/clients/cli/commands/gap-report.mjs +12 -0
- package/clients/cli/commands/gap-report.test.mjs +63 -0
- package/clients/cli/commands/hook/index.mjs +7 -2
- package/clients/cli/commands/import-hint-correctness.test.mjs +5 -5
- package/clients/cli/commands/init.next-steps.test.mjs +18 -23
- package/clients/cli/commands/integration-add.doc.mjs +1 -1
- package/clients/cli/commands/integration-real-world.test.mjs +61 -12
- package/clients/cli/commands/layout-check.doc.mjs +1 -0
- package/clients/cli/commands/layout-expand.doc.mjs +1 -0
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -0
- package/clients/cli/commands/layout.doc.mjs +1 -0
- package/clients/cli/commands/layout.mjs +45 -4
- package/clients/cli/commands/no-prompt-wording.test.mjs +4 -4
- package/clients/cli/commands/search.doc.mjs +5 -4
- package/clients/cli/commands/search.mjs +30 -6
- package/clients/cli/commands/search.test.mjs +63 -17
- package/clients/cli/commands/swizzle.doc.mjs +12 -3
- package/clients/cli/commands/swizzle.mjs +2 -1
- package/clients/cli/commands/template.mjs +54 -4
- package/clients/cli/commands/text-json-parity.test.mjs +40 -0
- package/clients/cli/commands/theme-add-lifecycle.test.mjs +132 -0
- package/clients/cli/commands/theme-add.doc.mjs +19 -19
- package/clients/cli/commands/theme-eject.doc.mjs +47 -0
- package/clients/cli/commands/theme-list.behavior.test.mjs +44 -0
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -2
- package/clients/cli/commands/theme-remove.doc.mjs +22 -0
- package/clients/cli/commands/theme-template.doc.mjs +4 -3
- package/clients/cli/commands/theme-use.doc.mjs +22 -0
- package/clients/cli/commands/theme.doc.mjs +21 -16
- package/clients/cli/commands/upgrade.mjs +1 -1
- package/clients/cli/index.mjs +4 -1
- package/clients/cli/lib/component-format.mjs +19 -2
- package/clients/cli/lib/resolve-theme.mjs +80 -78
- package/clients/cli/lib/resolve-theme.test.mjs +523 -27
- package/foundation/agent-docs/agent-docs.mjs +31 -28
- package/foundation/agent-docs/agent-docs.test.mjs +35 -32
- package/foundation/agent-docs/app-theme-workflow.test.mjs +13 -0
- package/foundation/config/project.d.mts +20 -5
- package/foundation/config/project.mjs +43 -6
- package/foundation/config/theme-private-vars.d.mts +12 -0
- package/foundation/config/theme-private-vars.mjs +107 -0
- package/foundation/config/theme-private-vars.test.mjs +55 -0
- package/foundation/config/theme-state.d.mts +145 -0
- package/foundation/config/theme-state.mjs +417 -0
- package/foundation/config/theme-state.test.mjs +182 -0
- package/foundation/discovery/component-discovery.d.mts +5 -2
- package/foundation/discovery/component-discovery.mjs +12 -6
- package/foundation/discovery/component-replacement.d.mts +91 -0
- package/foundation/discovery/component-replacement.mjs +417 -0
- package/foundation/discovery/component-replacement.test.mjs +480 -0
- package/foundation/discovery/docs-output-budget.d.mts +6 -2
- package/foundation/discovery/docs-output-budget.mjs +2 -1
- package/foundation/discovery/docs-section-key.d.mts +4 -2
- package/foundation/discovery/docs-section-key.mjs +1 -1
- package/foundation/discovery/module-exports.d.mts +10 -0
- package/foundation/discovery/module-exports.mjs +146 -0
- package/foundation/discovery/package-exports.d.mts +29 -0
- package/foundation/discovery/package-exports.mjs +200 -0
- package/foundation/discovery/theme-discovery.d.mts +78 -5
- package/foundation/discovery/theme-discovery.mjs +143 -18
- package/foundation/discovery/theme-discovery.test.mjs +9 -3
- package/foundation/discovery/theme-imports.d.mts +15 -0
- package/foundation/discovery/theme-imports.mjs +217 -0
- package/foundation/discovery/theme-imports.test.mjs +173 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +16 -6
- package/foundation/doc-compiler/inputs.mjs +2 -1
- package/foundation/doc-compiler/lenses.d.mts +4 -2
- package/foundation/doc-compiler/lenses.mjs +1 -1
- package/foundation/doc-compiler/tree.test.mjs +2 -2
- package/foundation/fs/module-loader.d.mts +9 -0
- package/foundation/fs/module-loader.mjs +71 -2
- package/foundation/integrations/cli-requirement.d.mts +22 -0
- package/foundation/integrations/cli-requirement.mjs +31 -0
- package/foundation/integrations/cli-requirement.test.mjs +70 -0
- package/foundation/integrations/contribution-inventory.mjs +3 -3
- package/foundation/response/base.d.ts +9 -3
- package/foundation/response/json.d.mts +7 -4
- package/foundation/response/json.mjs +10 -6
- package/foundation/response/response-types.doc.mjs +38 -23
- package/foundation/response/response.doc.mjs +18 -4
- package/foundation/text/copyright-header.mjs +1 -1
- package/foundation/text/copyright-header.test.mjs +1 -1
- package/package.json +9 -9
- package/assets/docs/layout.doc.dense.mjs +0 -388
- package/assets/docs/layout.doc.mjs +0 -550
|
@@ -137,7 +137,7 @@ describe('progressive reads', () => {
|
|
|
137
137
|
const full = await runCli(['docs', 'theme', '--full']);
|
|
138
138
|
expect(full.status).toBe(0);
|
|
139
139
|
expect(full.stdout).toMatch(/^## Wrap your app in a theme/m);
|
|
140
|
-
expect(full.stdout.length).toBeGreaterThan(index.stdout.length
|
|
140
|
+
expect(full.stdout.length).toBeGreaterThan(index.stdout.length);
|
|
141
141
|
expect((await runCli(['--detail', 'full', 'docs', 'theme', '--full'])).stdout).toBe(
|
|
142
142
|
full.stdout,
|
|
143
143
|
);
|
|
@@ -198,8 +198,7 @@ describe('blocks as text', () => {
|
|
|
198
198
|
it('prints the labels of a real section above their fences', async () => {
|
|
199
199
|
const {status, stdout} = await runCli(['docs', 'theme', 'quick-start']);
|
|
200
200
|
expect(status).toBe(0);
|
|
201
|
-
expect(stdout).toContain('
|
|
202
|
-
expect(stdout).not.toContain('// Install a theme package');
|
|
201
|
+
expect(stdout).toContain('Basic theme setup:\n```tsx\nimport {Theme}');
|
|
203
202
|
}, SLOW);
|
|
204
203
|
});
|
|
205
204
|
|
|
@@ -8,11 +8,16 @@ 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: 'Check integration component names and replacements against Core',
|
|
12
12
|
description:
|
|
13
13
|
'Compares one local or installed integration with Core component names. A ' +
|
|
14
14
|
'conflict is allowed and exits successfully, but the report recommends ' +
|
|
15
|
-
'renaming and gives the exact --package command for an intentional overlap.'
|
|
15
|
+
'renaming and gives the exact --package command for an intentional overlap. ' +
|
|
16
|
+
"It also checks each component's replaces: in a package that declares the CLI " +
|
|
17
|
+
'range that turns replacement on, a missing Core target, an invalid value, a ' +
|
|
18
|
+
'component named after a different Core component, or two replacements for one ' +
|
|
19
|
+
'Core component is an error. In a package without that range they are warnings, ' +
|
|
20
|
+
'with one more warning naming the range to declare.',
|
|
16
21
|
fn: 'integrationComponentConflicts',
|
|
17
22
|
args: [
|
|
18
23
|
{
|
|
@@ -31,8 +36,14 @@ export const doc = {
|
|
|
31
36
|
},
|
|
32
37
|
],
|
|
33
38
|
exitCodes: [
|
|
34
|
-
{
|
|
35
|
-
|
|
39
|
+
{
|
|
40
|
+
code: 0,
|
|
41
|
+
when: 'the check completed; component name conflicts, and replaces findings for a package without the CLI range, are warnings',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
code: 1,
|
|
45
|
+
when: 'the integration is invalid, Core cannot be resolved, or a package that declares the CLI range has an invalid replaces',
|
|
46
|
+
},
|
|
36
47
|
],
|
|
37
48
|
related: ['doctor integration templates', 'component'],
|
|
38
49
|
};
|
|
@@ -16,7 +16,7 @@ export const doc = {
|
|
|
16
16
|
summary: 'Diagnose Astryx projects and integration packages',
|
|
17
17
|
description:
|
|
18
18
|
'Runs read-only project health diagnostics by default: Node version, @astryxdesign/core ' +
|
|
19
|
-
'install and version alignment, themes, config, integrations (linked without a config entry, ' +
|
|
19
|
+
'install and version alignment, generated app themes when present, earlier copied-theme migration, config, integrations (linked without a config entry, ' +
|
|
20
20
|
'provider identity, contribution issues), agent docs, core peer dependencies, package manager, ' +
|
|
21
21
|
"and the docs the CLI reads. It writes nothing, but loading astryx.config runs that file's code. " +
|
|
22
22
|
'The `integration` subcommands provide authoring checks for one integration package.',
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
checkNodeVersion,
|
|
15
15
|
checkCoreInstalled,
|
|
16
16
|
checkVersionAlignment,
|
|
17
|
-
checkThemes,
|
|
18
17
|
checkConfig,
|
|
19
18
|
checkAgentDocs,
|
|
20
19
|
checkPeerDeps,
|
|
@@ -63,33 +62,6 @@ function installPkg(name, version = '1.0.0') {
|
|
|
63
62
|
return dir;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
/**
|
|
67
|
-
* Mirror pnpm's layout: the real package lives under node_modules/.pnpm and
|
|
68
|
-
* the entry in the scope directory is a symlink to it.
|
|
69
|
-
*/
|
|
70
|
-
function installPkgPnpmStyle(name, version = '1.0.0') {
|
|
71
|
-
const realDir = path.join(
|
|
72
|
-
tmpDir,
|
|
73
|
-
'node_modules',
|
|
74
|
-
'.pnpm',
|
|
75
|
-
`${name.replace('/', '+')}@${version}`,
|
|
76
|
-
'node_modules',
|
|
77
|
-
...name.split('/'),
|
|
78
|
-
);
|
|
79
|
-
fs.mkdirSync(realDir, {recursive: true});
|
|
80
|
-
fs.writeFileSync(
|
|
81
|
-
path.join(realDir, 'package.json'),
|
|
82
|
-
JSON.stringify({name, version, main: 'index.js'}),
|
|
83
|
-
);
|
|
84
|
-
fs.writeFileSync(path.join(realDir, 'index.js'), 'module.exports = {};');
|
|
85
|
-
const linkPath = path.join(tmpDir, 'node_modules', ...name.split('/'));
|
|
86
|
-
fs.mkdirSync(path.dirname(linkPath), {recursive: true});
|
|
87
|
-
// 'junction' keeps this working on Windows without elevated permissions;
|
|
88
|
-
// it is ignored on posix.
|
|
89
|
-
fs.symlinkSync(realDir, linkPath, 'junction');
|
|
90
|
-
return linkPath;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
65
|
function find(checks, id) {
|
|
94
66
|
return checks.find(c => c.id === id);
|
|
95
67
|
}
|
|
@@ -128,29 +100,15 @@ describe('doctor — individual checks', () => {
|
|
|
128
100
|
expect(res.status).toBe('info');
|
|
129
101
|
});
|
|
130
102
|
|
|
131
|
-
it('themes:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
expect(res.message).toContain('@astryxdesign/theme-neutral');
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it('themes: PASS when theme installed and wired via config', () => {
|
|
144
|
-
installPkg('@astryxdesign/theme-neutral', '0.0.14');
|
|
145
|
-
const res = checkThemes({cwd: tmpDir, configTheme: 'default'});
|
|
146
|
-
expect(res.status).toBe('pass');
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
it('themes: detects pnpm-style symlinked theme packages (#3530)', () => {
|
|
150
|
-
installPkgPnpmStyle('@astryxdesign/theme-neutral', '0.1.2');
|
|
151
|
-
const res = checkThemes({cwd: tmpDir, configTheme: 'default'});
|
|
152
|
-
expect(res.status).toBe('pass');
|
|
153
|
-
expect(res.message).toContain('@astryxdesign/theme-neutral');
|
|
103
|
+
it('app themes: reports unmanaged state as one INFO check', async () => {
|
|
104
|
+
fs.writeFileSync(path.join(tmpDir, 'package.json'), '{"name":"app"}\n');
|
|
105
|
+
const result = await runChecks({cwd: tmpDir});
|
|
106
|
+
const themeChecks = result.checks.filter(check =>
|
|
107
|
+
check.id.startsWith('theme-'),
|
|
108
|
+
);
|
|
109
|
+
expect(themeChecks).toEqual([
|
|
110
|
+
expect.objectContaining({id: 'theme-management', status: 'info'}),
|
|
111
|
+
]);
|
|
154
112
|
});
|
|
155
113
|
|
|
156
114
|
it('config: INFO when no astryx.config.mjs', async () => {
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
namespace: 'cli/commands',
|
|
14
14
|
summary: 'Report a missing component or feature to the package that owns it',
|
|
15
15
|
description:
|
|
16
|
-
'Reports a missing component, variant, layout, styling, accessibility, API, or documentation capability to the package that owns it: the --package you name, else the one package that provides the component, else Core. ' +
|
|
16
|
+
'Reports a missing component, variant, layout, styling, accessibility, API, or documentation capability to the package that owns it: the --package you name, else the integration whose component replaces it, else the one package that provides the component, else Core. ' +
|
|
17
17
|
'Every configured handler receives the report: the project config handler first, then each integration handler in config order. Public handlers run only with --confirm-public; internal handlers always run. A failing handler does not stop the others. ' +
|
|
18
18
|
"With no handler it files a GitHub issue for the owning package, only with --confirm-public (without it nothing is sent), or returns the package's issues URL when that is not on GitHub. " +
|
|
19
19
|
'The report records whether an agent or a person ran it.',
|
|
@@ -49,7 +49,7 @@ export const doc = {
|
|
|
49
49
|
flag: '--package <pkg>',
|
|
50
50
|
param: 'options.package',
|
|
51
51
|
description:
|
|
52
|
-
'Package that owns the gap: @astryxdesign/core or a loaded integration. Overrides automatic routing; needed when more than one package provides the component',
|
|
52
|
+
'Package that owns the gap: @astryxdesign/core or a loaded integration. Overrides automatic routing, which picks the integration whose component replaces the named Core component, else the one package that provides it, else Core; needed when more than one package provides the component',
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
flag: '--confirm-public',
|
|
@@ -55,6 +55,18 @@ export function registerGapReport(program) {
|
|
|
55
55
|
result.type === 'gap-report.file' &&
|
|
56
56
|
(result.data.status === 'failed' || result.data.status === 'partial');
|
|
57
57
|
|
|
58
|
+
// stderr in both modes, so a caller that reads only the exit code or the
|
|
59
|
+
// JSON envelope still sees which delivery failed and why.
|
|
60
|
+
if (isFailure && result.type === 'gap-report.file') {
|
|
61
|
+
for (const delivery of result.data.deliveries) {
|
|
62
|
+
if (delivery.status === 'failed') {
|
|
63
|
+
console.error(
|
|
64
|
+
`gap-report: delivery to ${delivery.handler} failed: ${delivery.message ?? 'no message'}`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
58
70
|
if (program.opts().json) {
|
|
59
71
|
jsonOut(result);
|
|
60
72
|
if (isFailure) process.exitCode = 1;
|
|
@@ -172,6 +172,69 @@ export default {};\n`,
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
+
it('exits nonzero and names the integration on stderr when one fails to load', async () => {
|
|
176
|
+
const cwd = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-gap-broken-'));
|
|
177
|
+
try {
|
|
178
|
+
fs.writeFileSync(
|
|
179
|
+
path.join(cwd, 'package.json'),
|
|
180
|
+
JSON.stringify({name: 'fixture-app'}),
|
|
181
|
+
);
|
|
182
|
+
fs.writeFileSync(
|
|
183
|
+
path.join(cwd, 'astryx.config.mjs'),
|
|
184
|
+
"export default {integrations: ['@test/broken']};\n",
|
|
185
|
+
);
|
|
186
|
+
const integrationDir = path.join(cwd, 'node_modules', '@test', 'broken');
|
|
187
|
+
fs.mkdirSync(integrationDir, {recursive: true});
|
|
188
|
+
fs.writeFileSync(
|
|
189
|
+
path.join(integrationDir, 'package.json'),
|
|
190
|
+
JSON.stringify({
|
|
191
|
+
name: '@test/broken',
|
|
192
|
+
version: '1.0.0',
|
|
193
|
+
type: 'module',
|
|
194
|
+
}),
|
|
195
|
+
);
|
|
196
|
+
fs.writeFileSync(
|
|
197
|
+
path.join(integrationDir, 'astryx.integration.mjs'),
|
|
198
|
+
"throw new Error('intentional integration load failure');\n",
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
const cli = await runCli(
|
|
202
|
+
[
|
|
203
|
+
'gap-report',
|
|
204
|
+
'General',
|
|
205
|
+
'--category',
|
|
206
|
+
'docs_gap',
|
|
207
|
+
'--reason',
|
|
208
|
+
'Need a keyboard example',
|
|
209
|
+
'--json',
|
|
210
|
+
],
|
|
211
|
+
{cwd},
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
expect(cli.status).toBe(1);
|
|
215
|
+
expect(JSON.parse(cli.stdout)).toMatchObject({
|
|
216
|
+
type: 'gap-report.file',
|
|
217
|
+
data: {
|
|
218
|
+
status: 'failed',
|
|
219
|
+
filedCount: 0,
|
|
220
|
+
deliveries: [
|
|
221
|
+
{
|
|
222
|
+
handlerType: 'integration',
|
|
223
|
+
handler: '@test/broken',
|
|
224
|
+
status: 'failed',
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
});
|
|
229
|
+
expect(cli.stderr).toContain(
|
|
230
|
+
'gap-report: delivery to @test/broken failed:',
|
|
231
|
+
);
|
|
232
|
+
expect(cli.stderr).toContain('intentional integration load failure');
|
|
233
|
+
} finally {
|
|
234
|
+
fs.rmSync(cwd, {recursive: true, force: true});
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
175
238
|
it('reports missing required fields through the JSON error contract', async () => {
|
|
176
239
|
const cli = await runCli(['gap-report', 'Button', '--json']);
|
|
177
240
|
expect(cli.status).toBe(1);
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../../lib/hook-format.mjs';
|
|
15
15
|
import {getCliInvocation} from '../../../../foundation/env/package-manager.mjs';
|
|
16
16
|
import {jsonOut} from '../../../../foundation/response/json.mjs';
|
|
17
|
-
import {emit, section, text, list, records, code} from '../../formatters/index.mjs';
|
|
17
|
+
import {emit, section, text, list, records, code, record} from '../../formatters/index.mjs';
|
|
18
18
|
import {cliError} from '../../lib/cli-error.mjs';
|
|
19
19
|
import {defineCommand} from '../../lib/define-command.mjs';
|
|
20
20
|
import {resultSet} from '../../../../foundation/debug/index.mjs';
|
|
@@ -103,6 +103,7 @@ export function registerHook(program) {
|
|
|
103
103
|
// ── Text output ────────────────────────────────────────────
|
|
104
104
|
switch (result.type) {
|
|
105
105
|
case 'hook.list': {
|
|
106
|
+
emit(record({package: result.package}));
|
|
106
107
|
// One list type across all three detail levels; the depth is carried
|
|
107
108
|
// in result.data.detail and the grouped map in result.data.components.
|
|
108
109
|
if (result.data.detail === 'full') {
|
|
@@ -172,6 +173,7 @@ export function registerHook(program) {
|
|
|
172
173
|
// under `component <name> --blocks`.
|
|
173
174
|
const related = result.data.relatedComponents ?? [];
|
|
174
175
|
emit(
|
|
176
|
+
record({package: result.package}),
|
|
175
177
|
code(doc),
|
|
176
178
|
related.length > 0 &&
|
|
177
179
|
text(
|
|
@@ -182,7 +184,10 @@ export function registerHook(program) {
|
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
case 'hook.detail.params': {
|
|
185
|
-
emit(
|
|
187
|
+
emit(
|
|
188
|
+
record({package: result.package}),
|
|
189
|
+
code(formatHookParams({params: result.data, name})),
|
|
190
|
+
);
|
|
186
191
|
break;
|
|
187
192
|
}
|
|
188
193
|
}
|
|
@@ -85,7 +85,7 @@ describe('import hint correctness', () => {
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
describe('CLI --detail
|
|
88
|
+
describe('CLI --detail compact shows correct import path', () => {
|
|
89
89
|
// Test a representative set across different patterns
|
|
90
90
|
const representative = [
|
|
91
91
|
{name: 'Button', expected: '@astryxdesign/core/Button'},
|
|
@@ -101,8 +101,8 @@ describe('import hint correctness', () => {
|
|
|
101
101
|
];
|
|
102
102
|
|
|
103
103
|
for (const {name, expected} of representative) {
|
|
104
|
-
it(`npx astryx component ${name} --detail
|
|
105
|
-
const result = await runCli(['component', name, '--detail', '
|
|
104
|
+
it(`npx astryx component ${name} --detail compact shows ${expected}`, async () => {
|
|
105
|
+
const result = await runCli(['component', name, '--detail', 'compact'], REPO_ROOT);
|
|
106
106
|
expect(result.code).toBe(0);
|
|
107
107
|
expect(result.stdout).toContain(expected);
|
|
108
108
|
});
|
|
@@ -179,11 +179,11 @@ describe('import hint correctness', () => {
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
it('component <Name> --detail
|
|
182
|
+
it('component <Name> --detail compact also shows the integration package', async () => {
|
|
183
183
|
const fixtureDir = createIntegrationFixture();
|
|
184
184
|
try {
|
|
185
185
|
const result = await runCli(
|
|
186
|
-
['component', 'Widget', '--detail', '
|
|
186
|
+
['component', 'Widget', '--detail', 'compact'],
|
|
187
187
|
fixtureDir,
|
|
188
188
|
);
|
|
189
189
|
expect(result.code).toBe(0);
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file Regression
|
|
4
|
+
* @file Regression tests for `astryx init` app-theme next steps.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* import { neutralTheme } from '@astryxdesign/theme-neutral'
|
|
10
|
-
* <Theme theme={neutralTheme}>...</Theme>
|
|
11
|
-
*
|
|
12
|
-
* ...which contradicted the runtime console warning emitted by core's
|
|
13
|
-
* <Theme> component (packages/core/src/theme/Theme.tsx) recommending the
|
|
14
|
-
* pre-built path, and left users with an unstyled app because the base CSS
|
|
15
|
-
* imports were never mentioned (facebook/astryx#3080).
|
|
16
|
-
*
|
|
17
|
-
* These assertions lock in the corrected guidance: base CSS imports, the
|
|
18
|
-
* pre-built (`/built` + `theme.css`) theme path, and the custom-theme build
|
|
19
|
-
* command.
|
|
6
|
+
* The guidance follows the generated-module workflow: base CSS once, add an
|
|
7
|
+
* installed theme, import the generated record once, extend to customize, and
|
|
8
|
+
* eject only to make an independent source fork.
|
|
20
9
|
*/
|
|
21
10
|
|
|
22
11
|
import {describe, it, expect} from 'vitest';
|
|
@@ -30,17 +19,23 @@ describe('init Next steps theme guidance', () => {
|
|
|
30
19
|
expect(text).toContain("'@astryxdesign/core/astryx.css'");
|
|
31
20
|
});
|
|
32
21
|
|
|
33
|
-
it('
|
|
34
|
-
expect(text).toContain(
|
|
35
|
-
expect(text).toContain(
|
|
22
|
+
it('adds an installed theme through the CLI', () => {
|
|
23
|
+
expect(text).toContain('npm install @astryxdesign/theme-neutral');
|
|
24
|
+
expect(text).toContain('npx astryx theme add neutral --import');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('wires the generated theme record once', () => {
|
|
28
|
+
expect(text).toContain("{ themes, defaultThemeSlug } from './astryx-themes'");
|
|
29
|
+
expect(text).toContain('themes[defaultThemeSlug]');
|
|
36
30
|
});
|
|
37
31
|
|
|
38
|
-
it('
|
|
39
|
-
expect(text).toContain('
|
|
32
|
+
it('names extension for customization and eject only for a source fork', () => {
|
|
33
|
+
expect(text).toContain('Extend an imported theme');
|
|
34
|
+
expect(text).toContain('npx astryx theme eject <slug>');
|
|
35
|
+
expect(text).toContain('only to fork source');
|
|
40
36
|
});
|
|
41
37
|
|
|
42
|
-
it('does not
|
|
43
|
-
|
|
44
|
-
expect(text).not.toContain("from '@astryxdesign/theme-neutral'");
|
|
38
|
+
it('does not teach a direct package theme import', () => {
|
|
39
|
+
expect(text).not.toContain("from '@astryxdesign/theme-neutral");
|
|
45
40
|
});
|
|
46
41
|
});
|
|
@@ -60,7 +60,7 @@ export const doc = {
|
|
|
60
60
|
flag: '--from <theme>',
|
|
61
61
|
param: 'options.from',
|
|
62
62
|
description:
|
|
63
|
-
'Existing theme slug to fork as a starting point instead of a blank scaffold; the new theme copies the base and has no link back. Only valid for theme',
|
|
63
|
+
'Existing theme slug to fork as a starting point instead of a blank scaffold; the new theme copies the base and has no link back, and package.json `dependencies` gains the npm packages the copied files import (other than Core and React). Only valid for theme',
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
flag: '--to <version>',
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file Real package-boundary coverage for integration authoring. Authors a
|
|
5
5
|
* provider through the CLI, packs it, installs the tarball into a separate
|
|
6
|
-
* no-config consumer, then exercises packed docs, codemods,
|
|
6
|
+
* no-config consumer, then exercises packed docs, codemods, built themes, and
|
|
7
|
+
* explicit source ejection.
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
import {afterEach, describe, expect, it} from 'vitest';
|
|
@@ -201,6 +202,15 @@ export const oceanTheme = defineTheme({
|
|
|
201
202
|
});
|
|
202
203
|
`,
|
|
203
204
|
);
|
|
205
|
+
const providerBuild = await runCli(
|
|
206
|
+
['theme', 'build', 'themes/ocean/oceanTheme.ts', '--json'],
|
|
207
|
+
providerDir,
|
|
208
|
+
);
|
|
209
|
+
expect(providerBuild.status, providerBuild.stderr).toBe(0);
|
|
210
|
+
expect(parseEnvelope(providerBuild.stdout)).toMatchObject({
|
|
211
|
+
type: 'theme.build',
|
|
212
|
+
data: {name: 'ocean'},
|
|
213
|
+
});
|
|
204
214
|
|
|
205
215
|
const providerPackage = JSON.parse(
|
|
206
216
|
fs.readFileSync(path.join(providerDir, 'package.json'), 'utf-8'),
|
|
@@ -313,8 +323,8 @@ export const oceanTheme = defineTheme({
|
|
|
313
323
|
expect(fs.lstatSync(alternateInstalledDir).isSymbolicLink()).toBe(false);
|
|
314
324
|
|
|
315
325
|
// The consumer installs both providers from tarballs. Link this checkout's
|
|
316
|
-
// Core package as the consumer's normal app dependency so
|
|
317
|
-
// can
|
|
326
|
+
// Core package as the consumer's normal app dependency so an ejected source
|
|
327
|
+
// can build against the same peer it would get from `npm install @astryxdesign/core`.
|
|
318
328
|
const coreScope = path.join(consumerDir, 'node_modules', '@astryxdesign');
|
|
319
329
|
const coreLink = path.join(coreScope, 'core');
|
|
320
330
|
fs.mkdirSync(coreScope, {recursive: true});
|
|
@@ -427,7 +437,7 @@ export const oceanTheme = defineTheme({
|
|
|
427
437
|
}
|
|
428
438
|
|
|
429
439
|
const ambiguous = await runCli(
|
|
430
|
-
['theme', 'add', 'ocean', '
|
|
440
|
+
['theme', 'add', 'ocean', '--json'],
|
|
431
441
|
consumerDir,
|
|
432
442
|
);
|
|
433
443
|
expect(ambiguous.status).not.toBe(0);
|
|
@@ -435,11 +445,50 @@ export const oceanTheme = defineTheme({
|
|
|
435
445
|
code: 'ERR_AMBIGUOUS_THEME',
|
|
436
446
|
});
|
|
437
447
|
|
|
448
|
+
const addedTheme = await runCli(
|
|
449
|
+
[
|
|
450
|
+
'theme',
|
|
451
|
+
'add',
|
|
452
|
+
'ocean',
|
|
453
|
+
'--import',
|
|
454
|
+
'--package',
|
|
455
|
+
'@acme/brand-integration',
|
|
456
|
+
'--json',
|
|
457
|
+
],
|
|
458
|
+
consumerDir,
|
|
459
|
+
);
|
|
460
|
+
expect(addedTheme.status, addedTheme.stderr).toBe(0);
|
|
461
|
+
expect(parseEnvelope(addedTheme.stdout)).toMatchObject({
|
|
462
|
+
type: 'theme.app',
|
|
463
|
+
data: {
|
|
464
|
+
default: 'ocean',
|
|
465
|
+
change: {action: 'add', slug: 'ocean', changed: true},
|
|
466
|
+
themes: [
|
|
467
|
+
{
|
|
468
|
+
slug: 'ocean',
|
|
469
|
+
owner: '@acme/brand-integration',
|
|
470
|
+
module: '@acme/brand-integration/themes/ocean',
|
|
471
|
+
stylesheet: '@acme/brand-integration/themes/ocean.css',
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
},
|
|
475
|
+
});
|
|
476
|
+
const generatedModule = fs.readFileSync(
|
|
477
|
+
path.join(consumerDir, 'src', 'astryx-themes.js'),
|
|
478
|
+
'utf-8',
|
|
479
|
+
);
|
|
480
|
+
expect(generatedModule).toContain(
|
|
481
|
+
'from "@acme/brand-integration/themes/ocean"',
|
|
482
|
+
);
|
|
483
|
+
expect(generatedModule).toContain(
|
|
484
|
+
'import "@acme/brand-integration/themes/ocean.css"',
|
|
485
|
+
);
|
|
486
|
+
|
|
438
487
|
const target = path.join('src', 'themes', 'acme-ocean');
|
|
439
488
|
const copied = await runCli(
|
|
440
489
|
[
|
|
441
490
|
'theme',
|
|
442
|
-
'
|
|
491
|
+
'eject',
|
|
443
492
|
'ocean',
|
|
444
493
|
target,
|
|
445
494
|
'--package',
|
|
@@ -450,17 +499,17 @@ export const oceanTheme = defineTheme({
|
|
|
450
499
|
);
|
|
451
500
|
expect(copied.status, copied.stderr).toBe(0);
|
|
452
501
|
expect(parseEnvelope(copied.stdout)).toMatchObject({
|
|
453
|
-
type: 'theme.
|
|
502
|
+
type: 'theme.eject',
|
|
454
503
|
data: {
|
|
455
504
|
slug: 'ocean',
|
|
456
505
|
package: '@acme/brand-integration',
|
|
457
506
|
outputDir: target,
|
|
458
|
-
files: [
|
|
507
|
+
files: expect.arrayContaining([
|
|
459
508
|
'oceanTheme.ts',
|
|
460
509
|
'oceanTheme.doc.mjs',
|
|
461
510
|
'tokens/ocean.palette.receipt.json',
|
|
462
511
|
'tokens/ocean.palette.ts',
|
|
463
|
-
],
|
|
512
|
+
]),
|
|
464
513
|
},
|
|
465
514
|
});
|
|
466
515
|
expect(
|
|
@@ -501,7 +550,7 @@ export const oceanTheme = defineTheme({
|
|
|
501
550
|
const duplicate = await runCli(
|
|
502
551
|
[
|
|
503
552
|
'theme',
|
|
504
|
-
'
|
|
553
|
+
'eject',
|
|
505
554
|
'ocean',
|
|
506
555
|
target,
|
|
507
556
|
'--package',
|
|
@@ -517,7 +566,7 @@ export const oceanTheme = defineTheme({
|
|
|
517
566
|
const overwritten = await runCli(
|
|
518
567
|
[
|
|
519
568
|
'theme',
|
|
520
|
-
'
|
|
569
|
+
'eject',
|
|
521
570
|
'ocean',
|
|
522
571
|
target,
|
|
523
572
|
'--package',
|
|
@@ -528,7 +577,7 @@ export const oceanTheme = defineTheme({
|
|
|
528
577
|
consumerDir,
|
|
529
578
|
);
|
|
530
579
|
expect(overwritten.status, overwritten.stderr).toBe(0);
|
|
531
|
-
expect(parseEnvelope(overwritten.stdout).type).toBe('theme.
|
|
580
|
+
expect(parseEnvelope(overwritten.stdout).type).toBe('theme.eject');
|
|
532
581
|
|
|
533
582
|
const installedCodemod = path.join(
|
|
534
583
|
installedDir,
|
|
@@ -594,7 +643,7 @@ export const oceanTheme = defineTheme({
|
|
|
594
643
|
const corruptedInstall = await runCli(
|
|
595
644
|
[
|
|
596
645
|
'theme',
|
|
597
|
-
'
|
|
646
|
+
'eject',
|
|
598
647
|
'ocean',
|
|
599
648
|
'src/themes/corrupted',
|
|
600
649
|
'--package',
|
|
@@ -61,5 +61,6 @@ export const doc = {
|
|
|
61
61
|
when: 'the expression is invalid, empty or over 5 MB (from stdin or --file), has a syntax error, or a bad --form',
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
|
+
deprecated: 'DEP-0006: Use `astryx build` to start from a template, `astryx template` to scaffold, and `astryx docs layout` for guidance.',
|
|
64
65
|
related: ['layout expand', 'layout grammar'],
|
|
65
66
|
};
|
|
@@ -81,5 +81,6 @@ export const doc = {
|
|
|
81
81
|
when: 'a missing, empty or over-5 MB expression (from stdin or --file), a bad --name or --form, a parse/validation error, or a path escape',
|
|
82
82
|
},
|
|
83
83
|
],
|
|
84
|
+
deprecated: 'DEP-0006: Use `astryx build` to start from a template, `astryx template` to scaffold, and `astryx docs layout` for guidance.',
|
|
84
85
|
related: ['layout check', 'layout grammar'],
|
|
85
86
|
};
|
|
@@ -26,5 +26,6 @@ export const doc = {
|
|
|
26
26
|
{code: 0, when: 'success'},
|
|
27
27
|
{code: 1, when: 'the component registry cannot be read'},
|
|
28
28
|
],
|
|
29
|
+
deprecated: 'DEP-0006: Use `astryx build` to start from a template, `astryx template` to scaffold, and `astryx docs layout` for guidance.',
|
|
29
30
|
related: ['layout expand', 'layout check'],
|
|
30
31
|
};
|
|
@@ -30,5 +30,6 @@ export const doc = {
|
|
|
30
30
|
{code: 0, when: 'a subcommand succeeded, or --help'},
|
|
31
31
|
{code: 1, when: 'no subcommand (help is printed) or an unknown subcommand'},
|
|
32
32
|
],
|
|
33
|
+
deprecated: 'DEP-0006: Use `astryx build` to start from a template, `astryx template` to scaffold, and `astryx docs layout` for guidance.',
|
|
33
34
|
related: ['template', 'build'],
|
|
34
35
|
};
|