@decocms/blocks 8.9.1 → 8.11.0
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol/channel.d.ts +98 -0
- package/dist/protocol/channel.d.ts.map +1 -0
- package/dist/protocol/channel.js +58 -0
- package/dist/protocol/channel.js.map +1 -0
- package/dist/protocol/client.js +2 -2
- package/dist/protocol/client.js.map +1 -1
- package/dist/protocol/conformance/blockMetaVectors.json +214 -0
- package/dist/protocol/conformance/contentHashFixtures.d.ts +22 -0
- package/dist/protocol/conformance/contentHashFixtures.d.ts.map +1 -1
- package/dist/protocol/conformance/contentHashFixtures.js +55 -0
- package/dist/protocol/conformance/contentHashFixtures.js.map +1 -1
- package/dist/protocol/conformance/index.d.ts +2 -1
- package/dist/protocol/conformance/index.d.ts.map +1 -1
- package/dist/protocol/conformance/index.js +2 -1
- package/dist/protocol/conformance/index.js.map +1 -1
- package/dist/protocol/conformance/vectors.d.ts +33 -0
- package/dist/protocol/conformance/vectors.d.ts.map +1 -0
- package/dist/protocol/conformance/vectors.js +3 -0
- package/dist/protocol/conformance/vectors.js.map +1 -0
- package/dist/protocol/index.d.ts +11 -1
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +11 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/keys.d.ts +1 -1
- package/dist/protocol/keys.js +1 -1
- package/dist/v8/background.d.ts +13 -0
- package/dist/v8/background.d.ts.map +1 -1
- package/dist/v8/background.js +41 -0
- package/dist/v8/background.js.map +1 -1
- package/dist/v8/blockMeta.d.ts +27 -0
- package/dist/v8/blockMeta.d.ts.map +1 -0
- package/dist/v8/blockMeta.js +75 -0
- package/dist/v8/blockMeta.js.map +1 -0
- package/dist/v8/blockStore.d.ts +43 -0
- package/dist/v8/blockStore.d.ts.map +1 -0
- package/dist/v8/blockStore.js +95 -0
- package/dist/v8/blockStore.js.map +1 -0
- package/dist/v8/boundedJson.d.ts +5 -0
- package/dist/v8/boundedJson.d.ts.map +1 -1
- package/dist/v8/boundedJson.js +10 -2
- package/dist/v8/boundedJson.js.map +1 -1
- package/dist/v8/boundedMap.d.ts +19 -0
- package/dist/v8/boundedMap.d.ts.map +1 -0
- package/dist/v8/boundedMap.js +52 -0
- package/dist/v8/boundedMap.js.map +1 -0
- package/dist/v8/builtins/data.d.ts +18 -2
- package/dist/v8/builtins/data.d.ts.map +1 -1
- package/dist/v8/builtins/data.js +17 -1
- package/dist/v8/builtins/data.js.map +1 -1
- package/dist/v8/builtins/index.d.ts.map +1 -1
- package/dist/v8/builtins/index.js +2 -1
- package/dist/v8/builtins/index.js.map +1 -1
- package/dist/v8/builtins/legacy.d.ts +6 -3
- package/dist/v8/builtins/legacy.d.ts.map +1 -1
- package/dist/v8/builtins/legacy.js +6 -3
- package/dist/v8/builtins/legacy.js.map +1 -1
- package/dist/v8/canonical.d.ts +8 -0
- package/dist/v8/canonical.d.ts.map +1 -1
- package/dist/v8/canonical.js +15 -0
- package/dist/v8/canonical.js.map +1 -1
- package/dist/v8/cli/builtins.d.ts.map +1 -1
- package/dist/v8/cli/builtins.js +1 -0
- package/dist/v8/cli/builtins.js.map +1 -1
- package/dist/v8/cli/check/index.d.ts +10 -0
- package/dist/v8/cli/check/index.d.ts.map +1 -1
- package/dist/v8/cli/check/index.js +91 -7
- package/dist/v8/cli/check/index.js.map +1 -1
- package/dist/v8/cli/content.d.ts +12 -25
- package/dist/v8/cli/content.d.ts.map +1 -1
- package/dist/v8/cli/content.js +46 -75
- package/dist/v8/cli/content.js.map +1 -1
- package/dist/v8/cli/index.d.ts +2 -2
- package/dist/v8/cli/index.d.ts.map +1 -1
- package/dist/v8/cli/index.js +2 -2
- package/dist/v8/cli/index.js.map +1 -1
- package/dist/v8/cli/remote/commands.d.ts +71 -0
- package/dist/v8/cli/remote/commands.d.ts.map +1 -0
- package/dist/v8/cli/remote/commands.js +644 -0
- package/dist/v8/cli/remote/commands.js.map +1 -0
- package/dist/v8/cli/remote/diff.d.ts +15 -0
- package/dist/v8/cli/remote/diff.d.ts.map +1 -0
- package/dist/v8/cli/remote/diff.js +102 -0
- package/dist/v8/cli/remote/diff.js.map +1 -0
- package/dist/v8/cli/remote/env.d.ts +35 -0
- package/dist/v8/cli/remote/env.d.ts.map +1 -0
- package/dist/v8/cli/remote/env.js +84 -0
- package/dist/v8/cli/remote/env.js.map +1 -0
- package/dist/v8/cli/remote/http.d.ts +149 -0
- package/dist/v8/cli/remote/http.d.ts.map +1 -0
- package/dist/v8/cli/remote/http.js +381 -0
- package/dist/v8/cli/remote/http.js.map +1 -0
- package/dist/v8/cli/remote/local.d.ts +90 -0
- package/dist/v8/cli/remote/local.d.ts.map +1 -0
- package/dist/v8/cli/remote/local.js +309 -0
- package/dist/v8/cli/remote/local.js.map +1 -0
- package/dist/v8/cli/root.d.ts +29 -0
- package/dist/v8/cli/root.d.ts.map +1 -1
- package/dist/v8/cli/root.js +28 -0
- package/dist/v8/cli/root.js.map +1 -1
- package/dist/v8/cli/run.d.ts +13 -1
- package/dist/v8/cli/run.d.ts.map +1 -1
- package/dist/v8/cli/run.js +310 -124
- package/dist/v8/cli/run.js.map +1 -1
- package/dist/v8/cli/schema/builtinSchemas.d.ts.map +1 -1
- package/dist/v8/cli/schema/builtinSchemas.js +28 -10
- package/dist/v8/cli/schema/builtinSchemas.js.map +1 -1
- package/dist/v8/cli/schema/generate.js +1 -1
- package/dist/v8/cli/schema/generate.js.map +1 -1
- package/dist/v8/cli/skills.d.ts +25 -0
- package/dist/v8/cli/skills.d.ts.map +1 -0
- package/dist/v8/cli/skills.js +70 -0
- package/dist/v8/cli/skills.js.map +1 -0
- package/dist/v8/client.d.ts +9 -9
- package/dist/v8/client.d.ts.map +1 -1
- package/dist/v8/client.js +138 -50
- package/dist/v8/client.js.map +1 -1
- package/dist/v8/cms.d.ts +2 -1
- package/dist/v8/cms.d.ts.map +1 -1
- package/dist/v8/cms.js +55 -46
- package/dist/v8/cms.js.map +1 -1
- package/dist/v8/content.d.ts +39 -78
- package/dist/v8/content.d.ts.map +1 -1
- package/dist/v8/content.js +155 -195
- package/dist/v8/content.js.map +1 -1
- package/dist/v8/contentIndex.d.ts +71 -0
- package/dist/v8/contentIndex.d.ts.map +1 -0
- package/dist/v8/contentIndex.js +137 -0
- package/dist/v8/contentIndex.js.map +1 -0
- package/dist/v8/draft.d.ts +7 -7
- package/dist/v8/draft.d.ts.map +1 -1
- package/dist/v8/draft.js +10 -9
- package/dist/v8/draft.js.map +1 -1
- package/dist/v8/draftChanges.d.ts +59 -32
- package/dist/v8/draftChanges.d.ts.map +1 -1
- package/dist/v8/draftChanges.js +139 -75
- package/dist/v8/draftChanges.js.map +1 -1
- package/dist/v8/errors.d.ts +21 -0
- package/dist/v8/errors.d.ts.map +1 -1
- package/dist/v8/errors.js +22 -0
- package/dist/v8/errors.js.map +1 -1
- package/dist/v8/hostedSource.d.ts +57 -0
- package/dist/v8/hostedSource.d.ts.map +1 -0
- package/dist/v8/hostedSource.js +18 -0
- package/dist/v8/hostedSource.js.map +1 -0
- package/dist/v8/identity.d.ts +1 -1
- package/dist/v8/identity.js +1 -1
- package/dist/v8/index.d.ts +1 -0
- package/dist/v8/index.d.ts.map +1 -1
- package/dist/v8/index.js +1 -0
- package/dist/v8/index.js.map +1 -1
- package/dist/v8/matchRoute.js +7 -4
- package/dist/v8/matchRoute.js.map +1 -1
- package/dist/v8/pin.d.ts +34 -0
- package/dist/v8/pin.d.ts.map +1 -0
- package/dist/v8/pin.js +156 -0
- package/dist/v8/pin.js.map +1 -0
- package/dist/v8/preview/StudioBridge.d.ts +8 -8
- package/dist/v8/preview/StudioBridge.d.ts.map +1 -1
- package/dist/v8/preview/StudioBridge.js +8 -10
- package/dist/v8/preview/StudioBridge.js.map +1 -1
- package/dist/v8/preview/StudioChannel.d.ts +51 -0
- package/dist/v8/preview/StudioChannel.d.ts.map +1 -0
- package/dist/v8/preview/StudioChannel.js +104 -0
- package/dist/v8/preview/StudioChannel.js.map +1 -0
- package/dist/v8/preview/index.d.ts +3 -0
- package/dist/v8/preview/index.d.ts.map +1 -1
- package/dist/v8/preview/index.js +3 -0
- package/dist/v8/preview/index.js.map +1 -1
- package/dist/v8/remoteLoader.d.ts +42 -5
- package/dist/v8/remoteLoader.d.ts.map +1 -1
- package/dist/v8/remoteLoader.js +317 -259
- package/dist/v8/remoteLoader.js.map +1 -1
- package/dist/v8/resolver.d.ts +22 -8
- package/dist/v8/resolver.d.ts.map +1 -1
- package/dist/v8/resolver.js +37 -32
- package/dist/v8/resolver.js.map +1 -1
- package/dist/v8/revisionId.d.ts +11 -0
- package/dist/v8/revisionId.d.ts.map +1 -0
- package/dist/v8/revisionId.js +13 -0
- package/dist/v8/revisionId.js.map +1 -0
- package/dist/v8/settings.d.ts +6 -6
- package/dist/v8/settings.d.ts.map +1 -1
- package/dist/v8/settings.js +8 -7
- package/dist/v8/settings.js.map +1 -1
- package/dist/v8/telemetry.d.ts +4 -2
- package/dist/v8/telemetry.d.ts.map +1 -1
- package/dist/v8/telemetry.js +2 -2
- package/dist/v8/telemetry.js.map +1 -1
- package/dist/v8/types.d.ts +52 -40
- package/dist/v8/types.d.ts.map +1 -1
- package/dist/v8/variants.d.ts +7 -2
- package/dist/v8/variants.d.ts.map +1 -1
- package/dist/v8/variants.js +21 -24
- package/dist/v8/variants.js.map +1 -1
- package/dist/v8/vite/index.d.ts +2 -2
- package/dist/v8/vite/index.js +1 -1
- package/dist/v8/vite/index.js.map +1 -1
- package/package.json +3 -2
- package/skills/deco-apps/SKILL.md +82 -0
- package/skills/deco-apps/references/algolia.md +51 -0
- package/skills/deco-apps/references/commerce-types.md +132 -0
- package/skills/deco-apps/references/instrumented-fetch.md +144 -0
- package/skills/deco-apps/references/magento.md +55 -0
- package/skills/deco-apps/references/messaging.md +76 -0
- package/skills/deco-apps/references/shopify.md +69 -0
- package/skills/deco-apps/references/vendored-loaders.md +135 -0
- package/skills/deco-apps/references/vtex-cookies-auth.md +146 -0
- package/skills/deco-apps/references/vtex.md +150 -0
- package/skills/deco-apps/references/wake.md +75 -0
- package/skills/deco-cms-schema/SKILL.md +80 -0
- package/skills/deco-cms-schema/references/annotations.md +147 -0
- package/skills/deco-cms-schema/references/content-hygiene.md +91 -0
- package/skills/deco-cms-schema/references/formats-and-widgets.md +112 -0
- package/skills/deco-cms-schema/references/shapes-that-break-the-form.md +165 -0
- package/skills/deco-cms-schema/references/types-to-fields.md +112 -0
- package/skills/deco-go-live/SKILL.md +127 -0
- package/skills/deco-go-live/references/content-releases.md +90 -0
- package/skills/deco-go-live/references/process.md +106 -0
- package/skills/deco-go-live/references/proxy-headers-checkout.md +139 -0
- package/skills/deco-go-live/references/qa-checklist-template.md +150 -0
- package/skills/deco-go-live/references/qa-inventory.md +120 -0
- package/skills/deco-go-live/references/react-spa.md +183 -0
- package/skills/deco-go-live/references/seo-analytics.md +114 -0
- package/skills/deco-go-live/references/traffic-ramp.md +87 -0
- package/skills/deco-go-live/references/worker-runtime.md +93 -0
- package/skills/deco-go-live/scripts/preflight.sh +221 -0
- package/skills/deco-images-media/SKILL.md +64 -0
- package/skills/deco-images-media/references/asset-upload.md +191 -0
- package/skills/deco-images-media/references/components-per-binding.md +167 -0
- package/skills/deco-images-media/references/providers-and-cdn.md +145 -0
- package/skills/deco-images-media/references/quality-and-lcp.md +93 -0
- package/skills/deco-images-media/references/troubleshooting.md +147 -0
- package/skills/deco-images-media/references/video.md +122 -0
- package/skills/deco-make-editable/SKILL.md +94 -0
- package/skills/deco-make-editable/references/a11y-and-e2e.md +104 -0
- package/skills/deco-make-editable/references/content-shapes.md +198 -0
- package/skills/deco-make-editable/references/from-figma.md +110 -0
- package/skills/deco-make-editable/references/i18n-fields.md +112 -0
- package/skills/deco-make-editable/references/inventory.md +79 -0
- package/skills/deco-make-editable/references/pixel-parity.md +175 -0
- package/skills/deco-make-editable/references/seeding-content.md +119 -0
- package/skills/deco-nextjs-site/SKILL.md +74 -0
- package/skills/deco-nextjs-site/references/caching.md +116 -0
- package/skills/deco-nextjs-site/references/metadata-seo.md +100 -0
- package/skills/deco-nextjs-site/references/proxy-and-drafts.md +177 -0
- package/skills/deco-nextjs-site/references/rendering.md +171 -0
- package/skills/deco-nextjs-site/references/setup.md +190 -0
- package/skills/deco-nextjs-site/references/studio-bridge.md +130 -0
- package/skills/deco-site-authoring/SKILL.md +75 -0
- package/skills/deco-site-authoring/references/lazy-blocks.md +155 -0
- package/skills/deco-site-authoring/references/loaders.md +192 -0
- package/skills/deco-site-authoring/references/pages.md +156 -0
- package/skills/deco-site-authoring/references/review-before-publish.md +95 -0
- package/skills/deco-site-authoring/references/sections.md +158 -0
- package/skills/deco-site-authoring/references/seo.md +116 -0
- package/skills/deco-site-workflow/SKILL.md +92 -0
- package/skills/deco-site-workflow/references/check.md +116 -0
- package/skills/deco-site-workflow/references/cli-reference.md +104 -0
- package/skills/deco-site-workflow/references/content-layout.md +93 -0
- package/skills/deco-site-workflow/references/content-sync.md +146 -0
- package/skills/deco-site-workflow/references/delivery.md +51 -0
- package/skills/deco-site-workflow/references/deploy.md +87 -0
- package/skills/deco-site-workflow/references/schema.md +173 -0
- package/skills/deco-site-workflow/references/serve-and-studio.md +138 -0
- package/skills/deco-storefront-caching/SKILL.md +67 -0
- package/skills/deco-storefront-caching/references/cache-keys.md +129 -0
- package/skills/deco-storefront-caching/references/case-study.md +82 -0
- package/skills/deco-storefront-caching/references/egress-traps.md +153 -0
- package/skills/deco-storefront-caching/references/nextjs.md +60 -0
- package/skills/deco-storefront-caching/references/perf-guardrails-e2e.md +123 -0
- package/skills/deco-storefront-caching/references/verification.md +136 -0
- package/skills/deco-storefront-caching/references/worker-page-cache.md +160 -0
- package/skills/deco-storefront-caching/scripts/html-anatomy.mjs +97 -0
- package/skills/deco-storefront-performance/SKILL.md +81 -0
- package/skills/deco-storefront-performance/references/cls-third-party.md +90 -0
- package/skills/deco-storefront-performance/references/hydration.md +116 -0
- package/skills/deco-storefront-performance/references/loaders-n-plus-1.md +107 -0
- package/skills/deco-storefront-performance/references/navigation-ux.md +130 -0
- package/skills/deco-storefront-performance/references/payload-trim.md +163 -0
- package/skills/deco-storefront-performance/references/render-location.md +152 -0
- package/skills/deco-storefront-performance/references/request-dedupe.md +147 -0
- package/skills/deco-storefront-performance/references/trace-reading.md +79 -0
- package/skills/deco-storefront-performance/references/worker-memory.md +176 -0
- package/skills/deco-tanstack-site/SKILL.md +68 -0
- package/skills/deco-tanstack-site/references/document-and-security.md +155 -0
- package/skills/deco-tanstack-site/references/router-and-navigation.md +137 -0
- package/skills/deco-tanstack-site/references/routes-and-pages.md +183 -0
- package/skills/deco-tanstack-site/references/server-functions.md +123 -0
- package/skills/deco-tanstack-site/references/setup.md +153 -0
- package/skills/deco-tanstack-site/references/worker-entry.md +152 -0
- package/skills/deco-v7-to-v8-migration/SKILL.md +122 -0
- package/skills/deco-v7-to-v8-migration/references/caching-and-privacy.md +10 -0
- package/skills/deco-v7-to-v8-migration/references/content.md +25 -0
- package/skills/deco-v7-to-v8-migration/references/editor-forms.md +27 -0
- package/skills/deco-v7-to-v8-migration/references/faststore.md +40 -0
- package/skills/deco-v7-to-v8-migration/references/framework-code.md +53 -0
- package/skills/deco-v7-to-v8-migration/references/hosted-releases.md +16 -0
- package/skills/deco-v7-to-v8-migration/references/import-map.md +81 -0
- package/skills/deco-v7-to-v8-migration/references/legacy-names.md +33 -0
- package/skills/deco-v7-to-v8-migration/references/manual-steps.md +10 -0
- package/skills/deco-v7-to-v8-migration/references/native-apps.md +43 -0
- package/skills/deco-v7-to-v8-migration/references/nextjs.md +19 -0
- package/skills/deco-v7-to-v8-migration/references/parity.md +66 -0
- package/skills/deco-v7-to-v8-migration/references/rendering.md +13 -0
- package/skills/deco-v7-to-v8-migration/references/running-the-script.md +29 -0
- package/skills/deco-v7-to-v8-migration/references/script-steps.md +13 -0
- package/skills/deco-v7-to-v8-migration/references/server-functions.md +15 -0
- package/skills/deco-v7-to-v8-migration/references/sibling-port.md +11 -0
- package/skills/deco-v7-to-v8-migration/references/site-code.md +15 -0
- package/skills/deco-v7-to-v8-migration/references/telemetry.md +10 -0
- package/skills/deco-v7-to-v8-migration/references/verify.md +20 -0
- package/skills/deco-v7-to-v8-migration/scripts/apps.ts +297 -0
- package/skills/deco-v7-to-v8-migration/scripts/asyncRendering.ts +73 -0
- package/skills/deco-v7-to-v8-migration/scripts/blockMap.ts +584 -0
- package/skills/deco-v7-to-v8-migration/scripts/ciSchemaCheck.ts +145 -0
- package/skills/deco-v7-to-v8-migration/scripts/compat.ts +357 -0
- package/skills/deco-v7-to-v8-migration/scripts/content.ts +121 -0
- package/skills/deco-v7-to-v8-migration/scripts/experiments.ts +81 -0
- package/skills/deco-v7-to-v8-migration/scripts/framework.ts +61 -0
- package/skills/deco-v7-to-v8-migration/scripts/imageCopy.ts +276 -0
- package/skills/deco-v7-to-v8-migration/scripts/imageModule.ts +285 -0
- package/skills/deco-v7-to-v8-migration/scripts/imports.ts +942 -0
- package/skills/deco-v7-to-v8-migration/scripts/invoke.ts +624 -0
- package/skills/deco-v7-to-v8-migration/scripts/legacyNames.ts +45 -0
- package/skills/deco-v7-to-v8-migration/scripts/main.ts +59 -0
- package/skills/deco-v7-to-v8-migration/scripts/matchers.ts +41 -0
- package/skills/deco-v7-to-v8-migration/scripts/migrate.ts +176 -0
- package/skills/deco-v7-to-v8-migration/scripts/redirects.ts +455 -0
- package/skills/deco-v7-to-v8-migration/scripts/report.ts +50 -0
- package/skills/deco-v7-to-v8-migration/scripts/scaffold.ts +1119 -0
- package/skills/deco-v7-to-v8-migration/scripts/secrets.ts +35 -0
- package/skills/deco-v7-to-v8-migration/scripts/sectionLoaders.ts +216 -0
- package/skills/deco-v7-to-v8-migration/scripts/siteSettings.ts +261 -0
- package/skills/deco-v7-to-v8-migration/scripts/stubs.ts +388 -0
- package/skills/deco-v7-to-v8-migration/scripts/tsconfig.json +7 -0
- package/skills/deco-v7-to-v8-migration/scripts/vendor.ts +249 -0
- package/skills/deco-v7-to-v8-migration/scripts/vtexInvoke.ts +240 -0
- package/skills/deco-v7-to-v8-migration/scripts/walk.ts +30 -0
- package/skills/deco-variants/SKILL.md +57 -0
- package/skills/deco-variants/references/caching-variants.md +63 -0
- package/skills/deco-variants/references/custom-matchers.md +83 -0
- package/skills/deco-variants/references/draft-preview.md +59 -0
- package/skills/deco-variants/references/experiments-and-campaigns.md +104 -0
- package/skills/deco-variants/references/multivariate.md +85 -0
- package/skills/deco-variants/references/v7-matchers.md +71 -0
- package/src/index.ts +2 -0
- package/src/protocol/channel.ts +127 -0
- package/src/protocol/client.ts +2 -2
- package/src/protocol/conformance/blockMetaVectors.json +214 -0
- package/src/protocol/conformance/contentHashFixtures.ts +74 -0
- package/src/protocol/conformance/index.ts +9 -1
- package/src/protocol/conformance/vectors.ts +36 -0
- package/src/protocol/index.ts +32 -0
- package/src/protocol/keys.ts +1 -1
- package/src/v8/background.ts +42 -0
- package/src/v8/blockMeta.ts +100 -0
- package/src/v8/blockStore.ts +124 -0
- package/src/v8/boundedJson.ts +20 -2
- package/src/v8/boundedMap.ts +53 -0
- package/src/v8/builtins/data.ts +26 -2
- package/src/v8/builtins/index.ts +2 -1
- package/src/v8/builtins/legacy.ts +6 -3
- package/src/v8/canonical.ts +15 -0
- package/src/v8/cli/builtins.ts +1 -0
- package/src/v8/cli/check/index.ts +97 -7
- package/src/v8/cli/content.ts +49 -91
- package/src/v8/cli/index.ts +2 -2
- package/src/v8/cli/remote/commands.ts +834 -0
- package/src/v8/cli/remote/diff.ts +100 -0
- package/src/v8/cli/remote/env.ts +107 -0
- package/src/v8/cli/remote/http.ts +484 -0
- package/src/v8/cli/remote/local.ts +343 -0
- package/src/v8/cli/root.ts +40 -0
- package/src/v8/cli/run.ts +366 -135
- package/src/v8/cli/schema/builtinSchemas.ts +29 -10
- package/src/v8/cli/schema/generate.ts +1 -1
- package/src/v8/cli/skills.ts +91 -0
- package/src/v8/client.ts +162 -60
- package/src/v8/cms.ts +62 -53
- package/src/v8/content.ts +179 -229
- package/src/v8/contentIndex.ts +183 -0
- package/src/v8/draft.ts +15 -14
- package/src/v8/draftChanges.ts +151 -85
- package/src/v8/errors.ts +37 -0
- package/src/v8/hostedSource.ts +67 -0
- package/src/v8/identity.ts +1 -1
- package/src/v8/index.ts +1 -0
- package/src/v8/matchRoute.ts +7 -4
- package/src/v8/pin.ts +176 -0
- package/src/v8/preview/StudioBridge.ts +8 -10
- package/src/v8/preview/StudioChannel.ts +116 -0
- package/src/v8/preview/index.ts +3 -0
- package/src/v8/remoteLoader.ts +350 -286
- package/src/v8/resolver.ts +56 -33
- package/src/v8/revisionId.ts +14 -0
- package/src/v8/settings.ts +10 -9
- package/src/v8/telemetry.ts +3 -3
- package/src/v8/types.ts +52 -40
- package/src/v8/variants.ts +30 -26
- package/src/v8/vite/index.ts +3 -3
- package/dist/v8/cli/serve/server.d.ts +0 -29
- package/dist/v8/cli/serve/server.d.ts.map +0 -1
- package/dist/v8/cli/serve/server.js +0 -296
- package/dist/v8/cli/serve/server.js.map +0 -1
- package/src/v8/cli/serve/server.ts +0 -348
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type Analytics, type Block, type BlockFunction, type Blocks, type Client, type ClientOptions, type CMS, type CMSError, type CMSSettings, createCMS, currentClient, type DraftPointer, type EffectiveSettings, formatDraftPointer, type Lazy, type ListOptions, type Loader, type Match, matchRoute, type Page, parseDraftPointer, parseVersion, type Redirect, type RequestLike, type RequestVersion, type Result, type Route, remoteLoader, resetForTests, type Seo, type Snapshot, type Telemetry, type TelemetryConfig, type Variant, } from "./v8/index.ts";
|
|
1
|
+
export { type Analytics, type Block, type BlockFunction, type Blocks, type Client, type ClientOptions, type CMS, type CMSError, type CMSSettings, ContentUnavailableError, type ContentUnavailableReason, createCMS, currentClient, type DraftPointer, type EffectiveSettings, formatDraftPointer, type Lazy, type ListOptions, type Loader, type Match, matchRoute, type Page, parseDraftPointer, parseVersion, type Redirect, type RequestLike, type RequestVersion, type Result, type Route, remoteLoader, resetForTests, type Seo, type Snapshot, type Telemetry, type TelemetryConfig, type Variant, } from "./v8/index.ts";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,SAAS,EACT,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,UAAU,EACV,KAAK,IAAI,EACT,iBAAiB,EACjB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,YAAY,EACZ,aAAa,EACb,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,OAAO,GACb,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,SAAS,EACT,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,UAAU,EACV,KAAK,IAAI,EACT,iBAAiB,EACjB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,YAAY,EACZ,aAAa,EACb,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,OAAO,GACb,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @decocms/blocks: the v8 runtime API. The CLI, protocol and helpers live on
|
|
2
2
|
// their own subpaths (`/cli`, `/protocol`, `/fetch`, `/analytics`, `/vite`).
|
|
3
|
-
export { createCMS, currentClient, formatDraftPointer, matchRoute, parseDraftPointer, parseVersion, remoteLoader, resetForTests, } from "./v8/index.js";
|
|
3
|
+
export { ContentUnavailableError, createCMS, currentClient, formatDraftPointer, matchRoute, parseDraftPointer, parseVersion, remoteLoader, resetForTests, } from "./v8/index.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,OAAO,EAUL,SAAS,EACT,aAAa,EAGb,kBAAkB,EAKlB,UAAU,EAEV,iBAAiB,EACjB,YAAY,EAMZ,YAAY,EACZ,aAAa,GAMd,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,OAAO,EAUL,uBAAuB,EAEvB,SAAS,EACT,aAAa,EAGb,kBAAkB,EAKlB,UAAU,EAEV,iBAAiB,EACjB,YAAY,EAMZ,YAAY,EACZ,aAAa,GAMd,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Studio channel: how code that belongs to Deco Studio's site editor
|
|
3
|
+
* runs inside the site's page when Studio frames it. Browser-safe, no
|
|
4
|
+
* dependencies; types plus a few constants, shared by the page's bootstrap
|
|
5
|
+
* (`StudioChannel` in `@decocms/blocks/preview`, which every binding mounts on
|
|
6
|
+
* every page) and Studio, which hosts the modules.
|
|
7
|
+
*
|
|
8
|
+
* The page trusts a list of Studio origins (the binding's: Studio's production
|
|
9
|
+
* and staging origins by default, {@link DEFAULT_STUDIO_ORIGINS}), each
|
|
10
|
+
* compared exactly, no wildcard. It is the only way Studio runs code in the
|
|
11
|
+
* page: no message makes the page evaluate a script.
|
|
12
|
+
*
|
|
13
|
+
* 1. A framed page (`window.parent !== window`) posts `{ type: "deco:ready" }`
|
|
14
|
+
* to its parent once per trusted origin, each as the `targetOrigin` (the
|
|
15
|
+
* browser delivers it only if the parent is at that origin, so a parent of
|
|
16
|
+
* any other origin never receives it). Where the browser names the parent's
|
|
17
|
+
* origin (`location.ancestorOrigins`), the page posts to that origin alone,
|
|
18
|
+
* and only when it is trusted.
|
|
19
|
+
* 2. Studio answers `{ type: "deco:load", url }`: an absolute URL of an ES
|
|
20
|
+
* module on Studio's own origin (versioned, served with CORS).
|
|
21
|
+
* 3. The page accepts the message only when `event.origin` is one of the
|
|
22
|
+
* trusted origins, the sender is the parent window, and the module URL's
|
|
23
|
+
* origin is the origin of that message; then it `import()`s the URL, once
|
|
24
|
+
* per URL, and calls the module's default export with a
|
|
25
|
+
* {@link StudioChannelContext} bound to that origin. It answers
|
|
26
|
+
* `{ type: "deco:loaded", url }`, or `{ type: "deco:load-error", url,
|
|
27
|
+
* message }` (a failed URL may be sent again), to that origin.
|
|
28
|
+
* 4. Every later message from that origin whose `type` doesn't start with
|
|
29
|
+
* `deco:` (reserved for the channel) is handed to the listeners of each
|
|
30
|
+
* module it loaded; a module talks back with `send`, to that origin only.
|
|
31
|
+
*
|
|
32
|
+
* Not framed, framed by another origin, or a message that fails a check: the
|
|
33
|
+
* bootstrap does nothing. The binding adds the same origins to the page's
|
|
34
|
+
* Content Security Policy (`script-src`, for the modules, and
|
|
35
|
+
* `frame-ancestors`); the bootstrap's inline script takes the site's `nonce`.
|
|
36
|
+
*/
|
|
37
|
+
/** Studio's production origin. */
|
|
38
|
+
export declare const DEFAULT_STUDIO_ORIGIN = "https://studio.decocms.com";
|
|
39
|
+
/**
|
|
40
|
+
* The origins a page trusts unless the binding option or `DECO_STUDIO_ORIGIN`
|
|
41
|
+
* (comma-separated) says otherwise: Studio's production and staging origins.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DEFAULT_STUDIO_ORIGINS: readonly string[];
|
|
44
|
+
/** The channel's own message types; a module's message types never start with `deco:`. */
|
|
45
|
+
export declare const CHANNEL_MESSAGE: Readonly<{
|
|
46
|
+
readonly ready: "deco:ready";
|
|
47
|
+
readonly load: "deco:load";
|
|
48
|
+
readonly loaded: "deco:loaded";
|
|
49
|
+
readonly loadError: "deco:load-error";
|
|
50
|
+
}>;
|
|
51
|
+
/** Page → Studio: the framed page's bootstrap is listening. */
|
|
52
|
+
export interface ChannelReadyMessage {
|
|
53
|
+
type: "deco:ready";
|
|
54
|
+
}
|
|
55
|
+
/** Studio → page: import this module (an absolute URL on Studio's origin). */
|
|
56
|
+
export interface ChannelLoadMessage {
|
|
57
|
+
type: "deco:load";
|
|
58
|
+
url: string;
|
|
59
|
+
}
|
|
60
|
+
/** Page → Studio: the module at `url` was imported and its default export ran. */
|
|
61
|
+
export interface ChannelLoadedMessage {
|
|
62
|
+
type: "deco:loaded";
|
|
63
|
+
url: string;
|
|
64
|
+
}
|
|
65
|
+
/** Page → Studio: the module at `url` failed to import or to start. */
|
|
66
|
+
export interface ChannelLoadErrorMessage {
|
|
67
|
+
type: "deco:load-error";
|
|
68
|
+
url: string;
|
|
69
|
+
message: string;
|
|
70
|
+
}
|
|
71
|
+
/** What the page's bootstrap posts to Studio. */
|
|
72
|
+
export type PageChannelMessage = ChannelReadyMessage | ChannelLoadedMessage | ChannelLoadErrorMessage;
|
|
73
|
+
/** What the page's bootstrap acts on itself; any other message goes to the modules. */
|
|
74
|
+
export type StudioChannelMessage = ChannelLoadMessage;
|
|
75
|
+
/**
|
|
76
|
+
* A message between Studio and one of its modules: any structured-cloneable
|
|
77
|
+
* object with a `type` that doesn't start with `deco:` (by convention the
|
|
78
|
+
* module's name, `wireframe:hover`).
|
|
79
|
+
*/
|
|
80
|
+
export interface ModuleMessage {
|
|
81
|
+
type: string;
|
|
82
|
+
}
|
|
83
|
+
/** What a module's default export is called with. */
|
|
84
|
+
export interface StudioChannelContext<In extends ModuleMessage = ModuleMessage, Out extends ModuleMessage = ModuleMessage> {
|
|
85
|
+
/** The Studio origin this module was loaded from (the `deco:load` message's, checked exactly). */
|
|
86
|
+
readonly studioOrigin: string;
|
|
87
|
+
/** The URL this module was loaded from. */
|
|
88
|
+
readonly url: string;
|
|
89
|
+
/** Posts a message to Studio (addressed to `studioOrigin` only). */
|
|
90
|
+
send(message: Out): void;
|
|
91
|
+
/** Listens to Studio's module messages from `studioOrigin`; returns the unsubscribe. */
|
|
92
|
+
on(listener: (message: In) => void): () => void;
|
|
93
|
+
}
|
|
94
|
+
/** A module's default export. The page answers `deco:loaded` once it returns (or its promise resolves). */
|
|
95
|
+
export type StudioChannelModule<In extends ModuleMessage = ModuleMessage, Out extends ModuleMessage = ModuleMessage> = (context: StudioChannelContext<In, Out>) => void | Promise<void>;
|
|
96
|
+
/** Types a module's default export: `export default defineStudioModule<In, Out>((channel) => …)`. */
|
|
97
|
+
export declare function defineStudioModule<In extends ModuleMessage = ModuleMessage, Out extends ModuleMessage = ModuleMessage>(module: StudioChannelModule<In, Out>): StudioChannelModule<In, Out>;
|
|
98
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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,CAAC;IACrB,oEAAoE;IACpE,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,wFAAwF;IACxF,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACjD;AAED,2GAA2G;AAC3G,MAAM,MAAM,mBAAmB,CAC7B,EAAE,SAAS,aAAa,GAAG,aAAa,EACxC,GAAG,SAAS,aAAa,GAAG,aAAa,IACvC,CAAC,OAAO,EAAE,oBAAoB,CAAC,EAAE,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAErE,qGAAqG;AACrG,wBAAgB,kBAAkB,CAChC,EAAE,SAAS,aAAa,GAAG,aAAa,EACxC,GAAG,SAAS,aAAa,GAAG,aAAa,EACzC,MAAM,EAAE,mBAAmB,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,mBAAmB,CAAC,EAAE,EAAE,GAAG,CAAC,CAEpE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Studio channel: how code that belongs to Deco Studio's site editor
|
|
3
|
+
* runs inside the site's page when Studio frames it. Browser-safe, no
|
|
4
|
+
* dependencies; types plus a few constants, shared by the page's bootstrap
|
|
5
|
+
* (`StudioChannel` in `@decocms/blocks/preview`, which every binding mounts on
|
|
6
|
+
* every page) and Studio, which hosts the modules.
|
|
7
|
+
*
|
|
8
|
+
* The page trusts a list of Studio origins (the binding's: Studio's production
|
|
9
|
+
* and staging origins by default, {@link DEFAULT_STUDIO_ORIGINS}), each
|
|
10
|
+
* compared exactly, no wildcard. It is the only way Studio runs code in the
|
|
11
|
+
* page: no message makes the page evaluate a script.
|
|
12
|
+
*
|
|
13
|
+
* 1. A framed page (`window.parent !== window`) posts `{ type: "deco:ready" }`
|
|
14
|
+
* to its parent once per trusted origin, each as the `targetOrigin` (the
|
|
15
|
+
* browser delivers it only if the parent is at that origin, so a parent of
|
|
16
|
+
* any other origin never receives it). Where the browser names the parent's
|
|
17
|
+
* origin (`location.ancestorOrigins`), the page posts to that origin alone,
|
|
18
|
+
* and only when it is trusted.
|
|
19
|
+
* 2. Studio answers `{ type: "deco:load", url }`: an absolute URL of an ES
|
|
20
|
+
* module on Studio's own origin (versioned, served with CORS).
|
|
21
|
+
* 3. The page accepts the message only when `event.origin` is one of the
|
|
22
|
+
* trusted origins, the sender is the parent window, and the module URL's
|
|
23
|
+
* origin is the origin of that message; then it `import()`s the URL, once
|
|
24
|
+
* per URL, and calls the module's default export with a
|
|
25
|
+
* {@link StudioChannelContext} bound to that origin. It answers
|
|
26
|
+
* `{ type: "deco:loaded", url }`, or `{ type: "deco:load-error", url,
|
|
27
|
+
* message }` (a failed URL may be sent again), to that origin.
|
|
28
|
+
* 4. Every later message from that origin whose `type` doesn't start with
|
|
29
|
+
* `deco:` (reserved for the channel) is handed to the listeners of each
|
|
30
|
+
* module it loaded; a module talks back with `send`, to that origin only.
|
|
31
|
+
*
|
|
32
|
+
* Not framed, framed by another origin, or a message that fails a check: the
|
|
33
|
+
* bootstrap does nothing. The binding adds the same origins to the page's
|
|
34
|
+
* Content Security Policy (`script-src`, for the modules, and
|
|
35
|
+
* `frame-ancestors`); the bootstrap's inline script takes the site's `nonce`.
|
|
36
|
+
*/
|
|
37
|
+
/** Studio's production origin. */
|
|
38
|
+
export const DEFAULT_STUDIO_ORIGIN = "https://studio.decocms.com";
|
|
39
|
+
/**
|
|
40
|
+
* The origins a page trusts unless the binding option or `DECO_STUDIO_ORIGIN`
|
|
41
|
+
* (comma-separated) says otherwise: Studio's production and staging origins.
|
|
42
|
+
*/
|
|
43
|
+
export const DEFAULT_STUDIO_ORIGINS = Object.freeze([
|
|
44
|
+
DEFAULT_STUDIO_ORIGIN,
|
|
45
|
+
"https://studio-stg.decocms.com",
|
|
46
|
+
]);
|
|
47
|
+
/** The channel's own message types; a module's message types never start with `deco:`. */
|
|
48
|
+
export const CHANNEL_MESSAGE = Object.freeze({
|
|
49
|
+
ready: "deco:ready",
|
|
50
|
+
load: "deco:load",
|
|
51
|
+
loaded: "deco:loaded",
|
|
52
|
+
loadError: "deco:load-error",
|
|
53
|
+
});
|
|
54
|
+
/** Types a module's default export: `export default defineStudioModule<In, Out>((channel) => …)`. */
|
|
55
|
+
export function defineStudioModule(module) {
|
|
56
|
+
return module;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../src/protocol/channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACrE,qBAAqB;IACrB,gCAAgC;CACjC,CAAC,CAAC;AAEH,0FAA0F;AAC1F,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,iBAAiB;CACpB,CAAC,CAAC;AAiEZ,qGAAqG;AACrG,MAAM,UAAU,kBAAkB,CAGhC,MAAoC;IACpC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/protocol/client.js
CHANGED
|
@@ -21,8 +21,8 @@ export async function readResponseJson(response) {
|
|
|
21
21
|
const REQUIRED_VERSION = { major: PROTOCOL_VERSION.major, minor: REQUIRED_PROTOCOL_MINOR };
|
|
22
22
|
/** The guidance for a server older than this client: update it. */
|
|
23
23
|
const OUTDATED_MESSAGE = `the endpoint speaks an older ${PROTOCOL_NAME} than this client needs ` +
|
|
24
|
-
`(${REQUIRED_VERSION.major}.${REQUIRED_VERSION.minor} or newer): update @decocms/blocks
|
|
25
|
-
"(8.2.0 or newer)
|
|
24
|
+
`(${REQUIRED_VERSION.major}.${REQUIRED_VERSION.minor} or newer): update @decocms/blocks ` +
|
|
25
|
+
"(8.2.0 or newer) where the endpoint runs";
|
|
26
26
|
function unsupportedEndpoint(message, reason, description) {
|
|
27
27
|
const data = { reason, required: { ...REQUIRED_VERSION } };
|
|
28
28
|
if (description) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/protocol/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,oBAAoB,EACpB,SAAS,GAGV,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,aAAa,EACb,gBAAgB,EAChB,uBAAuB,GAExB,MAAM,YAAY,CAAC;AAuDpB;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,QAAkB;IACvD,IAAI,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACzD,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,CAAC,KAAiB,CAAC,CAAC;aACzC,MAAM,EAAE;aACR,WAAW,CACV,IAAI,mBAAmB,CAAC,MAAM,CAA4D,CAC3F,CAAC;QACJ,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;AAE3F,mE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EAAE,EAAE,KAAK;wBACT,KAAK,EAAE,IAAI,oBAAoB,CAAC,SAAS,CAAC,aAAa,EAAE,2BAA2B,CAAC;qBACtF,CAAC;gBACJ,CAAC;gBACD,OAAO,QAAQ,CAAC,KAAK;oBACnB,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE;oBACvE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"names": [
|
|
3
|
+
"CMS",
|
|
4
|
+
"extends",
|
|
5
|
+
"footer",
|
|
6
|
+
"footer-a",
|
|
7
|
+
"header",
|
|
8
|
+
"home",
|
|
9
|
+
"plain",
|
|
10
|
+
"redirects",
|
|
11
|
+
"variants"
|
|
12
|
+
],
|
|
13
|
+
"cases": [
|
|
14
|
+
{
|
|
15
|
+
"name": "home",
|
|
16
|
+
"body": {
|
|
17
|
+
"__resolveType": "website/pages/Page.tsx",
|
|
18
|
+
"path": "/",
|
|
19
|
+
"sections": [
|
|
20
|
+
{
|
|
21
|
+
"__resolveType": "header"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"__resolveType": "footer"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"__resolveType": "site/sections/Hero.tsx",
|
|
28
|
+
"title": "Olá"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"version": "D8NyAZf7d5YahxJT5yN79A",
|
|
33
|
+
"meta": {
|
|
34
|
+
"type": "website/pages/Page.tsx",
|
|
35
|
+
"path": "/",
|
|
36
|
+
"refs": ["footer", "header"]
|
|
37
|
+
},
|
|
38
|
+
"entry": {
|
|
39
|
+
"version": "D8NyAZf7d5YahxJT5yN79A",
|
|
40
|
+
"meta": {
|
|
41
|
+
"type": "website/pages/Page.tsx",
|
|
42
|
+
"path": "/",
|
|
43
|
+
"refs": ["footer", "header"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "footer",
|
|
49
|
+
"body": {
|
|
50
|
+
"__resolveType": "site/sections/Footer.tsx",
|
|
51
|
+
"columns": [
|
|
52
|
+
{
|
|
53
|
+
"__resolveType": "footer-b"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"__resolveType": "footer-a"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"__resolveType": "footer-a"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"version": "6-WZ8yiUs_rKrbuJOftvQA",
|
|
64
|
+
"meta": {
|
|
65
|
+
"type": "site/sections/Footer.tsx",
|
|
66
|
+
"refs": ["footer-a"]
|
|
67
|
+
},
|
|
68
|
+
"entry": {
|
|
69
|
+
"version": "6-WZ8yiUs_rKrbuJOftvQA",
|
|
70
|
+
"meta": {
|
|
71
|
+
"type": "site/sections/Footer.tsx",
|
|
72
|
+
"refs": ["footer-a"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "footer-a",
|
|
78
|
+
"body": {
|
|
79
|
+
"__resolveType": "site/sections/Links.tsx",
|
|
80
|
+
"links": []
|
|
81
|
+
},
|
|
82
|
+
"version": "FKbaI1TQOkKUaJDToMSDXg",
|
|
83
|
+
"meta": {
|
|
84
|
+
"type": "site/sections/Links.tsx"
|
|
85
|
+
},
|
|
86
|
+
"entry": {
|
|
87
|
+
"version": "FKbaI1TQOkKUaJDToMSDXg",
|
|
88
|
+
"meta": {
|
|
89
|
+
"type": "site/sections/Links.tsx"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "plain",
|
|
95
|
+
"body": {
|
|
96
|
+
"title": "no type"
|
|
97
|
+
},
|
|
98
|
+
"version": "nDqa9jpXsR-37zvd7Y5rrw",
|
|
99
|
+
"meta": {},
|
|
100
|
+
"entry": {
|
|
101
|
+
"version": "nDqa9jpXsR-37zvd7Y5rrw"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "variants",
|
|
106
|
+
"body": {
|
|
107
|
+
"__resolveType": "multivariate",
|
|
108
|
+
"variants": [
|
|
109
|
+
{
|
|
110
|
+
"rule": {
|
|
111
|
+
"__resolveType": "never"
|
|
112
|
+
},
|
|
113
|
+
"value": {
|
|
114
|
+
"__resolveType": "Promo"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"rule": {
|
|
119
|
+
"__resolveType": "always"
|
|
120
|
+
},
|
|
121
|
+
"value": {
|
|
122
|
+
"__resolveType": "lazy",
|
|
123
|
+
"value": {
|
|
124
|
+
"__resolveType": "header"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"version": "NY3fN7vf-0QANkzlwdvuKg",
|
|
131
|
+
"meta": {
|
|
132
|
+
"type": "multivariate",
|
|
133
|
+
"refs": ["header"]
|
|
134
|
+
},
|
|
135
|
+
"entry": {
|
|
136
|
+
"version": "NY3fN7vf-0QANkzlwdvuKg",
|
|
137
|
+
"meta": {
|
|
138
|
+
"type": "multivariate",
|
|
139
|
+
"refs": ["header"]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "extends",
|
|
145
|
+
"body": {
|
|
146
|
+
"__resolveType": "header",
|
|
147
|
+
"title": "override",
|
|
148
|
+
"path": "/x"
|
|
149
|
+
},
|
|
150
|
+
"version": "zuj5u8YTRDdaEv_7wSwnjg",
|
|
151
|
+
"meta": {
|
|
152
|
+
"type": "header",
|
|
153
|
+
"path": "/x",
|
|
154
|
+
"refs": ["header"]
|
|
155
|
+
},
|
|
156
|
+
"entry": {
|
|
157
|
+
"version": "zuj5u8YTRDdaEv_7wSwnjg",
|
|
158
|
+
"meta": {
|
|
159
|
+
"type": "header",
|
|
160
|
+
"path": "/x",
|
|
161
|
+
"refs": ["header"]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "redirects",
|
|
167
|
+
"body": {
|
|
168
|
+
"__resolveType": "website/loaders/redirects.ts",
|
|
169
|
+
"redirects": [
|
|
170
|
+
{
|
|
171
|
+
"from": "/old",
|
|
172
|
+
"to": "/new",
|
|
173
|
+
"type": "permanent"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"version": "b5gi6Yu1_tmkwW6fWbs02Q",
|
|
178
|
+
"meta": {
|
|
179
|
+
"type": "website/loaders/redirects.ts"
|
|
180
|
+
},
|
|
181
|
+
"entry": {
|
|
182
|
+
"version": "b5gi6Yu1_tmkwW6fWbs02Q",
|
|
183
|
+
"meta": {
|
|
184
|
+
"type": "website/loaders/redirects.ts"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "CMS",
|
|
190
|
+
"body": {
|
|
191
|
+
"__resolveType": "cms-settings",
|
|
192
|
+
"telemetry": {
|
|
193
|
+
"enabled": false
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"version": "sBqXj5u549za_Plbqc6R_g",
|
|
197
|
+
"meta": {
|
|
198
|
+
"type": "cms-settings"
|
|
199
|
+
},
|
|
200
|
+
"entry": {
|
|
201
|
+
"version": "sBqXj5u549za_Plbqc6R_g",
|
|
202
|
+
"meta": {
|
|
203
|
+
"type": "cms-settings"
|
|
204
|
+
},
|
|
205
|
+
"data": {
|
|
206
|
+
"__resolveType": "cms-settings",
|
|
207
|
+
"telemetry": {
|
|
208
|
+
"enabled": false
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
@@ -19,4 +19,26 @@ export interface ContentHashFixture {
|
|
|
19
19
|
revision: string;
|
|
20
20
|
}
|
|
21
21
|
export declare const contentHashFixtures: readonly ContentHashFixture[];
|
|
22
|
+
export interface BlockVersionFixture {
|
|
23
|
+
id: string;
|
|
24
|
+
/** The block (any JSON value). */
|
|
25
|
+
block: unknown;
|
|
26
|
+
/** Its canonical JSON. */
|
|
27
|
+
canonical: string;
|
|
28
|
+
/** `blockVersion(block)`: the first 16 bytes of SHA-256 over the canonical JSON, base64url, no padding. */
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Golden fixtures for block versions (`blockVersion`, in
|
|
33
|
+
* `@decocms/blocks/protocol`): every implementation that writes or checks
|
|
34
|
+
* `ifMatch` produces these exact versions.
|
|
35
|
+
*/
|
|
36
|
+
export declare const blockVersionFixtures: readonly BlockVersionFixture[];
|
|
37
|
+
export interface RevisionIdFixture {
|
|
38
|
+
id: string;
|
|
39
|
+
/** Whether it has the shape of a revision id (`isRevisionId`). */
|
|
40
|
+
valid: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** Revision ids (`<inv>-<uuidv7>`) and strings that aren't one. */
|
|
43
|
+
export declare const revisionIdFixtures: readonly RevisionIdFixture[];
|
|
22
44
|
//# sourceMappingURL=contentHashFixtures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentHashFixtures.d.ts","sourceRoot":"","sources":["../../../src/protocol/conformance/contentHashFixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAwD5D,CAAC"}
|
|
1
|
+
{"version":3,"file":"contentHashFixtures.d.ts","sourceRoot":"","sources":["../../../src/protocol/conformance/contentHashFixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAwD5D,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,2GAA2G;IAC3G,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,mBAAmB,EAkC9D,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,EAAE,SAAS,iBAAiB,EAc1D,CAAC"}
|
|
@@ -61,4 +61,59 @@ export const contentHashFixtures = [
|
|
|
61
61
|
revision: "6913c5e6aa28f441d3b0102177b372e4fb7c08bc09bdd8698df85e597282ac96",
|
|
62
62
|
},
|
|
63
63
|
];
|
|
64
|
+
/**
|
|
65
|
+
* Golden fixtures for block versions (`blockVersion`, in
|
|
66
|
+
* `@decocms/blocks/protocol`): every implementation that writes or checks
|
|
67
|
+
* `ifMatch` produces these exact versions.
|
|
68
|
+
*/
|
|
69
|
+
export const blockVersionFixtures = [
|
|
70
|
+
{ id: "empty", block: {}, canonical: "{}", version: "RBNvo1WzZ4oRRq0W9-hkng" },
|
|
71
|
+
{
|
|
72
|
+
id: "key-order",
|
|
73
|
+
block: { b: 1, a: [true, null, "x"] },
|
|
74
|
+
canonical: '{"a":[true,null,"x"],"b":1}',
|
|
75
|
+
version: "VKZUFa03AiiFGh2ksxtv1A",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "unicode-numbers",
|
|
79
|
+
block: {
|
|
80
|
+
__resolveType: "site/sections/Hero.tsx",
|
|
81
|
+
title: "Olá — ünïcode 😀",
|
|
82
|
+
n: -0,
|
|
83
|
+
f: 1.5e-7,
|
|
84
|
+
big: 1e21,
|
|
85
|
+
int: 10,
|
|
86
|
+
},
|
|
87
|
+
canonical: '{"__resolveType":"site/sections/Hero.tsx","big":1e+21,"f":1.5e-7,"int":10,"n":0,"title":"Olá — ünïcode 😀"}',
|
|
88
|
+
version: "cvNhsZmxtnrgaCwRg73Kxw",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "code-unit-order",
|
|
92
|
+
block: { é: 1, Z: 2, a: 3, aa: 4, "": 0 },
|
|
93
|
+
canonical: '{"":0,"Z":2,"a":3,"aa":4,"é":1}',
|
|
94
|
+
version: "psFj7dEx0yLDzHd3f9mabQ",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "nested-escapes",
|
|
98
|
+
block: { nested: { z: { y: [1, { b: 2, a: 1 }] }, a: 'line\nbreak "q" \\ \u0001' } },
|
|
99
|
+
canonical: '{"nested":{"a":"line\\nbreak \\"q\\" \\\\ \\u0001","z":{"y":[1,{"a":1,"b":2}]}}}',
|
|
100
|
+
version: "-F2yA3CkzEaGhmts3kOA3w",
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
/** Revision ids (`<inv>-<uuidv7>`) and strings that aren't one. */
|
|
104
|
+
export const revisionIdFixtures = [
|
|
105
|
+
{ id: "fe6c5e0d97ff-0193a1f2-6800-7c3e-9d2a-4b8e1f0c7a55", valid: true },
|
|
106
|
+
{ id: "fe5e5eb831ff-01a1a147-ce00-7000-8000-000000000000", valid: true },
|
|
107
|
+
{ id: "fe5e5eb831fe-01a1a147-ce01-7fff-bfff-ffffffffffff", valid: true },
|
|
108
|
+
// A git commit SHA, a content hash, a bare UUIDv7.
|
|
109
|
+
{ id: "1".repeat(40), valid: false },
|
|
110
|
+
{ id: "f".repeat(64), valid: false },
|
|
111
|
+
{ id: "0193a1f2-6800-7c3e-9d2a-4b8e1f0c7a55", valid: false },
|
|
112
|
+
// Uppercase, another UUID version, the wrong variant, a path.
|
|
113
|
+
{ id: "FE6C5E0D97FF-0193A1F2-6800-7C3E-9D2A-4B8E1F0C7A55", valid: false },
|
|
114
|
+
{ id: "fe6c5e0d97ff-0193a1f2-6800-4c3e-9d2a-4b8e1f0c7a55", valid: false },
|
|
115
|
+
{ id: "fe6c5e0d97ff-0193a1f2-6800-7c3e-cd2a-4b8e1f0c7a55", valid: false },
|
|
116
|
+
{ id: "fe6c5e0d97ff-0193a1f2-6800-7c3e-9d2a-4b8e1f0c7a55/../x", valid: false },
|
|
117
|
+
{ id: "", valid: false },
|
|
118
|
+
];
|
|
64
119
|
//# sourceMappingURL=contentHashFixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentHashFixtures.js","sourceRoot":"","sources":["../../../src/protocol/conformance/contentHashFixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAChE;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,IAA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aACnD;YACD,MAAM,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;SAC/C;QACD,SAAS,EACP,sJAAsJ;QACxJ,QAAQ,EAAE,kEAAkE;KAC7E;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"contentHashFixtures.js","sourceRoot":"","sources":["../../../src/protocol/conformance/contentHashFixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAChE;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,kEAAkE;KAC7E;IACD;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EACH,oGAAoG;QACtG,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE;QACvF,SAAS,EAAE,uEAAuE;QAClF,QAAQ,EAAE,kEAAkE;KAC7E;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,uFAAuF;QAC9F,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,IAAI,EAAE,2CAA2C;gBACjD,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,kBAAkB;gBAC3B,UAAU,EAAE,cAAc;aAC3B;SACF;QACD,SAAS,EACP,4IAA4I;QAC9I,QAAQ,EAAE,kEAAkE;KAC7E;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,6CAA6C;QACpD,MAAM,EAAE;YACN,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GA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AE,KAAK,EAAE,KAAK,EAAE;IAC9E,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;CACzB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ConformanceCase } from "./cases/types.ts";
|
|
2
2
|
import { type ConformanceOptions } from "./context.ts";
|
|
3
3
|
export type { ConformanceCase } from "./cases/types.ts";
|
|
4
|
-
export { type ContentHashFixture, contentHashFixtures } from "./contentHashFixtures.ts";
|
|
4
|
+
export { type BlockVersionFixture, blockVersionFixtures, type ContentHashFixture, contentHashFixtures, type RevisionIdFixture, revisionIdFixtures, } from "./contentHashFixtures.ts";
|
|
5
5
|
export type { ConformanceOptions } from "./context.ts";
|
|
6
|
+
export { type BlockMetaVector, type BlockMetaVectors, blockMetaVectors } from "./vectors.ts";
|
|
6
7
|
/** Every conformance case, in the order they run. */
|
|
7
8
|
export declare const conformanceCases: readonly ConformanceCase[];
|
|
8
9
|
export interface CaseOutcome {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/protocol/conformance/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAsB,KAAK,kBAAkB,EAAY,MAAM,cAAc,CAAC;AAErF,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/protocol/conformance/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAsB,KAAK,kBAAkB,EAAY,MAAM,cAAc,CAAC;AAErF,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,mBAAmB,E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kB,GAAG,CAAC,MAAM,kBAAkB,CAAC,EACxD,SAAS,SAAiC,EAC1C,MAAM,GAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAoB,GAC1D,IAAI,CAqBN"}
|
|
@@ -28,7 +28,8 @@ import { readCases } from "./cases/reads.js";
|
|
|
28
28
|
import { wireCases } from "./cases/wire.js";
|
|
29
29
|
import { writeCases } from "./cases/writes.js";
|
|
30
30
|
import { ConformanceContext, SkipCase } from "./context.js";
|
|
31
|
-
export { contentHashFixtures } from "./contentHashFixtures.js";
|
|
31
|
+
export { blockVersionFixtures, contentHashFixtures, revisionIdFixtures, } from "./contentHashFixtures.js";
|
|
32
|
+
export { blockMetaVectors } from "./vectors.js";
|
|
32
33
|
/** Every conformance case, in the order they run. */
|
|
33
34
|
export const conformanceCases = [
|
|
34
35
|
...wireCases,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/protocol/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAA2B,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGrF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/protocol/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAA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CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Golden vectors for `blockMeta` and `indexEntry` (see
|
|
3
|
+
* `@decocms/blocks/protocol`): every implementation that writes or reads a
|
|
4
|
+
* revision index (the SDK, the CLI, Studio's publish) checks it computes these
|
|
5
|
+
* exact entries. The JSON file is shared byte for byte with Studio's vendored
|
|
6
|
+
* copy.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { blockMetaVectors } from "@decocms/blocks/protocol/conformance";
|
|
10
|
+
* for (const c of blockMetaVectors.cases) {
|
|
11
|
+
* expect(blockMeta(c.body, blockMetaVectors.names)).toEqual(c.meta);
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import type { BlockMeta, IndexEntry } from "../../v8/blockMeta.ts";
|
|
16
|
+
export interface BlockMetaVector {
|
|
17
|
+
/** The block's name in the index. */
|
|
18
|
+
name: string;
|
|
19
|
+
body: unknown;
|
|
20
|
+
/** `blockVersion(body)`. */
|
|
21
|
+
version: string;
|
|
22
|
+
/** `blockMeta(body, names)`. */
|
|
23
|
+
meta: BlockMeta;
|
|
24
|
+
/** `indexEntry(name, body, names)`. */
|
|
25
|
+
entry: IndexEntry;
|
|
26
|
+
}
|
|
27
|
+
export interface BlockMetaVectors {
|
|
28
|
+
/** The block names of the index the cases are computed for. */
|
|
29
|
+
names: readonly string[];
|
|
30
|
+
cases: readonly BlockMetaVector[];
|
|
31
|
+
}
|
|
32
|
+
export declare const blockMetaVectors: BlockMetaVectors;
|
|
33
|
+
//# sourceMappingURL=vectors.d.ts.map
|