@salsita-ai/sdk 0.50.0-develop.996c9540be → 0.50.0-develop.9c1e52435a
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 +8 -4
- package/dist/admin/default-admin-elements.d.ts +9 -0
- package/dist/admin/default-admin-elements.js +1 -0
- package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-entity-element.js +1 -0
- package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-layout-element.js +1 -0
- package/dist/admin/default-elements/index.d.ts +2 -0
- package/dist/admin/default-elements/index.js +1 -0
- package/dist/admin/index.d.ts +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/application-spec/caching/content-diff.js +1 -1
- package/dist/application-spec/core/application-file.d.ts +0 -2
- package/dist/application-spec/core/application-file.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +3 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +3 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
- package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
- package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
- package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +10 -14
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +6 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +13 -13
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
- package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -3
- package/dist/application-spec/generate-application/code/templates/globals.js +7 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
- package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
- package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +3 -2
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +13 -6
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +6 -4
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +3 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +7 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
- package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
- package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
- package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/index.d.ts +5 -0
- package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +18 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
- package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +6 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +6 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/index.d.ts +1 -1
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.js +1 -1
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +12 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
- package/dist/configurator/configuration-not-found-page/index.d.ts +1 -0
- package/dist/configurator/configuration-not-found-page/index.js +1 -0
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/RootPage.js +1 -1
- package/dist/configurator/pages/default-configurator-elements.d.ts +3 -1
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/index.d.ts +4 -0
- package/dist/configurator/pages/default-elements/index.js +1 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
- package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
- package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
- package/dist/configurator/ui/assistant/form/form-model.js +1 -0
- package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
- package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
- package/dist/configurator/ui/assistant/form/form-state.js +1 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +11 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
- package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
- package/dist/docs/fabs/basic.mdx +2 -2
- package/dist/docs/index.json +1 -1
- package/dist/docs/layouts/custom-layout.mdx +325 -15
- package/dist/docs/other-features/not-found-404.mdx +1 -1
- package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +36 -11
- package/dist/docs/phoenix/domain-model.mdx +2 -0
- package/dist/docs/phoenix/getting-started.mdx +5 -3
- package/dist/docs/phoenix/layout-slots.mdx +9 -9
- package/dist/docs/phoenix/localization.mdx +6 -2
- package/dist/docs/phoenix/migration-guide.mdx +12 -10
- package/dist/docs/phoenix/phoenix-cli.mdx +31 -16
- package/dist/docs/phoenix/project-structure.mdx +52 -30
- package/dist/docs/phoenix/quickstart.mdx +7 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +6 -6
- package/dist/docs/phoenix/testing.mdx +8 -0
- package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
- package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +2 -0
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
- package/dist/domain/core/schema/extended-schema-validator.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +12 -11
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
- package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
- package/dist/editor/Editor.d.ts +7 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/mocks/CreateMockYaml.js +2 -2
- package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +79 -80
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +10 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +9 -10
- package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/bin.d.ts +2 -0
- package/dist/phoenix/bin.js +2 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
- package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
- package/dist/phoenix/check-configs/eslint-config.js +1 -0
- package/dist/phoenix/check-configs/index.d.ts +8 -0
- package/dist/phoenix/check-configs/index.js +1 -0
- package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
- package/dist/phoenix/check-configs/typescript-project.js +1 -0
- package/dist/phoenix/cli.d.ts +0 -1
- package/dist/phoenix/cli.js +1 -2
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +2 -2
- package/dist/phoenix/commands/deps/deps.d.ts +22 -1
- package/dist/phoenix/commands/deps/deps.js +2 -2
- package/dist/phoenix/commands/deps/index.d.ts +1 -1
- package/dist/phoenix/commands/deps/index.js +1 -1
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -1
- package/dist/phoenix/commands/dev.js +4 -4
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/init.d.ts +17 -5
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/link.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/commands/unlink.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +0 -2
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/lingui.d.ts +8 -0
- package/dist/phoenix/services/lingui.js +1 -1
- package/dist/phoenix/services/swc.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/utils/index.d.ts +3 -2
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/node-version/index.d.ts +1 -0
- package/dist/phoenix/utils/node-version/index.js +1 -0
- package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
- package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
- package/dist/phoenix/utils/package-info.d.ts +0 -9
- package/dist/phoenix/utils/package-info.js +1 -1
- package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
- package/dist/phoenix/utils/package-manager/index.js +1 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
- package/dist/phoenix/utils/run-command.d.ts +11 -0
- package/dist/phoenix/utils/run-command.js +1 -1
- package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
- package/dist/phoenix/utils/sdk-tool/index.js +1 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
- package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +15 -4
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/package.json +16 -9
- package/schema/domain-spec.json +86 -8
- package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
- package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
- package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
- package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
- package/dist/phoenix/commands/generate-project-files.js +0 -1
- /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +0 -0
- /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.js +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ TypeScript SDK and `phoenix` command line for building 3D product configurators
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
The package is public on npm. Start a new project with the CLI, which writes a `package.json`
|
|
7
|
+
The package is public on npm and needs Node.js 22.13 or newer (`engines.node`). The `phoenix` binary checks the running Node.js version first and stops with a message naming the required range; the legacy binaries rely on package managers checking `engines.node` on install. A project installs with any package manager; the commands below use pnpm, and with npm they are `npm install` and `npx phoenix …`. Phoenix writes no package-manager settings: a project on pnpm 11 adds a `pnpm-workspace.yaml` that allows the build scripts of `@swc/core` and `esbuild` and denies the one of `es5-ext` (see Project Structure in the Storybook docs). Start a new project with the CLI, which writes a starter spec and a `package.json` with the SDK, the packages the SDK requires as peers, ESLint and Prettier:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx -p @salsita-ai/sdk phoenix init my-configurator
|
|
@@ -17,13 +17,17 @@ pnpm phoenix dev
|
|
|
17
17
|
|
|
18
18
|
`@salsita-ai/sdk` is the only Salsita package a project declares. The shared utilities and contracts it builds on are its own dependencies and are imported through it, as `@salsita-ai/sdk/common/*` and `@salsita-ai/sdk/contracts/*`.
|
|
19
19
|
|
|
20
|
-
To add the SDK to an existing project, install it
|
|
20
|
+
To add the SDK to an existing project, install it, let `phoenix deps` add the packages it requires as peers, and install again before the first sync. With pnpm (with npm: `npm install @salsita-ai/sdk`, `npx phoenix deps`, `npm install`, `npx phoenix sync`):
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
pnpm add @salsita-ai/sdk
|
|
24
|
+
pnpm phoenix deps
|
|
25
|
+
pnpm install
|
|
24
26
|
pnpm phoenix sync
|
|
25
27
|
```
|
|
26
28
|
|
|
29
|
+
Run `phoenix deps` and install after every SDK update too. The project's `package.json` is its own: `phoenix sync`, `dev` and `build` never write it, and they stop with a list of the peers it does not declare at a version the SDK supports.
|
|
30
|
+
|
|
27
31
|
## Project layout
|
|
28
32
|
|
|
29
33
|
```text
|
|
@@ -44,8 +48,8 @@ Run the CLI through the project's package manager so its version matches the ins
|
|
|
44
48
|
|
|
45
49
|
| Command | What it does |
|
|
46
50
|
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
-
| `phoenix init [folder]` | Starts a project: `package.json`
|
|
48
|
-
| `phoenix sync` | Regenerates project files
|
|
51
|
+
| `phoenix init [folder]` | Starts a project: a starter spec and the `package.json` entries it lacks (SDK, peers, ESLint, Prettier, scripts). |
|
|
52
|
+
| `phoenix sync` | Regenerates project files; stops when `package.json` does not declare the SDK's peers. |
|
|
49
53
|
| `phoenix deps` | Adds the SDK's missing peer dependencies to `package.json` and moves out-of-range ones into range; installs nothing. |
|
|
50
54
|
| `phoenix dev` | Development server with hot reload, webhook tunnel and the editor. |
|
|
51
55
|
| `phoenix build` | Production build of the frontend and the webhooks. |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ElementRegistration } from '#package/domain';
|
|
2
|
+
/**
|
|
3
|
+
* The admin's default element registrations, passed to `withDefaultElements`: the configurator's
|
|
4
|
+
* defaults, because the admin mounts a full configurator, followed by the admin's built-in pages,
|
|
5
|
+
* sidebars and actions under the spec kinds that YAML names. `withDefaultElements` replaces the
|
|
6
|
+
* defaults it was given before, so an admin config passes this list instead of
|
|
7
|
+
* `defaultConfiguratorElements`. A project element registered under the same name replaces one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultAdminElements: readonly ElementRegistration[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultConfiguratorElements as e}from"#package/configurator";import{adminConnectedResourcePageSchema as m,adminDataTableActionsSchema as o,adminDataTablePageSchema as i,adminDataTableSidebarSchema as t,adminPresetActionsSchema as n,adminPresetCategoryActionsSchema as r,adminPresetCategoryPageSchema as a,adminPresetCategorySidebarSchema as p,adminPresetListPageSchema as d,adminPresetSidebarSchema as f,adminRecipeActionsSchema as s,adminRecipeCollectionPageSchema as l,adminRecipeSidebarSchema as c}from"#package/domain";import{builtInEntityElement as u,builtInLayoutElement as x}from"./default-elements/index.js";import{AdminConnectedResourcePage as g,AdminDataTableActions as j,AdminDataTablePage as k,AdminDataTableSidebar as h,AdminPresetActions as A,AdminPresetCategoryActions as E,AdminPresetCategoryPage as b,AdminPresetCategorySidebar as q,AdminPresetListPage as v,AdminPresetSidebar as w,AdminRecipeActions as y,AdminRecipeCollectionPage as z,AdminRecipeSidebar as B}from"./ui/phoenix-admin-elements/index.js";export const defaultAdminElements=[...e,x(m,g),x(o,j),x(i,k),u(t,h),x(n,A),x(r,E),x(a,b),u(p,q),x(d,v),u(f,w),x(s,y),x(l,z),u(c,B)];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PhoenixEntityElementDefinition, type PhoenixEntityElementRegistration } from '#package/domain';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a built-in entity element under the `kind` of its schema, with the component that the
|
|
4
|
+
* element's module exports. The schema type argument ties the schema and the
|
|
5
|
+
* component's props together, as in `createPhoenixEntityElement`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const builtInEntityElement: <SCHEMA extends {
|
|
8
|
+
kind: string;
|
|
9
|
+
props?: Record<string, unknown>;
|
|
10
|
+
} = never>(schema: PhoenixEntityElementDefinition<SCHEMA>['schema'], component: PhoenixEntityElementDefinition<SCHEMA>['component']) => PhoenixEntityElementRegistration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCustomPhoenixEntityElement as t}from"#package/domain";export const builtInEntityElement=(e,n)=>t(e.properties.kind.enum[0],n);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PhoenixLayoutElementDefinition, type PhoenixLayoutElementRegistration } from '#package/domain';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a built-in layout element under the `kind` of its schema, with the component that the
|
|
4
|
+
* element's module exports. The schema type argument ties the schema and the
|
|
5
|
+
* component's props together, as in `createPhoenixLayoutElement`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const builtInLayoutElement: <SCHEMA extends {
|
|
8
|
+
kind: string;
|
|
9
|
+
props?: Record<string, unknown>;
|
|
10
|
+
} = never>(schema: PhoenixLayoutElementDefinition<SCHEMA>['schema'], component: PhoenixLayoutElementDefinition<SCHEMA>['component']) => PhoenixLayoutElementRegistration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCustomPhoenixLayoutElement as e}from"#package/domain";export const builtInLayoutElement=(o,t)=>e(o.properties.kind.enum[0],t);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{builtInEntityElement}from"./built-in-entity-element.js";export{builtInLayoutElement}from"./built-in-layout-element.js";
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { StandaloneAdmin } from './StandaloneAdmin.js';
|
|
|
3
3
|
export { createAdminPages, type AdminPagesConfig } from './create-admin-pages.js';
|
|
4
4
|
export { createAdminPagesFromSpec } from './create-admin-pages-from-spec.js';
|
|
5
5
|
export { createAdminInterface } from './common/admin-interface.js';
|
|
6
|
+
export { defaultAdminElements } from './default-admin-elements.js';
|
|
6
7
|
export { ConnectedResourcePage } from './pages/connected/ConnectedResourcePage.js';
|
|
7
8
|
export { ConnectedDataValidationDialog } from './pages/connected/ConnectedDataValidationDialog.js';
|
|
8
9
|
export { type ConnectedDataValidationIssue } from './common/use-connected-data-validation.js';
|
package/dist/admin/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EmbeddedAdmin}from"./EmbeddedAdmin.js";export{StandaloneAdmin}from"./StandaloneAdmin.js";export{createAdminPages}from"./create-admin-pages.js";export{createAdminPagesFromSpec}from"./create-admin-pages-from-spec.js";export{createAdminInterface}from"./common/admin-interface.js";export{ConnectedResourcePage}from"./pages/connected/ConnectedResourcePage.js";export{ConnectedDataValidationDialog}from"./pages/connected/ConnectedDataValidationDialog.js";export{DataTablePage}from"./pages/data-table/DataTablePage.js";export{EntityRow}from"./ui/list/EntityRow.js";export{AdminLayout}from"./ui/layout/AdminLayout.js";export{EditEntityMenuItem}from"./ui/menu/EditEntityMenuItem.js";export{DeleteEntityMenuItem}from"./ui/menu/DeleteEntityMenuItem.js";export{ShowEntityMenuItem}from"./ui/menu/ShowEntityMenuItem.js";export{Application}from"./legacy-admin/Application.js";export{useLegacyAdminRouting}from"./legacy-admin/LegacyAdminRoutingProvider.js";export{LegacyAdminLayout}from"./legacy-admin/LegacyAdminLayout.js";export*from"./ui/phoenix-admin-elements/index.js";export*from"./integration/index.js";export*from"./EncapsulatedAdminTheme.js";
|
|
1
|
+
export{EmbeddedAdmin}from"./EmbeddedAdmin.js";export{StandaloneAdmin}from"./StandaloneAdmin.js";export{createAdminPages}from"./create-admin-pages.js";export{createAdminPagesFromSpec}from"./create-admin-pages-from-spec.js";export{createAdminInterface}from"./common/admin-interface.js";export{defaultAdminElements}from"./default-admin-elements.js";export{ConnectedResourcePage}from"./pages/connected/ConnectedResourcePage.js";export{ConnectedDataValidationDialog}from"./pages/connected/ConnectedDataValidationDialog.js";export{DataTablePage}from"./pages/data-table/DataTablePage.js";export{EntityRow}from"./ui/list/EntityRow.js";export{AdminLayout}from"./ui/layout/AdminLayout.js";export{EditEntityMenuItem}from"./ui/menu/EditEntityMenuItem.js";export{DeleteEntityMenuItem}from"./ui/menu/DeleteEntityMenuItem.js";export{ShowEntityMenuItem}from"./ui/menu/ShowEntityMenuItem.js";export{Application}from"./legacy-admin/Application.js";export{useLegacyAdminRouting}from"./legacy-admin/LegacyAdminRoutingProvider.js";export{LegacyAdminLayout}from"./legacy-admin/LegacyAdminLayout.js";export*from"./ui/phoenix-admin-elements/index.js";export*from"./integration/index.js";export*from"./EncapsulatedAdminTheme.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"spark-md5";import{GeneratedApplicationFile as t}from"../core/index.js";let r=t=>e.hash(t);export const createContentDiffTracker=e=>{let n=new Map,
|
|
1
|
+
import e from"spark-md5";import{GeneratedApplicationFile as t}from"../core/index.js";let r=t=>e.hash(t);export const createContentDiffTracker=e=>{let n=new Map,o=(t,o)=>{let i=[],a=o?.mode??"content";for(let f of t){let t=r(f.content),s=n.get(f.path);if(o?.force&&"content"===a){i.push(f),n.set(f.path,t);continue}if(void 0===s&&e?.readDiskContent){let t=e.readDiskContent(f.path);void 0!==t&&(s=r(t))}if(void 0===s){i.push(f),n.set(f.path,t);continue}"content"===a&&t!==s&&i.push(f),n.set(f.path,t)}return i};return{getChangedFiles:o,getChangedApplicationFiles:(e,r)=>{let n=o(e.files.map(e=>{let n,o;return n=r.generatedFilesPathPrefix,o={format:!1},t(`${n}${e.path}`,e.content,{binary:e.binary,format:o?.format??e.format})}),{force:r.force}),i=new Set(n.map(e=>e.path));return{changedGeneratedFiles:e.files.filter(e=>i.has(`${r.generatedFilesPathPrefix}${e.path}`)),filesToWrite:[...n,...o(e.generatedProjectFiles,{force:r.force}),...o(e.initialProjectFiles,{mode:"missing"})]}}}};
|
|
@@ -39,14 +39,12 @@ export type GeneratedApplication = Branded<'GeneratedApplication', {
|
|
|
39
39
|
readonly files: readonly GeneratedApplicationFile[];
|
|
40
40
|
readonly generatedProjectFiles: readonly GeneratedApplicationFile[];
|
|
41
41
|
readonly initialProjectFiles: readonly GeneratedApplicationFile[];
|
|
42
|
-
readonly prettierFiles: readonly GeneratedApplicationFile[];
|
|
43
42
|
readonly removedProjectFiles: readonly string[];
|
|
44
43
|
}>;
|
|
45
44
|
interface GeneratedApplicationProps {
|
|
46
45
|
readonly files: readonly GeneratedApplicationFile[];
|
|
47
46
|
readonly generatedProjectFiles: readonly GeneratedApplicationFile[];
|
|
48
47
|
readonly initialProjectFiles: readonly GeneratedApplicationFile[];
|
|
49
|
-
readonly prettierFiles: readonly GeneratedApplicationFile[];
|
|
50
48
|
readonly removedProjectFiles: readonly string[];
|
|
51
49
|
}
|
|
52
50
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";export const GeneratedApplicationFile=(i,t,
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";export const GeneratedApplicationFile=(i,t,o)=>e({path:i,content:t,...o?.binary!==void 0?{binary:o.binary}:{},...o?.format!==void 0?{format:o.format}:{}});export const GeneratedApplication=i=>e({files:i.files,generatedProjectFiles:i.generatedProjectFiles,initialProjectFiles:i.initialProjectFiles,removedProjectFiles:i.removedProjectFiles});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare enum DiagnosticCode {
|
|
3
3
|
EMPTY_SPEC_FILE = "EMPTY_SPEC_FILE",
|
|
4
4
|
YAML_PARSE_ERROR = "YAML_PARSE_ERROR",
|
|
5
|
+
NON_FINITE_NUMBER = "NON_FINITE_NUMBER",
|
|
5
6
|
SCHEMA_PARSE_ERROR = "SCHEMA_PARSE_ERROR",
|
|
6
7
|
IMPORT_MODULE_NOT_FOUND = "IMPORT_MODULE_NOT_FOUND",
|
|
7
8
|
IMPORT_MODULE_OUTSIDE_PROJECT = "IMPORT_MODULE_OUTSIDE_PROJECT",
|
|
@@ -146,6 +147,8 @@ export declare enum DiagnosticCode {
|
|
|
146
147
|
READ_BINDING_UNKNOWN_FIELD = "READ_BINDING_UNKNOWN_FIELD",
|
|
147
148
|
COMPONENT_BINDING_TYPE_MISMATCH = "COMPONENT_BINDING_TYPE_MISMATCH",
|
|
148
149
|
COMPONENT_STATIC_ENTITY_ID = "COMPONENT_STATIC_ENTITY_ID",
|
|
150
|
+
EXPRESSION_READ_TYPE_CONFLICT = "EXPRESSION_READ_TYPE_CONFLICT",
|
|
151
|
+
EXPRESSION_VALUE_TYPE_MISMATCH = "EXPRESSION_VALUE_TYPE_MISMATCH",
|
|
149
152
|
WRITE_BINDING_UNKNOWN_FIELD = "WRITE_BINDING_UNKNOWN_FIELD",
|
|
150
153
|
WRITE_BINDING_IMMUTABLE_FIELD = "WRITE_BINDING_IMMUTABLE_FIELD",
|
|
151
154
|
WRITE_BINDING_EXPRESSION_TARGET = "WRITE_BINDING_EXPRESSION_TARGET",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E;export var DiagnosticCode=((E={}).EMPTY_SPEC_FILE="EMPTY_SPEC_FILE",E.YAML_PARSE_ERROR="YAML_PARSE_ERROR",E.SCHEMA_PARSE_ERROR="SCHEMA_PARSE_ERROR",E.IMPORT_MODULE_NOT_FOUND="IMPORT_MODULE_NOT_FOUND",E.IMPORT_MODULE_OUTSIDE_PROJECT="IMPORT_MODULE_OUTSIDE_PROJECT",E.MERGE_CONFLICT="MERGE_CONFLICT",E.MISSING_MODEL="MISSING_MODEL",E.MISSING_LATEST="MISSING_LATEST",E.INVALID_VERSION_KEY="INVALID_VERSION_KEY",E.MISSING_VERSION="MISSING_VERSION",E.NAME_CLASH="NAME_CLASH",E.INVALID_ENTITY_TYPE_NAME="INVALID_ENTITY_TYPE_NAME",E.DUPLICATE_ENTITY_TYPE="DUPLICATE_ENTITY_TYPE",E.INVALID_ALIAS_NAME="INVALID_ALIAS_NAME",E.RESERVED_ALIAS_NAME="RESERVED_ALIAS_NAME",E.MISSING_ROOT_ENTITY="MISSING_ROOT_ENTITY",E.CIRCULAR_ALIAS="CIRCULAR_ALIAS",E.UNKNOWN_ALIAS_MEMBER="UNKNOWN_ALIAS_MEMBER",E.UNKNOWN_SHAPE_KEY="UNKNOWN_SHAPE_KEY",E.UNKNOWN_REFERENCE_TARGET="UNKNOWN_REFERENCE_TARGET",E.RESERVED_PROPERTY="RESERVED_PROPERTY",E.INVALID_SHAPE_PROPERTY_NAME="INVALID_SHAPE_PROPERTY_NAME",E.UNKNOWN_PHX_DEFINITION="UNKNOWN_PHX_DEFINITION",E.UNKNOWN_COMMON_TYPE_REF="UNKNOWN_COMMON_TYPE_REF",E.INVALID_REF="INVALID_REF",E.MISSING_MIGRATION="MISSING_MIGRATION",E.MIGRATION_INVALID_START="MIGRATION_INVALID_START",E.UNKNOWN_MIGRATION="UNKNOWN_MIGRATION",E.PROTECTED_SHAPE="PROTECTED_SHAPE",E.PROTECTED_ALIAS="PROTECTED_ALIAS",E.RESERVED_ALIAS="RESERVED_ALIAS",E.ALIAS_INCLUDES_COMMON="ALIAS_INCLUDES_COMMON",E.PROTECTED_INVARIANT="PROTECTED_INVARIANT",E.PROTECTED_RELATION="PROTECTED_RELATION",E.PROTECTED_EXPRESSION="PROTECTED_EXPRESSION",E.PROTECTED_COMMON_TYPE="PROTECTED_COMMON_TYPE",E.PROTECTED_ENTITY_TYPE="PROTECTED_ENTITY_TYPE",E.PRESET_UNKNOWN_ROOT_ENTITY_TYPE="PRESET_UNKNOWN_ROOT_ENTITY_TYPE",E.PRESET_UNKNOWN_ENTITY_TYPE="PRESET_UNKNOWN_ENTITY_TYPE",E.PRESET_INVALID_ENTITY_ID_FORMAT="PRESET_INVALID_ENTITY_ID_FORMAT",E.PRESET_MISSING_ROOT_ENTITY="PRESET_MISSING_ROOT_ENTITY",E.PRESET_MULTIPLE_ROOT_ENTITIES="PRESET_MULTIPLE_ROOT_ENTITIES",E.PRESET_ENTITY_SCHEMA_VIOLATION="PRESET_ENTITY_SCHEMA_VIOLATION",E.PRESET_DUPLICATE_ENTITY_ID="PRESET_DUPLICATE_ENTITY_ID",E.PRESET_ENTITY_ID_TYPE_MISMATCH="PRESET_ENTITY_ID_TYPE_MISMATCH",E.PRESET_UNKNOWN_REFERENCE="PRESET_UNKNOWN_REFERENCE",E.PRESET_REFERENCE_TYPE_MISMATCH="PRESET_REFERENCE_TYPE_MISMATCH",E.PRESET_RELATION_CARDINALITY_VIOLATION="PRESET_RELATION_CARDINALITY_VIOLATION",E.PRESET_COMPOSITION_MULTIPLE_PARENTS="PRESET_COMPOSITION_MULTIPLE_PARENTS",E.PRESET_COMPOSITION_CYCLE="PRESET_COMPOSITION_CYCLE",E.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE="PRESET_ENTITY_NOT_IN_COMPOSITION_TREE",E.ADMIN_PRESET_MULTIPLE_PER_FILE="ADMIN_PRESET_MULTIPLE_PER_FILE",E.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN="ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN",E.ACTIONS_IN_ADMIN_FILE="ACTIONS_IN_ADMIN_FILE",E.INVALID_ACTION_NAME="INVALID_ACTION_NAME",E.ACTION_UNKNOWN_REFERENCE_TARGET="ACTION_UNKNOWN_REFERENCE_TARGET",E.EXPRESSION_UNKNOWN_ENTITY_KEY="EXPRESSION_UNKNOWN_ENTITY_KEY",E.INVALID_EXPRESSION_NAME="INVALID_EXPRESSION_NAME",E.DUPLICATE_EXPRESSION="DUPLICATE_EXPRESSION",E.EXPRESSION_RELATION_CONFLICT="EXPRESSION_RELATION_CONFLICT",E.CONSTANTS_EXPRESSION_CONFLICT="CONSTANTS_EXPRESSION_CONFLICT",E.COMPONENT_RELATION_CONFLICT="COMPONENT_RELATION_CONFLICT",E.COMPONENT_ALIAS_CONFLICT="COMPONENT_ALIAS_CONFLICT",E.INVALID_INVARIANT_NAME="INVALID_INVARIANT_NAME",E.INVALID_VIOLATION_TYPE_NAME="INVALID_VIOLATION_TYPE_NAME",E.INVARIANT_UNKNOWN_ENTITY_KEY="INVARIANT_UNKNOWN_ENTITY_KEY",E.INVARIANT_MANUAL_VIOLATIONS_COMPONENT="INVARIANT_MANUAL_VIOLATIONS_COMPONENT",E.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT="INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT",E.INVALID_RELATION_NAME="INVALID_RELATION_NAME",E.RELATION_UNKNOWN_ENTITY_KEY="RELATION_UNKNOWN_ENTITY_KEY",E.RELATION_UNKNOWN_TARGET="RELATION_UNKNOWN_TARGET",E.RELATION_UNKNOWN_FIELD_DIRECT="RELATION_UNKNOWN_FIELD_DIRECT",E.RELATION_UNKNOWN_FIELD_INDIRECT="RELATION_UNKNOWN_FIELD_INDIRECT",E.RELATION_IMMUTABLE_FIELD="RELATION_IMMUTABLE_FIELD",E.RELATION_FIELD_NOT_REFERENCE="RELATION_FIELD_NOT_REFERENCE",E.RELATION_FIELD_REFERENCES_OTHER_TYPES="RELATION_FIELD_REFERENCES_OTHER_TYPES",E.RELATION_FIELD_CARDINALITY_MISMATCH="RELATION_FIELD_CARDINALITY_MISMATCH",E.RELATION_MISSING_COUNTERPART="RELATION_MISSING_COUNTERPART",E.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH="RELATION_COUNTERPART_COMPOSED_OF_MISMATCH",E.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE="RELATION_ENTITY_NOT_IN_COMPOSITION_TREE",E.DUPLICATE_DATA_SCHEMA="DUPLICATE_DATA_SCHEMA",E.ADMIN_DATA_SCHEMA="ADMIN_DATA_SCHEMA",E.SESSION_DATA_REQUIRED_PROPERTIES="SESSION_DATA_REQUIRED_PROPERTIES",E.CLERK_SESSION_DATA_INCOMPATIBLE="CLERK_SESSION_DATA_INCOMPATIBLE",E.RESERVED_PUBLISHED_DATA_KEY="RESERVED_PUBLISHED_DATA_KEY",E.DUPLICATE_STATE_FIELD="DUPLICATE_STATE_FIELD",E.INVALID_STATE_KEY="INVALID_STATE_KEY",E.DUPLICATE_STATE_VALUE="DUPLICATE_STATE_VALUE",E.DUPLICATE_THEME_FIELD="DUPLICATE_THEME_FIELD",E.DUPLICATE_UI_FIELD="DUPLICATE_UI_FIELD",E.CONFLICTING_TRANSFORMERS="CONFLICTING_TRANSFORMERS",E.DUPLICATE_TRANSFORMER="DUPLICATE_TRANSFORMER",E.DUPLICATE_TRANSFORMER_FILE="DUPLICATE_TRANSFORMER_FILE",E.UNMATCHED_TRANSFORMER="UNMATCHED_TRANSFORMER",E.DUPLICATE_APP_METADATA_FIELD="DUPLICATE_APP_METADATA_FIELD",E.DUPLICATE_INFRA_FIELD="DUPLICATE_INFRA_FIELD",E.DUPLICATE_RESOURCE_NAME="DUPLICATE_RESOURCE_NAME",E.INVALID_APPLICATION_VERSION="INVALID_APPLICATION_VERSION",E.INVALID_ENV_VAR_KEY="INVALID_ENV_VAR_KEY",E.DUPLICATE_ADMIN_PAGES="DUPLICATE_ADMIN_PAGES",E.ADMIN_PAGES_NAV_STATE_CONFLICT="ADMIN_PAGES_NAV_STATE_CONFLICT",E.ADMIN_PAGE_DATA_ENTRY_CONFLICT="ADMIN_PAGE_DATA_ENTRY_CONFLICT",E.CONFLICTING_BUDGETS="CONFLICTING_BUDGETS",E.CONFLICTING_CHUNKS="CONFLICTING_CHUNKS",E.CONFLICTING_ASSISTANT="CONFLICTING_ASSISTANT",E.ASSISTANT_UNKNOWN_TYPE="ASSISTANT_UNKNOWN_TYPE",E.ASSISTANT_UNKNOWN_FIELD="ASSISTANT_UNKNOWN_FIELD",E.ASSISTANT_UNSUPPORTED_EXPRESSION="ASSISTANT_UNSUPPORTED_EXPRESSION",E.ASSISTANT_NOT_WRITABLE="ASSISTANT_NOT_WRITABLE",E.ASSISTANT_UNKNOWN_RECIPE_GROUP="ASSISTANT_UNKNOWN_RECIPE_GROUP",E.ASSISTANT_DUPLICATE_RECIPE_GROUP="ASSISTANT_DUPLICATE_RECIPE_GROUP",E.ASSISTANT_META_TYPE_NAME_CONFLICT="ASSISTANT_META_TYPE_NAME_CONFLICT",E.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT="ASSISTANT_UNKNOWN_OPTIONS_COMPONENT",E.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME="ASSISTANT_RESERVED_OPTIONS_EDGE_NAME",E.ASSISTANT_DUPLICATE_OPTIONS_EDGE="ASSISTANT_DUPLICATE_OPTIONS_EDGE",E.ASSISTANT_RESERVED_FIELD_NAME="ASSISTANT_RESERVED_FIELD_NAME",E.ASSISTANT_FIELD_NAME_CONFLICT="ASSISTANT_FIELD_NAME_CONFLICT",E.ASSISTANT_RESERVED_TYPE_NAME="ASSISTANT_RESERVED_TYPE_NAME",E.ASSISTANT_INVALID_SCHEMA="ASSISTANT_INVALID_SCHEMA",E.ASSISTANT_UNKNOWN_ACTION="ASSISTANT_UNKNOWN_ACTION",E.ASSISTANT_MUTATION_NAME_CONFLICT="ASSISTANT_MUTATION_NAME_CONFLICT",E.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT="ASSISTANT_ACTION_RESULT_TYPE_CONFLICT",E.ASSISTANT_UNKNOWN_LENS="ASSISTANT_UNKNOWN_LENS",E.ASSISTANT_EMPTY_LENS="ASSISTANT_EMPTY_LENS",E.ASSISTANT_RESERVED_LENS_NAME="ASSISTANT_RESERVED_LENS_NAME",E.ASSISTANT_FIELD_SHAPE_CONFLICT="ASSISTANT_FIELD_SHAPE_CONFLICT",E.INVALID_CHUNK_KEY="INVALID_CHUNK_KEY",E.RESERVED_CHUNK_KEY="RESERVED_CHUNK_KEY",E.CONFLICTING_DATA_ENTRY="CONFLICTING_DATA_ENTRY",E.INVALID_DATA_ENTRY_KEY="INVALID_DATA_ENTRY_KEY",E.INVALID_DATA_DEFINITION_FIELD_KEY="INVALID_DATA_DEFINITION_FIELD_KEY",E.UNKNOWN_DATA_CHUNK="UNKNOWN_DATA_CHUNK",E.INVALID_DATA_VALUE="INVALID_DATA_VALUE",E.DEFAULTS_UNKNOWN_ENTITY_KEY="DEFAULTS_UNKNOWN_ENTITY_KEY",E.DEFAULTS_UNKNOWN_PROPERTY="DEFAULTS_UNKNOWN_PROPERTY",E.DEFAULTS_SCHEMA_VIOLATION="DEFAULTS_SCHEMA_VIOLATION",E.DEFAULTS_INCOMPLETE="DEFAULTS_INCOMPLETE",E.DEFAULTS_DEPRECATED="DEFAULTS_DEPRECATED",E.COMPONENT_INVALID_INSTANCE_NAME="COMPONENT_INVALID_INSTANCE_NAME",E.COMPONENT_MERGE_CONFLICT="COMPONENT_MERGE_CONFLICT",E.COMPONENT_UNKNOWN_ENTITY_KEY="COMPONENT_UNKNOWN_ENTITY_KEY",E.COMPONENT_IMPORT_REF_UNSUPPORTED="COMPONENT_IMPORT_REF_UNSUPPORTED",E.COMPONENT_DATA_REF_UNSUPPORTED="COMPONENT_DATA_REF_UNSUPPORTED",E.READ_BINDING_UNKNOWN_FIELD="READ_BINDING_UNKNOWN_FIELD",E.COMPONENT_BINDING_TYPE_MISMATCH="COMPONENT_BINDING_TYPE_MISMATCH",E.COMPONENT_STATIC_ENTITY_ID="COMPONENT_STATIC_ENTITY_ID",E.WRITE_BINDING_UNKNOWN_FIELD="WRITE_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_IMMUTABLE_FIELD="WRITE_BINDING_IMMUTABLE_FIELD",E.WRITE_BINDING_EXPRESSION_TARGET="WRITE_BINDING_EXPRESSION_TARGET",E.WRITE_BINDING_DUPLICATE_TARGET="WRITE_BINDING_DUPLICATE_TARGET",E.UNKNOWN_SRC_PATH="UNKNOWN_SRC_PATH",E.INVALID_SUBDIRECTORY="INVALID_SUBDIRECTORY",E.MISSING_WEBHOOK_INDEX="MISSING_WEBHOOK_INDEX",E.MODULE_ANALYSIS_FAILED="MODULE_ANALYSIS_FAILED",E.WEBHOOK_UNSAFE_IMPORT="WEBHOOK_UNSAFE_IMPORT",E.MOCK_TEMPLATE_PARSE_ERROR="MOCK_TEMPLATE_PARSE_ERROR",E.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED="ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED="ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE="ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE",E.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED="ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED",E);
|
|
1
|
+
var E;export var DiagnosticCode=((E={}).EMPTY_SPEC_FILE="EMPTY_SPEC_FILE",E.YAML_PARSE_ERROR="YAML_PARSE_ERROR",E.NON_FINITE_NUMBER="NON_FINITE_NUMBER",E.SCHEMA_PARSE_ERROR="SCHEMA_PARSE_ERROR",E.IMPORT_MODULE_NOT_FOUND="IMPORT_MODULE_NOT_FOUND",E.IMPORT_MODULE_OUTSIDE_PROJECT="IMPORT_MODULE_OUTSIDE_PROJECT",E.MERGE_CONFLICT="MERGE_CONFLICT",E.MISSING_MODEL="MISSING_MODEL",E.MISSING_LATEST="MISSING_LATEST",E.INVALID_VERSION_KEY="INVALID_VERSION_KEY",E.MISSING_VERSION="MISSING_VERSION",E.NAME_CLASH="NAME_CLASH",E.INVALID_ENTITY_TYPE_NAME="INVALID_ENTITY_TYPE_NAME",E.DUPLICATE_ENTITY_TYPE="DUPLICATE_ENTITY_TYPE",E.INVALID_ALIAS_NAME="INVALID_ALIAS_NAME",E.RESERVED_ALIAS_NAME="RESERVED_ALIAS_NAME",E.MISSING_ROOT_ENTITY="MISSING_ROOT_ENTITY",E.CIRCULAR_ALIAS="CIRCULAR_ALIAS",E.UNKNOWN_ALIAS_MEMBER="UNKNOWN_ALIAS_MEMBER",E.UNKNOWN_SHAPE_KEY="UNKNOWN_SHAPE_KEY",E.UNKNOWN_REFERENCE_TARGET="UNKNOWN_REFERENCE_TARGET",E.RESERVED_PROPERTY="RESERVED_PROPERTY",E.INVALID_SHAPE_PROPERTY_NAME="INVALID_SHAPE_PROPERTY_NAME",E.UNKNOWN_PHX_DEFINITION="UNKNOWN_PHX_DEFINITION",E.UNKNOWN_COMMON_TYPE_REF="UNKNOWN_COMMON_TYPE_REF",E.INVALID_REF="INVALID_REF",E.MISSING_MIGRATION="MISSING_MIGRATION",E.MIGRATION_INVALID_START="MIGRATION_INVALID_START",E.UNKNOWN_MIGRATION="UNKNOWN_MIGRATION",E.PROTECTED_SHAPE="PROTECTED_SHAPE",E.PROTECTED_ALIAS="PROTECTED_ALIAS",E.RESERVED_ALIAS="RESERVED_ALIAS",E.ALIAS_INCLUDES_COMMON="ALIAS_INCLUDES_COMMON",E.PROTECTED_INVARIANT="PROTECTED_INVARIANT",E.PROTECTED_RELATION="PROTECTED_RELATION",E.PROTECTED_EXPRESSION="PROTECTED_EXPRESSION",E.PROTECTED_COMMON_TYPE="PROTECTED_COMMON_TYPE",E.PROTECTED_ENTITY_TYPE="PROTECTED_ENTITY_TYPE",E.PRESET_UNKNOWN_ROOT_ENTITY_TYPE="PRESET_UNKNOWN_ROOT_ENTITY_TYPE",E.PRESET_UNKNOWN_ENTITY_TYPE="PRESET_UNKNOWN_ENTITY_TYPE",E.PRESET_INVALID_ENTITY_ID_FORMAT="PRESET_INVALID_ENTITY_ID_FORMAT",E.PRESET_MISSING_ROOT_ENTITY="PRESET_MISSING_ROOT_ENTITY",E.PRESET_MULTIPLE_ROOT_ENTITIES="PRESET_MULTIPLE_ROOT_ENTITIES",E.PRESET_ENTITY_SCHEMA_VIOLATION="PRESET_ENTITY_SCHEMA_VIOLATION",E.PRESET_DUPLICATE_ENTITY_ID="PRESET_DUPLICATE_ENTITY_ID",E.PRESET_ENTITY_ID_TYPE_MISMATCH="PRESET_ENTITY_ID_TYPE_MISMATCH",E.PRESET_UNKNOWN_REFERENCE="PRESET_UNKNOWN_REFERENCE",E.PRESET_REFERENCE_TYPE_MISMATCH="PRESET_REFERENCE_TYPE_MISMATCH",E.PRESET_RELATION_CARDINALITY_VIOLATION="PRESET_RELATION_CARDINALITY_VIOLATION",E.PRESET_COMPOSITION_MULTIPLE_PARENTS="PRESET_COMPOSITION_MULTIPLE_PARENTS",E.PRESET_COMPOSITION_CYCLE="PRESET_COMPOSITION_CYCLE",E.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE="PRESET_ENTITY_NOT_IN_COMPOSITION_TREE",E.ADMIN_PRESET_MULTIPLE_PER_FILE="ADMIN_PRESET_MULTIPLE_PER_FILE",E.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN="ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN",E.ACTIONS_IN_ADMIN_FILE="ACTIONS_IN_ADMIN_FILE",E.INVALID_ACTION_NAME="INVALID_ACTION_NAME",E.ACTION_UNKNOWN_REFERENCE_TARGET="ACTION_UNKNOWN_REFERENCE_TARGET",E.EXPRESSION_UNKNOWN_ENTITY_KEY="EXPRESSION_UNKNOWN_ENTITY_KEY",E.INVALID_EXPRESSION_NAME="INVALID_EXPRESSION_NAME",E.DUPLICATE_EXPRESSION="DUPLICATE_EXPRESSION",E.EXPRESSION_RELATION_CONFLICT="EXPRESSION_RELATION_CONFLICT",E.CONSTANTS_EXPRESSION_CONFLICT="CONSTANTS_EXPRESSION_CONFLICT",E.COMPONENT_RELATION_CONFLICT="COMPONENT_RELATION_CONFLICT",E.COMPONENT_ALIAS_CONFLICT="COMPONENT_ALIAS_CONFLICT",E.INVALID_INVARIANT_NAME="INVALID_INVARIANT_NAME",E.INVALID_VIOLATION_TYPE_NAME="INVALID_VIOLATION_TYPE_NAME",E.INVARIANT_UNKNOWN_ENTITY_KEY="INVARIANT_UNKNOWN_ENTITY_KEY",E.INVARIANT_MANUAL_VIOLATIONS_COMPONENT="INVARIANT_MANUAL_VIOLATIONS_COMPONENT",E.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT="INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT",E.INVALID_RELATION_NAME="INVALID_RELATION_NAME",E.RELATION_UNKNOWN_ENTITY_KEY="RELATION_UNKNOWN_ENTITY_KEY",E.RELATION_UNKNOWN_TARGET="RELATION_UNKNOWN_TARGET",E.RELATION_UNKNOWN_FIELD_DIRECT="RELATION_UNKNOWN_FIELD_DIRECT",E.RELATION_UNKNOWN_FIELD_INDIRECT="RELATION_UNKNOWN_FIELD_INDIRECT",E.RELATION_IMMUTABLE_FIELD="RELATION_IMMUTABLE_FIELD",E.RELATION_FIELD_NOT_REFERENCE="RELATION_FIELD_NOT_REFERENCE",E.RELATION_FIELD_REFERENCES_OTHER_TYPES="RELATION_FIELD_REFERENCES_OTHER_TYPES",E.RELATION_FIELD_CARDINALITY_MISMATCH="RELATION_FIELD_CARDINALITY_MISMATCH",E.RELATION_MISSING_COUNTERPART="RELATION_MISSING_COUNTERPART",E.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH="RELATION_COUNTERPART_COMPOSED_OF_MISMATCH",E.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE="RELATION_ENTITY_NOT_IN_COMPOSITION_TREE",E.DUPLICATE_DATA_SCHEMA="DUPLICATE_DATA_SCHEMA",E.ADMIN_DATA_SCHEMA="ADMIN_DATA_SCHEMA",E.SESSION_DATA_REQUIRED_PROPERTIES="SESSION_DATA_REQUIRED_PROPERTIES",E.CLERK_SESSION_DATA_INCOMPATIBLE="CLERK_SESSION_DATA_INCOMPATIBLE",E.RESERVED_PUBLISHED_DATA_KEY="RESERVED_PUBLISHED_DATA_KEY",E.DUPLICATE_STATE_FIELD="DUPLICATE_STATE_FIELD",E.INVALID_STATE_KEY="INVALID_STATE_KEY",E.DUPLICATE_STATE_VALUE="DUPLICATE_STATE_VALUE",E.DUPLICATE_THEME_FIELD="DUPLICATE_THEME_FIELD",E.DUPLICATE_UI_FIELD="DUPLICATE_UI_FIELD",E.CONFLICTING_TRANSFORMERS="CONFLICTING_TRANSFORMERS",E.DUPLICATE_TRANSFORMER="DUPLICATE_TRANSFORMER",E.DUPLICATE_TRANSFORMER_FILE="DUPLICATE_TRANSFORMER_FILE",E.UNMATCHED_TRANSFORMER="UNMATCHED_TRANSFORMER",E.DUPLICATE_APP_METADATA_FIELD="DUPLICATE_APP_METADATA_FIELD",E.DUPLICATE_INFRA_FIELD="DUPLICATE_INFRA_FIELD",E.DUPLICATE_RESOURCE_NAME="DUPLICATE_RESOURCE_NAME",E.INVALID_APPLICATION_VERSION="INVALID_APPLICATION_VERSION",E.INVALID_ENV_VAR_KEY="INVALID_ENV_VAR_KEY",E.DUPLICATE_ADMIN_PAGES="DUPLICATE_ADMIN_PAGES",E.ADMIN_PAGES_NAV_STATE_CONFLICT="ADMIN_PAGES_NAV_STATE_CONFLICT",E.ADMIN_PAGE_DATA_ENTRY_CONFLICT="ADMIN_PAGE_DATA_ENTRY_CONFLICT",E.CONFLICTING_BUDGETS="CONFLICTING_BUDGETS",E.CONFLICTING_CHUNKS="CONFLICTING_CHUNKS",E.CONFLICTING_ASSISTANT="CONFLICTING_ASSISTANT",E.ASSISTANT_UNKNOWN_TYPE="ASSISTANT_UNKNOWN_TYPE",E.ASSISTANT_UNKNOWN_FIELD="ASSISTANT_UNKNOWN_FIELD",E.ASSISTANT_UNSUPPORTED_EXPRESSION="ASSISTANT_UNSUPPORTED_EXPRESSION",E.ASSISTANT_NOT_WRITABLE="ASSISTANT_NOT_WRITABLE",E.ASSISTANT_UNKNOWN_RECIPE_GROUP="ASSISTANT_UNKNOWN_RECIPE_GROUP",E.ASSISTANT_DUPLICATE_RECIPE_GROUP="ASSISTANT_DUPLICATE_RECIPE_GROUP",E.ASSISTANT_META_TYPE_NAME_CONFLICT="ASSISTANT_META_TYPE_NAME_CONFLICT",E.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT="ASSISTANT_UNKNOWN_OPTIONS_COMPONENT",E.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME="ASSISTANT_RESERVED_OPTIONS_EDGE_NAME",E.ASSISTANT_DUPLICATE_OPTIONS_EDGE="ASSISTANT_DUPLICATE_OPTIONS_EDGE",E.ASSISTANT_RESERVED_FIELD_NAME="ASSISTANT_RESERVED_FIELD_NAME",E.ASSISTANT_FIELD_NAME_CONFLICT="ASSISTANT_FIELD_NAME_CONFLICT",E.ASSISTANT_RESERVED_TYPE_NAME="ASSISTANT_RESERVED_TYPE_NAME",E.ASSISTANT_INVALID_SCHEMA="ASSISTANT_INVALID_SCHEMA",E.ASSISTANT_UNKNOWN_ACTION="ASSISTANT_UNKNOWN_ACTION",E.ASSISTANT_MUTATION_NAME_CONFLICT="ASSISTANT_MUTATION_NAME_CONFLICT",E.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT="ASSISTANT_ACTION_RESULT_TYPE_CONFLICT",E.ASSISTANT_UNKNOWN_LENS="ASSISTANT_UNKNOWN_LENS",E.ASSISTANT_EMPTY_LENS="ASSISTANT_EMPTY_LENS",E.ASSISTANT_RESERVED_LENS_NAME="ASSISTANT_RESERVED_LENS_NAME",E.ASSISTANT_FIELD_SHAPE_CONFLICT="ASSISTANT_FIELD_SHAPE_CONFLICT",E.INVALID_CHUNK_KEY="INVALID_CHUNK_KEY",E.RESERVED_CHUNK_KEY="RESERVED_CHUNK_KEY",E.CONFLICTING_DATA_ENTRY="CONFLICTING_DATA_ENTRY",E.INVALID_DATA_ENTRY_KEY="INVALID_DATA_ENTRY_KEY",E.INVALID_DATA_DEFINITION_FIELD_KEY="INVALID_DATA_DEFINITION_FIELD_KEY",E.UNKNOWN_DATA_CHUNK="UNKNOWN_DATA_CHUNK",E.INVALID_DATA_VALUE="INVALID_DATA_VALUE",E.DEFAULTS_UNKNOWN_ENTITY_KEY="DEFAULTS_UNKNOWN_ENTITY_KEY",E.DEFAULTS_UNKNOWN_PROPERTY="DEFAULTS_UNKNOWN_PROPERTY",E.DEFAULTS_SCHEMA_VIOLATION="DEFAULTS_SCHEMA_VIOLATION",E.DEFAULTS_INCOMPLETE="DEFAULTS_INCOMPLETE",E.DEFAULTS_DEPRECATED="DEFAULTS_DEPRECATED",E.COMPONENT_INVALID_INSTANCE_NAME="COMPONENT_INVALID_INSTANCE_NAME",E.COMPONENT_MERGE_CONFLICT="COMPONENT_MERGE_CONFLICT",E.COMPONENT_UNKNOWN_ENTITY_KEY="COMPONENT_UNKNOWN_ENTITY_KEY",E.COMPONENT_IMPORT_REF_UNSUPPORTED="COMPONENT_IMPORT_REF_UNSUPPORTED",E.COMPONENT_DATA_REF_UNSUPPORTED="COMPONENT_DATA_REF_UNSUPPORTED",E.READ_BINDING_UNKNOWN_FIELD="READ_BINDING_UNKNOWN_FIELD",E.COMPONENT_BINDING_TYPE_MISMATCH="COMPONENT_BINDING_TYPE_MISMATCH",E.COMPONENT_STATIC_ENTITY_ID="COMPONENT_STATIC_ENTITY_ID",E.EXPRESSION_READ_TYPE_CONFLICT="EXPRESSION_READ_TYPE_CONFLICT",E.EXPRESSION_VALUE_TYPE_MISMATCH="EXPRESSION_VALUE_TYPE_MISMATCH",E.WRITE_BINDING_UNKNOWN_FIELD="WRITE_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_IMMUTABLE_FIELD="WRITE_BINDING_IMMUTABLE_FIELD",E.WRITE_BINDING_EXPRESSION_TARGET="WRITE_BINDING_EXPRESSION_TARGET",E.WRITE_BINDING_DUPLICATE_TARGET="WRITE_BINDING_DUPLICATE_TARGET",E.UNKNOWN_SRC_PATH="UNKNOWN_SRC_PATH",E.INVALID_SUBDIRECTORY="INVALID_SUBDIRECTORY",E.MISSING_WEBHOOK_INDEX="MISSING_WEBHOOK_INDEX",E.MODULE_ANALYSIS_FAILED="MODULE_ANALYSIS_FAILED",E.WEBHOOK_UNSAFE_IMPORT="WEBHOOK_UNSAFE_IMPORT",E.MOCK_TEMPLATE_PARSE_ERROR="MOCK_TEMPLATE_PARSE_ERROR",E.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED="ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED="ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE="ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE",E.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED="ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED",E);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export declare const diagnosticMessages: {
|
|
6
6
|
EMPTY_SPEC_FILE: () => string;
|
|
7
7
|
YAML_PARSE_ERROR: (detail: string) => string;
|
|
8
|
+
NON_FINITE_NUMBER: (path: string, value: string) => string;
|
|
8
9
|
SCHEMA_PARSE_ERROR: (path: string, zodMessage: string) => string;
|
|
9
10
|
IMPORT_MODULE_NOT_FOUND: (module: string, resolvedPath: string) => string;
|
|
10
11
|
IMPORT_MODULE_OUTSIDE_PROJECT: (module: string, resolvedPath: string) => string;
|
|
@@ -166,6 +167,8 @@ export declare const diagnosticMessages: {
|
|
|
166
167
|
READ_BINDING_UNKNOWN_FIELD: (entityKey: string, componentName: string, instanceName: string, propKey: string, target: string) => string;
|
|
167
168
|
COMPONENT_BINDING_TYPE_MISMATCH: (componentPath: string, binding: string, fieldType: string, expectedType: string) => string;
|
|
168
169
|
COMPONENT_STATIC_ENTITY_ID: (componentPath: string, value: string, expectedType: string) => string;
|
|
170
|
+
EXPRESSION_READ_TYPE_CONFLICT: (entityKey: string, name: string, declaredType: string | undefined, readTypes: readonly string[]) => string;
|
|
171
|
+
EXPRESSION_VALUE_TYPE_MISMATCH: (expression: string, valueType: string, declaredType: string) => string;
|
|
169
172
|
WRITE_BINDING_UNKNOWN_FIELD: (entityKey: string, componentName: string, instanceName: string, propKey: string, entityField: string) => string;
|
|
170
173
|
WRITE_BINDING_IMMUTABLE_FIELD: (entityKey: string, componentName: string, instanceName: string, propKey: string, entityField: string) => string;
|
|
171
174
|
WRITE_BINDING_EXPRESSION_TARGET: (entityKey: string, componentName: string, instanceName: string, propKey: string, target: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DiagnosticCode as e}from"./diagnostic-codes.js";export const diagnosticMessages={[e.EMPTY_SPEC_FILE]:()=>'Spec file is empty. Every spec file must define at least one section ("model:", "components:", or "presets:"). Add content or remove the file.',[e.YAML_PARSE_ERROR]:e=>`YAML parse error: ${e}. Check for indentation issues, missing colons, or unquoted special characters.`,[e.SCHEMA_PARSE_ERROR]:(e,t)=>`Invalid value at "${e}": ${t}. Refer to the spec documentation for the expected structure at this path.`,[e.IMPORT_MODULE_NOT_FOUND]:(e,t)=>`Import module "${e}" resolves to "${t}", but no matching project source file exists. Add the source file or update import.module to a path relative to this spec file.`,[e.IMPORT_MODULE_OUTSIDE_PROJECT]:(e,t)=>`Import module "${e}" resolves outside the project root as "${t}", so its target cannot be verified. Confirm that the external file exists and that the path is intentional.`,[e.MOCK_TEMPLATE_PARSE_ERROR]:e=>`Mock template parse warning: ${e}. The mock template was skipped. Fix the YAML or remove the file.`,[e.MERGE_CONFLICT]:(e,t,n,a)=>`"model.${e}.${t}" is defined in both "${n}" and "${a}". Each subsection (entityTypes, aliases, shapes, commonTypes) can only appear once per version. Move all "${t}" for "${e}" into one file.`,[e.MISSING_MODEL]:e=>`No "${e}" section found. Every application must define at least "${e}.latest" with entity types and aliases. Add a "${e}:" section to a spec file.`,[e.MISSING_LATEST]:e=>`"${e}.latest" is missing. The "latest" version defines the current working model and is always required. Add "latest:" under "${e}:".`,[e.INVALID_VERSION_KEY]:e=>`"${e}" is not a valid version key. Version keys must be "latest" or "v1", "v2", etc. Rename "${e}".`,[e.MISSING_VERSION]:e=>`Model version "v${e}" is missing. Versions must be contiguous (v1, v2, …, latest) with no gaps. Add "v${e}:" or remove higher versions.`,[e.NAME_CLASH]:(e,t,n)=>`Name "${t}" is used as both a ${e} and a ${n}. Names must be unique across entity types, aliases, and commonTypes within a version. Rename one of them.`,[e.INVALID_ENTITY_TYPE_NAME]:e=>`"${e}" is not a valid entity type name. Entity types must be PascalCase (e.g. "Product", "KitchenRange"). Rename it.`,[e.DUPLICATE_ENTITY_TYPE]:e=>`Entity type "${e}" is declared more than once. Entity types must be unique. Remove the duplicate.`,[e.INVALID_ALIAS_NAME]:e=>`"${e}" is not a valid alias name. Aliases must be PascalCase (e.g. "RootEntity", "EditableItems"). Rename it.`,[e.RESERVED_ALIAS_NAME]:e=>`"${e}" is a reserved alias. "AnyDomainEntity" is auto-generated from all entity types and cannot be user-defined. Choose a different name.`,[e.MISSING_ROOT_ENTITY]:()=>'"RootEntity" alias is not defined. Every model must have a "RootEntity" alias that identifies which entity types can be used as configuration roots. Add "RootEntity: [YourType]" to your aliases.',[e.CIRCULAR_ALIAS]:e=>`Circular alias reference: ${e}. An alias cannot reference itself, directly or through other aliases. Remove one reference in the cycle.`,[e.UNKNOWN_ALIAS_MEMBER]:(e,t)=>`Alias "${e}" references "${t}", which is not a declared entity type or alias. Check the spelling or add "${t}" to entityTypes.`,[e.UNKNOWN_SHAPE_KEY]:e=>`Shape "${e}" does not match any declared entity type or alias. Shapes can only be defined for names that appear in entityTypes or aliases. Check the spelling or add "${e}" to entityTypes.`,[e.UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not a declared entity type or alias. Check the spelling or add "${n}" to entityTypes.`,[e.RESERVED_PROPERTY]:(e,t)=>`Property "${e}" on "${t}" is reserved. "id" and "type" are injected automatically and cannot appear in shapes. Remove "${e}" from the shape.`,[e.INVALID_SHAPE_PROPERTY_NAME]:e=>`"${e}" is not a valid shape property name. Property names must match /^[a-z]\\w*$/ — start with a lowercase letter, then word characters only (e.g. "height", "positionX", "hoodId"). Rename the property.`,[e.UNKNOWN_PHX_DEFINITION]:(e,t)=>`$ref "${e}" references unknown phoenix type "${t}". Available built-in types include DomainEntityId, Localizable, MultilingualString. Check the spelling.`,[e.UNKNOWN_COMMON_TYPE_REF]:(e,t)=>`$ref "${e}" references unknown commonType "${t}". The target must be declared in commonTypes of the same model version. Check the spelling or add "${t}" to commonTypes.`,[e.INVALID_REF]:e=>`$ref "${e}" is not a recognized reference format. Use "phx:TypeName" for built-in types, "common:TypeName" for commonTypes, or "#/model/{version}/commonTypes/{name}" for explicit version refs.`,[e.MISSING_MIGRATION]:e=>`No migration file for v${e}. Every version from v2 onward needs a migration (src/migrations/v${e}.ts) that transforms state from the previous version. Create the file.`,[e.MIGRATION_INVALID_START]:e=>`Migration "${e}" starts below v2. v1 is the initial version with no predecessor to migrate from. Remove this file.`,[e.UNKNOWN_MIGRATION]:(e,t,n)=>`Migration "${e}" targets v${t}, but the latest model version is v${n}. There is no model version for this migration to apply to. Remove the file or add model version v${t}.`,[e.PROTECTED_SHAPE]:e=>`Shape "${e}" cannot be user-defined. This entity type is part of the built-in admin model and its shape is managed by the system. Remove this shape.`,[e.PROTECTED_ALIAS]:e=>`Alias "${e}" cannot be user-defined in admin files. "RootEntity" and "CommonAdminEntity" are managed by the built-in admin model. Choose a different name.`,[e.RESERVED_ALIAS]:e=>`Alias "${e}" is auto-generated and cannot be user-defined. Remove this alias definition.`,[e.ALIAS_INCLUDES_COMMON]:(e,t)=>`Alias "${e}" includes "${t}", which is a built-in admin entity type. User aliases cannot include built-in admin types. Remove "${t}" from the alias.`,[e.PROTECTED_INVARIANT]:(e,t)=>`Invariant "${e}.${t}" is a built-in common admin invariant and cannot be overridden. Remove this declaration; the built-in implementation is always applied.`,[e.PROTECTED_RELATION]:(e,t)=>`Relation "${e}.${t}" is a built-in common admin relation and cannot be overridden. Remove this declaration; the built-in relation is always applied.`,[e.PROTECTED_EXPRESSION]:(e,t)=>`Expression "${e}.${t}" is reserved for the built-in common admin spec and cannot be user-defined. Rename this expression.`,[e.PROTECTED_COMMON_TYPE]:e=>`Common type "${e}" is part of the built-in admin model and cannot be user-defined. Choose a different name.`,[e.PROTECTED_ENTITY_TYPE]:e=>`Entity type "${e}" is part of the built-in admin model and cannot be re-declared. Remove it from entityTypes.`,[e.PRESET_UNKNOWN_ROOT_ENTITY_TYPE]:(e,t)=>`Preset rootEntityType "${e}" is not allowed. Allowed root types: ${t.join(", ")}. Use one of these or update the RootEntity alias.`,[e.PRESET_UNKNOWN_ENTITY_TYPE]:(e,t,n)=>`Preset entity "${e}" has type "${t}", which is not a declared entity type. Declared types: ${n.join(", ")}. Fix the type or add "${t}" to entityTypes.`,[e.PRESET_INVALID_ENTITY_ID_FORMAT]:e=>`Entity ID "${e}" does not follow the required format. IDs must match "TypeName-N" (e.g. "Product-1", "Hood-42"). Rename it.`,[e.PRESET_MISSING_ROOT_ENTITY]:e=>`Preset declares rootEntityType "${e}" but no entity of that type exists in initialDomainEntities. Add an entity with type "${e}".`,[e.PRESET_MULTIPLE_ROOT_ENTITIES]:(e,t)=>`Preset has ${t} entities of type "${e}", but exactly one root entity is required. Remove the extra "${e}" entities.`,[e.PRESET_ENTITY_SCHEMA_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" (${t}) has invalid data at ${n}: ${a}. Fix the value to match the entity schema.`,[e.PRESET_DUPLICATE_ENTITY_ID]:e=>`Preset entity ID "${e}" is used more than once. Entity IDs must be unique in a preset. Rename or remove the duplicate entity.`,[e.PRESET_ENTITY_ID_TYPE_MISMATCH]:(e,t,n)=>`Preset entity "${e}" has type "${t}", but its ID starts with "${n}". IDs must use the entity type prefix. Rename the ID to start with "${t}-" or change the entity type.`,[e.PRESET_UNKNOWN_REFERENCE]:(e,t,n)=>`Preset entity "${e}" references "${n}" from "${t}", but no entity with that ID exists in the preset. Add the referenced entity or update the reference.`,[e.PRESET_REFERENCE_TYPE_MISMATCH]:(e,t,n,a,i)=>`Preset entity "${e}" references "${n}" from "${t}", but the referenced entity has type "${a}". Allowed target types: ${i.join(", ")}. Use a matching entity ID.`,[e.PRESET_RELATION_CARDINALITY_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" violates relation "${t}" cardinality "${n}". The relation resolves ${a} entities. Add or remove referenced entities so the relation matches its cardinality.`,[e.PRESET_COMPOSITION_MULTIPLE_PARENTS]:(e,t,n)=>`Preset entity "${e}" is composed by both "${t}" and "${n}". Composition must form one tree. Remove one parent reference.`,[e.PRESET_COMPOSITION_CYCLE]:e=>`Preset composition contains a cycle at "${e}". Composition must form a tree from the root entity. Remove the cyclic reference.`,[e.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Preset entity "${e}" is not reachable from root entity "${t}" through composedOf relations. Add a composition relation path from the root or remove the entity.`,[e.ADMIN_PRESET_MULTIPLE_PER_FILE]:(e,t)=>`Admin file "${e}" has ${t} presets. Only 1 preset per admin file is allowed. Split into separate files or merge into one preset.`,[e.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN]:(e,t)=>`Admin preset in "${e}" has rootEntityType "${t}". Admin presets must always use rootEntityType "Admin". Change it to "Admin".`,[e.ACTIONS_IN_ADMIN_FILE]:e=>`"${e}" is an admin spec file ("$admin: true") but declares "actions". Actions run in the configurator domain only; the admin domain has none. Move the "actions" block to a configurator spec file, or remove it.`,[e.INVALID_ACTION_NAME]:e=>`"${e}" is not a valid action name. Action names are camelCase identifiers without a prefix (e.g. "movePartBy", "swapCabinets"), since they also name the implementation, the generated types and the assistant mutation. Rename it.`,[e.ACTION_UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not an entity type or alias of the latest model. A "references" target types the entity id or entity the param or result member holds. Check the spelling or add "${n}" to entityTypes.`,[e.EXPRESSION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Expression key "${e}" is not a declared entity type or alias. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVALID_EXPRESSION_NAME]:e=>`"${e}" is not a valid expression name. Expression names must start with "$" followed by camelCase (e.g. "$price", "$isValid"). Rename it.`,[e.DUPLICATE_EXPRESSION]:(e,t,n,a)=>`Expression "${e}.${t}" is produced by both "${n}" and "${a}" after alias expansion. Expression names must be unique for each concrete entity type. Remove one declaration or rename it.`,[e.EXPRESSION_RELATION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "expressions:" and generated by a relation. User expressions cannot shadow relation-derived expressions. Remove the user declaration or rename the relation.`,[e.CONSTANTS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "constants:" and "expressions:" in the same file. Use only one source of truth and migrate the legacy constant into "expressions:".`,[e.COMPONENT_RELATION_CONFLICT]:(e,t)=>`Component "${e}::${t}" is declared in both "components:" and generated by a relation. User components cannot shadow relation-derived components. Remove the user declaration or rename the relation.`,[e.COMPONENT_ALIAS_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is produced by both "${a}" and "${i}". Component instance names must be unique after alias expansion. Rename one instance or move the shared properties to one declaration.`,[e.COMPONENT_IMPORT_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" uses unsupported $importRef "${i}#${s}". Application-spec component values are part of the webhook-included domain and cannot reference frontend modules. Fix: remove $importRef from the spec and attach the component from a frontend-only file in src/components.`,[e.COMPONENT_DATA_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" combines "$read: ${i}" with the legacy "$data: ${s}" marker. Application-spec components resolve "$read" against entity fields and declared expressions only, so the combined marker never becomes a binding. Fix: remove "$data" and implement "${i}" with createDataSwatchMap('${s.split(".").at(-1)??s}') in the project's custom expressions.`,[e.INVALID_INVARIANT_NAME]:e=>`"${e}" is not a valid invariant name. Invariant names must start with a lowercase letter and contain only word characters (e.g. "nameNotEmpty"). Rename it.`,[e.INVALID_VIOLATION_TYPE_NAME]:e=>`"${e}" is not a valid violation type. Violation types must start with a lowercase letter and contain only letters, digits, underscores, or hyphens (e.g. "name-empty"). Rename it.`,[e.INVARIANT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Invariants are declared for "${e}", which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVARIANT_MANUAL_VIOLATIONS_COMPONENT]:e=>`Component "violations" on "${e}" cannot be declared manually because invariant parsing generates it automatically. Remove the manual component declaration.`,[e.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.$violations" is declared in "${t}:" but invariant parsing generates it automatically for the same entity type. Remove the declaration or rename it.`,[e.INVALID_RELATION_NAME]:e=>`"${e}" is not a valid relation name. Relation names must start with "$" followed by camelCase (e.g. "$top", "$legs"). Rename it.`,[e.RELATION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Relations declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.RELATION_UNKNOWN_TARGET]:(e,t,n,a)=>`Relation "${e}.${t}" targets "${n}" which is not an entity type or alias in the model. Known names: ${a.join(", ")}. Check the spelling or add "${n}" to entityTypes.`,[e.RELATION_UNKNOWN_FIELD_DIRECT]:(e,t,n)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of "${e}". Add "${n}" to the "${e}" schema or pick a different field.`,[e.RELATION_UNKNOWN_FIELD_INDIRECT]:(e,t,n,a)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of target "${a}". Add "${n}" to the "${a}" schema or pick a different field.`,[e.RELATION_IMMUTABLE_FIELD]:(e,t,n,a)=>`Relation "${e}.${t}" uses implicit field "${n}" on "${a}" as a relation reference holder. Implicit fields "id" and "type" are immutable and cannot hold relation references. Choose a writable shape field on "${a}".`,[e.RELATION_FIELD_NOT_REFERENCE]:(e,t,n,a)=>`Relation "${e}.${t}" uses field "${n}" of "${a}", which is not a reference field. A relation reads the ids of its related entities from the field, so the field must be a "phx:DomainEntityId" with "references", such a reference or null, or an array of such references. Declare "${n}" that way in the shape of "${a}" or pick a different field.`,[e.RELATION_FIELD_REFERENCES_OTHER_TYPES]:(e,t,n,a,i,s,o)=>{let r=1===o.length&&o[0]===s?"":` (${o.join(", ")})`;return`Relation "${e}.${t}" uses field "${n}" of "${a}", which references ${i.join(", ")}, but the relation relates to "${s}"${r}. The field of a direct relation must reference exactly the entity types of its target, and the field of an indirect relation exactly the entity types the relation is declared on. Make "${a}.${n}" reference "${s}" or pick a different field.`},[e.RELATION_FIELD_CARDINALITY_MISMATCH]:(e,t,n,a,i,s)=>{let o={single:"one reference that is never null",nullableSingle:"one reference or null",array:"an array of references"};return`Relation "${e}.${t}" has cardinality "${a}", which needs a field that holds ${o[s]}, but "${e}.${n}" holds ${o[i]}. A direct relation with cardinality "1-1" reads one reference that is never null, "0-1" one reference or null, and "0-N" or "1-N" an array of references. Change the cardinality or the schema of "${n}".`},[e.RELATION_MISSING_COUNTERPART]:(e,t,n,a,i,s)=>{let o=void 0!==i?` with field "${i}"`:"",r=s?`Set "composedOf: false" on the counterpart because "${e}.${t}" already owns the composition.`:'Set "composedOf: false" on the counterpart for a cross-reference, or "composedOf: true" if the counterpart should own the composition.';return`Relation "${e}.${t}" (${n} → "${a}"${void 0!==i?`, field "${i}"`:""}) has no counterpart on "${a}". Every relation must be declared from both sides — add a "${"allOfType"===n?"allOfType":"direct"===n?"indirect":"direct"}" relation on "${a}" targeting "${e}"${o}. ${r}`},[e.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH]:(e,t,n,a)=>`Relation "${e}.${t}" and its counterpart "${n}.${a}" both use "composedOf: true". A relation pair can have at most one composition owner — set "composedOf: false" on one side.`,[e.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Entity "${e}" is not reachable from any root entity type (${t.join(", ")}) via "composedOf: true" relations. Every declared entity must be part of the composition tree, otherwise instances of it can never appear in a valid domain state. Add a relation with "composedOf: true" from a reachable parent, or include "${e}" in the RootEntity alias.`,[e.DUPLICATE_DATA_SCHEMA]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each data schema can only be declared in one file. Remove the duplicate.`,[e.ADMIN_DATA_SCHEMA]:(e,t)=>`"${e}" is declared in admin spec "${t}". Data schemas are configurator-only. Move "${e}" to a non-admin spec file.`,[e.SESSION_DATA_REQUIRED_PROPERTIES]:(e,t)=>`sessionData in "${t}" declares required properties (${e.map(e=>`"${e}"`).join(", ")}), but admin and preset sessions do not carry custom session data. Remove these properties from required or set required to an empty array.`,[e.CLERK_SESSION_DATA_INCOMPATIBLE]:e=>`sessionData is not compatible with the built-in Clerk session payload: ${e.join("; ")}. When "useClerk" is true, the SDK's Clerk auth handlers return { id: string, accessToken: string, tags: string[], emailAddress: string, fullName: string | null }, and runtime session parsing rejects any payload the schema does not accept. Declare all five properties with these exact types (the "type" keyword is compared literally, so $ref, anyOf, and oneOf forms are not recognized) and keep them out of "required" so anonymous sessions stay valid. Extra project-defined properties are allowed.`,[e.RESERVED_PUBLISHED_DATA_KEY]:e=>`publishedData property "${e}" is reserved by the admin system. Properties like "presetCategories" and "recipes" are auto-injected. Remove "${e}" from your publishedData properties.`,[e.DUPLICATE_STATE_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each state field can only be declared in one file. Remove the duplicate.`,[e.INVALID_STATE_KEY]:(e,t)=>`State key "${t}" in "${e}" is not a valid identifier. State keys must start with a letter and contain only letters, digits, or underscores (e.g. "overview", "detailView"). Rename it.`,[e.DUPLICATE_STATE_VALUE]:(e,t)=>`State value "${t}" appears more than once in "${e}". Each value within a state array must be unique. Remove the duplicate.`,[e.DUPLICATE_THEME_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each theme field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_UI_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each UI field can only be declared in one file. Remove the duplicate.`,[e.CONFLICTING_TRANSFORMERS]:(e,t)=>`Transformers are declared in both "${e}" and "${t}". The "transformers" section can only appear in one spec file. Move all transformers into a single file.`,[e.DUPLICATE_TRANSFORMER]:(e,t)=>`Transformer "${e}" is declared twice in "${t}". Transformer names must be unique within the file. Remove the duplicate entry.`,[e.DUPLICATE_TRANSFORMER_FILE]:(e,t)=>`Transformer files "${e}" and "${t}" resolve to the same transformer name. Transformers are matched by file name, ignoring folders, letter case, and dashes. Rename one of the files so every transformer file name is unique.`,[e.UNMATCHED_TRANSFORMER]:(e,t)=>`Transformer "${e}" has no matching file in "src/transformers/". Every name listed under "transformers:" must correspond to a transformer module. ${t.length>0?`Available transformers: ${t.map(e=>`"${e}"`).join(", ")}. Check the spelling or add "src/transformers/${e}.ts".`:`No transformer files were found in "src/transformers/". Add "src/transformers/${e}.ts" or remove the entry.`}`,[e.DUPLICATE_APP_METADATA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each metadata field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_INFRA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each infrastructure field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_RESOURCE_NAME]:(e,t,n)=>`Resource name "${e}" is used by the entries at index ${t} and ${n} of "resources". A resource name identifies one resource. Rename one of the two entries or remove the duplicate.`,[e.INVALID_APPLICATION_VERSION]:e=>`"${e}" is not a valid applicationVersion. Version must be semver (x.y.z) using three numeric segments (e.g. "1.0.0", "2.3.12"). Update "applicationVersion" to match.`,[e.INVALID_ENV_VAR_KEY]:(e,t)=>`"${t}" is not a valid env.${e} variable name. Env var names must match /^[A-Z_][A-Z0-9_]*$/ — uppercase letters, digits, and underscores; must not start with a digit (e.g. "API_URL", "_PRIVATE_FLAG"). Rename the variable.`,[e.DUPLICATE_ADMIN_PAGES]:(e,t)=>`"$adminPages" is defined in both "${e}" and "${t}". Admin pages can only be declared in one admin spec file. Move all "$adminPages" settings into one admin file.`,[e.ADMIN_PAGES_NAV_STATE_CONFLICT]:e=>`Admin navigation states [${e.join(", ")}] are declared manually and generated from "$adminPages". Remove the manual entries from "navigationStates" in the admin spec or change the "$adminPages" navigationState values.`,[e.ADMIN_PAGE_DATA_ENTRY_CONFLICT]:(e,t)=>`"$adminPages.pages.${e}.connectedDataEntry" references data entry "${t}". This data entry already creates an inferred admin data page. Remove the explicit admin page connection or change the data entry kind.`,[e.CONFLICTING_BUDGETS]:(e,t)=>`"budgets" is declared in both "${e}" and "${t}". The "budgets" section can only appear in one spec file. Move all bundle-size budgets into a single file.`,[e.CONFLICTING_CHUNKS]:(e,t)=>`"chunks" is declared in both "${e}" and "${t}". The "chunks" section can only appear in one spec file. Move all chunk definitions into a single file.`,[e.CONFLICTING_ASSISTANT]:(e,t)=>`"assistant" is declared in both "${e}" and "${t}". The "assistant" manifest can only appear in one spec file. Move the whole "assistant" section into a single file.`,[e.ASSISTANT_UNKNOWN_TYPE]:(e,t)=>`"assistant.${e}.${t}" does not name an entity type or alias of the latest model, so it has nothing to ${({entities:"expose",deletable:"make deletable",writable:"make writable",childRecipes:"add children to",replaceRecipes:"replace"})[e]}. Use an entity type or alias name from "model.latest", or remove the entry.`,[e.ASSISTANT_UNKNOWN_FIELD]:(e,t,n)=>n.startsWith("$")?`"assistant.entities.${t}.${n}" is not an expression declared on "${t}". The assistant schema exposes expressions declared in "expressions", "constants" or "relations" on the entity type or alias itself, and on an entity type also those of its aliases; an expression only inferred from a component "$read" is not declared. Declare "${n}" in "expressions", "constants" or "relations" on "${t}" (for an entity type, an alias containing it also works), or remove the entry.`:`"assistant.${e}.${t}.${n}" is not a stored field of "${t}". The assistant schema ${"entities"===e?"exposes":"writes"} shape properties of the entity type or alias, including fields every alias member has. Use a property from the "${t}" shape, or remove the entry.`,[e.ASSISTANT_UNSUPPORTED_EXPRESSION]:(e,t)=>`"assistant.entities.${e}.${t}" whitelists the "$violations" expression, which the assistant schema does not expose yet: violations get their own typed edge in CON-2869. Remove the entry.`,[e.ASSISTANT_NOT_WRITABLE]:(e,t)=>`"assistant.writable.${e}.${t}" cannot be written: ${t.startsWith("$")?"an expression is computed from the state, not stored":`"${t}" identifies the entity and never changes`}. Only stored shape properties other than "id" and "type" can be writable. Remove the entry${t.startsWith("$")?", or make the stored fields the expression reads writable instead":""}.`,[e.ASSISTANT_UNKNOWN_RECIPE_GROUP]:({section:e,component:t},n,a,i,s)=>`"assistant.${e}.${n}.groups.${a}" does not name a "${t}" component instance on "${i}", so there are no recipes to expose. ${s.length>0?`"${i}" has these "${t}" instances: ${s.join(", ")}.`:`"${i}" has no "${t}" component.`} Use the instance name of a "${t}" component attached to the entity type or to an alias containing it, or remove the entry.`,[e.ASSISTANT_DUPLICATE_RECIPE_GROUP]:({section:e,mutation:t},n,a,i)=>`"${n}" gets the recipe group id "${a}" from both "assistant.${e}.${i.join(`" and "assistant.${e}.`)}", but "${t}" finds a group of an entity by its id. The entries may come from "${n}" itself or from aliases containing it. Give one of them another id with "as".`,[e.ASSISTANT_META_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a recipe group or the options of a field on "${e}", so the assistant schema generates the type "${t}" for them, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.childRecipes" and "assistant.replaceRecipes" group and every "options" of a writable field of "${e}".`,[e.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT]:(e,{componentType:t,instanceName:n},a,i)=>`"assistant.writable.${e}.options" names the "${t}" instance "${n}", which "${a}" does not have, so there are no choices to list. ${i.length>0?`"${a}" has these "${t}" instances: ${i.join(", ")}.`:`"${a}" has no "${t}" component.`} Use the name of a "${t}" instance attached to the entity type or to an alias containing it, correct "componentType", or remove "options".`,[e.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME]:(e,t,n)=>`"assistant.writable.${e}.options" would add the edge "${t}" to the meta type, but that name is taken by a recipe groups edge. Name the edge differently with "as", e.g. "as: ${n}Choices".`,[e.ASSISTANT_DUPLICATE_OPTIONS_EDGE]:(e,t,n)=>`"${e}" gets ${"edgeName"in t?`the options edge "${t.edgeName}"`:`options for the field "${t.field}"`} from both "assistant.writable.${n.join('.options" and "assistant.writable.')}.options", but ${"edgeName"in t?"one edge lists the choices of one field":"a written value is checked against one list of choices"}. The entries may come from "${e}" itself or from aliases containing it. ${"edgeName"in t?'Give one of them another name with "as", or remove':"Remove"} "options" from one of them.`,[e.ASSISTANT_UNKNOWN_ACTION]:(e,t)=>`"assistant.actions.${e}" does not name an action declared under "actions"${t.length>0?`; the declared actions are: ${t.join(", ")}`:"; the spec declares no actions"}. Declare the action in an "actions" block of a spec file and implement it in src/actions/, or remove the entry.`,[e.ASSISTANT_MUTATION_NAME_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", which ${n}. One Mutation field runs one change. Expose the action under another name with "as", e.g. "as: ${t}Action".`,[e.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", so the assistant schema generates the type "${n}" for its result, but that name is taken by an entity type, alias, generated meta type, built-in type or another action's result. Expose the action under another name with "as", or rename the conflicting type.`,[e.ASSISTANT_UNKNOWN_LENS]:(e,t,n)=>`"assistant.entities.${e}" is tagged with the lens "${t}", which is not declared under "assistant.lenses"${n.length>0?`; the declared lenses are: ${n.join(", ")}`:"; the manifest declares no lenses"}. Declare "${t}" under "assistant.lenses" with a "description", or remove the tag.`,[e.ASSISTANT_EMPTY_LENS]:e=>`"assistant.lenses.${e}" is declared, but no entry under "assistant.entities" is tagged with it, so the agent would be offered a lens that selects nothing. Tag the fields and expressions of the lens with "lenses: [${e}]", or remove the lens.`,[e.ASSISTANT_RESERVED_LENS_NAME]:(e,t)=>`"assistant.lenses.${e}" has the name of a built-in lens (${t.join(", ")}), which the assistant schema defines itself. Rename the lens and the tags that name it.`,[e.ASSISTANT_FIELD_SHAPE_CONFLICT]:(e,t)=>`The assistant schema exposes "${e}" in shapes that cannot be read together: ${t.map(({typeName:e,type:t})=>`${t} on "${e}"`).join(", ")}. A query that reaches entities of several types, such as "entities" or a lens, selects the field on all of them at once, and in GraphQL a single entity, a list of entities and a plain value cannot share a name. One name meaning different kinds of thing is an unusual model and confuses the assistant as well. Expose one of the entries under another name with "as".`,[e.ASSISTANT_RESERVED_FIELD_NAME]:(e,t,n)=>`"assistant.entities.${e}.${t}" is exposed as "${n}", which the assistant schema reserves ("id", "type" and "meta" are reserved on every type). Expose it under another name with "as", e.g. "as: ${t}Value".`,[e.ASSISTANT_FIELD_NAME_CONFLICT]:(e,t,n,a)=>void 0===a?`"${t}" on "${e}" in the assistant schema maps to both "${n.join('" and "')}", but one GraphQL field can read only one stored field or expression. The entries may come from "${e}" itself or from aliases containing it. Rename one of them with "as".`:`"assistant.writable.${a}" makes "${t}" writable on "${e}" without exposing it, so its delta field would be named "${t}", but "assistant.entities" already exposes "${n[0]}" on "${e}" under that name. One name cannot read one stored field or expression and write another. Expose "${t}" in "assistant.entities" under another name with "as", or rename the entry that exposes "${n[0]}".`,[e.ASSISTANT_RESERVED_TYPE_NAME]:(e,t)=>`"${e}" is an entity type or alias name that the assistant GraphQL schema reserves for its own types (${t.join(", ")}), so the schema cannot be generated. Rename the entity type or alias, or remove the "assistant" section.`,[e.ASSISTANT_INVALID_SCHEMA]:e=>`The GraphQL schema generated from the "assistant" manifest is invalid: ${e.join(" ")} This usually means aliases sharing an entity whitelist the same field with different types. Whitelist the field on one alias only, or rename one entry with "as".`,[e.INVALID_CHUNK_KEY]:e=>`"${e}" is not a valid chunk key. Chunk keys must be lowercase kebab-case matching /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/ (e.g. "main", "swatch-data"). Rename the chunk.`,[e.RESERVED_CHUNK_KEY]:()=>'"system" is a reserved chunk key used for presets and recipes. It cannot be user-defined and is auto-injected after validation. Please use a different key name.',[e.CONFLICTING_DATA_ENTRY]:(e,t,n,a)=>`"$data.${e}.${t}" is defined in both "${n}" and "${a}". Each data entry key can only be declared once per section. Move the entry into one file, delete the duplicate, or rename one entry.`,[e.INVALID_DATA_ENTRY_KEY]:(e,t)=>`"$data.${e}.${t}" is not a valid data entry key. Data entry keys must start with a letter, followed by letters, digits, or underscores (/^[A-Za-z]\\w*$/, e.g. "colorOptions" or "ColorOptions"). Rename the entry.`,[e.INVALID_DATA_DEFINITION_FIELD_KEY]:(e,t)=>`"$data.custom.${e}.definition.${t}" is not a valid field key. Definition field keys must match /^\\$?[a-z][\\w.-]*$/ — start with lowercase or "$", then letters, digits, "_", ".", or "-". Rename the field.`,[e.UNKNOWN_DATA_CHUNK]:(e,t,n)=>`"$data.${e}.${t}" references unknown chunk "${n}". The chunk reference must match a key declared under "chunks:". Add the chunk or update the entry chunk.`,[e.INVALID_DATA_VALUE]:(e,t,n,a)=>`"$data.custom.${e}.values[${t}].${n}" has an invalid value. Expected ${a}. Fix the value or update the field definition.`,[e.DEFAULTS_UNKNOWN_ENTITY_KEY]:(e,t)=>`Defaults declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.DEFAULTS_UNKNOWN_PROPERTY]:(e,t,n,a)=>{let i=n.length>0?n.join(", "):"(none)",s=a&&a.length>0?` Alias member(s) missing "${t}": ${a.join(", ")}.`:"";return`Default "${e}.${t}" refers to a property that does not exist on the shape of "${e}". Known properties: ${i}.${s} Remove the default or add "${t}" to the shape.`},[e.DEFAULTS_SCHEMA_VIOLATION]:(e,t,n,a,i)=>{let s=i?` (alias member "${i}")`:"",o=n&&"(root)"!==n?` at "${n}"`:"";return`Default "${e}.${t}"${s} does not match the entity shape${o}: ${a}. Defaults must be assignable to their shape property. Fix the value or update the shape.`},[e.DEFAULTS_INCOMPLETE]:(e,t,n)=>{let a=n.some(t=>t!==e)?` (declared under ${n.map(e=>`"${e}"`).join(", ")})`:"";return`Defaults for "${e}"${a} are incomplete: missing ${t.join(", ")}. Defaults for an entity type must state every property of its shape, because the recipe factory validates them as a whole entity when the application loads. Add the missing properties under "${e}" or under an alias that contains it, or remove the defaults for "${e}".`},[e.DEFAULTS_DEPRECATED]:()=>'The "defaults:" section is deprecated. Defaults remain supported for legacy parity, but new specs should model initial values as "$data" entries — see spec/application-specification/parsing/data-chunks.md. Defaults are planned for removal once the $data migration path is documented.',[e.COMPONENT_INVALID_INSTANCE_NAME]:(e,t,n)=>`Component instance name "${n}" in "${e}.${t}" is not a valid identifier. Instance names must start with a letter and contain only letters, digits, or underscores (e.g. "default", "body", "main"). Rename it.`,[e.COMPONENT_MERGE_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is defined in both "${a}" and "${i}". Each component instance can only appear in one file. Remove the duplicate.`,[e.COMPONENT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Components declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.READ_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$read binding "${a}" in "${e}.${t}.${n}" references field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the $read target.`,[e.COMPONENT_BINDING_TYPE_MISMATCH]:(e,t,n,a)=>`"${t}" at "${e}" reads a value of type ${n}, but the component expects ${a} there, so the generated code would not type-check. Read a field whose type fits, change the field's type, or compute the value in an expression.`,[e.COMPONENT_STATIC_ENTITY_ID]:(e,t,n)=>`"${e}" holds the value ${t} written in the spec, but the component expects ${n} there. An entity id is a branded type, so no value written in YAML is one and the generated code would not type-check. Read the id from the domain state with "$read" or "$bind" of a field or expression that holds it.`,[e.WRITE_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the target.`,[e.WRITE_BINDING_IMMUTABLE_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets implicit field "${i}". Implicit fields "id" and "type" are immutable and cannot be changed. Use $read to consume the field or choose a writable shape field.`,[e.WRITE_BINDING_EXPRESSION_TARGET]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets "${i}" which is an expression. Write targets must be entity shape fields, not expressions. Use $read for expression bindings, $write/$bind for shape fields.`,[e.WRITE_BINDING_DUPLICATE_TARGET]:(e,t,n,a,i,s)=>`Entity field "${a}" is written by both "${i}" and "${s}" in "${e}.${t}.${n}". Each entity field can only be written by one component property. Remove one of the bindings.`,[e.UNKNOWN_SRC_PATH]:e=>`File "${e}" is in an unknown src/ folder. Only known folders (expressions, actions, invariants, components, transformers, handlers, elements, webhooks, locales, admin/*, migrations) or _-prefixed shared folders are allowed. Move the file or rename the folder with a "_" prefix.`,[e.INVALID_SUBDIRECTORY]:(e,t)=>`File "${e}" is nested inside "${t}", but migrations must be flat. Move the migration file directly into "${t}" or prefix the folder with "_".`,[e.MISSING_WEBHOOK_INDEX]:()=>"Files found in src/webhooks/ but src/webhooks/index.ts is missing. The webhook entry point requires a default export from src/webhooks/index.ts. Create the file with a default export of your webhook handler.",[e.MODULE_ANALYSIS_FAILED]:(e,t)=>`Cannot analyze module "${e}": ${t}. Fix the file's syntax so its imports and webhook membership can be determined.`,[e.WEBHOOK_UNSAFE_IMPORT]:(e,t,n,a)=>`Webhook-included file "${e}" is not server-safe: it is included because ${t}, but "${n}" imports client-only "${a}". Fix: remove or isolate the client-only import, or remove the file's webhook membership.`,[e.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED]:()=>'"$eval" is not allowed in this position. "$eval" requires "self", which is only available inside expressions and component props — it is not available in static slots such as defaults. Replace the "$eval" with a literal value, "$msg", or move the dynamic logic into an "expressions:" entry.',[e.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED]:()=>'"$msg" is not allowed in this position. This slot does not accept localized messages (e.g. component props, which are resolved without an i18n context). Replace "$msg" with a plain string, or move the message into a slot that supports i18n such as defaults or expressions.',[e.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE]:e=>`Could not infer a schema from "$eval: ${e}" because the expression is not statically foldable. Add explicit schema keys to the expression entry, or use only literals, constant operators, and deterministic Math members.`,[e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED]:()=>'"$codeRef" with an inline "code" block is no longer supported by the application spec parser. It was never evaluated — the value was carried through as plain data. Use "$eval" instead, for example "$eval: \'4 * 25.4\'". "$eval" folds literals, constant operators, and deterministic Math members at parse time; anything else needs explicit schema keys.'};
|
|
1
|
+
import{DiagnosticCode as e}from"./diagnostic-codes.js";export const diagnosticMessages={[e.EMPTY_SPEC_FILE]:()=>'Spec file is empty. Every spec file must define at least one section ("model:", "components:", or "presets:"). Add content or remove the file.',[e.YAML_PARSE_ERROR]:e=>`YAML parse error: ${e}. Check for indentation issues, missing colons, or unquoted special characters.`,[e.NON_FINITE_NUMBER]:(e,t)=>`Invalid number at "${e}": ${t} is not a finite number. JSON, the schemas and the stored configuration have no infinite or not-a-number value, so it cannot be checked or saved. Write a finite number, or leave the key out if it sets no limit.`,[e.SCHEMA_PARSE_ERROR]:(e,t)=>`Invalid value at "${e}": ${t}. Refer to the spec documentation for the expected structure at this path.`,[e.IMPORT_MODULE_NOT_FOUND]:(e,t)=>`Import module "${e}" resolves to "${t}", but no matching project source file exists. Add the source file or update import.module to a path relative to this spec file.`,[e.IMPORT_MODULE_OUTSIDE_PROJECT]:(e,t)=>`Import module "${e}" resolves outside the project root as "${t}", so its target cannot be verified. Confirm that the external file exists and that the path is intentional.`,[e.MOCK_TEMPLATE_PARSE_ERROR]:e=>`Mock template parse warning: ${e}. The mock template was skipped. Fix the YAML or remove the file.`,[e.MERGE_CONFLICT]:(e,t,n,a)=>`"model.${e}.${t}" is defined in both "${n}" and "${a}". Each subsection (entityTypes, aliases, shapes, commonTypes) can only appear once per version. Move all "${t}" for "${e}" into one file.`,[e.MISSING_MODEL]:e=>`No "${e}" section found. Every application must define at least "${e}.latest" with entity types and aliases. Add a "${e}:" section to a spec file.`,[e.MISSING_LATEST]:e=>`"${e}.latest" is missing. The "latest" version defines the current working model and is always required. Add "latest:" under "${e}:".`,[e.INVALID_VERSION_KEY]:e=>`"${e}" is not a valid version key. Version keys must be "latest" or "v1", "v2", etc. Rename "${e}".`,[e.MISSING_VERSION]:e=>`Model version "v${e}" is missing. Versions must be contiguous (v1, v2, …, latest) with no gaps. Add "v${e}:" or remove higher versions.`,[e.NAME_CLASH]:(e,t,n)=>`Name "${t}" is used as both a ${e} and a ${n}. Names must be unique across entity types, aliases, and commonTypes within a version. Rename one of them.`,[e.INVALID_ENTITY_TYPE_NAME]:e=>`"${e}" is not a valid entity type name. Entity types must be PascalCase (e.g. "Product", "KitchenRange"). Rename it.`,[e.DUPLICATE_ENTITY_TYPE]:e=>`Entity type "${e}" is declared more than once. Entity types must be unique. Remove the duplicate.`,[e.INVALID_ALIAS_NAME]:e=>`"${e}" is not a valid alias name. Aliases must be PascalCase (e.g. "RootEntity", "EditableItems"). Rename it.`,[e.RESERVED_ALIAS_NAME]:e=>`"${e}" is a reserved alias. "AnyDomainEntity" is auto-generated from all entity types and cannot be user-defined. Choose a different name.`,[e.MISSING_ROOT_ENTITY]:()=>'"RootEntity" alias is not defined. Every model must have a "RootEntity" alias that identifies which entity types can be used as configuration roots. Add "RootEntity: [YourType]" to your aliases.',[e.CIRCULAR_ALIAS]:e=>`Circular alias reference: ${e}. An alias cannot reference itself, directly or through other aliases. Remove one reference in the cycle.`,[e.UNKNOWN_ALIAS_MEMBER]:(e,t)=>`Alias "${e}" references "${t}", which is not a declared entity type or alias. Check the spelling or add "${t}" to entityTypes.`,[e.UNKNOWN_SHAPE_KEY]:e=>`Shape "${e}" does not match any declared entity type or alias. Shapes can only be defined for names that appear in entityTypes or aliases. Check the spelling or add "${e}" to entityTypes.`,[e.UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not a declared entity type or alias. Check the spelling or add "${n}" to entityTypes.`,[e.RESERVED_PROPERTY]:(e,t)=>`Property "${e}" on "${t}" is reserved. "id" and "type" are injected automatically and cannot appear in shapes. Remove "${e}" from the shape.`,[e.INVALID_SHAPE_PROPERTY_NAME]:e=>`"${e}" is not a valid shape property name. Property names must match /^[a-z]\\w*$/ — start with a lowercase letter, then word characters only (e.g. "height", "positionX", "hoodId"). Rename the property.`,[e.UNKNOWN_PHX_DEFINITION]:(e,t)=>`$ref "${e}" references unknown phoenix type "${t}". Available built-in types include DomainEntityId, Localizable, MultilingualString. Check the spelling.`,[e.UNKNOWN_COMMON_TYPE_REF]:(e,t)=>`$ref "${e}" references unknown commonType "${t}". The target must be declared in commonTypes of the same model version. Check the spelling or add "${t}" to commonTypes.`,[e.INVALID_REF]:e=>`$ref "${e}" is not a recognized reference format. Use "phx:TypeName" for built-in types, "common:TypeName" for commonTypes, or "#/model/{version}/commonTypes/{name}" for explicit version refs.`,[e.MISSING_MIGRATION]:e=>`No migration file for v${e}. Every version from v2 onward needs a migration (src/migrations/v${e}.ts) that transforms state from the previous version. Create the file.`,[e.MIGRATION_INVALID_START]:e=>`Migration "${e}" starts below v2. v1 is the initial version with no predecessor to migrate from. Remove this file.`,[e.UNKNOWN_MIGRATION]:(e,t,n)=>`Migration "${e}" targets v${t}, but the latest model version is v${n}. There is no model version for this migration to apply to. Remove the file or add model version v${t}.`,[e.PROTECTED_SHAPE]:e=>`Shape "${e}" cannot be user-defined. This entity type is part of the built-in admin model and its shape is managed by the system. Remove this shape.`,[e.PROTECTED_ALIAS]:e=>`Alias "${e}" cannot be user-defined in admin files. "RootEntity" and "CommonAdminEntity" are managed by the built-in admin model. Choose a different name.`,[e.RESERVED_ALIAS]:e=>`Alias "${e}" is auto-generated and cannot be user-defined. Remove this alias definition.`,[e.ALIAS_INCLUDES_COMMON]:(e,t)=>`Alias "${e}" includes "${t}", which is a built-in admin entity type. User aliases cannot include built-in admin types. Remove "${t}" from the alias.`,[e.PROTECTED_INVARIANT]:(e,t)=>`Invariant "${e}.${t}" is a built-in common admin invariant and cannot be overridden. Remove this declaration; the built-in implementation is always applied.`,[e.PROTECTED_RELATION]:(e,t)=>`Relation "${e}.${t}" is a built-in common admin relation and cannot be overridden. Remove this declaration; the built-in relation is always applied.`,[e.PROTECTED_EXPRESSION]:(e,t)=>`Expression "${e}.${t}" is reserved for the built-in common admin spec and cannot be user-defined. Rename this expression.`,[e.PROTECTED_COMMON_TYPE]:e=>`Common type "${e}" is part of the built-in admin model and cannot be user-defined. Choose a different name.`,[e.PROTECTED_ENTITY_TYPE]:e=>`Entity type "${e}" is part of the built-in admin model and cannot be re-declared. Remove it from entityTypes.`,[e.PRESET_UNKNOWN_ROOT_ENTITY_TYPE]:(e,t)=>`Preset rootEntityType "${e}" is not allowed. Allowed root types: ${t.join(", ")}. Use one of these or update the RootEntity alias.`,[e.PRESET_UNKNOWN_ENTITY_TYPE]:(e,t,n)=>`Preset entity "${e}" has type "${t}", which is not a declared entity type. Declared types: ${n.join(", ")}. Fix the type or add "${t}" to entityTypes.`,[e.PRESET_INVALID_ENTITY_ID_FORMAT]:e=>`Entity ID "${e}" does not follow the required format. IDs must match "TypeName-N" (e.g. "Product-1", "Hood-42"). Rename it.`,[e.PRESET_MISSING_ROOT_ENTITY]:e=>`Preset declares rootEntityType "${e}" but no entity of that type exists in initialDomainEntities. Add an entity with type "${e}".`,[e.PRESET_MULTIPLE_ROOT_ENTITIES]:(e,t)=>`Preset has ${t} entities of type "${e}", but exactly one root entity is required. Remove the extra "${e}" entities.`,[e.PRESET_ENTITY_SCHEMA_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" (${t}) has invalid data at ${n}: ${a}. Fix the value to match the entity schema.`,[e.PRESET_DUPLICATE_ENTITY_ID]:e=>`Preset entity ID "${e}" is used more than once. Entity IDs must be unique in a preset. Rename or remove the duplicate entity.`,[e.PRESET_ENTITY_ID_TYPE_MISMATCH]:(e,t,n)=>`Preset entity "${e}" has type "${t}", but its ID starts with "${n}". IDs must use the entity type prefix. Rename the ID to start with "${t}-" or change the entity type.`,[e.PRESET_UNKNOWN_REFERENCE]:(e,t,n)=>`Preset entity "${e}" references "${n}" from "${t}", but no entity with that ID exists in the preset. Add the referenced entity or update the reference.`,[e.PRESET_REFERENCE_TYPE_MISMATCH]:(e,t,n,a,i)=>`Preset entity "${e}" references "${n}" from "${t}", but the referenced entity has type "${a}". Allowed target types: ${i.join(", ")}. Use a matching entity ID.`,[e.PRESET_RELATION_CARDINALITY_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" violates relation "${t}" cardinality "${n}". The relation resolves ${a} entities. Add or remove referenced entities so the relation matches its cardinality.`,[e.PRESET_COMPOSITION_MULTIPLE_PARENTS]:(e,t,n)=>`Preset entity "${e}" is composed by both "${t}" and "${n}". Composition must form one tree. Remove one parent reference.`,[e.PRESET_COMPOSITION_CYCLE]:e=>`Preset composition contains a cycle at "${e}". Composition must form a tree from the root entity. Remove the cyclic reference.`,[e.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Preset entity "${e}" is not reachable from root entity "${t}" through composedOf relations. Add a composition relation path from the root or remove the entity.`,[e.ADMIN_PRESET_MULTIPLE_PER_FILE]:(e,t)=>`Admin file "${e}" has ${t} presets. Only 1 preset per admin file is allowed. Split into separate files or merge into one preset.`,[e.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN]:(e,t)=>`Admin preset in "${e}" has rootEntityType "${t}". Admin presets must always use rootEntityType "Admin". Change it to "Admin".`,[e.ACTIONS_IN_ADMIN_FILE]:e=>`"${e}" is an admin spec file ("$admin: true") but declares "actions". Actions run in the configurator domain only; the admin domain has none. Move the "actions" block to a configurator spec file, or remove it.`,[e.INVALID_ACTION_NAME]:e=>`"${e}" is not a valid action name. Action names are camelCase identifiers without a prefix (e.g. "movePartBy", "swapCabinets"), since they also name the implementation, the generated types and the assistant mutation. Rename it.`,[e.ACTION_UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not an entity type or alias of the latest model. A "references" target types the entity id or entity the param or result member holds. Check the spelling or add "${n}" to entityTypes.`,[e.EXPRESSION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Expression key "${e}" is not a declared entity type or alias. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVALID_EXPRESSION_NAME]:e=>`"${e}" is not a valid expression name. Expression names must start with "$" followed by camelCase (e.g. "$price", "$isValid"). Rename it.`,[e.DUPLICATE_EXPRESSION]:(e,t,n,a)=>`Expression "${e}.${t}" is produced by both "${n}" and "${a}" after alias expansion. Expression names must be unique for each concrete entity type. Remove one declaration or rename it.`,[e.EXPRESSION_RELATION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "expressions:" and generated by a relation. User expressions cannot shadow relation-derived expressions. Remove the user declaration or rename the relation.`,[e.CONSTANTS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "constants:" and "expressions:" in the same file. Use only one source of truth and migrate the legacy constant into "expressions:".`,[e.COMPONENT_RELATION_CONFLICT]:(e,t)=>`Component "${e}::${t}" is declared in both "components:" and generated by a relation. User components cannot shadow relation-derived components. Remove the user declaration or rename the relation.`,[e.COMPONENT_ALIAS_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is produced by both "${a}" and "${i}". Component instance names must be unique after alias expansion. Rename one instance or move the shared properties to one declaration.`,[e.COMPONENT_IMPORT_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" uses unsupported $importRef "${i}#${s}". Application-spec component values are part of the webhook-included domain and cannot reference frontend modules. Fix: remove $importRef from the spec and attach the component from a frontend-only file in src/components.`,[e.COMPONENT_DATA_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" combines "$read: ${i}" with the legacy "$data: ${s}" marker. Application-spec components resolve "$read" against entity fields and declared expressions only, so the combined marker never becomes a binding. Fix: remove "$data" and implement "${i}" with createDataSwatchMap('${s.split(".").at(-1)??s}') in the project's custom expressions.`,[e.INVALID_INVARIANT_NAME]:e=>`"${e}" is not a valid invariant name. Invariant names must start with a lowercase letter and contain only word characters (e.g. "nameNotEmpty"). Rename it.`,[e.INVALID_VIOLATION_TYPE_NAME]:e=>`"${e}" is not a valid violation type. Violation types must start with a lowercase letter and contain only letters, digits, underscores, or hyphens (e.g. "name-empty"). Rename it.`,[e.INVARIANT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Invariants are declared for "${e}", which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVARIANT_MANUAL_VIOLATIONS_COMPONENT]:e=>`Component "violations" on "${e}" cannot be declared manually because invariant parsing generates it automatically. Remove the manual component declaration.`,[e.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.$violations" is declared in "${t}:" but invariant parsing generates it automatically for the same entity type. Remove the declaration or rename it.`,[e.INVALID_RELATION_NAME]:e=>`"${e}" is not a valid relation name. Relation names must start with "$" followed by camelCase (e.g. "$top", "$legs"). Rename it.`,[e.RELATION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Relations declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.RELATION_UNKNOWN_TARGET]:(e,t,n,a)=>`Relation "${e}.${t}" targets "${n}" which is not an entity type or alias in the model. Known names: ${a.join(", ")}. Check the spelling or add "${n}" to entityTypes.`,[e.RELATION_UNKNOWN_FIELD_DIRECT]:(e,t,n)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of "${e}". Add "${n}" to the "${e}" schema or pick a different field.`,[e.RELATION_UNKNOWN_FIELD_INDIRECT]:(e,t,n,a)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of target "${a}". Add "${n}" to the "${a}" schema or pick a different field.`,[e.RELATION_IMMUTABLE_FIELD]:(e,t,n,a)=>`Relation "${e}.${t}" uses implicit field "${n}" on "${a}" as a relation reference holder. Implicit fields "id" and "type" are immutable and cannot hold relation references. Choose a writable shape field on "${a}".`,[e.RELATION_FIELD_NOT_REFERENCE]:(e,t,n,a)=>`Relation "${e}.${t}" uses field "${n}" of "${a}", which is not a reference field. A relation reads the ids of its related entities from the field, so the field must be a "phx:DomainEntityId" with "references", such a reference or null, or an array of such references. Declare "${n}" that way in the shape of "${a}" or pick a different field.`,[e.RELATION_FIELD_REFERENCES_OTHER_TYPES]:(e,t,n,a,i,s,o)=>{let r=1===o.length&&o[0]===s?"":` (${o.join(", ")})`;return`Relation "${e}.${t}" uses field "${n}" of "${a}", which references ${i.join(", ")}, but the relation relates to "${s}"${r}. The field of a direct relation must reference exactly the entity types of its target, and the field of an indirect relation exactly the entity types the relation is declared on. Make "${a}.${n}" reference "${s}" or pick a different field.`},[e.RELATION_FIELD_CARDINALITY_MISMATCH]:(e,t,n,a,i,s)=>{let o={single:"one reference that is never null",nullableSingle:"one reference or null",array:"an array of references"};return`Relation "${e}.${t}" has cardinality "${a}", which needs a field that holds ${o[s]}, but "${e}.${n}" holds ${o[i]}. A direct relation with cardinality "1-1" reads one reference that is never null, "0-1" one reference or null, and "0-N" or "1-N" an array of references. Change the cardinality or the schema of "${n}".`},[e.RELATION_MISSING_COUNTERPART]:(e,t,n,a,i,s)=>{let o=void 0!==i?` with field "${i}"`:"",r=s?`Set "composedOf: false" on the counterpart because "${e}.${t}" already owns the composition.`:'Set "composedOf: false" on the counterpart for a cross-reference, or "composedOf: true" if the counterpart should own the composition.';return`Relation "${e}.${t}" (${n} → "${a}"${void 0!==i?`, field "${i}"`:""}) has no counterpart on "${a}". Every relation must be declared from both sides — add a "${"allOfType"===n?"allOfType":"direct"===n?"indirect":"direct"}" relation on "${a}" targeting "${e}"${o}. ${r}`},[e.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH]:(e,t,n,a)=>`Relation "${e}.${t}" and its counterpart "${n}.${a}" both use "composedOf: true". A relation pair can have at most one composition owner — set "composedOf: false" on one side.`,[e.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Entity "${e}" is not reachable from any root entity type (${t.join(", ")}) via "composedOf: true" relations. Every declared entity must be part of the composition tree, otherwise instances of it can never appear in a valid domain state. Add a relation with "composedOf: true" from a reachable parent, or include "${e}" in the RootEntity alias.`,[e.DUPLICATE_DATA_SCHEMA]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each data schema can only be declared in one file. Remove the duplicate.`,[e.ADMIN_DATA_SCHEMA]:(e,t)=>`"${e}" is declared in admin spec "${t}". Data schemas are configurator-only. Move "${e}" to a non-admin spec file.`,[e.SESSION_DATA_REQUIRED_PROPERTIES]:(e,t)=>`sessionData in "${t}" declares required properties (${e.map(e=>`"${e}"`).join(", ")}), but admin and preset sessions do not carry custom session data. Remove these properties from required or set required to an empty array.`,[e.CLERK_SESSION_DATA_INCOMPATIBLE]:e=>`sessionData is not compatible with the built-in Clerk session payload: ${e.join("; ")}. When "useClerk" is true, the SDK's Clerk auth handlers return { id: string, accessToken: string, tags: string[], emailAddress: string, fullName: string | null }, and runtime session parsing rejects any payload the schema does not accept. Declare all five properties with these exact types (the "type" keyword is compared literally, so $ref, anyOf, and oneOf forms are not recognized) and keep them out of "required" so anonymous sessions stay valid. Extra project-defined properties are allowed.`,[e.RESERVED_PUBLISHED_DATA_KEY]:e=>`publishedData property "${e}" is reserved by the admin system. Properties like "presetCategories" and "recipes" are auto-injected. Remove "${e}" from your publishedData properties.`,[e.DUPLICATE_STATE_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each state field can only be declared in one file. Remove the duplicate.`,[e.INVALID_STATE_KEY]:(e,t)=>`State key "${t}" in "${e}" is not a valid identifier. State keys must start with a letter and contain only letters, digits, or underscores (e.g. "overview", "detailView"). Rename it.`,[e.DUPLICATE_STATE_VALUE]:(e,t)=>`State value "${t}" appears more than once in "${e}". Each value within a state array must be unique. Remove the duplicate.`,[e.DUPLICATE_THEME_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each theme field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_UI_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each UI field can only be declared in one file. Remove the duplicate.`,[e.CONFLICTING_TRANSFORMERS]:(e,t)=>`Transformers are declared in both "${e}" and "${t}". The "transformers" section can only appear in one spec file. Move all transformers into a single file.`,[e.DUPLICATE_TRANSFORMER]:(e,t)=>`Transformer "${e}" is declared twice in "${t}". Transformer names must be unique within the file. Remove the duplicate entry.`,[e.DUPLICATE_TRANSFORMER_FILE]:(e,t)=>`Transformer files "${e}" and "${t}" resolve to the same transformer name. Transformers are matched by file name, ignoring folders, letter case, and dashes. Rename one of the files so every transformer file name is unique.`,[e.UNMATCHED_TRANSFORMER]:(e,t)=>`Transformer "${e}" has no matching file in "src/transformers/". Every name listed under "transformers:" must correspond to a transformer module. ${t.length>0?`Available transformers: ${t.map(e=>`"${e}"`).join(", ")}. Check the spelling or add "src/transformers/${e}.ts".`:`No transformer files were found in "src/transformers/". Add "src/transformers/${e}.ts" or remove the entry.`}`,[e.DUPLICATE_APP_METADATA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each metadata field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_INFRA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each infrastructure field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_RESOURCE_NAME]:(e,t,n)=>`Resource name "${e}" is used by the entries at index ${t} and ${n} of "resources". A resource name identifies one resource. Rename one of the two entries or remove the duplicate.`,[e.INVALID_APPLICATION_VERSION]:e=>`"${e}" is not a valid applicationVersion. Version must be semver (x.y.z) using three numeric segments (e.g. "1.0.0", "2.3.12"). Update "applicationVersion" to match.`,[e.INVALID_ENV_VAR_KEY]:(e,t)=>`"${t}" is not a valid env.${e} variable name. Env var names must match /^[A-Z_][A-Z0-9_]*$/ — uppercase letters, digits, and underscores; must not start with a digit (e.g. "API_URL", "_PRIVATE_FLAG"). Rename the variable.`,[e.DUPLICATE_ADMIN_PAGES]:(e,t)=>`"$adminPages" is defined in both "${e}" and "${t}". Admin pages can only be declared in one admin spec file. Move all "$adminPages" settings into one admin file.`,[e.ADMIN_PAGES_NAV_STATE_CONFLICT]:e=>`Admin navigation states [${e.join(", ")}] are declared manually and generated from "$adminPages". Remove the manual entries from "navigationStates" in the admin spec or change the "$adminPages" navigationState values.`,[e.ADMIN_PAGE_DATA_ENTRY_CONFLICT]:(e,t)=>`"$adminPages.pages.${e}.connectedDataEntry" references data entry "${t}". This data entry already creates an inferred admin data page. Remove the explicit admin page connection or change the data entry kind.`,[e.CONFLICTING_BUDGETS]:(e,t)=>`"budgets" is declared in both "${e}" and "${t}". The "budgets" section can only appear in one spec file. Move all bundle-size budgets into a single file.`,[e.CONFLICTING_CHUNKS]:(e,t)=>`"chunks" is declared in both "${e}" and "${t}". The "chunks" section can only appear in one spec file. Move all chunk definitions into a single file.`,[e.CONFLICTING_ASSISTANT]:(e,t)=>`"assistant" is declared in both "${e}" and "${t}". The "assistant" manifest can only appear in one spec file. Move the whole "assistant" section into a single file.`,[e.ASSISTANT_UNKNOWN_TYPE]:(e,t)=>`"assistant.${e}.${t}" does not name an entity type or alias of the latest model, so it has nothing to ${({entities:"expose",deletable:"make deletable",writable:"make writable",childRecipes:"add children to",replaceRecipes:"replace"})[e]}. Use an entity type or alias name from "model.latest", or remove the entry.`,[e.ASSISTANT_UNKNOWN_FIELD]:(e,t,n)=>n.startsWith("$")?`"assistant.entities.${t}.${n}" is not an expression declared on "${t}". The assistant schema exposes expressions declared in "expressions", "constants" or "relations" on the entity type or alias itself, and on an entity type also those of its aliases; an expression only inferred from a component "$read" is not declared. Declare "${n}" in "expressions", "constants" or "relations" on "${t}" (for an entity type, an alias containing it also works), or remove the entry.`:`"assistant.${e}.${t}.${n}" is not a stored field of "${t}". The assistant schema ${"entities"===e?"exposes":"writes"} shape properties of the entity type or alias, including fields every alias member has. Use a property from the "${t}" shape, or remove the entry.`,[e.ASSISTANT_UNSUPPORTED_EXPRESSION]:(e,t)=>`"assistant.entities.${e}.${t}" whitelists the "$violations" expression, which the assistant schema does not expose yet: violations get their own typed edge in CON-2869. Remove the entry.`,[e.ASSISTANT_NOT_WRITABLE]:(e,t)=>`"assistant.writable.${e}.${t}" cannot be written: ${t.startsWith("$")?"an expression is computed from the state, not stored":`"${t}" identifies the entity and never changes`}. Only stored shape properties other than "id" and "type" can be writable. Remove the entry${t.startsWith("$")?", or make the stored fields the expression reads writable instead":""}.`,[e.ASSISTANT_UNKNOWN_RECIPE_GROUP]:({section:e,component:t},n,a,i,s)=>`"assistant.${e}.${n}.groups.${a}" does not name a "${t}" component instance on "${i}", so there are no recipes to expose. ${s.length>0?`"${i}" has these "${t}" instances: ${s.join(", ")}.`:`"${i}" has no "${t}" component.`} Use the instance name of a "${t}" component attached to the entity type or to an alias containing it, or remove the entry.`,[e.ASSISTANT_DUPLICATE_RECIPE_GROUP]:({section:e,mutation:t},n,a,i)=>`"${n}" gets the recipe group id "${a}" from both "assistant.${e}.${i.join(`" and "assistant.${e}.`)}", but "${t}" finds a group of an entity by its id. The entries may come from "${n}" itself or from aliases containing it. Give one of them another id with "as".`,[e.ASSISTANT_META_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a recipe group or the options of a field on "${e}", so the assistant schema generates the type "${t}" for them, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.childRecipes" and "assistant.replaceRecipes" group and every "options" of a writable field of "${e}".`,[e.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT]:(e,{componentType:t,instanceName:n},a,i)=>`"assistant.writable.${e}.options" names the "${t}" instance "${n}", which "${a}" does not have, so there are no choices to list. ${i.length>0?`"${a}" has these "${t}" instances: ${i.join(", ")}.`:`"${a}" has no "${t}" component.`} Use the name of a "${t}" instance attached to the entity type or to an alias containing it, correct "componentType", or remove "options".`,[e.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME]:(e,t,n)=>`"assistant.writable.${e}.options" would add the edge "${t}" to the meta type, but that name is taken by a recipe groups edge. Name the edge differently with "as", e.g. "as: ${n}Choices".`,[e.ASSISTANT_DUPLICATE_OPTIONS_EDGE]:(e,t,n)=>`"${e}" gets ${"edgeName"in t?`the options edge "${t.edgeName}"`:`options for the field "${t.field}"`} from both "assistant.writable.${n.join('.options" and "assistant.writable.')}.options", but ${"edgeName"in t?"one edge lists the choices of one field":"a written value is checked against one list of choices"}. The entries may come from "${e}" itself or from aliases containing it. ${"edgeName"in t?'Give one of them another name with "as", or remove':"Remove"} "options" from one of them.`,[e.ASSISTANT_UNKNOWN_ACTION]:(e,t)=>`"assistant.actions.${e}" does not name an action declared under "actions"${t.length>0?`; the declared actions are: ${t.join(", ")}`:"; the spec declares no actions"}. Declare the action in an "actions" block of a spec file and implement it in src/actions/, or remove the entry.`,[e.ASSISTANT_MUTATION_NAME_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", which ${n}. One Mutation field runs one change. Expose the action under another name with "as", e.g. "as: ${t}Action".`,[e.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", so the assistant schema generates the type "${n}" for its result, but that name is taken by an entity type, alias, generated meta type, built-in type or another action's result. Expose the action under another name with "as", or rename the conflicting type.`,[e.ASSISTANT_UNKNOWN_LENS]:(e,t,n)=>`"assistant.entities.${e}" is tagged with the lens "${t}", which is not declared under "assistant.lenses"${n.length>0?`; the declared lenses are: ${n.join(", ")}`:"; the manifest declares no lenses"}. Declare "${t}" under "assistant.lenses" with a "description", or remove the tag.`,[e.ASSISTANT_EMPTY_LENS]:e=>`"assistant.lenses.${e}" is declared, but no entry under "assistant.entities" is tagged with it, so the agent would be offered a lens that selects nothing. Tag the fields and expressions of the lens with "lenses: [${e}]", or remove the lens.`,[e.ASSISTANT_RESERVED_LENS_NAME]:(e,t)=>`"assistant.lenses.${e}" has the name of a built-in lens (${t.join(", ")}), which the assistant schema defines itself. Rename the lens and the tags that name it.`,[e.ASSISTANT_FIELD_SHAPE_CONFLICT]:(e,t)=>`The assistant schema exposes "${e}" in shapes that cannot be read together: ${t.map(({typeName:e,type:t})=>`${t} on "${e}"`).join(", ")}. A query that reaches entities of several types, such as "entities" or a lens, selects the field on all of them at once, and in GraphQL a single entity, a list of entities and a plain value cannot share a name. One name meaning different kinds of thing is an unusual model and confuses the assistant as well. Expose one of the entries under another name with "as".`,[e.ASSISTANT_RESERVED_FIELD_NAME]:(e,t,n)=>`"assistant.entities.${e}.${t}" is exposed as "${n}", which the assistant schema reserves ("id", "type" and "meta" are reserved on every type). Expose it under another name with "as", e.g. "as: ${t}Value".`,[e.ASSISTANT_FIELD_NAME_CONFLICT]:(e,t,n,a)=>void 0===a?`"${t}" on "${e}" in the assistant schema maps to both "${n.join('" and "')}", but one GraphQL field can read only one stored field or expression. The entries may come from "${e}" itself or from aliases containing it. Rename one of them with "as".`:`"assistant.writable.${a}" makes "${t}" writable on "${e}" without exposing it, so its delta field would be named "${t}", but "assistant.entities" already exposes "${n[0]}" on "${e}" under that name. One name cannot read one stored field or expression and write another. Expose "${t}" in "assistant.entities" under another name with "as", or rename the entry that exposes "${n[0]}".`,[e.ASSISTANT_RESERVED_TYPE_NAME]:(e,t)=>`"${e}" is an entity type or alias name that the assistant GraphQL schema reserves for its own types (${t.join(", ")}), so the schema cannot be generated. Rename the entity type or alias, or remove the "assistant" section.`,[e.ASSISTANT_INVALID_SCHEMA]:e=>`The GraphQL schema generated from the "assistant" manifest is invalid: ${e.join(" ")} This usually means aliases sharing an entity whitelist the same field with different types. Whitelist the field on one alias only, or rename one entry with "as".`,[e.INVALID_CHUNK_KEY]:e=>`"${e}" is not a valid chunk key. Chunk keys must be lowercase kebab-case matching /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/ (e.g. "main", "swatch-data"). Rename the chunk.`,[e.RESERVED_CHUNK_KEY]:()=>'"system" is a reserved chunk key used for presets and recipes. It cannot be user-defined and is auto-injected after validation. Please use a different key name.',[e.CONFLICTING_DATA_ENTRY]:(e,t,n,a)=>`"$data.${e}.${t}" is defined in both "${n}" and "${a}". Each data entry key can only be declared once per section. Move the entry into one file, delete the duplicate, or rename one entry.`,[e.INVALID_DATA_ENTRY_KEY]:(e,t)=>`"$data.${e}.${t}" is not a valid data entry key. Data entry keys must start with a letter, followed by letters, digits, or underscores (/^[A-Za-z]\\w*$/, e.g. "colorOptions" or "ColorOptions"). Rename the entry.`,[e.INVALID_DATA_DEFINITION_FIELD_KEY]:(e,t)=>`"$data.custom.${e}.definition.${t}" is not a valid field key. Definition field keys must match /^\\$?[a-z][\\w.-]*$/ — start with lowercase or "$", then letters, digits, "_", ".", or "-". Rename the field.`,[e.UNKNOWN_DATA_CHUNK]:(e,t,n)=>`"$data.${e}.${t}" references unknown chunk "${n}". The chunk reference must match a key declared under "chunks:". Add the chunk or update the entry chunk.`,[e.INVALID_DATA_VALUE]:(e,t,n,a)=>`"$data.custom.${e}.values[${t}].${n}" has an invalid value. Expected ${a}. Fix the value or update the field definition.`,[e.DEFAULTS_UNKNOWN_ENTITY_KEY]:(e,t)=>`Defaults declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.DEFAULTS_UNKNOWN_PROPERTY]:(e,t,n,a)=>{let i=n.length>0?n.join(", "):"(none)",s=a&&a.length>0?` Alias member(s) missing "${t}": ${a.join(", ")}.`:"";return`Default "${e}.${t}" refers to a property that does not exist on the shape of "${e}". Known properties: ${i}.${s} Remove the default or add "${t}" to the shape.`},[e.DEFAULTS_SCHEMA_VIOLATION]:(e,t,n,a,i)=>{let s=i?` (alias member "${i}")`:"",o=n&&"(root)"!==n?` at "${n}"`:"";return`Default "${e}.${t}"${s} does not match the entity shape${o}: ${a}. Defaults must be assignable to their shape property. Fix the value or update the shape.`},[e.DEFAULTS_INCOMPLETE]:(e,t,n)=>{let a=n.some(t=>t!==e)?` (declared under ${n.map(e=>`"${e}"`).join(", ")})`:"";return`Defaults for "${e}"${a} are incomplete: missing ${t.join(", ")}. Defaults for an entity type must state every property of its shape, because the recipe factory validates them as a whole entity when the application loads. Add the missing properties under "${e}" or under an alias that contains it, or remove the defaults for "${e}".`},[e.DEFAULTS_DEPRECATED]:()=>'The "defaults:" section is deprecated. Defaults remain supported for legacy parity, but new specs should model initial values as "$data" entries — see spec/application-specification/parsing/data-chunks.md. Defaults are planned for removal once the $data migration path is documented.',[e.COMPONENT_INVALID_INSTANCE_NAME]:(e,t,n)=>`Component instance name "${n}" in "${e}.${t}" is not a valid identifier. Instance names must start with a letter and contain only letters, digits, or underscores (e.g. "default", "body", "main"). Rename it.`,[e.COMPONENT_MERGE_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is defined in both "${a}" and "${i}". Each component instance can only appear in one file. Remove the duplicate.`,[e.COMPONENT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Components declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.READ_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$read binding "${a}" in "${e}.${t}.${n}" references field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the $read target.`,[e.COMPONENT_BINDING_TYPE_MISMATCH]:(e,t,n,a)=>`"${t}" at "${e}" reads a value of type ${n}, but the component expects ${a} there, so the generated code would not type-check. Read a field whose type fits, change the field's type, or compute the value in an expression.`,[e.COMPONENT_STATIC_ENTITY_ID]:(e,t,n)=>`"${e}" holds the value ${t} written in the spec, but the component expects ${n} there. An entity id is a branded type, so no value written in YAML is one and the generated code would not type-check. Read the id from the domain state with "$read" or "$bind" of a field or expression that holds it.`,[e.EXPRESSION_READ_TYPE_CONFLICT]:(e,t,n,a)=>`Expression "${t}" of "${e}" ${void 0===n?"":`is declared as ${n} and `}is read where components expect ${a.join(", and ")}. No value is of all these types, so its implementation cannot type-check. Read the expression only where its type fits, declare the type the components expect, or read another expression there.`,[e.EXPRESSION_VALUE_TYPE_MISMATCH]:(e,t,n)=>`Expression "${e}" holds a value of type ${t}, but its schema declares ${n}, so the generated code would not type-check. A "$msg" is a message descriptor: declare the expression as "$ref: phx:Localizable" or "$ref: phx:MessageDescriptor", or change the value.`,[e.WRITE_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the target.`,[e.WRITE_BINDING_IMMUTABLE_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets implicit field "${i}". Implicit fields "id" and "type" are immutable and cannot be changed. Use $read to consume the field or choose a writable shape field.`,[e.WRITE_BINDING_EXPRESSION_TARGET]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets "${i}" which is an expression. Write targets must be entity shape fields, not expressions. Use $read for expression bindings, $write/$bind for shape fields.`,[e.WRITE_BINDING_DUPLICATE_TARGET]:(e,t,n,a,i,s)=>`Entity field "${a}" is written by both "${i}" and "${s}" in "${e}.${t}.${n}". Each entity field can only be written by one component property. Remove one of the bindings.`,[e.UNKNOWN_SRC_PATH]:e=>`File "${e}" is in an unknown src/ folder. Only known folders (expressions, actions, invariants, components, transformers, handlers, elements, webhooks, locales, admin/*, migrations) or _-prefixed shared folders are allowed. Move the file or rename the folder with a "_" prefix.`,[e.INVALID_SUBDIRECTORY]:(e,t)=>`File "${e}" is nested inside "${t}", but migrations must be flat. Move the migration file directly into "${t}" or prefix the folder with "_".`,[e.MISSING_WEBHOOK_INDEX]:()=>"Files found in src/webhooks/ but src/webhooks/index.ts is missing. The webhook entry point requires a default export from src/webhooks/index.ts. Create the file with a default export of your webhook handler.",[e.MODULE_ANALYSIS_FAILED]:(e,t)=>`Cannot analyze module "${e}": ${t}. Fix the file's syntax so its imports and webhook membership can be determined.`,[e.WEBHOOK_UNSAFE_IMPORT]:(e,t,n,a)=>`Webhook-included file "${e}" is not server-safe: it is included because ${t}, but "${n}" imports client-only "${a}". Fix: remove or isolate the client-only import, or remove the file's webhook membership.`,[e.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED]:()=>'"$eval" is not allowed in this position. "$eval" requires "self", which is only available inside expressions and component props — it is not available in static slots such as defaults. Replace the "$eval" with a literal value, "$msg", or move the dynamic logic into an "expressions:" entry.',[e.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED]:()=>'"$msg" is not allowed in this position. This slot does not accept localized messages (e.g. component props, which are resolved without an i18n context). Replace "$msg" with a plain string, or move the message into a slot that supports i18n such as defaults or expressions.',[e.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE]:e=>`Could not infer a schema from "$eval: ${e}" because the expression is not statically foldable. Add explicit schema keys to the expression entry, or use only literals, constant operators, and deterministic Math members.`,[e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED]:()=>'"$codeRef" with an inline "code" block is no longer supported by the application spec parser. It was never evaluated — the value was carried through as plain data. Use "$eval" instead, for example "$eval: \'4 * 25.4\'". "$eval" folds literals, constant operators, and deterministic Math members at parse time; anything else needs explicit schema keys.'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rebaseProjectModule as t}from"../../../core/index.js";export class CodeImports{imports=new Map;typeImports=new Map;addImport(t,e){let o=this.imports.get(t)??new Set;this.imports.set(t,o),o.add(e)}addTypeImport(t,e){let o=this.typeImports.get(t)??new Set;this.typeImports.set(t,o),o.add(e)}toTypeOnlyString(
|
|
1
|
+
import{rebaseProjectModule as t}from"../../../core/index.js";import{toSingleQuotedString as e}from"./single-quoted-string.js";export class CodeImports{imports=new Map;typeImports=new Map;addImport(t,e){let o=this.imports.get(t)??new Set;this.imports.set(t,o),o.add(e)}addTypeImport(t,e){let o=this.typeImports.get(t)??new Set;this.typeImports.set(t,o),o.add(e)}toTypeOnlyString(o){let r=new Map;for(let[t,e]of this.imports){let o=r.get(t)??new Set;for(let s of(r.set(t,o),e))o.add(s)}for(let[t,e]of this.typeImports){let o=r.get(t)??new Set;for(let s of(r.set(t,o),e))o.add(s)}return[...r.entries()].map(([r,s])=>{let p=o?t(r,o):r;return`import type { ${[...s].sort().join(", ")} } from ${e(p)}`}).join("\n")}toString(){let t=[];for(let[o,r]of this.imports){let s=this.typeImports.get(o),p=[...r].filter(t=>!s?.has(t)).sort(),i=s?[...s].filter(t=>!r.has(t)).sort():[];p.length>0&&t.push(`import { ${p.join(", ")} } from ${e(o)}`),i.length>0&&t.push(`import type { ${i.join(", ")} } from ${e(o)}`)}for(let[o,r]of this.typeImports)this.imports.has(o)||t.push(`import type { ${[...r].sort().join(", ")} } from ${e(o)}`);return t.join("\n")}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const generateEnvReader=
|
|
2
|
-
${
|
|
1
|
+
import{toSingleQuotedString as e}from"./single-quoted-string.js";export const generateEnvReader=t=>{let i=Object.keys(t);if(0===i.length)return{imports:[],config:"{}"};let l=new Set,n=i.map(i=>{let n=t[i];l.add(n.type);let f=[];if("default"in n){let t="string"==typeof n.default?e(n.default):n.default;f.push(`default: ${t}`)}else!0!==n.required&&f.push("default: undefined");if("devDefault"in n){let t="string"==typeof n.devDefault?e(n.devDefault):n.devDefault;f.push(`devDefault: ${t}`)}if(n.choices){let t=`[${n.choices.map(e).join(", ")}]`;f.push(`choices: ${t}`)}let r=f.length>0?`{ ${f.join(", ")} }`:"{}";return` ${i}: ${n.type}(${r}),`});return{imports:Array.from(l).sort(),config:`{
|
|
2
|
+
${n.join("\n")}
|
|
3
3
|
}`}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./application-type-imports.js";export*from"./code-imports.js";export*from"./exported-type-declarations.js";export*from"./env-reader.js";export*from"./file-headers.js";export*from"./project-module-list.js";
|
|
1
|
+
export*from"./application-type-imports.js";export*from"./code-imports.js";export*from"./exported-type-declarations.js";export*from"./env-reader.js";export*from"./file-headers.js";export*from"./project-module-list.js";export*from"./single-quoted-string.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes a string as a single-quoted TypeScript string literal. Backslashes, single quotes and line
|
|
3
|
+
* terminators are escaped, so any string gives a valid literal; a string without them comes out as
|
|
4
|
+
* `'value'`, as the templates write it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const toSingleQuotedString: (value: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let u={"\\":"\\\\","'":"\\'","\n":"\\n","\r":"\\r","\u2028":"\\u2028","\u2029":"\\u2029"};export const toSingleQuotedString=e=>`'${e.replace(/[\\'\n\r\u2028\u2029]/g,e=>u[e])}'`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GeneratedApplicationFile as n}from"../../core/index.js";import{
|
|
1
|
+
import{GeneratedApplicationFile as n}from"../../core/index.js";import{encodeRuntimeSpec as e,toRuntimeSpec as i}from"../runtime-spec/index.js";import{createApplicationTypeImportRegistrar as o}from"./common/index.js";import{generateAdminGlobalBindingBlock as t,generateApplicationSpecAdminCode as a,generateApplicationSpecAdminFrontendCode as r,generateApplicationSpecAdminGlobals as s,generateApplicationSpecCodeFile as d,generateApplicationSpecConfiguratorCode as c,generateApplicationSpecConfiguratorConfig as p,generateApplicationSpecConfiguratorFrontendCode as m,generateApplicationSpecConfiguratorGlobals as g,generateApplicationSpecDomainFile as l,generateApplicationSpecDomainSpecFile as f,generateApplicationSpecGlobals as u,generateApplicationSpecMessagesFile as B,generateApplicationSpecTypesModule as x,generateConfiguratorGlobalBindingBlock as h,generateImportedStateConstants as k,generatePhxExportsBlock as y,generatePhxGlobalsBlock as C,generateStateConstants as b}from"./templates/index.js";import{splitWebhookMembership as D}from"./webhook-safe-files.js";let j=()=>"";export const globalPhxBindingStrategy={generateApplicationTypesFile:(e,i)=>n("globals.d.ts",u(e,i)),generateDomainBindingBlock:C,generateStateConstants:b,generateConfiguratorBindingBlock:h,configuratorBindingDescription:"Creates the configurator interface and sets phx.frontend — must run before any user code imports.",generateAdminBindingBlock:t,adminBindingDescription:"Creates the admin interface and sets phx.frontend.admin — must run before admin user code imports."};export const modulePhxBindingStrategy={applicationTypeImportSource:"./application-types.js",generateApplicationTypesFile:(e,i)=>n("application-types.ts",x(e,i)),generateDomainBindingBlock:y,generateStateConstants:k,generateConfiguratorBindingBlock:j,configuratorBindingDescription:"Creates and exports the configurator interface for a module-scoped phx binding.",generateAdminBindingBlock:j,adminBindingDescription:"Creates and exports the admin interface for a module-scoped phx binding."};let S=n=>n.map(n=>n.file.name);export const generateDomainRuntimeFiles=(t,u)=>{let{applicationSpec:x,categorizedFiles:h,phxDefinitions:k,includeDefaultEnvs:y}=t,C=o(u.applicationTypeImportSource),b=S(h.expressions),j=S(h.actions),A=S(h.handlers),F=S(h.elements),I=S(h.transformers),T=S(h.invariants),w=S(h.adminInvariants),v=S(h.adminExpressions),E=S(h.adminElements),O=D(h.components),P=S(O.webhookIncluded),R=S(O.frontendOnly),q=D(h.adminComponents),z=S(q.webhookIncluded),G=S(q.frontendOnly);return[n("domain-spec.ts",f(x,{generateBindingBlock:u.generateDomainBindingBlock,generateStateConstants:u.generateStateConstants,registerApplicationTypeImports:C})),n("configurator-globals.ts",g(u.generateConfiguratorBindingBlock,u.configuratorBindingDescription)),n("configurator-domain-code.ts",c({expressionFiles:b,actionFiles:j,invariantFiles:T,componentFiles:P})),n("configurator-frontend-code.ts",m({transformerFiles:I,handlerFiles:A,elementFiles:F,componentFiles:R})),n("admin-domain-code.ts",a({adminExpressionFiles:v,adminInvariantFiles:w,adminComponentFiles:z})),n("admin-frontend-code.ts",r({adminElementFiles:E,adminComponentFiles:G})),n("spec-code.ts",d(x,C)),n("spec-messages.ts",B(x)),n("domain.ts",l(x)),n("configurator-config.ts",p(x,{includeDefaultEnvs:y})),u.generateApplicationTypesFile(x,k),n("admin-globals.ts",s(u.generateAdminBindingBlock,u.adminBindingDescription)),n("application-spec.json",e(i(x)),{format:!1})]};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generates the files that configure the generated project itself.
|
|
3
3
|
*
|
|
4
4
|
* Membership criterion: a file belongs to this group when it describes the project rather than the
|
|
5
|
-
* application —
|
|
5
|
+
* application — toolchain configuration, formatting rules, agent skills, and
|
|
6
6
|
* the initial content a fresh project starts with. Nothing here is imported by the running
|
|
7
7
|
* configurator or served by the deployed application.
|
|
8
8
|
*
|
|
@@ -24,12 +24,12 @@ export declare const agentSkillRoots: readonly ['.claude/skills', '.agents/skill
|
|
|
24
24
|
/**
|
|
25
25
|
* Inputs required by generated-project configuration and initial project files.
|
|
26
26
|
*
|
|
27
|
-
* The SDK version
|
|
28
|
-
* CLI flag override the spec's workspace mode
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* SDK block can be stripped from them, and whether the root `tsconfig.json`
|
|
32
|
-
* versions generated, so
|
|
27
|
+
* The SDK version and the workspace mode decide whether the agent skills tell the agent to follow the
|
|
28
|
+
* canary builds; `cliUseWorkspace` lets an explicit CLI flag override the spec's workspace mode. The
|
|
29
|
+
* categorized files carry the project's existing `.gitignore` so its template can merge rather than
|
|
30
|
+
* clobber, the legacy cursor rules and `CLAUDE.md` so the
|
|
31
|
+
* SDK block can be stripped from them, and whether the root `tsconfig.json`, `eslint.config.js` and
|
|
32
|
+
* `prettier.config.js` are the ones earlier SDK versions generated, so they can be replaced.
|
|
33
33
|
*
|
|
34
34
|
* `projectInGitRepository` says whether the project folder is inside a git work tree. `.gitignore` is
|
|
35
35
|
* generated only then: a project that is not under git has no use for the file, and one it already
|
|
@@ -43,8 +43,6 @@ export interface GenerateProjectScaffoldingOptions {
|
|
|
43
43
|
readonly sdkVersion: string;
|
|
44
44
|
readonly projectInGitRepository?: boolean;
|
|
45
45
|
readonly cliUseWorkspace?: boolean;
|
|
46
|
-
readonly name?: string;
|
|
47
|
-
readonly description?: string;
|
|
48
46
|
}
|
|
49
47
|
/**
|
|
50
48
|
* Project-root file buckets produced independently from the application runtime files, and the
|
|
@@ -53,10 +51,9 @@ export interface GenerateProjectScaffoldingOptions {
|
|
|
53
51
|
* The buckets are kept apart because they carry different write intent, which the caching layer
|
|
54
52
|
* acts on: `phoenixFiles` are paths relative to `.phoenix/` and join the application files there,
|
|
55
53
|
* rewritten whenever they differ and removed with the rest of the folder's stale output;
|
|
56
|
-
* `generatedProjectFiles` are content-diffed and rewritten whenever they differ,
|
|
57
|
-
* `initialProjectFiles` are written only when absent and are the project's to edit afterwards
|
|
58
|
-
* `
|
|
59
|
-
* output it formats. `removedProjectFiles` lists project-relative paths of files earlier SDK versions
|
|
54
|
+
* `generatedProjectFiles` are content-diffed and rewritten whenever they differ, and
|
|
55
|
+
* `initialProjectFiles` are written only when absent and are the project's to edit afterwards.
|
|
56
|
+
* `removedProjectFiles` lists project-relative paths of files earlier SDK versions
|
|
60
57
|
* generated that must no longer exist. As in the generated application bundle these buckets flow
|
|
61
58
|
* into, they express that intent without implementing the write behavior themselves.
|
|
62
59
|
*/
|
|
@@ -64,7 +61,6 @@ export interface GeneratedProjectScaffolding {
|
|
|
64
61
|
readonly phoenixFiles: readonly GeneratedApplicationFile[];
|
|
65
62
|
readonly generatedProjectFiles: readonly GeneratedApplicationFile[];
|
|
66
63
|
readonly initialProjectFiles: readonly GeneratedApplicationFile[];
|
|
67
|
-
readonly prettierFiles: readonly GeneratedApplicationFile[];
|
|
68
64
|
readonly removedProjectFiles: readonly string[];
|
|
69
65
|
}
|
|
70
66
|
export declare const generateProjectScaffolding: (options: GenerateProjectScaffoldingOptions) => GeneratedProjectScaffolding;
|