@elytracms/core 0.0.6
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/LICENSE +21 -0
- package/dist/clipboard/build.d.ts +77 -0
- package/dist/clipboard/build.js +128 -0
- package/dist/clipboard/build.js.map +1 -0
- package/dist/clipboard/clipboard.d.ts +33 -0
- package/dist/clipboard/clipboard.js +45 -0
- package/dist/clipboard/clipboard.js.map +1 -0
- package/dist/clipboard/fragment.d.ts +112 -0
- package/dist/clipboard/fragment.js +79 -0
- package/dist/clipboard/fragment.js.map +1 -0
- package/dist/clipboard/html.d.ts +26 -0
- package/dist/clipboard/html.js +82 -0
- package/dist/clipboard/html.js.map +1 -0
- package/dist/clipboard/index.d.ts +15 -0
- package/dist/clipboard/index.js +16 -0
- package/dist/clipboard/index.js.map +1 -0
- package/dist/clipboard/references.d.ts +50 -0
- package/dist/clipboard/references.js +0 -0
- package/dist/clipboard/references.js.map +1 -0
- package/dist/clipboard/serialize.d.ts +69 -0
- package/dist/clipboard/serialize.js +130 -0
- package/dist/clipboard/serialize.js.map +1 -0
- package/dist/cms-core/collections.d.ts +82 -0
- package/dist/cms-core/collections.js +187 -0
- package/dist/cms-core/collections.js.map +1 -0
- package/dist/cms-core/documents.d.ts +71 -0
- package/dist/cms-core/documents.js +67 -0
- package/dist/cms-core/documents.js.map +1 -0
- package/dist/cms-core/envelopes.d.ts +80 -0
- package/dist/cms-core/envelopes.js +124 -0
- package/dist/cms-core/envelopes.js.map +1 -0
- package/dist/cms-core/fields.d.ts +220 -0
- package/dist/cms-core/fields.js +250 -0
- package/dist/cms-core/fields.js.map +1 -0
- package/dist/cms-core/fixtures.d.ts +92 -0
- package/dist/cms-core/fixtures.js +357 -0
- package/dist/cms-core/fixtures.js.map +1 -0
- package/dist/cms-core/hierarchy.d.ts +113 -0
- package/dist/cms-core/hierarchy.js +223 -0
- package/dist/cms-core/hierarchy.js.map +1 -0
- package/dist/cms-core/index.d.ts +25 -0
- package/dist/cms-core/index.js +26 -0
- package/dist/cms-core/index.js.map +1 -0
- package/dist/cms-core/infer.d.ts +103 -0
- package/dist/cms-core/infer.js +57 -0
- package/dist/cms-core/infer.js.map +1 -0
- package/dist/cms-core/issues.d.ts +92 -0
- package/dist/cms-core/issues.js +74 -0
- package/dist/cms-core/issues.js.map +1 -0
- package/dist/cms-core/json-schema.d.ts +25 -0
- package/dist/cms-core/json-schema.js +110 -0
- package/dist/cms-core/json-schema.js.map +1 -0
- package/dist/cms-core/localization.d.ts +51 -0
- package/dist/cms-core/localization.js +89 -0
- package/dist/cms-core/localization.js.map +1 -0
- package/dist/cms-core/routes.d.ts +76 -0
- package/dist/cms-core/routes.js +220 -0
- package/dist/cms-core/routes.js.map +1 -0
- package/dist/cms-core/self-type.d.ts +41 -0
- package/dist/cms-core/self-type.js +191 -0
- package/dist/cms-core/self-type.js.map +1 -0
- package/dist/cms-core/url-for-document.d.ts +39 -0
- package/dist/cms-core/url-for-document.js +138 -0
- package/dist/cms-core/url-for-document.js.map +1 -0
- package/dist/cms-core/validate-document.d.ts +121 -0
- package/dist/cms-core/validate-document.js +871 -0
- package/dist/cms-core/validate-document.js.map +1 -0
- package/dist/cms-core/versions.d.ts +75 -0
- package/dist/cms-core/versions.js +97 -0
- package/dist/cms-core/versions.js.map +1 -0
- package/dist/collaboration/approval.d.ts +68 -0
- package/dist/collaboration/approval.js +104 -0
- package/dist/collaboration/approval.js.map +1 -0
- package/dist/collaboration/collaboration.d.ts +49 -0
- package/dist/collaboration/collaboration.js +56 -0
- package/dist/collaboration/collaboration.js.map +1 -0
- package/dist/collaboration/comments.d.ts +72 -0
- package/dist/collaboration/comments.js +118 -0
- package/dist/collaboration/comments.js.map +1 -0
- package/dist/collaboration/core.d.ts +25 -0
- package/dist/collaboration/core.js +26 -0
- package/dist/collaboration/core.js.map +1 -0
- package/dist/collaboration/index.d.ts +14 -0
- package/dist/collaboration/index.js +15 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/collaboration/presence.d.ts +62 -0
- package/dist/collaboration/presence.js +85 -0
- package/dist/collaboration/presence.js.map +1 -0
- package/dist/collaboration/publishing.d.ts +60 -0
- package/dist/collaboration/publishing.js +93 -0
- package/dist/collaboration/publishing.js.map +1 -0
- package/dist/collaboration/versions.d.ts +52 -0
- package/dist/collaboration/versions.js +81 -0
- package/dist/collaboration/versions.js.map +1 -0
- package/dist/component-registry/index.d.ts +3 -0
- package/dist/component-registry/index.js +4 -0
- package/dist/component-registry/index.js.map +1 -0
- package/dist/component-registry/issues.d.ts +6 -0
- package/dist/component-registry/issues.js +2 -0
- package/dist/component-registry/issues.js.map +1 -0
- package/dist/component-registry/manifest.d.ts +164 -0
- package/dist/component-registry/manifest.js +129 -0
- package/dist/component-registry/manifest.js.map +1 -0
- package/dist/component-registry/registry.d.ts +33 -0
- package/dist/component-registry/registry.js +90 -0
- package/dist/component-registry/registry.js.map +1 -0
- package/dist/content/__fixtures__/filterable-collections.d.ts +14 -0
- package/dist/content/__fixtures__/filterable-collections.js +15 -0
- package/dist/content/__fixtures__/filterable-collections.js.map +1 -0
- package/dist/content/__fixtures__/sample-accessor-types.d.ts +56 -0
- package/dist/content/__fixtures__/sample-accessor-types.js +5 -0
- package/dist/content/__fixtures__/sample-accessor-types.js.map +1 -0
- package/dist/content/__fixtures__/sample-delivery-types.d.ts +122 -0
- package/dist/content/__fixtures__/sample-delivery-types.js +5 -0
- package/dist/content/__fixtures__/sample-delivery-types.js.map +1 -0
- package/dist/content/assets.d.ts +53 -0
- package/dist/content/assets.js +38 -0
- package/dist/content/assets.js.map +1 -0
- package/dist/content/binding-sources.d.ts +53 -0
- package/dist/content/binding-sources.js +73 -0
- package/dist/content/binding-sources.js.map +1 -0
- package/dist/content/client.d.ts +90 -0
- package/dist/content/client.js +383 -0
- package/dist/content/client.js.map +1 -0
- package/dist/content/codegen.d.ts +54 -0
- package/dist/content/codegen.js +305 -0
- package/dist/content/codegen.js.map +1 -0
- package/dist/content/context.d.ts +38 -0
- package/dist/content/context.js +21 -0
- package/dist/content/context.js.map +1 -0
- package/dist/content/cursor.d.ts +33 -0
- package/dist/content/cursor.js +104 -0
- package/dist/content/cursor.js.map +1 -0
- package/dist/content/index.d.ts +28 -0
- package/dist/content/index.js +29 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/locale.d.ts +30 -0
- package/dist/content/locale.js +26 -0
- package/dist/content/locale.js.map +1 -0
- package/dist/content/perspective.d.ts +29 -0
- package/dist/content/perspective.js +31 -0
- package/dist/content/perspective.js.map +1 -0
- package/dist/content/populate.d.ts +25 -0
- package/dist/content/populate.js +22 -0
- package/dist/content/populate.js.map +1 -0
- package/dist/content/query.d.ts +122 -0
- package/dist/content/query.js +257 -0
- package/dist/content/query.js.map +1 -0
- package/dist/content/raw.d.ts +13 -0
- package/dist/content/raw.js +14 -0
- package/dist/content/raw.js.map +1 -0
- package/dist/content/resolve.d.ts +97 -0
- package/dist/content/resolve.js +261 -0
- package/dist/content/resolve.js.map +1 -0
- package/dist/content/serialize.d.ts +30 -0
- package/dist/content/serialize.js +57 -0
- package/dist/content/serialize.js.map +1 -0
- package/dist/content/tags.d.ts +54 -0
- package/dist/content/tags.js +40 -0
- package/dist/content/tags.js.map +1 -0
- package/dist/data-binding/fixtures.d.ts +20 -0
- package/dist/data-binding/fixtures.js +47 -0
- package/dist/data-binding/fixtures.js.map +1 -0
- package/dist/data-binding/index.d.ts +14 -0
- package/dist/data-binding/index.js +15 -0
- package/dist/data-binding/index.js.map +1 -0
- package/dist/data-binding/issues.d.ts +45 -0
- package/dist/data-binding/issues.js +46 -0
- package/dist/data-binding/issues.js.map +1 -0
- package/dist/data-binding/resolve.d.ts +87 -0
- package/dist/data-binding/resolve.js +204 -0
- package/dist/data-binding/resolve.js.map +1 -0
- package/dist/data-binding/sample.d.ts +21 -0
- package/dist/data-binding/sample.js +23 -0
- package/dist/data-binding/sample.js.map +1 -0
- package/dist/data-binding/sources.d.ts +225 -0
- package/dist/data-binding/sources.js +154 -0
- package/dist/data-binding/sources.js.map +1 -0
- package/dist/data-binding/tokens.d.ts +62 -0
- package/dist/data-binding/tokens.js +150 -0
- package/dist/data-binding/tokens.js.map +1 -0
- package/dist/design-tokens/css.d.ts +34 -0
- package/dist/design-tokens/css.js +51 -0
- package/dist/design-tokens/css.js.map +1 -0
- package/dist/design-tokens/index.d.ts +10 -0
- package/dist/design-tokens/index.js +11 -0
- package/dist/design-tokens/index.js.map +1 -0
- package/dist/design-tokens/style-guide.d.ts +30 -0
- package/dist/design-tokens/style-guide.js +31 -0
- package/dist/design-tokens/style-guide.js.map +1 -0
- package/dist/design-tokens/tokens.d.ts +89 -0
- package/dist/design-tokens/tokens.js +112 -0
- package/dist/design-tokens/tokens.js.map +1 -0
- package/dist/export-sync/builder-source.d.ts +85 -0
- package/dist/export-sync/builder-source.js +124 -0
- package/dist/export-sync/builder-source.js.map +1 -0
- package/dist/export-sync/check.d.ts +61 -0
- package/dist/export-sync/check.js +126 -0
- package/dist/export-sync/check.js.map +1 -0
- package/dist/export-sync/cli.d.ts +89 -0
- package/dist/export-sync/cli.js +323 -0
- package/dist/export-sync/cli.js.map +1 -0
- package/dist/export-sync/core.d.ts +58 -0
- package/dist/export-sync/core.js +41 -0
- package/dist/export-sync/core.js.map +1 -0
- package/dist/export-sync/eject.d.ts +28 -0
- package/dist/export-sync/eject.js +21 -0
- package/dist/export-sync/eject.js.map +1 -0
- package/dist/export-sync/fixtures.d.ts +25 -0
- package/dist/export-sync/fixtures.js +87 -0
- package/dist/export-sync/fixtures.js.map +1 -0
- package/dist/export-sync/generate.d.ts +7 -0
- package/dist/export-sync/generate.js +505 -0
- package/dist/export-sync/generate.js.map +1 -0
- package/dist/export-sync/index.d.ts +37 -0
- package/dist/export-sync/index.js +39 -0
- package/dist/export-sync/index.js.map +1 -0
- package/dist/export-sync/init.d.ts +123 -0
- package/dist/export-sync/init.js +234 -0
- package/dist/export-sync/init.js.map +1 -0
- package/dist/export-sync/manifest-host.d.ts +48 -0
- package/dist/export-sync/manifest-host.js +73 -0
- package/dist/export-sync/manifest-host.js.map +1 -0
- package/dist/export-sync/node.d.ts +20 -0
- package/dist/export-sync/node.js +101 -0
- package/dist/export-sync/node.js.map +1 -0
- package/dist/export-sync/push.d.ts +76 -0
- package/dist/export-sync/push.js +197 -0
- package/dist/export-sync/push.js.map +1 -0
- package/dist/export-sync/registry-sync-client.d.ts +59 -0
- package/dist/export-sync/registry-sync-client.js +97 -0
- package/dist/export-sync/registry-sync-client.js.map +1 -0
- package/dist/export-sync/sync.d.ts +47 -0
- package/dist/export-sync/sync.js +47 -0
- package/dist/export-sync/sync.js.map +1 -0
- package/dist/export-sync/typegen.d.ts +40 -0
- package/dist/export-sync/typegen.js +45 -0
- package/dist/export-sync/typegen.js.map +1 -0
- package/dist/export-sync/validate.d.ts +19 -0
- package/dist/export-sync/validate.js +102 -0
- package/dist/export-sync/validate.js.map +1 -0
- package/dist/export-sync/watch.d.ts +66 -0
- package/dist/export-sync/watch.js +70 -0
- package/dist/export-sync/watch.js.map +1 -0
- package/dist/operations/assets.d.ts +198 -0
- package/dist/operations/assets.js +75 -0
- package/dist/operations/assets.js.map +1 -0
- package/dist/operations/authorization.d.ts +49 -0
- package/dist/operations/authorization.js +128 -0
- package/dist/operations/authorization.js.map +1 -0
- package/dist/operations/changesets.d.ts +160 -0
- package/dist/operations/changesets.js +442 -0
- package/dist/operations/changesets.js.map +1 -0
- package/dist/operations/client.d.ts +49 -0
- package/dist/operations/client.js +57 -0
- package/dist/operations/client.js.map +1 -0
- package/dist/operations/core.d.ts +238 -0
- package/dist/operations/core.js +269 -0
- package/dist/operations/core.js.map +1 -0
- package/dist/operations/documents.d.ts +432 -0
- package/dist/operations/documents.js +344 -0
- package/dist/operations/documents.js.map +1 -0
- package/dist/operations/graph.d.ts +138 -0
- package/dist/operations/graph.js +78 -0
- package/dist/operations/graph.js.map +1 -0
- package/dist/operations/index.d.ts +19 -0
- package/dist/operations/index.js +20 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/operations/members.d.ts +87 -0
- package/dist/operations/members.js +56 -0
- package/dist/operations/members.js.map +1 -0
- package/dist/operations/publishing.d.ts +89 -0
- package/dist/operations/publishing.js +57 -0
- package/dist/operations/publishing.js.map +1 -0
- package/dist/operations/references.d.ts +222 -0
- package/dist/operations/references.js +177 -0
- package/dist/operations/references.js.map +1 -0
- package/dist/operations/schema.d.ts +413 -0
- package/dist/operations/schema.js +138 -0
- package/dist/operations/schema.js.map +1 -0
- package/dist/operations/tokens.d.ts +79 -0
- package/dist/operations/tokens.js +102 -0
- package/dist/operations/tokens.js.map +1 -0
- package/dist/persistence/adapter.d.ts +79 -0
- package/dist/persistence/adapter.js +55 -0
- package/dist/persistence/adapter.js.map +1 -0
- package/dist/persistence/assets.d.ts +120 -0
- package/dist/persistence/assets.js +141 -0
- package/dist/persistence/assets.js.map +1 -0
- package/dist/persistence/backend-validation.d.ts +43 -0
- package/dist/persistence/backend-validation.js +57 -0
- package/dist/persistence/backend-validation.js.map +1 -0
- package/dist/persistence/cli-tokens.d.ts +50 -0
- package/dist/persistence/cli-tokens.js +66 -0
- package/dist/persistence/cli-tokens.js.map +1 -0
- package/dist/persistence/cms.d.ts +148 -0
- package/dist/persistence/cms.js +232 -0
- package/dist/persistence/cms.js.map +1 -0
- package/dist/persistence/contract-scenarios.d.ts +73 -0
- package/dist/persistence/contract-scenarios.js +496 -0
- package/dist/persistence/contract-scenarios.js.map +1 -0
- package/dist/persistence/core.d.ts +96 -0
- package/dist/persistence/core.js +110 -0
- package/dist/persistence/core.js.map +1 -0
- package/dist/persistence/graph.d.ts +61 -0
- package/dist/persistence/graph.js +98 -0
- package/dist/persistence/graph.js.map +1 -0
- package/dist/persistence/index.d.ts +22 -0
- package/dist/persistence/index.js +23 -0
- package/dist/persistence/index.js.map +1 -0
- package/dist/persistence/members.d.ts +70 -0
- package/dist/persistence/members.js +0 -0
- package/dist/persistence/members.js.map +1 -0
- package/dist/persistence/publishing.d.ts +59 -0
- package/dist/persistence/publishing.js +95 -0
- package/dist/persistence/publishing.js.map +1 -0
- package/dist/persistence/reference-extraction.d.ts +44 -0
- package/dist/persistence/reference-extraction.js +204 -0
- package/dist/persistence/reference-extraction.js.map +1 -0
- package/dist/persistence/reference-indexing.d.ts +68 -0
- package/dist/persistence/reference-indexing.js +112 -0
- package/dist/persistence/reference-indexing.js.map +1 -0
- package/dist/persistence/references.d.ts +257 -0
- package/dist/persistence/references.js +0 -0
- package/dist/persistence/references.js.map +1 -0
- package/dist/persistence/seed.d.ts +55 -0
- package/dist/persistence/seed.js +102 -0
- package/dist/persistence/seed.js.map +1 -0
- package/dist/persistence/self-maintaining-adapter.d.ts +41 -0
- package/dist/persistence/self-maintaining-adapter.js +79 -0
- package/dist/persistence/self-maintaining-adapter.js.map +1 -0
- package/dist/plugins/asset-storage.d.ts +76 -0
- package/dist/plugins/asset-storage.js +104 -0
- package/dist/plugins/asset-storage.js.map +1 -0
- package/dist/plugins/component-package.d.ts +54 -0
- package/dist/plugins/component-package.js +92 -0
- package/dist/plugins/component-package.js.map +1 -0
- package/dist/plugins/data-sources.d.ts +78 -0
- package/dist/plugins/data-sources.js +99 -0
- package/dist/plugins/data-sources.js.map +1 -0
- package/dist/plugins/examples.d.ts +47 -0
- package/dist/plugins/examples.js +205 -0
- package/dist/plugins/examples.js.map +1 -0
- package/dist/plugins/export-targets.d.ts +47 -0
- package/dist/plugins/export-targets.js +78 -0
- package/dist/plugins/export-targets.js.map +1 -0
- package/dist/plugins/field-types.d.ts +86 -0
- package/dist/plugins/field-types.js +93 -0
- package/dist/plugins/field-types.js.map +1 -0
- package/dist/plugins/hooks.d.ts +60 -0
- package/dist/plugins/hooks.js +94 -0
- package/dist/plugins/hooks.js.map +1 -0
- package/dist/plugins/index.d.ts +27 -0
- package/dist/plugins/index.js +28 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/marketplace.d.ts +90 -0
- package/dist/plugins/marketplace.js +110 -0
- package/dist/plugins/marketplace.js.map +1 -0
- package/dist/plugins/plugin.d.ts +107 -0
- package/dist/plugins/plugin.js +122 -0
- package/dist/plugins/plugin.js.map +1 -0
- package/dist/plugins/templates.d.ts +66 -0
- package/dist/plugins/templates.js +74 -0
- package/dist/plugins/templates.js.map +1 -0
- package/dist/project-graph/binding.d.ts +68 -0
- package/dist/project-graph/binding.js +39 -0
- package/dist/project-graph/binding.js.map +1 -0
- package/dist/project-graph/container.d.ts +126 -0
- package/dist/project-graph/container.js +221 -0
- package/dist/project-graph/container.js.map +1 -0
- package/dist/project-graph/edit.d.ts +66 -0
- package/dist/project-graph/edit.js +201 -0
- package/dist/project-graph/edit.js.map +1 -0
- package/dist/project-graph/fixtures.d.ts +51 -0
- package/dist/project-graph/fixtures.js +224 -0
- package/dist/project-graph/fixtures.js.map +1 -0
- package/dist/project-graph/ids.d.ts +17 -0
- package/dist/project-graph/ids.js +19 -0
- package/dist/project-graph/ids.js.map +1 -0
- package/dist/project-graph/index.d.ts +12 -0
- package/dist/project-graph/index.js +13 -0
- package/dist/project-graph/index.js.map +1 -0
- package/dist/project-graph/issues.d.ts +61 -0
- package/dist/project-graph/issues.js +44 -0
- package/dist/project-graph/issues.js.map +1 -0
- package/dist/project-graph/json.d.ts +6 -0
- package/dist/project-graph/json.js +10 -0
- package/dist/project-graph/json.js.map +1 -0
- package/dist/project-graph/node.d.ts +48 -0
- package/dist/project-graph/node.js +42 -0
- package/dist/project-graph/node.js.map +1 -0
- package/dist/project-graph/normalize.d.ts +17 -0
- package/dist/project-graph/normalize.js +110 -0
- package/dist/project-graph/normalize.js.map +1 -0
- package/dist/project-graph/serialize.d.ts +36 -0
- package/dist/project-graph/serialize.js +51 -0
- package/dist/project-graph/serialize.js.map +1 -0
- package/dist/project-graph/structure.d.ts +40 -0
- package/dist/project-graph/structure.js +36 -0
- package/dist/project-graph/structure.js.map +1 -0
- package/dist/project-graph/validate.d.ts +84 -0
- package/dist/project-graph/validate.js +158 -0
- package/dist/project-graph/validate.js.map +1 -0
- package/dist/rich-text/adapter.d.ts +43 -0
- package/dist/rich-text/adapter.js +24 -0
- package/dist/rich-text/adapter.js.map +1 -0
- package/dist/rich-text/dom-editor.d.ts +101 -0
- package/dist/rich-text/dom-editor.js +482 -0
- package/dist/rich-text/dom-editor.js.map +1 -0
- package/dist/rich-text/embed.d.ts +70 -0
- package/dist/rich-text/embed.js +70 -0
- package/dist/rich-text/embed.js.map +1 -0
- package/dist/rich-text/fixtures.d.ts +25 -0
- package/dist/rich-text/fixtures.js +115 -0
- package/dist/rich-text/fixtures.js.map +1 -0
- package/dist/rich-text/html.d.ts +5 -0
- package/dist/rich-text/html.js +309 -0
- package/dist/rich-text/html.js.map +1 -0
- package/dist/rich-text/index.d.ts +19 -0
- package/dist/rich-text/index.js +20 -0
- package/dist/rich-text/index.js.map +1 -0
- package/dist/rich-text/markdown.d.ts +7 -0
- package/dist/rich-text/markdown.js +235 -0
- package/dist/rich-text/markdown.js.map +1 -0
- package/dist/rich-text/portable-text.d.ts +50 -0
- package/dist/rich-text/portable-text.js +223 -0
- package/dist/rich-text/portable-text.js.map +1 -0
- package/dist/rich-text/registry.d.ts +48 -0
- package/dist/rich-text/registry.js +16 -0
- package/dist/rich-text/registry.js.map +1 -0
- package/dist/rich-text/render.d.ts +69 -0
- package/dist/rich-text/render.js +205 -0
- package/dist/rich-text/render.js.map +1 -0
- package/dist/rich-text/schema.d.ts +86 -0
- package/dist/rich-text/schema.js +80 -0
- package/dist/rich-text/schema.js.map +1 -0
- package/dist/rich-text/test-support.d.ts +7 -0
- package/dist/rich-text/test-support.js +8 -0
- package/dist/rich-text/test-support.js.map +1 -0
- package/dist/runtime-renderer/client.d.ts +14 -0
- package/dist/runtime-renderer/client.js +15 -0
- package/dist/runtime-renderer/client.js.map +1 -0
- package/dist/runtime-renderer/condition.d.ts +8 -0
- package/dist/runtime-renderer/condition.js +48 -0
- package/dist/runtime-renderer/condition.js.map +1 -0
- package/dist/runtime-renderer/content-client.d.ts +62 -0
- package/dist/runtime-renderer/content-client.js +37 -0
- package/dist/runtime-renderer/content-client.js.map +1 -0
- package/dist/runtime-renderer/context.d.ts +185 -0
- package/dist/runtime-renderer/context.js +7 -0
- package/dist/runtime-renderer/context.js.map +1 -0
- package/dist/runtime-renderer/fallback.d.ts +39 -0
- package/dist/runtime-renderer/fallback.js +45 -0
- package/dist/runtime-renderer/fallback.js.map +1 -0
- package/dist/runtime-renderer/index.d.ts +13 -0
- package/dist/runtime-renderer/index.js +13 -0
- package/dist/runtime-renderer/index.js.map +1 -0
- package/dist/runtime-renderer/primitives.d.ts +85 -0
- package/dist/runtime-renderer/primitives.js +442 -0
- package/dist/runtime-renderer/primitives.js.map +1 -0
- package/dist/runtime-renderer/render.d.ts +138 -0
- package/dist/runtime-renderer/render.js +825 -0
- package/dist/runtime-renderer/render.js.map +1 -0
- package/dist/runtime-renderer/rich-text.d.ts +26 -0
- package/dist/runtime-renderer/rich-text.js +113 -0
- package/dist/runtime-renderer/rich-text.js.map +1 -0
- package/dist/starter-kits/index.d.ts +13 -0
- package/dist/starter-kits/index.js +14 -0
- package/dist/starter-kits/index.js.map +1 -0
- package/dist/starter-kits/instantiate.d.ts +29 -0
- package/dist/starter-kits/instantiate.js +24 -0
- package/dist/starter-kits/instantiate.js.map +1 -0
- package/dist/starter-kits/kit.d.ts +61 -0
- package/dist/starter-kits/kit.js +37 -0
- package/dist/starter-kits/kit.js.map +1 -0
- package/dist/starter-kits/kits.d.ts +7 -0
- package/dist/starter-kits/kits.js +201 -0
- package/dist/starter-kits/kits.js.map +1 -0
- package/dist/starter-kits/manifests.d.ts +7 -0
- package/dist/starter-kits/manifests.js +111 -0
- package/dist/starter-kits/manifests.js.map +1 -0
- package/dist/starter-kits/upgrade.d.ts +39 -0
- package/dist/starter-kits/upgrade.js +54 -0
- package/dist/starter-kits/upgrade.js.map +1 -0
- package/dist/starter-kits/validate.d.ts +16 -0
- package/dist/starter-kits/validate.js +77 -0
- package/dist/starter-kits/validate.js.map +1 -0
- package/dist/studio-core/context.d.ts +27 -0
- package/dist/studio-core/context.js +44 -0
- package/dist/studio-core/context.js.map +1 -0
- package/dist/studio-core/errors.d.ts +58 -0
- package/dist/studio-core/errors.js +74 -0
- package/dist/studio-core/errors.js.map +1 -0
- package/dist/studio-core/fixtures.d.ts +18 -0
- package/dist/studio-core/fixtures.js +83 -0
- package/dist/studio-core/fixtures.js.map +1 -0
- package/dist/studio-core/ids.d.ts +22 -0
- package/dist/studio-core/ids.js +33 -0
- package/dist/studio-core/ids.js.map +1 -0
- package/dist/studio-core/index.d.ts +11 -0
- package/dist/studio-core/index.js +12 -0
- package/dist/studio-core/index.js.map +1 -0
- package/dist/studio-core/issues.d.ts +50 -0
- package/dist/studio-core/issues.js +33 -0
- package/dist/studio-core/issues.js.map +1 -0
- package/dist/studio-core/metadata.d.ts +109 -0
- package/dist/studio-core/metadata.js +74 -0
- package/dist/studio-core/metadata.js.map +1 -0
- package/dist/studio-core/repository.d.ts +73 -0
- package/dist/studio-core/repository.js +202 -0
- package/dist/studio-core/repository.js.map +1 -0
- package/dist/studio-core/sections.d.ts +73 -0
- package/dist/studio-core/sections.js +68 -0
- package/dist/studio-core/sections.js.map +1 -0
- package/dist/studio-core/validate.d.ts +15 -0
- package/dist/studio-core/validate.js +119 -0
- package/dist/studio-core/validate.js.map +1 -0
- package/dist/studio-core/workspace-config.d.ts +587 -0
- package/dist/studio-core/workspace-config.js +434 -0
- package/dist/studio-core/workspace-config.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { collectionDefSchema, redirectRecordSchema, routeRecordSchema } from '@elytracms/core/cms-core';
|
|
3
|
+
import { isValidSlug, localeSchema } from './ids';
|
|
4
|
+
import { environmentSchema, defaultEnvironments, exportTargetSchema } from './metadata';
|
|
5
|
+
import { allSectionsAvailable, sectionAvailabilityMapSchema } from './sections';
|
|
6
|
+
import { validateProjectSettings } from './validate';
|
|
7
|
+
/**
|
|
8
|
+
* Code-first workspace config — `elytra.config.ts` (EC-154, vision AD-8).
|
|
9
|
+
*
|
|
10
|
+
* A repo declares its projects as code: the config file default-exports
|
|
11
|
+
* `defineElytraConfig({...})` with an array of project configs, optionally
|
|
12
|
+
* composed over a shared `base`. The studio's project switcher and the CLI
|
|
13
|
+
* (`builder init --project <slug>`) both consume the same schema and the same
|
|
14
|
+
* structured validation, so an invalid config fails identically everywhere —
|
|
15
|
+
* never silently.
|
|
16
|
+
*
|
|
17
|
+
* Composition semantics (deliberately simple and deterministic): each project
|
|
18
|
+
* entry is merged over `base` **per field** — a field set on the entry replaces
|
|
19
|
+
* the base field entirely (arrays and objects are not deep-merged). Fields set
|
|
20
|
+
* on neither fall back to documented defaults.
|
|
21
|
+
*
|
|
22
|
+
* Validation follows the EC-028/EC-029 split: Zod checks field *shapes*;
|
|
23
|
+
* cross-field and cross-project rules (duplicate slugs, default locale ∈
|
|
24
|
+
* locales, empty projects) surface as structured, path-located
|
|
25
|
+
* {@link WorkspaceConfigIssue}s — never throws. The settings-shaped parts reuse
|
|
26
|
+
* the EC-028 `validateProjectSettings` rules verbatim.
|
|
27
|
+
*/
|
|
28
|
+
// --- Shapes (Zod) -------------------------------------------------------------
|
|
29
|
+
/** Where a project's collection schema lives: a host-repo module, or managed in the studio. */
|
|
30
|
+
export const workspaceSchemaRefSchema = z.union([
|
|
31
|
+
z.literal('inline'),
|
|
32
|
+
z.object({ module: z.string().min(1) }),
|
|
33
|
+
]);
|
|
34
|
+
export const componentsInputSchema = z.custom((value) => Array.isArray(value), { message: 'components must be an array of { manifest, implementation } pairs' });
|
|
35
|
+
/** Which Convex deployment/dataset backs a project (or one of its environments). */
|
|
36
|
+
export const workspaceConvexRefSchema = z.object({
|
|
37
|
+
/** Deployment reference (URL or named deployment). */
|
|
38
|
+
deployment: z.string().min(1).optional(),
|
|
39
|
+
/** Dataset/namespace within the deployment, for shared deployments. */
|
|
40
|
+
dataset: z.string().min(1).optional(),
|
|
41
|
+
});
|
|
42
|
+
/**
|
|
43
|
+
* A deployment environment in config. Extends the backend `{ key, label }` shape
|
|
44
|
+
* with an optional per-environment `convex` ref so a project can target a
|
|
45
|
+
* different deployment/dataset per environment (Sanity project↔dataset style,
|
|
46
|
+
* e.g. prod vs staging). The project-level `convex` ref is the default.
|
|
47
|
+
*
|
|
48
|
+
* `frontendUrl` (EC-215) is the public base URL of the live site for this
|
|
49
|
+
* environment (e.g. `https://staging.acme.com`); the project-level `frontendUrl`
|
|
50
|
+
* is the fallback. The studio uses it to show/link a document's live URL
|
|
51
|
+
* (EC-216) and the host's sitemap uses it as its `baseUrl`.
|
|
52
|
+
*/
|
|
53
|
+
export const workspaceEnvironmentSchema = environmentSchema.extend({
|
|
54
|
+
convex: workspaceConvexRefSchema.optional(),
|
|
55
|
+
frontendUrl: z.string().url().optional(),
|
|
56
|
+
});
|
|
57
|
+
const routesInputSchema = z.union([
|
|
58
|
+
z.array(routeRecordSchema),
|
|
59
|
+
z.custom((value) => typeof value === 'function', {
|
|
60
|
+
message: 'routes must be a RouteRecord[] or a (collections) => RouteRecord[] function',
|
|
61
|
+
}),
|
|
62
|
+
]);
|
|
63
|
+
const redirectsInputSchema = z.union([
|
|
64
|
+
z.array(redirectRecordSchema),
|
|
65
|
+
z.custom((value) => typeof value === 'function', {
|
|
66
|
+
message: 'redirects must be a RedirectRecord[] or a (collections) => RedirectRecord[] function',
|
|
67
|
+
}),
|
|
68
|
+
]);
|
|
69
|
+
/** The shared, overridable fields — usable as `base` and per project. */
|
|
70
|
+
export const workspaceProjectBaseSchema = z.object({
|
|
71
|
+
schema: workspaceSchemaRefSchema.optional(),
|
|
72
|
+
locales: z.array(localeSchema).optional(),
|
|
73
|
+
defaultLocale: localeSchema.optional(),
|
|
74
|
+
components: componentsInputSchema.optional(),
|
|
75
|
+
convex: workspaceConvexRefSchema.optional(),
|
|
76
|
+
/**
|
|
77
|
+
* Public base URL of the live site (EC-215), e.g. `https://acme.com`. The
|
|
78
|
+
* project-level fallback; an environment may override it with its own
|
|
79
|
+
* `frontendUrl`. Consumed by the studio (a document's live URL, EC-216) and
|
|
80
|
+
* the host's sitemap (`baseUrl`). Connection secrets stay in env; this is a
|
|
81
|
+
* public address, so it lives in config.
|
|
82
|
+
*/
|
|
83
|
+
frontendUrl: z.string().url().optional(),
|
|
84
|
+
environments: z.array(workspaceEnvironmentSchema).optional(),
|
|
85
|
+
/**
|
|
86
|
+
* CMS collection schema (AD-11, EC-183): collections are declared in config,
|
|
87
|
+
* not the backend. The studio (CMS table/detail, validation, binding pickers)
|
|
88
|
+
* and the host (delivery shape, depth-1 population) both read them from here;
|
|
89
|
+
* the backend stores documents only. Reuses the canonical `@elytracms/core/cms-core`
|
|
90
|
+
* `CollectionDef` shape — no new format. Defaults to `[]`.
|
|
91
|
+
*/
|
|
92
|
+
collections: z.array(collectionDefSchema).optional(),
|
|
93
|
+
/**
|
|
94
|
+
* Routes as code (AD-3/AD-11, EC-207): the URL→document map is declared in
|
|
95
|
+
* config — a `RouteRecord[]` or a `(collections) => RouteRecord[]` derive — not
|
|
96
|
+
* stored in the backend. The resolver materializes it against the resolved
|
|
97
|
+
* collections; the studio renders the result read-only with conflict/loop
|
|
98
|
+
* detection; the host resolves URLs through the config-sourced router.
|
|
99
|
+
*/
|
|
100
|
+
routes: routesInputSchema.optional(),
|
|
101
|
+
/** Redirects as code, same shape as {@link routes} (EC-207). */
|
|
102
|
+
redirects: redirectsInputSchema.optional(),
|
|
103
|
+
/** Code-generation target (EC-179 item 5); defaults to `next-app-router`. */
|
|
104
|
+
exportTarget: exportTargetSchema.optional(),
|
|
105
|
+
/** Per-section availability (EC-179 item 5); defaults to all sections available. */
|
|
106
|
+
sectionAvailability: sectionAvailabilityMapSchema.optional(),
|
|
107
|
+
});
|
|
108
|
+
/** One project entry: identity is required, everything else may come from `base`. */
|
|
109
|
+
export const workspaceProjectEntrySchema = workspaceProjectBaseSchema.extend({
|
|
110
|
+
name: z.string().min(1).max(120),
|
|
111
|
+
slug: z.string().min(1),
|
|
112
|
+
});
|
|
113
|
+
/** The full `elytra.config.ts` value: shared base + an array of project configs. */
|
|
114
|
+
export const elytraConfigInputSchema = z.object({
|
|
115
|
+
base: workspaceProjectBaseSchema.optional(),
|
|
116
|
+
projects: z.array(workspaceProjectEntrySchema),
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Typed identity helper for `elytra.config.ts` — keeps the config file
|
|
120
|
+
* declarative (like Vite's `defineConfig`). Validation happens on load via
|
|
121
|
+
* {@link resolveWorkspaceConfig}, not here, so a config file never throws.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* // elytra.config.ts
|
|
126
|
+
* import { defineElytraConfig } from '@elytracms/core/export-sync'
|
|
127
|
+
*
|
|
128
|
+
* export default defineElytraConfig({
|
|
129
|
+
* base: {
|
|
130
|
+
* locales: ['en', 'de'],
|
|
131
|
+
* defaultLocale: 'en',
|
|
132
|
+
* components: { package: '@acme/site-components' },
|
|
133
|
+
* schema: { module: './src/schema/collections' },
|
|
134
|
+
* },
|
|
135
|
+
* projects: [
|
|
136
|
+
* { name: 'Acme Marketing', slug: 'acme-marketing' },
|
|
137
|
+
* {
|
|
138
|
+
* name: 'Acme Store',
|
|
139
|
+
* slug: 'acme-store',
|
|
140
|
+
* convex: { deployment: 'https://store.convex.cloud' },
|
|
141
|
+
* locales: ['en'],
|
|
142
|
+
* defaultLocale: 'en',
|
|
143
|
+
* },
|
|
144
|
+
* ],
|
|
145
|
+
* })
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export function defineElytraConfig(config) {
|
|
149
|
+
return config;
|
|
150
|
+
}
|
|
151
|
+
// --- Structured issues ----------------------------------------------------------
|
|
152
|
+
/** Stable codes for workspace-config validation issues (EC-154). */
|
|
153
|
+
export const workspaceConfigIssueCodeSchema = z.enum([
|
|
154
|
+
// Shape / loading
|
|
155
|
+
'invalid-config-shape',
|
|
156
|
+
'missing-default-export',
|
|
157
|
+
// Cross-project rules
|
|
158
|
+
'empty-projects',
|
|
159
|
+
'duplicate-project-slug',
|
|
160
|
+
// Per-project identity
|
|
161
|
+
'invalid-name',
|
|
162
|
+
'invalid-slug',
|
|
163
|
+
// Settings-shaped rules (mirrors the EC-028 StudioIssue codes)
|
|
164
|
+
'empty-locales',
|
|
165
|
+
'duplicate-locale',
|
|
166
|
+
'invalid-locale',
|
|
167
|
+
'default-locale-not-in-locales',
|
|
168
|
+
'missing-default-locale',
|
|
169
|
+
'no-environments',
|
|
170
|
+
'duplicate-environment',
|
|
171
|
+
'invalid-environment',
|
|
172
|
+
]);
|
|
173
|
+
function shapeIssue(message, path) {
|
|
174
|
+
return { code: 'invalid-config-shape', severity: 'error', message, path };
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Materialize a `routes`/`redirects` config value (EC-207): run a derive
|
|
178
|
+
* function against the resolved collections, or copy a static array. `undefined`
|
|
179
|
+
* resolves to `[]`.
|
|
180
|
+
*/
|
|
181
|
+
function materializeRecords(input, collections) {
|
|
182
|
+
if (input === undefined)
|
|
183
|
+
return [];
|
|
184
|
+
if (typeof input === 'function')
|
|
185
|
+
return input(collections);
|
|
186
|
+
return [...input];
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Per-field base + override composition: an entry field replaces the base
|
|
190
|
+
* field entirely; defaults fill what neither sets. `defaultLocale` defaults to
|
|
191
|
+
* the single configured locale (single-locale projects need no ceremony);
|
|
192
|
+
* multi-locale projects must state it — enforced as a structured issue below.
|
|
193
|
+
*/
|
|
194
|
+
function composeProject(base, entry) {
|
|
195
|
+
const locales = entry.locales ?? base?.locales ?? ['en'];
|
|
196
|
+
const explicitDefault = entry.defaultLocale ?? base?.defaultLocale;
|
|
197
|
+
const defaultLocale = explicitDefault ?? (locales.length === 1 ? locales[0] : '');
|
|
198
|
+
const components = entry.components ?? base?.components;
|
|
199
|
+
const convex = entry.convex ?? base?.convex;
|
|
200
|
+
// EC-215: project-level frontend URL (an environment may still override it).
|
|
201
|
+
const frontendUrl = entry.frontendUrl ?? base?.frontendUrl;
|
|
202
|
+
// Structure-from-config (AD-11, EC-179 item 5): an entry field replaces the
|
|
203
|
+
// base field entirely; documented defaults fill what neither sets.
|
|
204
|
+
const collections = [...(entry.collections ?? base?.collections ?? [])];
|
|
205
|
+
// EC-207: materialize routes/redirects against the resolved collections — a
|
|
206
|
+
// derive function runs once here; a static array passes through.
|
|
207
|
+
const routes = materializeRecords(entry.routes ?? base?.routes, collections);
|
|
208
|
+
const redirects = materializeRecords(entry.redirects ?? base?.redirects, collections);
|
|
209
|
+
return {
|
|
210
|
+
project: {
|
|
211
|
+
name: entry.name,
|
|
212
|
+
slug: entry.slug,
|
|
213
|
+
schema: entry.schema ?? base?.schema ?? 'inline',
|
|
214
|
+
locales: [...locales],
|
|
215
|
+
defaultLocale,
|
|
216
|
+
...(components !== undefined ? { components } : {}),
|
|
217
|
+
...(convex !== undefined ? { convex } : {}),
|
|
218
|
+
...(frontendUrl !== undefined ? { frontendUrl } : {}),
|
|
219
|
+
environments: (entry.environments ?? base?.environments ?? defaultEnvironments()).map((e) => ({ ...e })),
|
|
220
|
+
collections,
|
|
221
|
+
routes,
|
|
222
|
+
redirects,
|
|
223
|
+
exportTarget: entry.exportTarget ?? base?.exportTarget ?? 'next-app-router',
|
|
224
|
+
sectionAvailability: entry.sectionAvailability ?? base?.sectionAvailability ?? allSectionsAvailable(),
|
|
225
|
+
},
|
|
226
|
+
missingDefaultLocale: explicitDefault === undefined && locales.length !== 1,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Resolve a project's public site URL for a given environment (EC-215): the
|
|
231
|
+
* environment's own `frontendUrl` when it declares one, else the project-level
|
|
232
|
+
* fallback. `undefined` when neither is configured. The trailing slash (if any)
|
|
233
|
+
* is preserved as authored — callers that build paths should normalize.
|
|
234
|
+
*/
|
|
235
|
+
export function frontendUrlForEnvironment(project, environmentKey) {
|
|
236
|
+
const env = environmentKey !== undefined
|
|
237
|
+
? project.environments.find((e) => e.key === environmentKey)
|
|
238
|
+
: undefined;
|
|
239
|
+
return env?.frontendUrl ?? project.frontendUrl;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Build the studio's `Project` from a resolved config entry (vision AD-8). The
|
|
243
|
+
* slug is the canonical id; identity is config-owned, so there are no backend
|
|
244
|
+
* timestamps. This is how the studio sources project identity at runtime.
|
|
245
|
+
*/
|
|
246
|
+
export function configProject(project) {
|
|
247
|
+
return {
|
|
248
|
+
id: project.slug,
|
|
249
|
+
name: project.name,
|
|
250
|
+
slug: project.slug,
|
|
251
|
+
settings: toProjectSettings(project),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/** Map a resolved project onto the EC-028 settings shape (export target + sections defaulted). */
|
|
255
|
+
export function toProjectSettings(project) {
|
|
256
|
+
return {
|
|
257
|
+
locales: [...project.locales],
|
|
258
|
+
defaultLocale: project.defaultLocale,
|
|
259
|
+
// Settings carry only the backend `{ key, label }` shape — the per-environment
|
|
260
|
+
// `convex` ref is config wiring, not project settings.
|
|
261
|
+
environments: project.environments.map((e) => ({ key: e.key, label: e.label })),
|
|
262
|
+
// EC-183: export target + section availability are config-owned (no longer
|
|
263
|
+
// hardcoded defaults) — the resolver applied the defaults in `composeProject`.
|
|
264
|
+
exportTarget: project.exportTarget,
|
|
265
|
+
sectionAvailability: project.sectionAvailability,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Project one resolved config project to its serializable form (EC-223 mount
|
|
270
|
+
* contract). The single code→data step is `components`: each live
|
|
271
|
+
* `{ manifest, implementation }` collapses to its `manifest`, dropping the opaque
|
|
272
|
+
* host React component. Arrays are copied so the projection is an owned snapshot;
|
|
273
|
+
* deterministic — the same resolved project always yields the same value.
|
|
274
|
+
*/
|
|
275
|
+
export function toSerializableProject(project) {
|
|
276
|
+
return {
|
|
277
|
+
name: project.name,
|
|
278
|
+
slug: project.slug,
|
|
279
|
+
schema: project.schema,
|
|
280
|
+
locales: [...project.locales],
|
|
281
|
+
defaultLocale: project.defaultLocale,
|
|
282
|
+
// CODE → DATA: drop each component's live implementation, keep its manifest.
|
|
283
|
+
// This is the derivation `HostComponentEntry` names ("the serializable
|
|
284
|
+
// projection derives the manifests"); the only non-serializable field there is.
|
|
285
|
+
components: (project.components ?? []).map((entry) => entry.manifest),
|
|
286
|
+
...(project.convex !== undefined ? { convex: project.convex } : {}),
|
|
287
|
+
...(project.frontendUrl !== undefined ? { frontendUrl: project.frontendUrl } : {}),
|
|
288
|
+
environments: project.environments.map((e) => ({ ...e })),
|
|
289
|
+
collections: [...project.collections],
|
|
290
|
+
routes: [...project.routes],
|
|
291
|
+
redirects: [...project.redirects],
|
|
292
|
+
exportTarget: project.exportTarget,
|
|
293
|
+
sectionAvailability: project.sectionAvailability,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* **`toSerializableSchema(config)`** — the EC-223 serializable-schema projection.
|
|
298
|
+
* Resolve a code-first config (running base+override composition and the
|
|
299
|
+
* `routes`/`redirects` derives), then strip code from every project. The result
|
|
300
|
+
* is a pure-data snapshot of the workspace's structure — the portable-validation
|
|
301
|
+
* artifact, the AI/CLI codegen target (EC-209), the fixtures source, and the only
|
|
302
|
+
* thing that may cross a server→client RSC boundary (never the live config).
|
|
303
|
+
*
|
|
304
|
+
* Never throws: an invalid config returns `{ ok: false, projects: [], issues }`,
|
|
305
|
+
* exactly as {@link resolveWorkspaceConfig} reports it. Deterministic.
|
|
306
|
+
*/
|
|
307
|
+
export function toSerializableSchema(config, options = {}) {
|
|
308
|
+
const result = resolveWorkspaceConfig(config, options);
|
|
309
|
+
return {
|
|
310
|
+
ok: result.ok,
|
|
311
|
+
projects: result.projects.map(toSerializableProject),
|
|
312
|
+
issues: result.issues,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Validate + resolve a raw config value (the default export of
|
|
317
|
+
* `elytra.config.ts`, or env-injected JSON). Never throws: every failure mode
|
|
318
|
+
* is a structured, path-located {@link WorkspaceConfigIssue}. Deterministic —
|
|
319
|
+
* the same input always yields byte-identical results.
|
|
320
|
+
*/
|
|
321
|
+
export function resolveWorkspaceConfig(value, options = {}) {
|
|
322
|
+
const issues = [];
|
|
323
|
+
// 1. Shape (Zod). Shape failures are terminal — nothing to resolve.
|
|
324
|
+
const parsed = elytraConfigInputSchema.safeParse(value);
|
|
325
|
+
if (!parsed.success) {
|
|
326
|
+
for (const issue of parsed.error.issues) {
|
|
327
|
+
issues.push(shapeIssue(issue.message, issue.path.map((p) => (typeof p === 'symbol' ? String(p) : p))));
|
|
328
|
+
}
|
|
329
|
+
return finalize([], issues, options);
|
|
330
|
+
}
|
|
331
|
+
const config = parsed.data;
|
|
332
|
+
// 2. Cross-project rules.
|
|
333
|
+
if (config.projects.length === 0) {
|
|
334
|
+
issues.push({
|
|
335
|
+
code: 'empty-projects',
|
|
336
|
+
severity: 'error',
|
|
337
|
+
message: 'The workspace config declares no projects. Add at least one project entry.',
|
|
338
|
+
path: ['projects'],
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
const seenSlugs = new Map();
|
|
342
|
+
const projects = [];
|
|
343
|
+
config.projects.forEach((entry, index) => {
|
|
344
|
+
const at = (...rest) => ['projects', index, ...rest];
|
|
345
|
+
// Identity (mirrors EC-028 validateProjectIdentity).
|
|
346
|
+
if (entry.name.trim().length === 0) {
|
|
347
|
+
issues.push({
|
|
348
|
+
code: 'invalid-name',
|
|
349
|
+
severity: 'error',
|
|
350
|
+
message: 'Project name cannot be empty.',
|
|
351
|
+
path: at('name'),
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
if (!isValidSlug(entry.slug)) {
|
|
355
|
+
issues.push({
|
|
356
|
+
code: 'invalid-slug',
|
|
357
|
+
severity: 'error',
|
|
358
|
+
message: `“${entry.slug}” is not a valid slug (lowercase, hyphen-separated).`,
|
|
359
|
+
path: at('slug'),
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
const firstIndex = seenSlugs.get(entry.slug);
|
|
363
|
+
if (firstIndex !== undefined) {
|
|
364
|
+
issues.push({
|
|
365
|
+
code: 'duplicate-project-slug',
|
|
366
|
+
severity: 'error',
|
|
367
|
+
message: `Project slug “${entry.slug}” is also used by projects[${firstIndex}]. Slugs must be unique across the workspace.`,
|
|
368
|
+
path: at('slug'),
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
seenSlugs.set(entry.slug, index);
|
|
373
|
+
}
|
|
374
|
+
// Composition + settings-shaped rules (reuses EC-028 validateProjectSettings).
|
|
375
|
+
const { project, missingDefaultLocale } = composeProject(config.base, entry);
|
|
376
|
+
if (missingDefaultLocale) {
|
|
377
|
+
issues.push({
|
|
378
|
+
code: 'missing-default-locale',
|
|
379
|
+
severity: 'error',
|
|
380
|
+
message: `Project “${entry.slug}” configures ${project.locales.length === 0 ? 'no' : 'multiple'} locales but no defaultLocale. State which locale is the default.`,
|
|
381
|
+
path: at('defaultLocale'),
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
// Guard: validateProjectSettings would also flag '' ∉ locales; skip the
|
|
385
|
+
// redundant report when the default is missing entirely.
|
|
386
|
+
const settingsIssues = validateProjectSettings(toProjectSettings(project)).filter((issue) => !(missingDefaultLocale && issue.code === 'default-locale-not-in-locales') &&
|
|
387
|
+
issue.code !== 'incomplete-section-availability');
|
|
388
|
+
for (const issue of settingsIssues) {
|
|
389
|
+
issues.push({
|
|
390
|
+
code: issue.code,
|
|
391
|
+
severity: issue.severity,
|
|
392
|
+
message: issue.message,
|
|
393
|
+
path: at(...issue.path),
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
projects.push(project);
|
|
397
|
+
});
|
|
398
|
+
return finalize(projects, issues, options);
|
|
399
|
+
}
|
|
400
|
+
function finalize(projects, issues, options) {
|
|
401
|
+
const located = options.file ? issues.map((issue) => ({ ...issue, file: options.file })) : issues;
|
|
402
|
+
const ok = !located.some((issue) => issue.severity === 'error');
|
|
403
|
+
return { ok, projects: ok ? projects : [], issues: located };
|
|
404
|
+
}
|
|
405
|
+
// --- Module extraction ------------------------------------------------------------
|
|
406
|
+
/** Conventional config file name (the CLI also accepts compiled variants). */
|
|
407
|
+
export const WORKSPACE_CONFIG_FILE = 'elytra.config.ts';
|
|
408
|
+
/** File names the loaders probe for, in priority order. */
|
|
409
|
+
export const WORKSPACE_CONFIG_FILES = [
|
|
410
|
+
'elytra.config.ts',
|
|
411
|
+
'elytra.config.mts',
|
|
412
|
+
'elytra.config.js',
|
|
413
|
+
'elytra.config.mjs',
|
|
414
|
+
];
|
|
415
|
+
/**
|
|
416
|
+
* Pull the config value out of a loaded module namespace. The convention is a
|
|
417
|
+
* default export (`export default defineElytraConfig({...})`); a missing one
|
|
418
|
+
* is a structured issue, not a throw.
|
|
419
|
+
*/
|
|
420
|
+
export function extractWorkspaceConfigExport(moduleExports, file) {
|
|
421
|
+
if (typeof moduleExports === 'object' && moduleExports !== null && 'default' in moduleExports) {
|
|
422
|
+
return { value: moduleExports.default };
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
issue: {
|
|
426
|
+
code: 'missing-default-export',
|
|
427
|
+
severity: 'error',
|
|
428
|
+
message: 'The workspace config module has no default export. Export the config with `export default defineElytraConfig({...})`.',
|
|
429
|
+
path: [],
|
|
430
|
+
...(file !== undefined ? { file } : {}),
|
|
431
|
+
},
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
//# sourceMappingURL=workspace-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-config.js","sourceRoot":"","sources":["../../src/studio-core/workspace-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B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QAAQ,KAAK,OAAO,CAAC,CAAA;IAC/D,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA;AAC9D,CAAC;AAED,qFAAqF;AAErF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEvD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;CACX,CAAA;AAEV;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,aAAsB,EACtB,IAAa;IAEb,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,IAAI,IAAI,SAAS,IAAI,aAAa,EAAE,CAAC;QAC9F,OAAO,EAAE,KAAK,EAAG,aAAsC,CAAC,OAAO,EAAE,CAAA;IACnE,CAAC;IACD,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,wBAAwB;YAC9B,QAAQ,EAAE,OAAO;YACjB,OAAO,EACL,uHAAuH;YACzH,IAAI,EAAE,EAAE;YACR,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elytracms/core",
|
|
3
|
+
"author": "finaldream <hi@finaldream.de>",
|
|
4
|
+
"version": "0.0.6",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./project-graph": {
|
|
10
|
+
"types": "./dist/project-graph/index.d.ts",
|
|
11
|
+
"default": "./dist/project-graph/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./cms-core": {
|
|
14
|
+
"types": "./dist/cms-core/index.d.ts",
|
|
15
|
+
"default": "./dist/cms-core/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./content": {
|
|
18
|
+
"types": "./dist/content/index.d.ts",
|
|
19
|
+
"default": "./dist/content/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./component-registry": {
|
|
22
|
+
"types": "./dist/component-registry/index.d.ts",
|
|
23
|
+
"default": "./dist/component-registry/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./runtime-renderer": {
|
|
26
|
+
"types": "./dist/runtime-renderer/index.d.ts",
|
|
27
|
+
"default": "./dist/runtime-renderer/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./persistence": {
|
|
30
|
+
"types": "./dist/persistence/index.d.ts",
|
|
31
|
+
"default": "./dist/persistence/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./rich-text": {
|
|
34
|
+
"types": "./dist/rich-text/index.d.ts",
|
|
35
|
+
"default": "./dist/rich-text/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./data-binding": {
|
|
38
|
+
"types": "./dist/data-binding/index.d.ts",
|
|
39
|
+
"default": "./dist/data-binding/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./design-tokens": {
|
|
42
|
+
"types": "./dist/design-tokens/index.d.ts",
|
|
43
|
+
"default": "./dist/design-tokens/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./operations": {
|
|
46
|
+
"types": "./dist/operations/index.d.ts",
|
|
47
|
+
"default": "./dist/operations/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./clipboard": {
|
|
50
|
+
"types": "./dist/clipboard/index.d.ts",
|
|
51
|
+
"default": "./dist/clipboard/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./collaboration": {
|
|
54
|
+
"types": "./dist/collaboration/index.d.ts",
|
|
55
|
+
"default": "./dist/collaboration/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./plugins": {
|
|
58
|
+
"types": "./dist/plugins/index.d.ts",
|
|
59
|
+
"default": "./dist/plugins/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./starter-kits": {
|
|
62
|
+
"types": "./dist/starter-kits/index.d.ts",
|
|
63
|
+
"default": "./dist/starter-kits/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./studio-core": {
|
|
66
|
+
"types": "./dist/studio-core/index.d.ts",
|
|
67
|
+
"default": "./dist/studio-core/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./export-sync": {
|
|
70
|
+
"types": "./dist/export-sync/index.d.ts",
|
|
71
|
+
"default": "./dist/export-sync/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./runtime-renderer/client": {
|
|
74
|
+
"types": "./dist/runtime-renderer/client.d.ts",
|
|
75
|
+
"default": "./dist/runtime-renderer/client.js"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"zod": "^4.0.0"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"react": "^19.0.0",
|
|
83
|
+
"react-dom": "^19.0.0"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/node": "^22.0.0",
|
|
87
|
+
"@types/react": "^19.0.0",
|
|
88
|
+
"@types/react-dom": "^19.0.0",
|
|
89
|
+
"react": "^19.0.0",
|
|
90
|
+
"react-dom": "^19.0.0",
|
|
91
|
+
"typescript": "^5.7.0"
|
|
92
|
+
},
|
|
93
|
+
"files": [
|
|
94
|
+
"dist"
|
|
95
|
+
],
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"build": "tsc -p tsconfig.build.json",
|
|
101
|
+
"typecheck": "tsc --noEmit",
|
|
102
|
+
"lint": "eslint src"
|
|
103
|
+
}
|
|
104
|
+
}
|