@astryxdesign/cli 0.7.2 → 0.7.3-canary.02f5fe4
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 +104 -71
- package/api/build/_adapter.d.mts +58 -0
- package/api/build/_adapter.mjs +127 -3
- package/api/build/blocks/blocks.d.mts +92 -0
- package/api/build/blocks/blocks.mjs +528 -0
- package/api/build/blocks/blocks.test.mjs +238 -0
- package/api/build/blocks/blocks.weights.json +1 -0
- package/api/build/build.mjs +25 -6
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/answer.d.mts +18 -0
- package/api/build/kit/answer.mjs +195 -0
- package/api/build/kit/answer.test.mjs +108 -0
- package/api/build/kit/kind.d.mts +25 -0
- package/api/build/kit/kind.mjs +170 -0
- package/api/build/kit/kit.d.mts +2 -4
- package/api/build/kit/kit.mjs +8 -398
- package/api/build/kit/rank.d.mts +3 -32
- package/api/build/kit/rank.mjs +25 -342
- package/api/build/kit/rank.test.mjs +2 -1
- package/api/build/kit/signals.d.mts +79 -0
- package/api/build/kit/signals.mjs +295 -0
- package/api/build/kit/start.d.mts +32 -0
- package/api/build/kit/start.mjs +163 -0
- package/api/build/kit/words.d.mts +72 -0
- package/api/build/kit/words.mjs +202 -0
- package/api/build/tree.d.mts +20 -0
- package/api/build/tree.mjs +53 -0
- package/api/build/tree.test.mjs +185 -0
- package/api/build/tree.weights.json +1 -0
- package/api/component/_adapter.mjs +39 -5
- package/api/component/component-replacement.test.mjs +1 -0
- package/api/component/component.mjs +17 -3
- package/api/component/component.test.mjs +15 -0
- package/api/component/doc-links.test.mjs +2 -2
- package/api/discover/_adapter.d.mts +1 -2
- package/api/discover/_adapter.mjs +42 -17
- package/api/discover/_adapter.test.mjs +42 -0
- package/api/discover/discover.mjs +0 -1
- package/api/docs/_adapter.d.mts +2 -2
- package/api/docs/_adapter.mjs +82 -23
- package/api/docs/docs-homes.test.mjs +127 -0
- package/api/docs/docs.doc.mjs +3 -3
- package/api/docs/docs.test.mjs +35 -19
- package/api/docs/integration-tree.test.mjs +20 -20
- package/api/docs/integrationDocs.test.mjs +1 -1
- package/api/docs/namespace-section.test.mjs +6 -6
- package/api/docs/reference-blocks.test.mjs +2 -2
- package/api/doctor/_adapter.d.mts +33 -13
- package/api/doctor/_adapter.mjs +55 -25
- package/api/doctor/doctor.d.mts +23 -5
- package/api/doctor/doctor.mjs +183 -40
- package/api/doctor/doctor.test.mjs +95 -12
- package/api/hook/hook.mjs +1 -1
- package/api/init/init.doc.mjs +20 -6
- package/api/init/init.test.mjs +18 -2
- package/api/init/init.type.d.mts +3 -3
- package/api/init/init.type.mjs +3 -3
- package/api/init/remove/remove.mjs +17 -4
- package/api/init/remove/remove.test.mjs +114 -2
- package/api/init/run/run.mjs +69 -6
- package/api/integration/_adapter.d.mts +8 -0
- package/api/integration/_adapter.mjs +21 -1
- package/api/integration/authoring-checks.mjs +83 -9
- package/api/integration/authoring-checks.test.mjs +220 -0
- package/api/integration/pack-check.mjs +123 -4
- package/api/integration/pack-check.test.mjs +87 -0
- package/api/integration/validate-integration-case-disk.test.mjs +111 -0
- package/api/integration/validate-integration-fixes.test.mjs +6 -5
- package/api/integration/validate-integration-gaps.test.mjs +1975 -0
- package/api/integration/validate-integration.d.mts +15 -2
- package/api/integration/validate-integration.mjs +298 -39
- package/api/integration/validate-integration.type.d.mts +90 -1
- package/api/integration/validate-integration.type.mjs +67 -2
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/ORDERING.md +28 -0
- package/api/search/_adapter.d.mts +82 -2
- package/api/search/_adapter.mjs +157 -10
- package/api/search/_adapter.test.mjs +173 -0
- package/api/search/_candidate-score.d.mts +40 -0
- package/api/search/_candidate-score.mjs +238 -0
- package/api/search/_cards.json +6098 -0
- package/api/search/_compound.d.mts +50 -0
- package/api/search/_compound.mjs +170 -0
- package/api/search/_doc-searcher.d.mts +4 -0
- package/api/search/_doc-searcher.mjs +23 -0
- package/api/search/_doc-searcher.test.mjs +36 -0
- package/api/search/_doc-searcher.weights.json +1 -0
- package/api/search/_doc-text.d.mts +30 -0
- package/api/search/_doc-text.mjs +87 -0
- package/api/search/_entries.d.mts +63 -0
- package/api/search/_entries.mjs +232 -0
- package/api/search/_entries.test.mjs +48 -0
- package/api/search/_features.d.mts +35 -0
- package/api/search/_features.mjs +155 -0
- package/api/search/_gather-components.d.mts +26 -0
- package/api/search/_gather-components.mjs +284 -0
- package/api/search/_gather-docs.d.mts +20 -0
- package/api/search/_gather-docs.mjs +254 -0
- package/api/search/_gather-hooks.d.mts +12 -0
- package/api/search/_gather-hooks.mjs +52 -0
- package/api/search/_gather-templates.d.mts +25 -0
- package/api/search/_gather-templates.mjs +107 -0
- package/api/search/_lexical.d.mts +135 -0
- package/api/search/_lexical.mjs +351 -0
- package/api/search/_main-searcher.d.mts +19 -0
- package/api/search/_main-searcher.mjs +115 -0
- package/api/search/_main-searcher.test.mjs +106 -0
- package/api/search/_main-searcher.weights.json +1 -0
- package/api/search/_module-doc.d.mts +32 -0
- package/api/search/_module-doc.mjs +78 -0
- package/api/search/_order.d.mts +32 -0
- package/api/search/_order.mjs +162 -0
- package/api/search/_order.test.mjs +72 -0
- package/api/search/_priority.d.mts +50 -0
- package/api/search/_priority.mjs +139 -0
- package/api/search/_query-words.d.mts +25 -0
- package/api/search/_query-words.mjs +92 -0
- package/api/search/_query.d.mts +65 -0
- package/api/search/_query.mjs +176 -0
- package/api/search/_result.d.mts +97 -0
- package/api/search/_result.mjs +150 -0
- package/api/search/_score.d.mts +60 -0
- package/api/search/_score.mjs +283 -0
- package/api/search/_synonyms.d.mts +21 -0
- package/api/search/_synonyms.mjs +67 -0
- package/api/search/_template-searcher.d.mts +4 -0
- package/api/search/_template-searcher.mjs +23 -0
- package/api/search/_template-searcher.test.mjs +40 -0
- package/api/search/_template-searcher.weights.json +1 -0
- package/api/search/_titles.d.mts +33 -0
- package/api/search/_titles.mjs +65 -0
- package/api/search/_words.d.mts +64 -0
- package/api/search/_words.mjs +157 -0
- package/api/search/search.d.mts +22 -305
- package/api/search/search.doc.mjs +8 -6
- package/api/search/search.mjs +56 -2482
- package/api/search/search.test.mjs +14 -14
- package/api/search/search.type.d.mts +6 -1
- package/api/search/search.type.mjs +6 -1
- package/api/search/tree.d.mts +15 -0
- package/api/search/tree.mjs +40 -0
- package/api/search/tree.test.mjs +66 -0
- package/api/search/tree.weights.json +1 -0
- package/api/template/template.mjs +5 -1
- package/api/theme/build/build.packed-old-core.test.mjs +1 -0
- package/api/upgrade/_adapter.d.mts +57 -9
- package/api/upgrade/_adapter.mjs +198 -28
- package/api/upgrade/registry/registry.d.mts +10 -4
- package/api/upgrade/registry/registry.mjs +33 -16
- package/api/upgrade/registry/registry.test.mjs +85 -0
- package/api/upgrade/run/run.d.mts +4 -2
- package/api/upgrade/run/run.mjs +13 -2
- package/api/upgrade/run/run.test.mjs +417 -3
- package/api/upgrade/upgrade.doc.mjs +10 -5
- package/api/upgrade/upgrade.mjs +13 -2
- package/api/upgrade/upgrade.test.mjs +194 -0
- package/api/upgrade/upgrade.type.d.mts +5 -3
- package/api/upgrade/upgrade.type.mjs +8 -6
- package/assets/codemods/transforms/v0.7.0/__tests__/validate-data-token-ownership.test.mjs +11 -0
- package/assets/codemods/transforms/v0.7.0/validate-data-token-ownership.mjs +3 -3
- package/assets/docs/author-a-theme.doc.mjs +2 -2
- package/assets/docs/is-my-code-good.doc.mjs +287 -0
- package/assets/docs/tree/add-a-component.doc.mjs +1 -1
- package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
- package/assets/docs/tree/add-a-topic.doc.mjs +2 -2
- package/assets/docs/tree/agent-guidance.doc.mjs +1 -1
- package/assets/docs/tree/api.doc.mjs +6 -0
- package/assets/docs/tree/{integrations.doc.mjs → authoring.doc.mjs} +15 -6
- package/assets/docs/tree/block-template.doc.mjs +1 -1
- package/assets/docs/tree/build-the-template.doc.mjs +1 -1
- package/assets/docs/tree/building-blocks.doc.mjs +2 -2
- package/assets/docs/tree/check-the-props.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
- package/assets/docs/tree/checks.doc.mjs +3 -3
- package/assets/docs/tree/ci-and-containers.doc.mjs +13 -0
- package/assets/docs/tree/cli-command.doc.mjs +1 -1
- package/assets/docs/tree/cli.doc.mjs +1 -1
- package/assets/docs/tree/codemods.doc.mjs +1 -1
- package/assets/docs/tree/component-family.doc.mjs +1 -1
- package/assets/docs/tree/component-imports.doc.mjs +1 -1
- package/assets/docs/tree/components.doc.mjs +1 -1
- package/assets/docs/tree/configuration.doc.mjs +1 -1
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
- package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
- package/assets/docs/tree/docs.doc.mjs +1 -1
- package/assets/docs/tree/document-the-template.doc.mjs +1 -1
- package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
- package/assets/docs/tree/extend-or-replace.doc.mjs +1 -1
- package/assets/docs/{authoring.doc.mjs → tree/field-reference.doc.mjs} +4 -3
- package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
- package/assets/docs/tree/global-integrations.doc.mjs +2 -2
- package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
- package/assets/docs/tree/help.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +128 -0
- package/assets/docs/tree/links.doc.mjs +1 -1
- package/assets/docs/tree/package-and-test.doc.mjs +1 -1
- package/assets/docs/tree/page-template.doc.mjs +1 -1
- package/assets/docs/tree/publishing.doc.mjs +1 -1
- package/assets/docs/tree/quick-start.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-template.doc.mjs +1 -1
- package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/ship.doc.mjs +2 -2
- package/assets/docs/tree/short-and-findable.doc.mjs +1 -1
- package/assets/docs/tree/single-component.doc.mjs +1 -1
- package/assets/docs/tree/start-a-template.doc.mjs +1 -1
- package/assets/docs/tree/subcomponent.doc.mjs +1 -1
- package/assets/docs/tree/template-assets.doc.mjs +1 -1
- package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
- package/assets/docs/tree/template-fonts.doc.mjs +1 -1
- package/assets/docs/tree/template-grading-rubric.doc.mjs +17 -38
- package/assets/docs/tree/template-icons.doc.mjs +1 -1
- package/assets/docs/tree/template-images-media.doc.mjs +1 -1
- package/assets/docs/tree/template-styles.doc.mjs +1 -1
- package/assets/docs/tree/templates.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
- package/assets/docs/tree/themes.doc.mjs +1 -1
- package/assets/docs/tree/tokens-data.doc.mjs +2 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +1 -1
- package/assets/docs/tree/upgrading.doc.mjs +1 -1
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +5 -1
- package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
- package/assets/docs/tree/write-the-template-file.doc.mjs +1 -1
- package/assets/docs/use-integrations.doc.mjs +120 -0
- package/assets/docs/working-with-ai.doc.mjs +6 -2
- package/assets/templates/themes/butter/butterTheme.ts +4 -2
- package/assets/templates/themes/stone/stoneTheme.ts +4 -2
- package/assets/templates/themes/y2k/y2kTheme.ts +4 -2
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/integration/integration.doc.mjs +1 -1
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/bin/astryx.mjs +7 -78
- package/clients/cli/command-result-coverage.test.mjs +6 -5
- package/clients/cli/commands/build-theme.color-scheme.test.mjs +1 -1
- package/clients/cli/commands/{component/index.mjs → component.mjs} +37 -37
- package/clients/cli/commands/component.test.mjs +6 -6
- package/clients/cli/commands/docs.doc.mjs +2 -2
- package/clients/cli/commands/docs.mjs +1 -1
- package/clients/cli/commands/docs.test.mjs +14 -14
- package/clients/cli/commands/doctor-integration.test.mjs +49 -1
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +40 -0
- package/clients/cli/commands/doctor.test.mjs +65 -0
- package/clients/cli/commands/{hook/index.mjs → hook.mjs} +22 -22
- package/clients/cli/commands/import-hint-correctness.test.mjs +1 -1
- package/clients/cli/commands/init.behavior.test.mjs +230 -1
- package/clients/cli/commands/init.doc.mjs +28 -9
- package/clients/cli/commands/init.flag-help.test.mjs +1 -0
- package/clients/cli/commands/init.mjs +2 -2
- package/clients/cli/commands/integration-check.test.mjs +48 -0
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/manifest.mjs +67 -0
- package/clients/cli/commands/outside-project.test.mjs +101 -1
- package/clients/cli/commands/postinstall.doc.mjs +23 -0
- package/clients/cli/commands/postinstall.mjs +31 -0
- package/clients/cli/commands/setup-nudge.test.mjs +78 -0
- package/clients/cli/commands/{build-theme.mjs → theme.mjs} +1 -1
- package/clients/cli/commands/upgrade.doc.mjs +4 -2
- package/clients/cli/commands/upgrade.mjs +9 -2
- package/clients/cli/commands/upgrade.subfolder-path.test.mjs +97 -0
- package/clients/cli/index.mjs +54 -94
- package/clients/cli/lib/component-format.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +12 -7
- package/clients/cli/lib/exit-codes.test.mjs +5 -0
- package/clients/cli/lib/manifest.test.mjs +12 -0
- package/clients/cli/lib/welcome-box.mjs +50 -0
- package/clients/cli/run.mjs +108 -0
- package/foundation/agent-docs/agent-doc-state.d.mts +32 -7
- package/foundation/agent-docs/agent-doc-state.mjs +58 -9
- package/foundation/agent-docs/agent-docs.d.mts +100 -12
- package/foundation/agent-docs/agent-docs.mjs +1017 -105
- package/foundation/agent-docs/agent-docs.path-safety.test.mjs +1239 -17
- package/foundation/agent-docs/agent-docs.test.mjs +683 -39
- package/foundation/agent-docs/computer-agent-text.d.mts +39 -2
- package/foundation/agent-docs/computer-agent-text.mjs +135 -8
- package/foundation/agent-docs/computer-agent-text.test.mjs +99 -2
- package/foundation/config/project.mjs +20 -22
- package/foundation/config/project.test.mjs +56 -0
- package/foundation/discovery/authoring-self-docs.d.mts +7 -0
- package/foundation/discovery/authoring-self-docs.mjs +16 -4
- package/foundation/discovery/authoring-self-docs.test.mjs +15 -3
- package/foundation/discovery/authoring-surface.d.mts +1 -1
- package/foundation/discovery/authoring-surface.mjs +2 -2
- package/foundation/discovery/authoring-surface.test.mjs +1 -1
- package/foundation/discovery/cli-self-docs.d.mts +2 -1
- package/foundation/discovery/cli-self-docs.mjs +4 -3
- package/foundation/discovery/cli-self-docs.test.mjs +2 -2
- package/foundation/discovery/component-discovery.d.mts +37 -0
- package/foundation/discovery/component-discovery.mjs +80 -5
- package/foundation/discovery/component-loader.d.mts +1 -1
- package/foundation/discovery/docs-discovery.mjs +14 -1
- package/foundation/discovery/module-exports.d.mts +41 -0
- package/foundation/discovery/module-exports.mjs +253 -0
- package/foundation/discovery/runner-allowlist.d.mts +2 -4
- package/foundation/discovery/runner-allowlist.mjs +2 -4
- package/foundation/discovery/runner-commands.d.mts +77 -0
- package/foundation/discovery/runner-commands.mjs +294 -0
- package/foundation/discovery/runner-commands.test.mjs +128 -0
- package/foundation/discovery/stray-pointers.test.mjs +1 -1
- package/foundation/discovery/template-adapter.mjs +18 -1
- package/foundation/discovery/template-needs.mjs +1 -44
- package/foundation/discovery/theme-discovery.mjs +147 -3
- package/foundation/doc-compiler/doc-loads.test.mjs +33 -9
- package/foundation/doc-compiler/read.mjs +59 -1
- package/foundation/doc-compiler/read.test.mjs +11 -2
- package/foundation/doc-compiler/split-topic-keywords.test.mjs +3 -2
- package/foundation/doc-compiler/tree.d.mts +32 -6
- package/foundation/doc-compiler/tree.mjs +77 -43
- package/foundation/doc-compiler/tree.test.mjs +7 -7
- package/foundation/fs/paths.d.mts +70 -8
- package/foundation/fs/paths.mjs +556 -38
- package/foundation/fs/paths.test.mjs +430 -54
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +131 -0
- package/foundation/fs/read-record.test.mjs +77 -0
- package/foundation/integrations/autolink.d.mts +2 -1
- package/foundation/integrations/autolink.mjs +4 -13
- package/foundation/integrations/cli-peer-version.d.mts +36 -0
- package/foundation/integrations/cli-peer-version.mjs +132 -0
- package/foundation/integrations/cli-peer-version.test.mjs +354 -0
- package/foundation/integrations/computer-integrations.d.mts +6 -3
- package/foundation/integrations/computer-integrations.mjs +38 -9
- package/foundation/integrations/contribution-inventory.d.mts +15 -20
- package/foundation/integrations/contribution-inventory.mjs +41 -5
- package/foundation/integrations/exports-subpaths.d.mts +57 -0
- package/foundation/integrations/exports-subpaths.mjs +113 -0
- package/foundation/integrations/integrations.d.mts +27 -1
- package/foundation/integrations/integrations.mjs +61 -2
- package/foundation/integrations/public-imports.d.mts +118 -0
- package/foundation/integrations/public-imports.mjs +1769 -0
- package/foundation/integrations/public-imports.test.mjs +1793 -0
- package/foundation/integrations/validate-contributions.d.mts +115 -0
- package/foundation/integrations/validate-contributions.mjs +1168 -13
- package/foundation/release/cache.test.mjs +24 -21
- package/foundation/release/global-state.d.mts +8 -4
- package/foundation/release/global-state.mjs +4 -2
- package/foundation/release/handoff.d.mts +23 -4
- package/foundation/release/handoff.mjs +175 -8
- package/foundation/release/notices.d.mts +62 -8
- package/foundation/release/notices.mjs +136 -25
- package/foundation/release/notices.test.mjs +21 -0
- package/foundation/release/run-context.mjs +14 -0
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/route/route.d.mts +285 -0
- package/foundation/route/route.mjs +324 -0
- package/foundation/route/route.test.mjs +153 -0
- package/foundation/runtime/hosted-runtime.test.mjs +403 -0
- package/foundation/runtime/locked-versions.d.mts +32 -0
- package/foundation/runtime/locked-versions.mjs +65 -0
- package/foundation/runtime/package-root.d.mts +91 -0
- package/foundation/runtime/package-root.mjs +174 -0
- package/foundation/runtime/package-set.d.mts +62 -0
- package/foundation/runtime/package-set.mjs +130 -0
- package/foundation/runtime/package-set.test.mjs +432 -0
- package/foundation/text/string-utils.d.mts +2 -1
- package/foundation/text/string-utils.mjs +16 -5
- package/foundation/text/suggest-order.d.mts +72 -0
- package/foundation/text/suggest-order.mjs +363 -0
- package/foundation/text/suggest-order.test.mjs +259 -0
- package/host/door-conformance.test.mjs +274 -0
- package/host/index.d.ts +116 -0
- package/host/index.mjs +295 -0
- package/host/index.test.mjs +302 -0
- package/package.json +14 -9
package/api/upgrade/upgrade.mjs
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
import {list} from './list/list.mjs';
|
|
25
25
|
import {registryUpgrade} from './registry/registry.mjs';
|
|
26
26
|
import {run} from './run/run.mjs';
|
|
27
|
+
import {relativeToOrigin, scopeToProject} from './_adapter.mjs';
|
|
27
28
|
import {isValidSemver} from '../../foundation/env/semver.mjs';
|
|
28
29
|
import {getCliInvocation} from '../../foundation/env/package-manager.mjs';
|
|
29
30
|
import {isOutsideProject} from '../../foundation/env/project-scope.mjs';
|
|
@@ -88,7 +89,11 @@ export async function upgrade(options = {}, {cwd = process.cwd()} = {}) {
|
|
|
88
89
|
logger.log('Aborted\n');
|
|
89
90
|
throw new AstryxError(msg, undefined, ERROR_CODES.ERR_INVALID_ARGUMENT);
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
+
const scoped = scopeToProject(options, cwd);
|
|
93
|
+
return registryUpgrade(scoped.options, {
|
|
94
|
+
cwd: scoped.cwd,
|
|
95
|
+
origin: scoped.origin,
|
|
96
|
+
});
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
if (!options.list && !options.from) {
|
|
@@ -112,5 +117,11 @@ export async function upgrade(options = {}, {cwd = process.cwd()} = {}) {
|
|
|
112
117
|
return list();
|
|
113
118
|
}
|
|
114
119
|
|
|
115
|
-
|
|
120
|
+
// A run from a subfolder upgrades the project the folder belongs to, and
|
|
121
|
+
// names files relative to the folder it ran in.
|
|
122
|
+
const scoped = scopeToProject(options, cwd);
|
|
123
|
+
return relativeToOrigin(
|
|
124
|
+
await run(scoped.options, {cwd: scoped.cwd, origin: scoped.origin}),
|
|
125
|
+
scoped,
|
|
126
|
+
);
|
|
116
127
|
}
|
|
@@ -246,6 +246,200 @@ describe('upgrade() — receipts', () => {
|
|
|
246
246
|
expect(content).not.toMatch(/Astryx v0\.0\.1 ·/);
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
+
it('leaves the block of a project at the top of a home settings folder, saying why and not pointing at init', async () => {
|
|
250
|
+
const saved = {
|
|
251
|
+
HOME: process.env.HOME,
|
|
252
|
+
USERPROFILE: process.env.USERPROFILE,
|
|
253
|
+
};
|
|
254
|
+
process.env.HOME = tmpDir;
|
|
255
|
+
process.env.USERPROFILE = tmpDir;
|
|
256
|
+
const warned = [];
|
|
257
|
+
const warn = vi
|
|
258
|
+
.spyOn(console, 'error')
|
|
259
|
+
.mockImplementation((...a) => warned.push(a.join(' ')));
|
|
260
|
+
logger.setSilent(false);
|
|
261
|
+
try {
|
|
262
|
+
const project = path.join(tmpDir, '.dotfiles');
|
|
263
|
+
fs.mkdirSync(project, {recursive: true});
|
|
264
|
+
writePkg(project, {'@astryxdesign/core': '0.0.15'});
|
|
265
|
+
writeInstalledCore(project, '0.0.15');
|
|
266
|
+
writeAgentBlock(project, 'AGENTS.md', '0.0.1');
|
|
267
|
+
|
|
268
|
+
const res = await upgrade({from: '0.0.15', apply: true}, {cwd: project});
|
|
269
|
+
|
|
270
|
+
expect(res.data.agentDocs.action).toBe('error');
|
|
271
|
+
expect(res.data.agentDocs.refreshed).toBe(false);
|
|
272
|
+
expect(fs.readFileSync(path.join(project, 'AGENTS.md'), 'utf-8')).toMatch(
|
|
273
|
+
/Astryx v0\.0\.1 ·/,
|
|
274
|
+
);
|
|
275
|
+
const text = warned.join('\n');
|
|
276
|
+
expect(text).toContain(
|
|
277
|
+
`Agent docs not refreshed: ${fs.realpathSync(project)} is the home folder or a settings folder in it, which every project's agents read. To keep agent docs, move the project into a folder of its own; otherwise update or remove the Astryx block there by hand.`,
|
|
278
|
+
);
|
|
279
|
+
expect(text).not.toContain('init --features agents');
|
|
280
|
+
} finally {
|
|
281
|
+
logger.setSilent(true);
|
|
282
|
+
warn.mockRestore();
|
|
283
|
+
for (const [key, value] of Object.entries(saved)) {
|
|
284
|
+
if (value === undefined) delete process.env[key];
|
|
285
|
+
else process.env[key] = value;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it('with no block, in a project at the top of a home settings folder, says why instead of pointing at init', async () => {
|
|
291
|
+
const saved = {
|
|
292
|
+
HOME: process.env.HOME,
|
|
293
|
+
USERPROFILE: process.env.USERPROFILE,
|
|
294
|
+
};
|
|
295
|
+
process.env.HOME = tmpDir;
|
|
296
|
+
process.env.USERPROFILE = tmpDir;
|
|
297
|
+
const warned = [];
|
|
298
|
+
const warn = vi
|
|
299
|
+
.spyOn(console, 'error')
|
|
300
|
+
.mockImplementation((...a) => warned.push(a.join(' ')));
|
|
301
|
+
logger.setSilent(false);
|
|
302
|
+
try {
|
|
303
|
+
const project = path.join(tmpDir, '.dotfiles');
|
|
304
|
+
fs.mkdirSync(project, {recursive: true});
|
|
305
|
+
writePkg(project, {'@astryxdesign/core': '0.0.15'});
|
|
306
|
+
writeInstalledCore(project, '0.0.15');
|
|
307
|
+
|
|
308
|
+
const res = await upgrade({from: '0.0.15'}, {cwd: project});
|
|
309
|
+
|
|
310
|
+
expect(res.data.agentDocs.action).toBe('error');
|
|
311
|
+
const text = warned.join('\n');
|
|
312
|
+
expect(text).toContain(
|
|
313
|
+
`Agent docs not installed: ${fs.realpathSync(project)} is the home folder or a settings folder in it, which every project's agents read. To have agent docs, move the project into a folder of its own, or add the Astryx block to its agent file by hand.`,
|
|
314
|
+
);
|
|
315
|
+
expect(text).not.toContain('init --features agents');
|
|
316
|
+
} finally {
|
|
317
|
+
logger.setSilent(true);
|
|
318
|
+
warn.mockRestore();
|
|
319
|
+
for (const [key, value] of Object.entries(saved)) {
|
|
320
|
+
if (value === undefined) delete process.env[key];
|
|
321
|
+
else process.env[key] = value;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
it('a dry run in a project at the top of a home settings folder reports the refusal, not a refresh to apply', async () => {
|
|
327
|
+
const saved = {
|
|
328
|
+
HOME: process.env.HOME,
|
|
329
|
+
USERPROFILE: process.env.USERPROFILE,
|
|
330
|
+
};
|
|
331
|
+
process.env.HOME = tmpDir;
|
|
332
|
+
process.env.USERPROFILE = tmpDir;
|
|
333
|
+
const warned = [];
|
|
334
|
+
const warn = vi
|
|
335
|
+
.spyOn(console, 'error')
|
|
336
|
+
.mockImplementation((...a) => warned.push(a.join(' ')));
|
|
337
|
+
logger.setSilent(false);
|
|
338
|
+
try {
|
|
339
|
+
const project = path.join(tmpDir, '.dotfiles');
|
|
340
|
+
fs.mkdirSync(project, {recursive: true});
|
|
341
|
+
writePkg(project, {'@astryxdesign/core': '0.0.15'});
|
|
342
|
+
writeInstalledCore(project, '0.0.15');
|
|
343
|
+
writeAgentBlock(project, 'AGENTS.md', '0.0.1');
|
|
344
|
+
|
|
345
|
+
const res = await upgrade({from: '0.0.15'}, {cwd: project});
|
|
346
|
+
|
|
347
|
+
expect(res.data.agentDocs.action).toBe('error');
|
|
348
|
+
expect(res.data.agentDocs.refreshed).toBe(false);
|
|
349
|
+
const text = warned.join('\n');
|
|
350
|
+
expect(text).toContain(
|
|
351
|
+
`Agent docs not refreshed: ${fs.realpathSync(project)} is the home folder or a settings folder in it`,
|
|
352
|
+
);
|
|
353
|
+
expect(text).not.toContain('--apply to refresh');
|
|
354
|
+
expect(text).not.toContain('init --features agents');
|
|
355
|
+
} finally {
|
|
356
|
+
logger.setSilent(true);
|
|
357
|
+
warn.mockRestore();
|
|
358
|
+
for (const [key, value] of Object.entries(saved)) {
|
|
359
|
+
if (value === undefined) delete process.env[key];
|
|
360
|
+
else process.env[key] = value;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
it('refreshes the agent docs of a project in an agent worktree inside a home settings folder', async () => {
|
|
366
|
+
const saved = {
|
|
367
|
+
HOME: process.env.HOME,
|
|
368
|
+
USERPROFILE: process.env.USERPROFILE,
|
|
369
|
+
};
|
|
370
|
+
process.env.HOME = tmpDir;
|
|
371
|
+
process.env.USERPROFILE = tmpDir;
|
|
372
|
+
try {
|
|
373
|
+
const project = path.join(tmpDir, '.codex', 'worktrees', 'a1b2c3', 'web');
|
|
374
|
+
fs.mkdirSync(project, {recursive: true});
|
|
375
|
+
writePkg(project, {'@astryxdesign/core': '0.0.15'});
|
|
376
|
+
writeInstalledCore(project, '0.0.15');
|
|
377
|
+
writeAgentBlock(project, 'AGENTS.md', '0.0.1');
|
|
378
|
+
|
|
379
|
+
const res = await upgrade({from: '0.0.15', apply: true}, {cwd: project});
|
|
380
|
+
|
|
381
|
+
expect(res.data.agentDocs.action).toBe('refreshed');
|
|
382
|
+
expect(fs.readFileSync(path.join(project, 'AGENTS.md'), 'utf-8')).toMatch(
|
|
383
|
+
/Astryx v0\.0\.15 ·/,
|
|
384
|
+
);
|
|
385
|
+
} finally {
|
|
386
|
+
for (const [key, value] of Object.entries(saved)) {
|
|
387
|
+
if (value === undefined) delete process.env[key];
|
|
388
|
+
else process.env[key] = value;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
it('refreshes the managed block in an ignored .claude/CLAUDE.md and keeps the text around it (INV31)', async () => {
|
|
394
|
+
writePkg(tmpDir);
|
|
395
|
+
writeInstalledCore(tmpDir, '0.0.15');
|
|
396
|
+
writeAgentBlock(tmpDir, 'AGENTS.md', '0.0.1');
|
|
397
|
+
fs.mkdirSync(path.join(tmpDir, '.claude'));
|
|
398
|
+
writeAgentBlock(tmpDir, '.claude/CLAUDE.md', '0.0.1');
|
|
399
|
+
const claude = path.join(tmpDir, '.claude', 'CLAUDE.md');
|
|
400
|
+
fs.writeFileSync(
|
|
401
|
+
claude,
|
|
402
|
+
`# Team notes\n\n${fs.readFileSync(claude, 'utf-8')}\nMore notes.\n`,
|
|
403
|
+
);
|
|
404
|
+
fs.writeFileSync(path.join(tmpDir, '.gitignore'), '.claude/\n');
|
|
405
|
+
|
|
406
|
+
const res = await upgrade({from: '0.0.15', apply: true}, {cwd: tmpDir});
|
|
407
|
+
|
|
408
|
+
expect(res.data.agentDocs.action).toBe('refreshed');
|
|
409
|
+
expect(res.data.agentDocs.files).toEqual([
|
|
410
|
+
'AGENTS.md',
|
|
411
|
+
'.claude/CLAUDE.md',
|
|
412
|
+
]);
|
|
413
|
+
expect(res.data.agentDocs).not.toHaveProperty('protectedFiles');
|
|
414
|
+
const content = fs.readFileSync(claude, 'utf-8');
|
|
415
|
+
expect(content).toMatch(/^# Team notes\n/u);
|
|
416
|
+
expect(content).toMatch(/Astryx v0\.0\.15 ·/u);
|
|
417
|
+
expect(content).toMatch(/More notes\.\n$/u);
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
it('refreshes a committed .claude/CLAUDE.md that imports AGENTS.md and keeps a copy beside an ignored root CLAUDE.md', async () => {
|
|
421
|
+
writePkg(tmpDir);
|
|
422
|
+
writeInstalledCore(tmpDir, '0.0.15');
|
|
423
|
+
writeAgentBlock(tmpDir, 'AGENTS.md', '0.0.1');
|
|
424
|
+
writeAgentBlock(tmpDir, 'CLAUDE.md', '0.0.1');
|
|
425
|
+
fs.writeFileSync(path.join(tmpDir, '.gitignore'), '/CLAUDE.md\n');
|
|
426
|
+
fs.mkdirSync(path.join(tmpDir, '.claude'));
|
|
427
|
+
const copy = path.join(tmpDir, '.claude', 'CLAUDE.md');
|
|
428
|
+
fs.writeFileSync(
|
|
429
|
+
copy,
|
|
430
|
+
`@../AGENTS.md\n\n${generateCompressedIndex('0.0.1')}\n`,
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
for (let round = 0; round < 2; round++) {
|
|
434
|
+
await upgrade({from: '0.0.15', apply: true}, {cwd: tmpDir});
|
|
435
|
+
const content = fs.readFileSync(copy, 'utf-8');
|
|
436
|
+
expect(content, `round ${round}`).toMatch(/^@\.\.\/AGENTS\.md\n/u);
|
|
437
|
+
expect(content, `round ${round}`).toMatch(/Astryx v0\.0\.15 ·/u);
|
|
438
|
+
}
|
|
439
|
+
const dry = await upgrade({from: '0.0.15'}, {cwd: tmpDir});
|
|
440
|
+
expect(dry.data.agentDocs.status).toBe('current');
|
|
441
|
+
});
|
|
442
|
+
|
|
249
443
|
it('reports would-refresh on a dry run without writing (honors cwd)', async () => {
|
|
250
444
|
writePkg(tmpDir);
|
|
251
445
|
writeInstalledCore(tmpDir, '0.0.15');
|
|
@@ -44,7 +44,7 @@ export type AgentDocsSummary = {
|
|
|
44
44
|
*/
|
|
45
45
|
fromVersions: string[];
|
|
46
46
|
/**
|
|
47
|
-
* Files rewritten (apply) or that would be rewritten (dry-run).
|
|
47
|
+
* Files rewritten (apply) or that would be rewritten (dry-run), relative to the folder the command ran in.
|
|
48
48
|
*/
|
|
49
49
|
files: string[];
|
|
50
50
|
/**
|
|
@@ -73,7 +73,9 @@ export type RegistryCompositionItemSummary = {
|
|
|
73
73
|
files: RegistryCompositionFileSummary[];
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
|
-
* Aggregate receipt for ShadCN-copied composition reconciliation.
|
|
76
|
+
* Aggregate receipt for ShadCN-copied composition reconciliation. File paths
|
|
77
|
+
* are relative to the scanned source directory, or, when the upgrade ran in a
|
|
78
|
+
* folder below the project root, to that folder.
|
|
77
79
|
*/
|
|
78
80
|
export type RegistryCompositionSummary = {
|
|
79
81
|
applied: boolean;
|
|
@@ -140,7 +142,7 @@ export type UpgradeRegistryResponse = {
|
|
|
140
142
|
*/
|
|
141
143
|
export type ProtectedCodemodFile = {
|
|
142
144
|
/**
|
|
143
|
-
*
|
|
145
|
+
* Path relative to the folder the command ran in.
|
|
144
146
|
*/
|
|
145
147
|
file: string;
|
|
146
148
|
/**
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* @property {'missing' | 'stale' | 'current'} status
|
|
46
46
|
* @property {string} installedVersion Installed core version the block should reflect.
|
|
47
47
|
* @property {string[]} fromVersions Distinct stale block versions found (the "from" side of the refresh).
|
|
48
|
-
* @property {string[]} files Files rewritten (apply) or that would be rewritten (dry-run).
|
|
48
|
+
* @property {string[]} files Files rewritten (apply) or that would be rewritten (dry-run), relative to the folder the command ran in.
|
|
49
49
|
* @property {boolean} refreshed True only when a block was actually rewritten (apply mode).
|
|
50
50
|
* @property {'refreshed' | 'would-refresh' | 'nudge-init' | 'error' | 'none'} action
|
|
51
51
|
*/
|
|
@@ -70,7 +70,9 @@
|
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Aggregate receipt for ShadCN-copied composition reconciliation.
|
|
73
|
+
* Aggregate receipt for ShadCN-copied composition reconciliation. File paths
|
|
74
|
+
* are relative to the scanned source directory, or, when the upgrade ran in a
|
|
75
|
+
* folder below the project root, to that folder.
|
|
74
76
|
* @typedef {object} RegistryCompositionSummary
|
|
75
77
|
* @property {boolean} applied
|
|
76
78
|
* @property {boolean} ok False when conflicts, missing files, invalid receipts, or failures remain.
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
/**
|
|
100
102
|
* A required codemod change blocked by effective working-tree protection.
|
|
101
103
|
* @typedef {object} ProtectedCodemodFile
|
|
102
|
-
* @property {string} file
|
|
104
|
+
* @property {string} file Path relative to the folder the command ran in.
|
|
103
105
|
* @property {string[]} codemods Codemods that still require a change.
|
|
104
106
|
* @property {string[]} reasons Protection categories (generated, vendored, ignored, and hard boundaries).
|
|
105
107
|
* @property {string[]} declarations Effective declarations that protect the file.
|
|
@@ -132,11 +134,11 @@
|
|
|
132
134
|
* @property {boolean} [data.complete] False when protected required changes remain.
|
|
133
135
|
* @property {'ERR_CODEMOD_PROTECTED'} [data.errorCode] Stable incomplete-result code when complete is false.
|
|
134
136
|
* @property {number} [data.filesChanged] Distinct files changed across core + integration codemods (apply mode). One file that four codemods each changed counts once.
|
|
135
|
-
* @property {string[]} [data.modifiedFiles]
|
|
137
|
+
* @property {string[]} [data.modifiedFiles] Files changed or previewed, relative to the folder the command ran in.
|
|
136
138
|
* @property {ProtectedCodemodFile[]} [data.protectedFiles] Protected files that still require a codemod change after regeneration.
|
|
137
|
-
* @property {Array<{file: string, location?: string, reason: string}>} [data.declinedCandidates] Candidates left unchanged because proof was insufficient.
|
|
139
|
+
* @property {Array<{file: string, location?: string, reason: string}>} [data.declinedCandidates] Candidates left unchanged because proof was insufficient. Each `file` is relative to the folder the command ran in.
|
|
138
140
|
* @property {number} [data.transformsApplied] Total codemod changes. A code or config codemod counts once for each file it changed, so one file changed by four of them counts four times; a project codemod counts once, however many files it writes.
|
|
139
|
-
* @property {Array<{file: string, codemod: string, error: string}>} [data.errors] Per-codemod errors, when any codemod failed.
|
|
141
|
+
* @property {Array<{file: string, codemod: string, error: string}>} [data.errors] Per-codemod errors, when any codemod failed. Each `file` is relative to the folder the command ran in.
|
|
140
142
|
* @property {CliBehindCore} [data.cliBehindCore] Present only when the installed Core is newer than this CLI: codemods for the releases after `cliBehindCore.cliVersion` did not run.
|
|
141
143
|
*/
|
|
142
144
|
|
|
@@ -29,6 +29,17 @@ describe('validate-data-token-ownership', () => {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
it('reports prebuilt CSS availability without requiring a source compile step', async () => {
|
|
33
|
+
await expect(
|
|
34
|
+
run('const fill = "var(--color-data-categorical-blue)";'),
|
|
35
|
+
).rejects.toThrow(
|
|
36
|
+
/in prebuilt mode, loads @astryxdesign\/core\/astryx\.css/,
|
|
37
|
+
);
|
|
38
|
+
await expect(
|
|
39
|
+
run('.bar { fill: var(--color-data-categorical-blue); }', 'chart.css'),
|
|
40
|
+
).rejects.toThrow(/load @astryxdesign\/core\/astryx\.css in prebuilt mode/);
|
|
41
|
+
});
|
|
42
|
+
|
|
32
43
|
it('leaves fallbacks, dataVars access, and comments unchanged', async () => {
|
|
33
44
|
const source = `
|
|
34
45
|
// var(--color-data-categorical-green)
|
|
@@ -56,7 +56,7 @@ export default function validateDataTokenOwnership(file, api) {
|
|
|
56
56
|
ROOT_DATA_DECLARATION.test(file.source)
|
|
57
57
|
) {
|
|
58
58
|
throw new Error(
|
|
59
|
-
'This generated theme CSS still emits canonical data defaults at :root. Rebuild it with `astryx theme build`; defaults
|
|
59
|
+
'This generated theme CSS still emits canonical data defaults at :root. Rebuild it with `astryx theme build`; defaults come from source-compiled dataVars consumers or @astryxdesign/core/astryx.css in prebuilt mode.',
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
const uncommented = file.source.replace(CSS_COMMENT, comment =>
|
|
@@ -66,7 +66,7 @@ export default function validateDataTokenOwnership(file, api) {
|
|
|
66
66
|
if (cssMatch) {
|
|
67
67
|
const line = uncommented.slice(0, cssMatch.index).split('\n').length;
|
|
68
68
|
throw new Error(
|
|
69
|
-
`Raw var(${cssMatch[1]}) without a fallback at line ${line} needs
|
|
69
|
+
`Raw var(${cssMatch[1]}) without a fallback at line ${line} needs an availability check: load @astryxdesign/core/astryx.css in prebuilt mode, ensure a source-compiled dataVars consumer retains the group, or add an explicit fallback. CSS-capable code imports dataVars from @astryxdesign/core/theme/dataTokens.stylex.`,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
return undefined;
|
|
@@ -95,7 +95,7 @@ export default function validateDataTokenOwnership(file, api) {
|
|
|
95
95
|
if (found) {
|
|
96
96
|
const {token, line} = found;
|
|
97
97
|
throw new Error(
|
|
98
|
-
`Direct var(${token})${line == null ? '' : ` at line ${line}`} needs manual migration: CSS-capable code imports dataVars from @astryxdesign/core/theme/dataTokens.stylex; Canvas and other non-CSS APIs use resolveThemeToken() or useTheme().token().`,
|
|
98
|
+
`Direct var(${token})${line == null ? '' : ` at line ${line}`} needs manual migration: CSS-capable code imports dataVars from @astryxdesign/core/theme/dataTokens.stylex and, in prebuilt mode, loads @astryxdesign/core/astryx.css; Canvas and other non-CSS APIs use resolveThemeToken() or useTheme().token().`,
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
return undefined;
|
|
@@ -28,7 +28,7 @@ export const docs = {
|
|
|
28
28
|
{type: 'code', lang: 'json', label: 'Minimal palette config (palette.config.json)', code: '{"families": [{"id": "ocean", "seed": "#0074e2"}]}'},
|
|
29
29
|
{type: 'code', lang: 'bash', label: 'Generate and preview', code: '# Print the palette without writing files\nastryx theme palette generate palette.config.json\n\n# Write palette + receipt, and open a visual preview\nastryx theme palette generate palette.config.json \\\n --out src/themes/ocean/tokens/ocean.palette.ts \\\n --preview preview.html'},
|
|
30
30
|
{type: 'prose', text: "The command writes a `.ts` file exporting 21 shades (stops 0–100) for both light and dark, plus a `.receipt.json` to regenerate later. Point your theme's tokens at the palette, then run defineTheme (see below)."},
|
|
31
|
-
{type: 'prose', text: 'For the full palette config fields and CLI flags, run `astryx docs cli/commands/theme-palette-generate`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `astryx docs
|
|
31
|
+
{type: 'prose', text: 'For the full palette config fields and CLI flags, run `astryx docs cli/commands/theme-palette-generate`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `astryx docs authoring/building-blocks/themes/generate-a-palette`.'},
|
|
32
32
|
],
|
|
33
33
|
},
|
|
34
34
|
{
|
|
@@ -61,7 +61,7 @@ export const docs = {
|
|
|
61
61
|
['adaptations', 'Width-breakpoint overrides merge by fixed name. Inherited ordered rules keep their relative order; child rules append and re-resolve against the child root axes.'],
|
|
62
62
|
]},
|
|
63
63
|
{type: 'prose', text: "Inheritance is resolved when the theme is defined, so an extended theme is flat: `astryx theme build` emits one self-contained stylesheet holding everything the child inherited, and the base theme's CSS does not need to be loaded next to it. A base that is not a theme (most often an import that missed) throws when `defineTheme` runs, rather than producing a theme that silently inherits nothing."},
|
|
64
|
-
{type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `astryx docs
|
|
64
|
+
{type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `astryx docs authoring/building-blocks/themes/define-the-theme`.'},
|
|
65
65
|
],
|
|
66
66
|
},
|
|
67
67
|
{
|