@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,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { OperationsRuntime } from './core';
|
|
3
|
+
/**
|
|
4
|
+
* Project-member management (EC-150, vision AD-7). Membership writes flow
|
|
5
|
+
* through the same chokepoint as every other mutation, so the role hook can
|
|
6
|
+
* enforce that only project `admin`s manage members — editors and viewers get
|
|
7
|
+
* structured denials, never UI-only gating.
|
|
8
|
+
*/
|
|
9
|
+
export declare const setMemberInputSchema: z.ZodObject<{
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
userId: z.ZodString;
|
|
12
|
+
role: z.ZodEnum<{
|
|
13
|
+
admin: "admin";
|
|
14
|
+
editor: "editor";
|
|
15
|
+
viewer: "viewer";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const removeMemberInputSchema: z.ZodObject<{
|
|
19
|
+
projectId: z.ZodString;
|
|
20
|
+
userId: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const listMembersInputSchema: z.ZodObject<{
|
|
23
|
+
projectId: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const memberOperationDefinitions: {
|
|
26
|
+
readonly set: import("./core").OperationDefinition<z.ZodObject<{
|
|
27
|
+
projectId: z.ZodString;
|
|
28
|
+
userId: z.ZodString;
|
|
29
|
+
role: z.ZodEnum<{
|
|
30
|
+
admin: "admin";
|
|
31
|
+
editor: "editor";
|
|
32
|
+
viewer: "viewer";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strip>, {
|
|
35
|
+
projectId: string;
|
|
36
|
+
userId: string;
|
|
37
|
+
role: "admin" | "editor" | "viewer";
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}>;
|
|
41
|
+
readonly remove: import("./core").OperationDefinition<z.ZodObject<{
|
|
42
|
+
projectId: z.ZodString;
|
|
43
|
+
userId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, {
|
|
45
|
+
projectId: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
}>;
|
|
48
|
+
readonly list: import("./core").OperationDefinition<z.ZodObject<{
|
|
49
|
+
projectId: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, {
|
|
51
|
+
projectId: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
role: "admin" | "editor" | "viewer";
|
|
54
|
+
createdAt: string;
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
}[]>;
|
|
57
|
+
};
|
|
58
|
+
export declare function createMemberOperations(runtime: OperationsRuntime): {
|
|
59
|
+
set: (input: {
|
|
60
|
+
projectId: string;
|
|
61
|
+
userId: string;
|
|
62
|
+
role: "admin" | "editor" | "viewer";
|
|
63
|
+
}) => Promise<import("./core").OperationResult<{
|
|
64
|
+
projectId: string;
|
|
65
|
+
userId: string;
|
|
66
|
+
role: "admin" | "editor" | "viewer";
|
|
67
|
+
createdAt: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
}>>;
|
|
70
|
+
remove: (input: {
|
|
71
|
+
projectId: string;
|
|
72
|
+
userId: string;
|
|
73
|
+
}) => Promise<import("./core").OperationResult<{
|
|
74
|
+
projectId: string;
|
|
75
|
+
userId: string;
|
|
76
|
+
}>>;
|
|
77
|
+
list: (input: {
|
|
78
|
+
projectId: string;
|
|
79
|
+
}) => Promise<import("./core").OperationResult<{
|
|
80
|
+
projectId: string;
|
|
81
|
+
userId: string;
|
|
82
|
+
role: "admin" | "editor" | "viewer";
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
}[]>>;
|
|
86
|
+
};
|
|
87
|
+
export type MemberOperations = ReturnType<typeof createMemberOperations>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { projectIdSchema } from '@elytracms/core/studio-core';
|
|
3
|
+
import { projectRoleSchema } from '@elytracms/core/persistence';
|
|
4
|
+
import { bindOperation, defineCommand, defineQuery } from './core';
|
|
5
|
+
/**
|
|
6
|
+
* Project-member management (EC-150, vision AD-7). Membership writes flow
|
|
7
|
+
* through the same chokepoint as every other mutation, so the role hook can
|
|
8
|
+
* enforce that only project `admin`s manage members — editors and viewers get
|
|
9
|
+
* structured denials, never UI-only gating.
|
|
10
|
+
*/
|
|
11
|
+
export const setMemberInputSchema = z.object({
|
|
12
|
+
projectId: projectIdSchema,
|
|
13
|
+
userId: z.string().min(1),
|
|
14
|
+
role: projectRoleSchema,
|
|
15
|
+
});
|
|
16
|
+
export const removeMemberInputSchema = z.object({
|
|
17
|
+
projectId: projectIdSchema,
|
|
18
|
+
userId: z.string().min(1),
|
|
19
|
+
});
|
|
20
|
+
export const listMembersInputSchema = z.object({
|
|
21
|
+
projectId: projectIdSchema,
|
|
22
|
+
});
|
|
23
|
+
export const memberOperationDefinitions = {
|
|
24
|
+
set: defineCommand({
|
|
25
|
+
name: 'members.set',
|
|
26
|
+
domain: 'members',
|
|
27
|
+
description: 'Add a member to a project or change their role (admin/editor/viewer).',
|
|
28
|
+
input: setMemberInputSchema,
|
|
29
|
+
execute: (context, input) => context.adapter.members.setMember(input.projectId, input.userId, input.role),
|
|
30
|
+
}),
|
|
31
|
+
remove: defineCommand({
|
|
32
|
+
name: 'members.remove',
|
|
33
|
+
domain: 'members',
|
|
34
|
+
description: 'Remove a member from a project.',
|
|
35
|
+
input: removeMemberInputSchema,
|
|
36
|
+
execute: async (context, input) => {
|
|
37
|
+
await context.adapter.members.removeMember(input.projectId, input.userId);
|
|
38
|
+
return { projectId: input.projectId, userId: input.userId };
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
list: defineQuery({
|
|
42
|
+
name: 'members.list',
|
|
43
|
+
domain: 'members',
|
|
44
|
+
description: 'List the members of a project with their roles.',
|
|
45
|
+
input: listMembersInputSchema,
|
|
46
|
+
execute: (context, input) => context.adapter.members.listMembers(input.projectId),
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
49
|
+
export function createMemberOperations(runtime) {
|
|
50
|
+
return {
|
|
51
|
+
set: bindOperation(runtime, memberOperationDefinitions.set),
|
|
52
|
+
remove: bindOperation(runtime, memberOperationDefinitions.remove),
|
|
53
|
+
list: bindOperation(runtime, memberOperationDefinitions.list),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/operations/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGlE;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,eAAe;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,iBAAiB;CACxB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,eAAe;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,eAAe;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE,aAAa,CAAC;QACjB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,uEAAuE;QACpF,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAC1B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC;KAC/E,CAAC;IACF,MAAM,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,iCAAiC;QAC9C,KAAK,EAAE,uBAAuB;QAC9B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;YAChC,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YACzE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAA;QAC7D,CAAC;KACF,CAAC;IACF,IAAI,EAAE,WAAW,CAAC;QAChB,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,iDAAiD;QAC9D,KAAK,EAAE,sBAAsB;QAC7B,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;KAClF,CAAC;CACM,CAAA;AAEV,MAAM,UAAU,sBAAsB,CAAC,OAA0B;IAC/D,OAAO;QACL,GAAG,EAAE,aAAa,CAAC,OAAO,EAAE,0BAA0B,CAAC,GAAG,CAAC;QAC3D,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,0BAA0B,CAAC,MAAM,CAAC;QACjE,IAAI,EAAE,aAAa,CAAC,OAAO,EAAE,0BAA0B,CAAC,IAAI,CAAC;KAC9D,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { OperationsRuntime } from './core';
|
|
3
|
+
/**
|
|
4
|
+
* Publishing operations (EC-139). Pins a graph revision live (or reverts it to
|
|
5
|
+
* draft) — the persistent counterpart to the studio's publish flow in the
|
|
6
|
+
* collaboration drawer. Single-environment (EC-179, vision AD-8): a deployment
|
|
7
|
+
* IS one environment, so there is no environment dimension and no promote —
|
|
8
|
+
* see `env-is-deployment-boundary`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const publishInputSchema: z.ZodObject<{
|
|
11
|
+
projectId: z.ZodString;
|
|
12
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const publishingRefInputSchema: z.ZodObject<{
|
|
15
|
+
projectId: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const publishingOperationDefinitions: {
|
|
18
|
+
readonly publish: import("./core").OperationDefinition<z.ZodObject<{
|
|
19
|
+
projectId: z.ZodString;
|
|
20
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>, {
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
projectId: string;
|
|
25
|
+
status: "draft" | "published";
|
|
26
|
+
publishedRevisionId?: string | undefined;
|
|
27
|
+
publishedRevision?: number | undefined;
|
|
28
|
+
publishedAt?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
readonly unpublish: import("./core").OperationDefinition<z.ZodObject<{
|
|
31
|
+
projectId: z.ZodString;
|
|
32
|
+
}, z.core.$strip>, {
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
projectId: string;
|
|
36
|
+
status: "draft" | "published";
|
|
37
|
+
publishedRevisionId?: string | undefined;
|
|
38
|
+
publishedRevision?: number | undefined;
|
|
39
|
+
publishedAt?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
readonly getState: import("./core").OperationDefinition<z.ZodObject<{
|
|
42
|
+
projectId: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, {
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
projectId: string;
|
|
47
|
+
status: "draft" | "published";
|
|
48
|
+
publishedRevisionId?: string | undefined;
|
|
49
|
+
publishedRevision?: number | undefined;
|
|
50
|
+
publishedAt?: string | undefined;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
};
|
|
53
|
+
export declare function createPublishingOperations(runtime: OperationsRuntime): {
|
|
54
|
+
publish: (input: {
|
|
55
|
+
projectId: string;
|
|
56
|
+
revision?: number | undefined;
|
|
57
|
+
}) => Promise<import("./core").OperationResult<{
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
projectId: string;
|
|
61
|
+
status: "draft" | "published";
|
|
62
|
+
publishedRevisionId?: string | undefined;
|
|
63
|
+
publishedRevision?: number | undefined;
|
|
64
|
+
publishedAt?: string | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
unpublish: (input: {
|
|
67
|
+
projectId: string;
|
|
68
|
+
}) => Promise<import("./core").OperationResult<{
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
projectId: string;
|
|
72
|
+
status: "draft" | "published";
|
|
73
|
+
publishedRevisionId?: string | undefined;
|
|
74
|
+
publishedRevision?: number | undefined;
|
|
75
|
+
publishedAt?: string | undefined;
|
|
76
|
+
}>>;
|
|
77
|
+
getState: (input: {
|
|
78
|
+
projectId: string;
|
|
79
|
+
}) => Promise<import("./core").OperationResult<{
|
|
80
|
+
createdAt: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
projectId: string;
|
|
83
|
+
status: "draft" | "published";
|
|
84
|
+
publishedRevisionId?: string | undefined;
|
|
85
|
+
publishedRevision?: number | undefined;
|
|
86
|
+
publishedAt?: string | undefined;
|
|
87
|
+
} | undefined>>;
|
|
88
|
+
};
|
|
89
|
+
export type PublishingOperations = ReturnType<typeof createPublishingOperations>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { projectIdSchema } from '@elytracms/core/studio-core';
|
|
3
|
+
import { bindOperation, defineCommand, defineQuery } from './core';
|
|
4
|
+
/**
|
|
5
|
+
* Publishing operations (EC-139). Pins a graph revision live (or reverts it to
|
|
6
|
+
* draft) — the persistent counterpart to the studio's publish flow in the
|
|
7
|
+
* collaboration drawer. Single-environment (EC-179, vision AD-8): a deployment
|
|
8
|
+
* IS one environment, so there is no environment dimension and no promote —
|
|
9
|
+
* see `env-is-deployment-boundary`.
|
|
10
|
+
*/
|
|
11
|
+
export const publishInputSchema = z.object({
|
|
12
|
+
projectId: projectIdSchema,
|
|
13
|
+
/** Graph revision number to publish; defaults to the latest revision. */
|
|
14
|
+
revision: z.number().int().positive().optional(),
|
|
15
|
+
});
|
|
16
|
+
export const publishingRefInputSchema = z.object({
|
|
17
|
+
projectId: projectIdSchema,
|
|
18
|
+
});
|
|
19
|
+
export const publishingOperationDefinitions = {
|
|
20
|
+
publish: defineCommand({
|
|
21
|
+
name: 'publishing.publish',
|
|
22
|
+
domain: 'publishing',
|
|
23
|
+
description: 'Publish a graph revision (latest when omitted).',
|
|
24
|
+
input: publishInputSchema,
|
|
25
|
+
execute: async (context, input) => {
|
|
26
|
+
const loaded = input.revision !== undefined
|
|
27
|
+
? await context.adapter.graphs.getRevision(input.projectId, input.revision)
|
|
28
|
+
: await context.adapter.graphs.getLatest(input.projectId);
|
|
29
|
+
return context.adapter.publishing.publish(input.projectId, {
|
|
30
|
+
revisionId: loaded.revision.id,
|
|
31
|
+
revision: loaded.revision.revision,
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
unpublish: defineCommand({
|
|
36
|
+
name: 'publishing.unpublish',
|
|
37
|
+
domain: 'publishing',
|
|
38
|
+
description: 'Revert to draft (must currently be published).',
|
|
39
|
+
input: publishingRefInputSchema,
|
|
40
|
+
execute: (context, input) => context.adapter.publishing.unpublish(input.projectId),
|
|
41
|
+
}),
|
|
42
|
+
getState: defineQuery({
|
|
43
|
+
name: 'publishing.getState',
|
|
44
|
+
domain: 'publishing',
|
|
45
|
+
description: 'Load the publishing state (undefined before the first publish).',
|
|
46
|
+
input: publishingRefInputSchema,
|
|
47
|
+
execute: (context, input) => context.adapter.publishing.findState(input.projectId),
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
export function createPublishingOperations(runtime) {
|
|
51
|
+
return {
|
|
52
|
+
publish: bindOperation(runtime, publishingOperationDefinitions.publish),
|
|
53
|
+
unpublish: bindOperation(runtime, publishingOperationDefinitions.unpublish),
|
|
54
|
+
getState: bindOperation(runtime, publishingOperationDefinitions.getState),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=publishing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishing.js","sourceRoot":"","sources":["../../src/operations/publishing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGlE;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,eAAe;IAC1B,yEAAyE;IACzE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,eAAe;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,OAAO,EAAE,aAAa,CAAC;QACrB,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,YAAY;QACpB,WAAW,EAAE,iDAAiD;QAC9D,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;YAChC,MAAM,MAAM,GACV,KAAK,CAAC,QAAQ,KAAK,SAAS;gBAC1B,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;gBAC3E,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;YAC7D,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE;gBACzD,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;gBAC9B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ;aACnC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC;IACF,SAAS,EAAE,aAAa,CAAC;QACvB,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,YAAY;QACpB,WAAW,EAAE,gDAAgD;QAC7D,KAAK,EAAE,wBAAwB;QAC/B,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;KACnF,CAAC;IACF,QAAQ,EAAE,WAAW,CAAC;QACpB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,YAAY;QACpB,WAAW,EAAE,iEAAiE;QAC9E,KAAK,EAAE,wBAAwB;QAC/B,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;KACnF,CAAC;CACM,CAAA;AAEV,MAAM,UAAU,0BAA0B,CAAC,OAA0B;IACnE,OAAO;QACL,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,8BAA8B,CAAC,OAAO,CAAC;QACvE,SAAS,EAAE,aAAa,CAAC,OAAO,EAAE,8BAA8B,CAAC,SAAS,CAAC;QAC3E,QAAQ,EAAE,aAAa,CAAC,OAAO,EAAE,8BAA8B,CAAC,QAAQ,CAAC;KAC1E,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PersistenceAdapter } from '@elytracms/core/persistence';
|
|
3
|
+
import type { OperationEvent, OperationEventBus, OperationsRuntime } from './core';
|
|
4
|
+
/**
|
|
5
|
+
* Reference-index operations (EC-155, vision AD-6/AD-7).
|
|
6
|
+
*
|
|
7
|
+
* Two halves, one file (self-contained by design):
|
|
8
|
+
* 1. The query API — `references.inbound` / `references.outbound` lookups with
|
|
9
|
+
* field/node-path granularity (the substrate for Milestone B deep links),
|
|
10
|
+
* plus the `references.backfill` command that rebuilds a project's index.
|
|
11
|
+
* 2. {@link attachReferenceIndex} — an event-bus subscriber that keeps the
|
|
12
|
+
* index maintained on write: document/graph/publishing command successes
|
|
13
|
+
* trigger a recompute of the affected sources (replace-all-for-source, so
|
|
14
|
+
* edits/deletes/unpublishes can never leave stale entries).
|
|
15
|
+
*/
|
|
16
|
+
export declare const outboundReferencesInputSchema: z.ZodObject<{
|
|
17
|
+
projectId: z.ZodString;
|
|
18
|
+
source: z.ZodObject<{
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
document: "document";
|
|
21
|
+
page: "page";
|
|
22
|
+
layout: "layout";
|
|
23
|
+
}>;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
draft: "draft";
|
|
28
|
+
published: "published";
|
|
29
|
+
}>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const inboundReferencesInputSchema: z.ZodObject<{
|
|
32
|
+
projectId: z.ZodString;
|
|
33
|
+
target: z.ZodObject<{
|
|
34
|
+
type: z.ZodEnum<{
|
|
35
|
+
asset: "asset";
|
|
36
|
+
document: "document";
|
|
37
|
+
component: "component";
|
|
38
|
+
}>;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
draft: "draft";
|
|
43
|
+
published: "published";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export declare const backfillReferencesInputSchema: z.ZodObject<{
|
|
47
|
+
projectId: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const referenceBuildMarkerInputSchema: z.ZodObject<{
|
|
50
|
+
projectId: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export declare const referenceOperationDefinitions: {
|
|
53
|
+
readonly outbound: import("./core").OperationDefinition<z.ZodObject<{
|
|
54
|
+
projectId: z.ZodString;
|
|
55
|
+
source: z.ZodObject<{
|
|
56
|
+
type: z.ZodEnum<{
|
|
57
|
+
document: "document";
|
|
58
|
+
page: "page";
|
|
59
|
+
layout: "layout";
|
|
60
|
+
}>;
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
draft: "draft";
|
|
65
|
+
published: "published";
|
|
66
|
+
}>>;
|
|
67
|
+
}, z.core.$strip>, {
|
|
68
|
+
path: string;
|
|
69
|
+
target: {
|
|
70
|
+
type: "asset" | "document" | "component";
|
|
71
|
+
id: string;
|
|
72
|
+
};
|
|
73
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
74
|
+
source: {
|
|
75
|
+
type: "document" | "page" | "layout";
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
projectId: string;
|
|
79
|
+
variant: "draft" | "published";
|
|
80
|
+
}[]>;
|
|
81
|
+
readonly inbound: import("./core").OperationDefinition<z.ZodObject<{
|
|
82
|
+
projectId: z.ZodString;
|
|
83
|
+
target: z.ZodObject<{
|
|
84
|
+
type: z.ZodEnum<{
|
|
85
|
+
asset: "asset";
|
|
86
|
+
document: "document";
|
|
87
|
+
component: "component";
|
|
88
|
+
}>;
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
draft: "draft";
|
|
93
|
+
published: "published";
|
|
94
|
+
}>>;
|
|
95
|
+
}, z.core.$strip>, {
|
|
96
|
+
path: string;
|
|
97
|
+
target: {
|
|
98
|
+
type: "asset" | "document" | "component";
|
|
99
|
+
id: string;
|
|
100
|
+
};
|
|
101
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
102
|
+
source: {
|
|
103
|
+
type: "document" | "page" | "layout";
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
106
|
+
projectId: string;
|
|
107
|
+
variant: "draft" | "published";
|
|
108
|
+
}[]>;
|
|
109
|
+
readonly backfill: import("./core").OperationDefinition<z.ZodObject<{
|
|
110
|
+
projectId: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, {
|
|
112
|
+
path: string;
|
|
113
|
+
target: {
|
|
114
|
+
type: "asset" | "document" | "component";
|
|
115
|
+
id: string;
|
|
116
|
+
};
|
|
117
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
118
|
+
source: {
|
|
119
|
+
type: "document" | "page" | "layout";
|
|
120
|
+
id: string;
|
|
121
|
+
};
|
|
122
|
+
projectId: string;
|
|
123
|
+
variant: "draft" | "published";
|
|
124
|
+
}[]>;
|
|
125
|
+
readonly buildMarker: import("./core").OperationDefinition<z.ZodObject<{
|
|
126
|
+
projectId: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, import("@elytracms/core/persistence").ReferenceIndexBuildMarker | null>;
|
|
128
|
+
};
|
|
129
|
+
export declare function createReferenceOperations(runtime: OperationsRuntime): {
|
|
130
|
+
outbound: (input: {
|
|
131
|
+
projectId: string;
|
|
132
|
+
source: {
|
|
133
|
+
type: "document" | "page" | "layout";
|
|
134
|
+
id: string;
|
|
135
|
+
};
|
|
136
|
+
variant?: "draft" | "published" | undefined;
|
|
137
|
+
}) => Promise<import("./core").OperationResult<{
|
|
138
|
+
path: string;
|
|
139
|
+
target: {
|
|
140
|
+
type: "asset" | "document" | "component";
|
|
141
|
+
id: string;
|
|
142
|
+
};
|
|
143
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
144
|
+
source: {
|
|
145
|
+
type: "document" | "page" | "layout";
|
|
146
|
+
id: string;
|
|
147
|
+
};
|
|
148
|
+
projectId: string;
|
|
149
|
+
variant: "draft" | "published";
|
|
150
|
+
}[]>>;
|
|
151
|
+
inbound: (input: {
|
|
152
|
+
projectId: string;
|
|
153
|
+
target: {
|
|
154
|
+
type: "asset" | "document" | "component";
|
|
155
|
+
id: string;
|
|
156
|
+
};
|
|
157
|
+
variant?: "draft" | "published" | undefined;
|
|
158
|
+
}) => Promise<import("./core").OperationResult<{
|
|
159
|
+
path: string;
|
|
160
|
+
target: {
|
|
161
|
+
type: "asset" | "document" | "component";
|
|
162
|
+
id: string;
|
|
163
|
+
};
|
|
164
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
165
|
+
source: {
|
|
166
|
+
type: "document" | "page" | "layout";
|
|
167
|
+
id: string;
|
|
168
|
+
};
|
|
169
|
+
projectId: string;
|
|
170
|
+
variant: "draft" | "published";
|
|
171
|
+
}[]>>;
|
|
172
|
+
backfill: (input: {
|
|
173
|
+
projectId: string;
|
|
174
|
+
}) => Promise<import("./core").OperationResult<{
|
|
175
|
+
path: string;
|
|
176
|
+
target: {
|
|
177
|
+
type: "asset" | "document" | "component";
|
|
178
|
+
id: string;
|
|
179
|
+
};
|
|
180
|
+
kind: "relation-field" | "asset-field" | "rich-text-link" | "rich-text-node" | "component-usage" | "prop-binding" | "condition-binding";
|
|
181
|
+
source: {
|
|
182
|
+
type: "document" | "page" | "layout";
|
|
183
|
+
id: string;
|
|
184
|
+
};
|
|
185
|
+
projectId: string;
|
|
186
|
+
variant: "draft" | "published";
|
|
187
|
+
}[]>>;
|
|
188
|
+
buildMarker: (input: {
|
|
189
|
+
projectId: string;
|
|
190
|
+
}) => Promise<import("./core").OperationResult<import("@elytracms/core/persistence").ReferenceIndexBuildMarker | null>>;
|
|
191
|
+
};
|
|
192
|
+
export type ReferenceOperations = ReturnType<typeof createReferenceOperations>;
|
|
193
|
+
export interface AttachReferenceIndexOptions {
|
|
194
|
+
/**
|
|
195
|
+
* Observes index-update failures. Updates run outside the command pipeline and
|
|
196
|
+
* must never break it (mirrors the event bus's listener isolation), so
|
|
197
|
+
* failures are reported here instead of thrown.
|
|
198
|
+
*/
|
|
199
|
+
onError?: (error: unknown, event: OperationEvent) => void;
|
|
200
|
+
}
|
|
201
|
+
export interface ReferenceIndexAttachment {
|
|
202
|
+
/** Stop listening (already-queued updates still run). */
|
|
203
|
+
detach: () => void;
|
|
204
|
+
/** Await every index update queued so far (updates are async; events are sync). */
|
|
205
|
+
flush: () => Promise<void>;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Subscribe the reference index to the EC-139 lifecycle event bus so it is
|
|
209
|
+
* maintained on every write:
|
|
210
|
+
*
|
|
211
|
+
* - `documents` command success → recompute that document's entries (or all
|
|
212
|
+
* documents when the summary was truncated past the document identity);
|
|
213
|
+
* deletes drop entries because the recompute of a missing document is empty.
|
|
214
|
+
* - `graph` command success → recompute the draft graph entries from the new
|
|
215
|
+
* latest revision.
|
|
216
|
+
* - `publishing` command success → recompute the published graph entries from
|
|
217
|
+
* the currently pinned revisions (unpublish included).
|
|
218
|
+
*
|
|
219
|
+
* Updates run on a serial queue for deterministic ordering; await
|
|
220
|
+
* {@link ReferenceIndexAttachment.flush} to observe a settled index.
|
|
221
|
+
*/
|
|
222
|
+
export declare function attachReferenceIndex(events: OperationEventBus, adapter: PersistenceAdapter, options?: AttachReferenceIndexOptions): ReferenceIndexAttachment;
|