@decocms/blocks 8.1.0-next.0 → 8.1.0-next.2
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/bin/deco.js +5 -12
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol/assets.d.ts +46 -0
- package/dist/protocol/assets.d.ts.map +1 -0
- package/dist/protocol/assets.js +105 -0
- package/dist/protocol/assets.js.map +1 -0
- package/dist/protocol/canonical.d.ts +8 -0
- package/dist/protocol/canonical.d.ts.map +1 -0
- package/dist/protocol/canonical.js +8 -0
- package/dist/protocol/canonical.js.map +1 -0
- package/dist/protocol/ciphertext.d.ts +7 -0
- package/dist/protocol/ciphertext.d.ts.map +1 -0
- package/dist/protocol/ciphertext.js +7 -0
- package/dist/protocol/ciphertext.js.map +1 -0
- package/dist/protocol/client.d.ts +54 -0
- package/dist/protocol/client.d.ts.map +1 -0
- package/dist/protocol/client.js +104 -0
- package/dist/protocol/client.js.map +1 -0
- package/dist/protocol/conformance/cases/assets.d.ts +3 -0
- package/dist/protocol/conformance/cases/assets.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/assets.js +71 -0
- package/dist/protocol/conformance/cases/assets.js.map +1 -0
- package/dist/protocol/conformance/cases/guards.d.ts +3 -0
- package/dist/protocol/conformance/cases/guards.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/guards.js +265 -0
- package/dist/protocol/conformance/cases/guards.js.map +1 -0
- package/dist/protocol/conformance/cases/reads.d.ts +3 -0
- package/dist/protocol/conformance/cases/reads.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/reads.js +140 -0
- package/dist/protocol/conformance/cases/reads.js.map +1 -0
- package/dist/protocol/conformance/cases/types.d.ts +9 -0
- package/dist/protocol/conformance/cases/types.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/types.js +2 -0
- package/dist/protocol/conformance/cases/types.js.map +1 -0
- package/dist/protocol/conformance/cases/wire.d.ts +3 -0
- package/dist/protocol/conformance/cases/wire.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/wire.js +130 -0
- package/dist/protocol/conformance/cases/wire.js.map +1 -0
- package/dist/protocol/conformance/cases/writes.d.ts +3 -0
- package/dist/protocol/conformance/cases/writes.d.ts.map +1 -0
- package/dist/protocol/conformance/cases/writes.js +278 -0
- package/dist/protocol/conformance/cases/writes.js.map +1 -0
- package/dist/protocol/conformance/contentHashFixtures.d.ts +22 -0
- package/dist/protocol/conformance/contentHashFixtures.d.ts.map +1 -0
- package/dist/protocol/conformance/contentHashFixtures.js +64 -0
- package/dist/protocol/conformance/contentHashFixtures.js.map +1 -0
- package/dist/protocol/conformance/context.d.ts +100 -0
- package/dist/protocol/conformance/context.d.ts.map +1 -0
- package/dist/protocol/conformance/context.js +155 -0
- package/dist/protocol/conformance/context.js.map +1 -0
- package/dist/protocol/conformance/index.d.ts +32 -0
- package/dist/protocol/conformance/index.d.ts.map +1 -0
- package/dist/protocol/conformance/index.js +90 -0
- package/dist/protocol/conformance/index.js.map +1 -0
- package/dist/protocol/errors.d.ts +85 -0
- package/dist/protocol/errors.d.ts.map +1 -0
- package/dist/protocol/errors.js +62 -0
- package/dist/protocol/errors.js.map +1 -0
- package/dist/protocol/index.d.ts +25 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +25 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/keys.d.ts +101 -0
- package/dist/protocol/keys.d.ts.map +1 -0
- package/dist/protocol/keys.js +223 -0
- package/dist/protocol/keys.js.map +1 -0
- package/dist/protocol/params.d.ts +10 -0
- package/dist/protocol/params.d.ts.map +1 -0
- package/dist/protocol/params.js +54 -0
- package/dist/protocol/params.js.map +1 -0
- package/dist/protocol/secrets.d.ts +22 -0
- package/dist/protocol/secrets.d.ts.map +1 -0
- package/dist/protocol/secrets.js +200 -0
- package/dist/protocol/secrets.js.map +1 -0
- package/dist/protocol/server/assets.d.ts +20 -0
- package/dist/protocol/server/assets.d.ts.map +1 -0
- package/dist/protocol/server/assets.js +77 -0
- package/dist/protocol/server/assets.js.map +1 -0
- package/dist/protocol/server/auth.d.ts +31 -0
- package/dist/protocol/server/auth.d.ts.map +1 -0
- package/dist/protocol/server/auth.js +32 -0
- package/dist/protocol/server/auth.js.map +1 -0
- package/dist/protocol/server/bodyCache.d.ts +28 -0
- package/dist/protocol/server/bodyCache.d.ts.map +1 -0
- package/dist/protocol/server/bodyCache.js +75 -0
- package/dist/protocol/server/bodyCache.js.map +1 -0
- package/dist/protocol/server/content.d.ts +44 -0
- package/dist/protocol/server/content.d.ts.map +1 -0
- package/dist/protocol/server/content.js +132 -0
- package/dist/protocol/server/content.js.map +1 -0
- package/dist/protocol/server/core.d.ts +63 -0
- package/dist/protocol/server/core.d.ts.map +1 -0
- package/dist/protocol/server/core.js +77 -0
- package/dist/protocol/server/core.js.map +1 -0
- package/dist/protocol/server/handler.d.ts +5 -0
- package/dist/protocol/server/handler.d.ts.map +1 -0
- package/dist/protocol/server/handler.js +70 -0
- package/dist/protocol/server/handler.js.map +1 -0
- package/dist/protocol/server/http.d.ts +24 -0
- package/dist/protocol/server/http.d.ts.map +1 -0
- package/dist/protocol/server/http.js +133 -0
- package/dist/protocol/server/http.js.map +1 -0
- package/dist/protocol/server/index.d.ts +11 -0
- package/dist/protocol/server/index.d.ts.map +1 -0
- package/dist/protocol/server/index.js +9 -0
- package/dist/protocol/server/index.js.map +1 -0
- package/dist/protocol/server/methods/apply.d.ts +4 -0
- package/dist/protocol/server/methods/apply.d.ts.map +1 -0
- package/dist/protocol/server/methods/apply.js +275 -0
- package/dist/protocol/server/methods/apply.js.map +1 -0
- package/dist/protocol/server/methods/read.d.ts +14 -0
- package/dist/protocol/server/methods/read.d.ts.map +1 -0
- package/dist/protocol/server/methods/read.js +132 -0
- package/dist/protocol/server/methods/read.js.map +1 -0
- package/dist/protocol/server/rpc.d.ts +7 -0
- package/dist/protocol/server/rpc.d.ts.map +1 -0
- package/dist/protocol/server/rpc.js +115 -0
- package/dist/protocol/server/rpc.js.map +1 -0
- package/dist/protocol/storage/fs/hash.d.ts +8 -0
- package/dist/protocol/storage/fs/hash.d.ts.map +1 -0
- package/dist/protocol/storage/fs/hash.js +20 -0
- package/dist/protocol/storage/fs/hash.js.map +1 -0
- package/dist/protocol/storage/fs/index.d.ts +30 -0
- package/dist/protocol/storage/fs/index.d.ts.map +1 -0
- package/dist/protocol/storage/fs/index.js +301 -0
- package/dist/protocol/storage/fs/index.js.map +1 -0
- package/dist/protocol/storage/fs/lock.d.ts +8 -0
- package/dist/protocol/storage/fs/lock.d.ts.map +1 -0
- package/dist/protocol/storage/fs/lock.js +61 -0
- package/dist/protocol/storage/fs/lock.js.map +1 -0
- package/dist/protocol/storage/fs/transaction.d.ts +19 -0
- package/dist/protocol/storage/fs/transaction.d.ts.map +1 -0
- package/dist/protocol/storage/fs/transaction.js +174 -0
- package/dist/protocol/storage/fs/transaction.js.map +1 -0
- package/dist/protocol/storage/fs/unsupported.d.ts +10 -0
- package/dist/protocol/storage/fs/unsupported.d.ts.map +1 -0
- package/dist/protocol/storage/fs/unsupported.js +4 -0
- package/dist/protocol/storage/fs/unsupported.js.map +1 -0
- package/dist/protocol/storage/memory.d.ts +40 -0
- package/dist/protocol/storage/memory.d.ts.map +1 -0
- package/dist/protocol/storage/memory.js +179 -0
- package/dist/protocol/storage/memory.js.map +1 -0
- package/dist/protocol/storage.d.ts +178 -0
- package/dist/protocol/storage.d.ts.map +1 -0
- package/dist/protocol/storage.js +29 -0
- package/dist/protocol/storage.js.map +1 -0
- package/dist/protocol/types.d.ts +194 -0
- package/dist/protocol/types.d.ts.map +1 -0
- package/dist/protocol/types.js +31 -0
- package/dist/protocol/types.js.map +1 -0
- package/dist/v8/analytics.d.ts +31 -0
- package/dist/v8/analytics.d.ts.map +1 -0
- package/dist/v8/analytics.js +46 -0
- package/dist/v8/analytics.js.map +1 -0
- package/dist/v8/background.d.ts +26 -0
- package/dist/v8/background.d.ts.map +1 -0
- package/dist/v8/background.js +95 -0
- package/dist/v8/background.js.map +1 -0
- package/dist/v8/builtins/data.d.ts +15 -0
- package/dist/v8/builtins/data.d.ts.map +1 -0
- package/dist/v8/builtins/data.js +18 -0
- package/dist/v8/builtins/data.js.map +1 -0
- package/dist/v8/builtins/index.d.ts +9 -0
- package/dist/v8/builtins/index.d.ts.map +1 -0
- package/dist/v8/builtins/index.js +24 -0
- package/dist/v8/builtins/index.js.map +1 -0
- package/dist/v8/builtins/lazy.d.ts +17 -0
- package/dist/v8/builtins/lazy.d.ts.map +1 -0
- package/dist/v8/builtins/lazy.js +13 -0
- package/dist/v8/builtins/lazy.js.map +1 -0
- package/dist/v8/builtins/legacy.d.ts +41 -0
- package/dist/v8/builtins/legacy.d.ts.map +1 -0
- package/dist/v8/builtins/legacy.js +62 -0
- package/dist/v8/builtins/legacy.js.map +1 -0
- package/dist/v8/builtins/matchers.d.ts +19 -0
- package/dist/v8/builtins/matchers.d.ts.map +1 -0
- package/dist/v8/builtins/matchers.js +24 -0
- package/dist/v8/builtins/matchers.js.map +1 -0
- package/dist/v8/builtins/multivariate.d.ts +15 -0
- package/dist/v8/builtins/multivariate.d.ts.map +1 -0
- package/dist/v8/builtins/multivariate.js +18 -0
- package/dist/v8/builtins/multivariate.js.map +1 -0
- package/dist/v8/builtins/secret.d.ts +7 -0
- package/dist/v8/builtins/secret.d.ts.map +1 -0
- package/dist/v8/builtins/secret.js +68 -0
- package/dist/v8/builtins/secret.js.map +1 -0
- package/dist/v8/canonical.d.ts +42 -0
- package/dist/v8/canonical.d.ts.map +1 -0
- package/dist/v8/canonical.js +111 -0
- package/dist/v8/canonical.js.map +1 -0
- package/dist/v8/ciphertext.d.ts +58 -0
- package/dist/v8/ciphertext.d.ts.map +1 -0
- package/dist/v8/ciphertext.js +134 -0
- package/dist/v8/ciphertext.js.map +1 -0
- package/dist/v8/cli/builtins.d.ts +11 -0
- package/dist/v8/cli/builtins.d.ts.map +1 -0
- package/dist/v8/cli/builtins.js +18 -0
- package/dist/v8/cli/builtins.js.map +1 -0
- package/dist/v8/cli/check/index.d.ts +41 -0
- package/dist/v8/cli/check/index.d.ts.map +1 -0
- package/dist/v8/cli/check/index.js +713 -0
- package/dist/v8/cli/check/index.js.map +1 -0
- package/dist/v8/cli/check/messages.d.ts +24 -0
- package/dist/v8/cli/check/messages.d.ts.map +1 -0
- package/dist/v8/cli/check/messages.js +150 -0
- package/dist/v8/cli/check/messages.js.map +1 -0
- package/dist/v8/cli/content.d.ts +60 -0
- package/dist/v8/cli/content.d.ts.map +1 -0
- package/dist/v8/cli/content.js +231 -0
- package/dist/v8/cli/content.js.map +1 -0
- package/dist/v8/cli/index.d.ts +18 -0
- package/dist/v8/cli/index.d.ts.map +1 -0
- package/dist/v8/cli/index.js +18 -0
- package/dist/v8/cli/index.js.map +1 -0
- package/dist/v8/cli/log.d.ts +9 -0
- package/dist/v8/cli/log.d.ts.map +1 -0
- package/dist/v8/cli/log.js +11 -0
- package/dist/v8/cli/log.js.map +1 -0
- package/dist/v8/cli/main.d.ts +2 -0
- package/dist/v8/cli/main.d.ts.map +1 -0
- package/dist/v8/cli/main.js +9 -0
- package/dist/v8/cli/main.js.map +1 -0
- package/dist/v8/cli/root.d.ts +28 -0
- package/dist/v8/cli/root.d.ts.map +1 -0
- package/dist/v8/cli/root.js +64 -0
- package/dist/v8/cli/root.js.map +1 -0
- package/dist/v8/cli/run.d.ts +13 -0
- package/dist/v8/cli/run.d.ts.map +1 -0
- package/dist/v8/cli/run.js +210 -0
- package/dist/v8/cli/run.js.map +1 -0
- package/dist/v8/cli/schema/builtinSchemas.d.ts +22 -0
- package/dist/v8/cli/schema/builtinSchemas.d.ts.map +1 -0
- package/dist/v8/cli/schema/builtinSchemas.js +213 -0
- package/dist/v8/cli/schema/builtinSchemas.js.map +1 -0
- package/dist/v8/cli/schema/generate.d.ts +50 -0
- package/dist/v8/cli/schema/generate.d.ts.map +1 -0
- package/dist/v8/cli/schema/generate.js +415 -0
- package/dist/v8/cli/schema/generate.js.map +1 -0
- package/dist/v8/cli/schema/index.d.ts +21 -0
- package/dist/v8/cli/schema/index.d.ts.map +1 -0
- package/dist/v8/cli/schema/index.js +51 -0
- package/dist/v8/cli/schema/index.js.map +1 -0
- package/dist/v8/cli/schema/tsProgram.d.ts +120 -0
- package/dist/v8/cli/schema/tsProgram.d.ts.map +1 -0
- package/dist/v8/cli/schema/tsProgram.js +418 -0
- package/dist/v8/cli/schema/tsProgram.js.map +1 -0
- package/dist/v8/cli/schema/typeToSchema.d.ts +81 -0
- package/dist/v8/cli/schema/typeToSchema.d.ts.map +1 -0
- package/dist/v8/cli/schema/typeToSchema.js +683 -0
- package/dist/v8/cli/schema/typeToSchema.js.map +1 -0
- package/dist/v8/cli/serve/server.d.ts +31 -0
- package/dist/v8/cli/serve/server.d.ts.map +1 -0
- package/dist/v8/cli/serve/server.js +247 -0
- package/dist/v8/cli/serve/server.js.map +1 -0
- package/dist/v8/cli/watch.d.ts +20 -0
- package/dist/v8/cli/watch.d.ts.map +1 -0
- package/dist/v8/cli/watch.js +79 -0
- package/dist/v8/cli/watch.js.map +1 -0
- package/dist/v8/client.d.ts +20 -0
- package/dist/v8/client.d.ts.map +1 -0
- package/dist/v8/client.js +115 -0
- package/dist/v8/client.js.map +1 -0
- package/dist/v8/cms.d.ts +9 -0
- package/dist/v8/cms.d.ts.map +1 -0
- package/dist/v8/cms.js +206 -0
- package/dist/v8/cms.js.map +1 -0
- package/dist/v8/content.d.ts +35 -0
- package/dist/v8/content.d.ts.map +1 -0
- package/dist/v8/content.js +183 -0
- package/dist/v8/content.js.map +1 -0
- package/dist/v8/draft.d.ts +44 -0
- package/dist/v8/draft.d.ts.map +1 -0
- package/dist/v8/draft.js +133 -0
- package/dist/v8/draft.js.map +1 -0
- package/dist/v8/errors.d.ts +21 -0
- package/dist/v8/errors.d.ts.map +1 -0
- package/dist/v8/errors.js +39 -0
- package/dist/v8/errors.js.map +1 -0
- package/dist/v8/fetch.d.ts +26 -0
- package/dist/v8/fetch.d.ts.map +1 -0
- package/dist/v8/fetch.js +98 -0
- package/dist/v8/fetch.js.map +1 -0
- package/dist/v8/identity.d.ts +19 -0
- package/dist/v8/identity.d.ts.map +1 -0
- package/dist/v8/identity.js +54 -0
- package/dist/v8/identity.js.map +1 -0
- package/dist/v8/index.d.ts +11 -0
- package/dist/v8/index.d.ts.map +1 -0
- package/dist/v8/index.js +10 -0
- package/dist/v8/index.js.map +1 -0
- package/dist/v8/json.d.ts +19 -0
- package/dist/v8/json.d.ts.map +1 -0
- package/dist/v8/json.js +65 -0
- package/dist/v8/json.js.map +1 -0
- package/dist/v8/matchRoute.d.ts +30 -0
- package/dist/v8/matchRoute.d.ts.map +1 -0
- package/dist/v8/matchRoute.js +175 -0
- package/dist/v8/matchRoute.js.map +1 -0
- package/dist/v8/remoteLoader.d.ts +16 -0
- package/dist/v8/remoteLoader.d.ts.map +1 -0
- package/dist/v8/remoteLoader.js +243 -0
- package/dist/v8/remoteLoader.js.map +1 -0
- package/dist/v8/resolver.d.ts +34 -0
- package/dist/v8/resolver.d.ts.map +1 -0
- package/dist/v8/resolver.js +219 -0
- package/dist/v8/resolver.js.map +1 -0
- package/dist/v8/secrets.d.ts +9 -0
- package/dist/v8/secrets.d.ts.map +1 -0
- package/dist/v8/secrets.js +14 -0
- package/dist/v8/secrets.js.map +1 -0
- package/dist/v8/telemetry.d.ts +61 -0
- package/dist/v8/telemetry.d.ts.map +1 -0
- package/dist/v8/telemetry.js +460 -0
- package/dist/v8/telemetry.js.map +1 -0
- package/dist/v8/types.d.ts +214 -0
- package/dist/v8/types.d.ts.map +1 -0
- package/dist/v8/types.js +2 -0
- package/dist/v8/types.js.map +1 -0
- package/package.json +65 -105
- package/src/index.ts +3 -13
- package/src/protocol/canonical.ts +1 -1
- package/src/protocol/ciphertext.ts +1 -1
- package/src/protocol/client.ts +2 -2
- package/src/protocol/conformance/cases/assets.ts +3 -3
- package/src/protocol/conformance/cases/guards.ts +4 -4
- package/src/protocol/conformance/cases/reads.ts +4 -4
- package/src/protocol/conformance/cases/types.ts +1 -1
- package/src/protocol/conformance/cases/wire.ts +4 -4
- package/src/protocol/conformance/cases/writes.ts +4 -4
- package/src/protocol/conformance/context.ts +4 -4
- package/src/protocol/conformance/index.ts +10 -10
- package/src/protocol/index.ts +6 -6
- package/src/protocol/params.ts +2 -2
- package/src/protocol/secrets.ts +3 -3
- package/src/protocol/server/assets.ts +6 -6
- package/src/protocol/server/auth.ts +1 -1
- package/src/protocol/server/content.ts +5 -5
- package/src/protocol/server/core.ts +12 -6
- package/src/protocol/server/handler.ts +6 -6
- package/src/protocol/server/http.ts +1 -1
- package/src/protocol/server/index.ts +3 -3
- package/src/protocol/server/methods/apply.ts +9 -9
- package/src/protocol/server/methods/read.ts +5 -5
- package/src/protocol/server/rpc.ts +6 -6
- package/src/protocol/storage/fs/index.ts +7 -7
- package/src/protocol/storage/fs/lock.ts +1 -1
- package/src/protocol/storage/fs/unsupported.ts +2 -2
- package/src/protocol/storage/memory.ts +5 -5
- package/src/protocol/storage.ts +1 -1
- package/src/v8/analytics.ts +2 -2
- package/src/v8/background.ts +3 -3
- package/src/v8/builtins/data.ts +1 -1
- package/src/v8/builtins/index.ts +6 -6
- package/src/v8/builtins/lazy.ts +1 -1
- package/src/v8/builtins/legacy.ts +2 -2
- package/src/v8/builtins/multivariate.ts +1 -1
- package/src/v8/builtins/secret.ts +2 -2
- package/src/v8/cli/builtins.ts +2 -2
- package/src/v8/cli/check/index.ts +11 -11
- package/src/v8/cli/content.ts +6 -6
- package/src/v8/cli/index.ts +8 -8
- package/src/v8/cli/main.ts +1 -1
- package/src/v8/cli/run.ts +7 -7
- package/src/v8/cli/schema/builtinSchemas.ts +1 -1
- package/src/v8/cli/schema/generate.ts +6 -6
- package/src/v8/cli/schema/index.ts +4 -4
- package/src/v8/cli/schema/tsProgram.ts +1 -1
- package/src/v8/cli/schema/typeToSchema.ts +24 -2
- package/src/v8/cli/serve/server.ts +9 -9
- package/src/v8/client.ts +5 -5
- package/src/v8/cms.ts +9 -9
- package/src/v8/content.ts +4 -4
- package/src/v8/draft.ts +1 -1
- package/src/v8/errors.ts +1 -1
- package/src/v8/fetch.ts +9 -28
- package/src/v8/identity.ts +1 -1
- package/src/v8/index.ts +5 -5
- package/src/v8/matchRoute.ts +1 -1
- package/src/v8/remoteLoader.ts +7 -7
- package/src/v8/resolver.ts +6 -6
- package/src/v8/secrets.ts +1 -1
- package/src/v8/telemetry.ts +6 -6
- package/src/cms/applySectionConventions.ts +0 -148
- package/src/cms/blockSource.ts +0 -228
- package/src/cms/client.ts +0 -85
- package/src/cms/deferredTrigger.ts +0 -58
- package/src/cms/draftSource.ts +0 -476
- package/src/cms/index.ts +0 -180
- package/src/cms/loadDecofileDirectory.ts +0 -89
- package/src/cms/loader.ts +0 -563
- package/src/cms/registry.ts +0 -264
- package/src/cms/renderJson.ts +0 -179
- package/src/cms/resolve.ts +0 -2583
- package/src/cms/schema.ts +0 -1219
- package/src/cms/sectionLoaderContext.ts +0 -113
- package/src/cms/sectionLoaders.ts +0 -686
- package/src/cms/sectionMixins.ts +0 -153
- package/src/flags/audience.ts +0 -56
- package/src/flags/everyone.ts +0 -29
- package/src/flags/flag.ts +0 -15
- package/src/flags/multivariate/image.ts +0 -11
- package/src/flags/multivariate/message.ts +0 -11
- package/src/flags/multivariate/page.ts +0 -16
- package/src/flags/multivariate/section.ts +0 -16
- package/src/flags/multivariate.ts +0 -1
- package/src/flags/types.ts +0 -59
- package/src/flags/utils/multivariate.ts +0 -20
- package/src/hooks/Image.tsx +0 -314
- package/src/hooks/JsonLd.tsx +0 -353
- package/src/hooks/LazySection.tsx +0 -121
- package/src/hooks/LiveControls.tsx +0 -144
- package/src/hooks/Picture.tsx +0 -127
- package/src/hooks/RenderSection.tsx +0 -91
- package/src/hooks/SectionErrorFallback.tsx +0 -97
- package/src/hooks/Stats.tsx +0 -134
- package/src/hooks/index.ts +0 -35
- package/src/hooks/useLoadMore.ts +0 -100
- package/src/matchers/builtins.ts +0 -459
- package/src/matchers/countryNames.ts +0 -104
- package/src/matchers/override.ts +0 -136
- package/src/matchers/posthog.ts +0 -154
- package/src/middleware/decoState.ts +0 -55
- package/src/middleware/healthMetrics.ts +0 -133
- package/src/middleware/hydrationContext.ts +0 -79
- package/src/middleware/index.ts +0 -88
- package/src/middleware/liveness.ts +0 -21
- package/src/middleware/observability.ts +0 -800
- package/src/middleware/validateSection.ts +0 -100
- package/src/preview/DraftPreviewBadge.tsx +0 -306
- package/src/preview/decoMark.ts +0 -11
- package/src/preview/index.ts +0 -8
- package/src/sdk/abTesting.ts +0 -556
- package/src/sdk/analytics.ts +0 -147
- package/src/sdk/cacheHeaders.ts +0 -633
- package/src/sdk/cacheStorage.ts +0 -287
- package/src/sdk/cachedLoader.ts +0 -556
- package/src/sdk/clx.ts +0 -5
- package/src/sdk/cn.ts +0 -28
- package/src/sdk/composite.ts +0 -114
- package/src/sdk/cookie.ts +0 -129
- package/src/sdk/crypto.ts +0 -199
- package/src/sdk/csp.ts +0 -59
- package/src/sdk/deepOmit.ts +0 -52
- package/src/sdk/detectDevice.ts +0 -45
- package/src/sdk/djb2.ts +0 -20
- package/src/sdk/encoding.ts +0 -44
- package/src/sdk/env.ts +0 -54
- package/src/sdk/experiments.ts +0 -314
- package/src/sdk/fetchCache.ts +0 -269
- package/src/sdk/fetchTimeout.ts +0 -58
- package/src/sdk/flags.ts +0 -138
- package/src/sdk/http.ts +0 -124
- package/src/sdk/index.ts +0 -97
- package/src/sdk/inflightTimeout.ts +0 -53
- package/src/sdk/instrumentedFetch.ts +0 -362
- package/src/sdk/invoke.ts +0 -298
- package/src/sdk/logger.ts +0 -304
- package/src/sdk/mergeCacheControl.ts +0 -150
- package/src/sdk/nonce.ts +0 -46
- package/src/sdk/normalizeUrls.ts +0 -91
- package/src/sdk/observability.ts +0 -116
- package/src/sdk/otel.ts +0 -1118
- package/src/sdk/otelAdapters/clickhouseCollector.ts +0 -65
- package/src/sdk/otelAdapters.ts +0 -144
- package/src/sdk/otelHttpLog.ts +0 -419
- package/src/sdk/otelHttpMeter.ts +0 -532
- package/src/sdk/otelHttpTracer.ts +0 -543
- package/src/sdk/redirects.ts +0 -336
- package/src/sdk/requestContext.ts +0 -281
- package/src/sdk/requestContextStorage.browser.ts +0 -43
- package/src/sdk/requestContextStorage.ts +0 -35
- package/src/sdk/responseCache.ts +0 -82
- package/src/sdk/retry.ts +0 -45
- package/src/sdk/serverTimings.ts +0 -68
- package/src/sdk/signal.ts +0 -42
- package/src/sdk/sitemap.ts +0 -160
- package/src/sdk/urlRedaction.ts +0 -82
- package/src/sdk/urlUtils.ts +0 -183
- package/src/sdk/useDevice.ts +0 -89
- package/src/sdk/useDeviceContext.tsx +0 -108
- package/src/sdk/useId.ts +0 -7
- package/src/sdk/useScript.ts +0 -210
- package/src/sdk/useSuggestions.ts +0 -188
- package/src/sdk/wrapCaughtErrors.ts +0 -107
- package/src/setup.ts +0 -120
- package/src/types/index.ts +0 -53
- package/src/types/widgets.ts +0 -14
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types of the next-major (v8) core SDK. See the API reference
|
|
3
|
+
* (`/next/api-reference#types`) — every type here is documented there.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from "react";
|
|
6
|
+
/**
|
|
7
|
+
* A block as stored: the JSON in `.deco/blocks`, and what `client.list` and
|
|
8
|
+
* `{ run: false }` return. Props never use it: a field's type is the value the
|
|
9
|
+
* function receives.
|
|
10
|
+
*/
|
|
11
|
+
export type Block = {
|
|
12
|
+
__resolveType: string;
|
|
13
|
+
[input: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
/** A function a block can call. */
|
|
16
|
+
export type BlockFunction = (inputs: any) => unknown | Promise<unknown>;
|
|
17
|
+
/** A block map: what `.deco/index.ts` exports and the CLI reads. */
|
|
18
|
+
export type Blocks = Record<string, BlockFunction>;
|
|
19
|
+
/** One fixed copy of the content: what the content module exports and `load()` returns. */
|
|
20
|
+
export type Snapshot = {
|
|
21
|
+
revision: string;
|
|
22
|
+
/** The content map: entry name → saved JSON. */
|
|
23
|
+
blocks: Record<string, unknown>;
|
|
24
|
+
/** The alias table `deco content` writes: old type name → your type. */
|
|
25
|
+
aliases?: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The content module `deco content` writes: a snapshot plus `root`, the
|
|
29
|
+
* `.deco` folder it was generated from, which `createCMS` keys its instance
|
|
30
|
+
* on (see /next/api-reference#one-instance-per-process). Not exported.
|
|
31
|
+
*/
|
|
32
|
+
export type ContentModule = Snapshot & {
|
|
33
|
+
root?: string;
|
|
34
|
+
};
|
|
35
|
+
/** A source of content. `load()` is the release; `load(pointer)` is a draft. */
|
|
36
|
+
export interface Loader {
|
|
37
|
+
load(pointer?: string | null): Promise<Snapshot>;
|
|
38
|
+
update?(): Promise<{
|
|
39
|
+
updated: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
/** The parts of a draft pointer, `<host[:port]><path[?query]>@<version>`. */
|
|
43
|
+
export interface DraftPointer {
|
|
44
|
+
/** `host[:port]` of the content source that holds the draft. */
|
|
45
|
+
host: string;
|
|
46
|
+
/** Starts with `/`; opaque to the app. */
|
|
47
|
+
path: string;
|
|
48
|
+
/** Opaque and immutable: the branch head or ETag. */
|
|
49
|
+
version: string;
|
|
50
|
+
}
|
|
51
|
+
/** An entry that lives at a URL. Extend it to make a type routable. */
|
|
52
|
+
export interface Route {
|
|
53
|
+
/** @title Name */
|
|
54
|
+
name: string;
|
|
55
|
+
/** @title Path */
|
|
56
|
+
path: string;
|
|
57
|
+
}
|
|
58
|
+
export interface Seo {
|
|
59
|
+
title: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}
|
|
62
|
+
/** The built-in `page` block, resolved: without `seo`, the site's defaults apply. */
|
|
63
|
+
export interface Page extends Route {
|
|
64
|
+
seo?: Seo;
|
|
65
|
+
sections: ReactNode[];
|
|
66
|
+
}
|
|
67
|
+
/** The built-in `redirect` block. */
|
|
68
|
+
export interface Redirect {
|
|
69
|
+
/** Literal path or template (`:name` segments, an optional trailing `/*`). */
|
|
70
|
+
from: string;
|
|
71
|
+
to: string;
|
|
72
|
+
/** `true` for a 301, `false` for a 302. */
|
|
73
|
+
permanent: boolean;
|
|
74
|
+
/** Wins over `permanent`. */
|
|
75
|
+
status?: RedirectStatus;
|
|
76
|
+
/** Drop the request's query string instead of carrying it over. */
|
|
77
|
+
discardQueryParameters?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export type RedirectStatus = 301 | 302 | 307 | 308;
|
|
80
|
+
/**
|
|
81
|
+
* The nested redirect shape v7 content stores (`website/loaders/redirect.ts`).
|
|
82
|
+
* `matchRoute` accepts it next to {@link Redirect}: `permanent` is a 301 and
|
|
83
|
+
* anything else a 307, the status the site editor has always written for it.
|
|
84
|
+
*/
|
|
85
|
+
export interface LegacyRedirect {
|
|
86
|
+
redirect: {
|
|
87
|
+
from: string;
|
|
88
|
+
to: string;
|
|
89
|
+
type?: "permanent" | "temporary";
|
|
90
|
+
discardQueryParameters?: boolean;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** A field the site editor saves encrypted, as a `secret` block. */
|
|
94
|
+
export type Secret = string & {
|
|
95
|
+
readonly __secret: true;
|
|
96
|
+
};
|
|
97
|
+
/** A prop the built-in `lazy` block fills; resolves its value when called, at most once. */
|
|
98
|
+
export type Lazy<T> = () => Promise<T>;
|
|
99
|
+
/** One entry of `variants`: a rule and the variant it shows. */
|
|
100
|
+
export interface Variant<T> {
|
|
101
|
+
rule: boolean;
|
|
102
|
+
value: Lazy<T>;
|
|
103
|
+
}
|
|
104
|
+
/** The `Telemetry` saved block's type (built-in `telemetry`). */
|
|
105
|
+
export interface Telemetry {
|
|
106
|
+
/** Default `true`; `false` switches telemetry off. */
|
|
107
|
+
enabled?: boolean;
|
|
108
|
+
/** Default `true`. */
|
|
109
|
+
metrics?: boolean;
|
|
110
|
+
/** Default 0.05, capped by `telemetry.limits`. */
|
|
111
|
+
errorSampleRate?: number;
|
|
112
|
+
/** Default 0, capped by `telemetry.limits`. */
|
|
113
|
+
traceSampleRate?: number;
|
|
114
|
+
}
|
|
115
|
+
/** The built-in `analytics` block's props. Separate from telemetry. */
|
|
116
|
+
export interface Analytics {
|
|
117
|
+
/** An endpoint that accepts the One Dollar Stats format; default: the hosted Deco CMS collector. */
|
|
118
|
+
collector?: string;
|
|
119
|
+
/** Default `true`; `false` makes `AnalyticsScript` render nothing. */
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export type CMSErrorCode = "NOT_FOUND" | "UNKNOWN_BLOCK" | "CYCLE" | "BLOCK_FAILED" | "LOADER_FAILED";
|
|
123
|
+
export interface CMSError {
|
|
124
|
+
code: CMSErrorCode;
|
|
125
|
+
message: string;
|
|
126
|
+
/** Where in the tree it happened, such as `["sections", 2, "product"]`. */
|
|
127
|
+
path: (string | number)[];
|
|
128
|
+
/** The original error, for `BLOCK_FAILED` and `LOADER_FAILED`. */
|
|
129
|
+
cause?: unknown;
|
|
130
|
+
}
|
|
131
|
+
export type Result<T> = [T, null] | [null, CMSError];
|
|
132
|
+
export type Match<T> = {
|
|
133
|
+
kind: "match";
|
|
134
|
+
entry: T;
|
|
135
|
+
params: Record<string, string>;
|
|
136
|
+
} | {
|
|
137
|
+
kind: "redirect";
|
|
138
|
+
location: string;
|
|
139
|
+
status: RedirectStatus;
|
|
140
|
+
} | {
|
|
141
|
+
kind: "not-found";
|
|
142
|
+
};
|
|
143
|
+
export type TelemetryConfig = ({
|
|
144
|
+
site: string;
|
|
145
|
+
token: string;
|
|
146
|
+
} | {
|
|
147
|
+
endpoint: string;
|
|
148
|
+
headers?: Record<string, string>;
|
|
149
|
+
}) & {
|
|
150
|
+
limits?: {
|
|
151
|
+
errorSampleRate?: number;
|
|
152
|
+
traceSampleRate?: number;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export interface CMSConfig {
|
|
156
|
+
/** Your block functions; the CMS uses `{ ...builtIns, ...blocks }`. */
|
|
157
|
+
blocks: Blocks;
|
|
158
|
+
/** The content module (`.deco/blocks.gen.ts`), or any {@link Loader}. */
|
|
159
|
+
content: ContentModule | Loader;
|
|
160
|
+
/** ms between `update()` checks of a content source that has one; minimum 60 000. */
|
|
161
|
+
interval?: number;
|
|
162
|
+
/** Where telemetry goes; see /next/telemetry. */
|
|
163
|
+
telemetry?: false | TelemetryConfig;
|
|
164
|
+
/** The private key that decrypts `secret` blocks. */
|
|
165
|
+
secrets?: {
|
|
166
|
+
key?: string;
|
|
167
|
+
};
|
|
168
|
+
/** Your site's ID, for hosted releases and drafts. */
|
|
169
|
+
site?: string;
|
|
170
|
+
/** Your site token (secret), for hosted releases and drafts. */
|
|
171
|
+
token?: string;
|
|
172
|
+
}
|
|
173
|
+
export interface ResolveOptions {
|
|
174
|
+
/** `false` reads without running: saved blocks expand, no function runs. */
|
|
175
|
+
run?: boolean;
|
|
176
|
+
}
|
|
177
|
+
export interface ListOptions<T> {
|
|
178
|
+
where?: (entry: T) => boolean;
|
|
179
|
+
sort?: (a: T, b: T) => number;
|
|
180
|
+
limit?: number;
|
|
181
|
+
run?: boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Reads one revision for one request.
|
|
185
|
+
*
|
|
186
|
+
* Results are read-only. A client runs each block function once per distinct
|
|
187
|
+
* input, so the same block at two places in a request hands both places the
|
|
188
|
+
* same object; mutating it in place changes the other occurrence too. Copy a
|
|
189
|
+
* result before changing it. (The memo belongs to one client, so nothing is
|
|
190
|
+
* shared across requests.)
|
|
191
|
+
*/
|
|
192
|
+
export interface Client {
|
|
193
|
+
resolve<T = unknown>(target: unknown, options?: ResolveOptions): Promise<Result<T>>;
|
|
194
|
+
list<T = Block>(type: string, options?: ListOptions<T>): Promise<Result<T[]>>;
|
|
195
|
+
/**
|
|
196
|
+
* The revision this client reads (loads it on first use). Unlike `resolve`
|
|
197
|
+
* and `list`, it rejects with the `LOADER_FAILED` error when the content
|
|
198
|
+
* can't load, since there is no revision to report.
|
|
199
|
+
*/
|
|
200
|
+
revision(): Promise<string>;
|
|
201
|
+
}
|
|
202
|
+
export interface CMS {
|
|
203
|
+
/** A client reading the current release. */
|
|
204
|
+
forRelease(): Client;
|
|
205
|
+
/** A client reading the draft a pointer names. */
|
|
206
|
+
forDraft(pointer: string): Client;
|
|
207
|
+
/** A client pinned to a revision this CMS has served; an unknown revision behaves like the release. */
|
|
208
|
+
forRevision(revision: string): Client;
|
|
209
|
+
/** Ask the content source for newer content now; never throws. */
|
|
210
|
+
update(): Promise<{
|
|
211
|
+
updated: boolean;
|
|
212
|
+
}>;
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v8/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAExE,mCAAmC;AACnC,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAExE,oEAAoE;AACpE,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEnD,2FAA2F;AAC3F,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC,M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package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/blocks",
|
|
3
|
-
"version": "8.1.0-next.
|
|
3
|
+
"version": "8.1.0-next.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24"
|
|
7
7
|
},
|
|
8
|
-
"description": "Deco
|
|
8
|
+
"description": "Deco CMS: content resolution, built-in blocks, the deco CLI and the content protocol",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/decocms/blocks.git",
|
|
12
12
|
"directory": "packages/blocks"
|
|
13
13
|
},
|
|
14
|
-
"main": "./
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
15
16
|
"files": [
|
|
16
17
|
"bin",
|
|
18
|
+
"dist",
|
|
17
19
|
"src",
|
|
18
20
|
"!src/**/*.test.ts",
|
|
19
21
|
"!src/**/*.test.tsx",
|
|
@@ -26,126 +28,84 @@
|
|
|
26
28
|
"deco": "./bin/deco.js"
|
|
27
29
|
},
|
|
28
30
|
"exports": {
|
|
29
|
-
".":
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"./
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"./
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"source": "./src/index.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./analytics": {
|
|
37
|
+
"types": "./dist/v8/analytics.d.ts",
|
|
38
|
+
"source": "./src/v8/analytics.ts",
|
|
39
|
+
"default": "./dist/v8/analytics.js"
|
|
40
|
+
},
|
|
41
|
+
"./cli": {
|
|
42
|
+
"types": "./dist/v8/cli/index.d.ts",
|
|
43
|
+
"source": "./src/v8/cli/index.ts",
|
|
44
|
+
"default": "./dist/v8/cli/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./fetch": {
|
|
47
|
+
"types": "./dist/v8/fetch.d.ts",
|
|
48
|
+
"source": "./src/v8/fetch.ts",
|
|
49
|
+
"default": "./dist/v8/fetch.js"
|
|
50
|
+
},
|
|
51
|
+
"./secrets": {
|
|
52
|
+
"types": "./dist/v8/secrets.d.ts",
|
|
53
|
+
"source": "./src/v8/secrets.ts",
|
|
54
|
+
"default": "./dist/v8/secrets.js"
|
|
55
|
+
},
|
|
56
|
+
"./protocol": {
|
|
57
|
+
"types": "./dist/protocol/index.d.ts",
|
|
58
|
+
"source": "./src/protocol/index.ts",
|
|
59
|
+
"default": "./dist/protocol/index.js"
|
|
44
60
|
},
|
|
45
|
-
"./protocol/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"./setup": "./src/setup.ts",
|
|
50
|
-
"./matchers/builtins": "./src/matchers/builtins.ts",
|
|
51
|
-
"./matchers/posthog": "./src/matchers/posthog.ts",
|
|
52
|
-
"./matchers/override": "./src/matchers/override.ts",
|
|
53
|
-
"./flags/audience": "./src/flags/audience.ts",
|
|
54
|
-
"./flags/everyone": "./src/flags/everyone.ts",
|
|
55
|
-
"./flags/flag": "./src/flags/flag.ts",
|
|
56
|
-
"./flags/types": "./src/flags/types.ts",
|
|
57
|
-
"./flags/multivariate": "./src/flags/multivariate.ts",
|
|
58
|
-
"./flags/multivariate/image": "./src/flags/multivariate/image.ts",
|
|
59
|
-
"./flags/multivariate/message": "./src/flags/multivariate/message.ts",
|
|
60
|
-
"./flags/multivariate/page": "./src/flags/multivariate/page.ts",
|
|
61
|
-
"./flags/multivariate/section": "./src/flags/multivariate/section.ts",
|
|
62
|
-
"./middleware": "./src/middleware/index.ts",
|
|
63
|
-
"./middleware/healthMetrics": "./src/middleware/healthMetrics.ts",
|
|
64
|
-
"./middleware/hydrationContext": "./src/middleware/hydrationContext.ts",
|
|
65
|
-
"./middleware/observability": "./src/middleware/observability.ts",
|
|
66
|
-
"./middleware/validateSection": "./src/middleware/validateSection.ts",
|
|
67
|
-
"./sdk": "./src/sdk/index.ts",
|
|
68
|
-
"./sdk/abTesting": "./src/sdk/abTesting.ts",
|
|
69
|
-
"./sdk/analytics": "./src/sdk/analytics.ts",
|
|
70
|
-
"./sdk/cachedLoader": "./src/sdk/cachedLoader.ts",
|
|
71
|
-
"./sdk/responseCache": "./src/sdk/responseCache.ts",
|
|
72
|
-
"./sdk/cacheStorage": "./src/sdk/cacheStorage.ts",
|
|
73
|
-
"./sdk/cacheHeaders": "./src/sdk/cacheHeaders.ts",
|
|
74
|
-
"./sdk/clx": "./src/sdk/clx.ts",
|
|
75
|
-
"./sdk/cn": "./src/sdk/cn.ts",
|
|
76
|
-
"./sdk/composite": "./src/sdk/composite.ts",
|
|
77
|
-
"./sdk/cookie": "./src/sdk/cookie.ts",
|
|
78
|
-
"./sdk/crypto": "./src/sdk/crypto.ts",
|
|
79
|
-
"./sdk/csp": "./src/sdk/csp.ts",
|
|
80
|
-
"./sdk/detectDevice": "./src/sdk/detectDevice.ts",
|
|
81
|
-
"./sdk/djb2": "./src/sdk/djb2.ts",
|
|
82
|
-
"./sdk/encoding": "./src/sdk/encoding.ts",
|
|
83
|
-
"./sdk/env": "./src/sdk/env.ts",
|
|
84
|
-
"./sdk/fetchCache": "./src/sdk/fetchCache.ts",
|
|
85
|
-
"./sdk/fetchTimeout": "./src/sdk/fetchTimeout.ts",
|
|
86
|
-
"./sdk/experiments": "./src/sdk/experiments.ts",
|
|
87
|
-
"./sdk/flags": "./src/sdk/flags.ts",
|
|
88
|
-
"./sdk/http": "./src/sdk/http.ts",
|
|
89
|
-
"./sdk/instrumentedFetch": "./src/sdk/instrumentedFetch.ts",
|
|
90
|
-
"./sdk/invoke": "./src/sdk/invoke.ts",
|
|
91
|
-
"./sdk/logger": "./src/sdk/logger.ts",
|
|
92
|
-
"./sdk/mergeCacheControl": "./src/sdk/mergeCacheControl.ts",
|
|
93
|
-
"./sdk/nonce": "./src/sdk/nonce.ts",
|
|
94
|
-
"./sdk/normalizeUrls": "./src/sdk/normalizeUrls.ts",
|
|
95
|
-
"./sdk/observability": "./src/sdk/observability.ts",
|
|
96
|
-
"./sdk/otel": "./src/sdk/otel.ts",
|
|
97
|
-
"./sdk/otelAdapters": "./src/sdk/otelAdapters.ts",
|
|
98
|
-
"./sdk/otelAdapters/clickhouseCollector": "./src/sdk/otelAdapters/clickhouseCollector.ts",
|
|
99
|
-
"./sdk/otelHttpLog": "./src/sdk/otelHttpLog.ts",
|
|
100
|
-
"./sdk/otelHttpMeter": "./src/sdk/otelHttpMeter.ts",
|
|
101
|
-
"./sdk/otelHttpTracer": "./src/sdk/otelHttpTracer.ts",
|
|
102
|
-
"./sdk/redirects": "./src/sdk/redirects.ts",
|
|
103
|
-
"./sdk/requestContext": "./src/sdk/requestContext.ts",
|
|
104
|
-
"./sdk/requestContextStorage": {
|
|
105
|
-
"workerd": "./src/sdk/requestContextStorage.ts",
|
|
106
|
-
"node": "./src/sdk/requestContextStorage.ts",
|
|
107
|
-
"browser": "./src/sdk/requestContextStorage.browser.ts",
|
|
108
|
-
"default": "./src/sdk/requestContextStorage.ts"
|
|
61
|
+
"./protocol/keys": {
|
|
62
|
+
"types": "./dist/protocol/keys.d.ts",
|
|
63
|
+
"source": "./src/protocol/keys.ts",
|
|
64
|
+
"default": "./dist/protocol/keys.js"
|
|
109
65
|
},
|
|
110
|
-
"./
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"./
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
66
|
+
"./protocol/server": {
|
|
67
|
+
"types": "./dist/protocol/server/index.d.ts",
|
|
68
|
+
"source": "./src/protocol/server/index.ts",
|
|
69
|
+
"default": "./dist/protocol/server/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./protocol/storage/fs": {
|
|
72
|
+
"node": {
|
|
73
|
+
"types": "./dist/protocol/storage/fs/index.d.ts",
|
|
74
|
+
"source": "./src/protocol/storage/fs/index.ts",
|
|
75
|
+
"default": "./dist/protocol/storage/fs/index.js"
|
|
76
|
+
},
|
|
77
|
+
"default": {
|
|
78
|
+
"types": "./dist/protocol/storage/fs/unsupported.d.ts",
|
|
79
|
+
"source": "./src/protocol/storage/fs/unsupported.ts",
|
|
80
|
+
"default": "./dist/protocol/storage/fs/unsupported.js"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"./protocol/conformance": {
|
|
84
|
+
"types": "./dist/protocol/conformance/index.d.ts",
|
|
85
|
+
"source": "./src/protocol/conformance/index.ts",
|
|
86
|
+
"default": "./dist/protocol/conformance/index.js"
|
|
87
|
+
}
|
|
120
88
|
},
|
|
121
89
|
"scripts": {
|
|
122
|
-
"build": "tsc",
|
|
90
|
+
"build": "node ../../scripts/tsc.mjs --clean dist -p tsconfig.build.json",
|
|
91
|
+
"prepack": "npm run build",
|
|
123
92
|
"test": "vitest run --root ../.. packages/blocks/",
|
|
124
|
-
"typecheck": "tsc
|
|
125
|
-
"lint:unused": "knip"
|
|
93
|
+
"typecheck": "node ../../scripts/tsc.mjs -p tsconfig.json"
|
|
126
94
|
},
|
|
127
95
|
"dependencies": {
|
|
128
|
-
"@opentelemetry/api": "^1.9.1",
|
|
129
|
-
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
130
|
-
"@tanstack/store": "^0.9.1",
|
|
131
96
|
"ajv": "^8.20.0",
|
|
132
|
-
"clsx": "^2.1.1",
|
|
133
|
-
"fast-json-patch": "^3.1.0",
|
|
134
|
-
"tailwind-merge": "^3.3.1",
|
|
135
|
-
"tsx": "^4.22.5",
|
|
136
97
|
"zod": "^4.4.3"
|
|
137
98
|
},
|
|
138
99
|
"peerDependencies": {
|
|
139
100
|
"react": "^19.0.0",
|
|
140
|
-
"react-dom": "^19.0.0",
|
|
141
101
|
"typescript": "^5.0.0"
|
|
142
102
|
},
|
|
143
103
|
"devDependencies": {
|
|
104
|
+
"@opentelemetry/api": "^1.9.1",
|
|
144
105
|
"@types/react": "^19.0.0",
|
|
145
106
|
"@types/react-dom": "^19.0.0",
|
|
146
107
|
"esbuild": "^0.27.3",
|
|
147
|
-
"
|
|
148
|
-
"typescript": "^5.9.0"
|
|
108
|
+
"react-dom": "^19.0.0"
|
|
149
109
|
},
|
|
150
110
|
"publishConfig": {
|
|
151
111
|
"registry": "https://registry.npmjs.org",
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
// @decocms/blocks
|
|
2
|
-
|
|
3
|
-
export * from "./hooks/index";
|
|
4
|
-
export * from "./middleware/index";
|
|
5
|
-
// Observability surface — logger + instrumentWorker live behind their own
|
|
6
|
-
// granular imports too (see `@decocms/blocks/sdk/logger`, `.../observability`).
|
|
7
|
-
export { type Logger, type LogLevel, logger, setLogLevel } from "./sdk/logger";
|
|
8
|
-
export * from "./types/index";
|
|
9
|
-
|
|
10
|
-
// Next major (v8) core SDK. Explicit re-exports shadow the star exports above,
|
|
11
|
-
// so where v7 and v8 share a name (`DraftPointer`, `parseDraftPointer`) the
|
|
12
|
-
// root serves the v8 one; v7's stays reachable at `@decocms/blocks/cms`.
|
|
1
|
+
// @decocms/blocks: the v8 runtime API. The CLI, protocol and helpers live on
|
|
2
|
+
// their own subpaths (`/cli`, `/protocol`, `/fetch`, `/analytics`, `/secrets`).
|
|
13
3
|
export {
|
|
14
4
|
type Analytics,
|
|
15
5
|
type Block,
|
|
@@ -42,4 +32,4 @@ export {
|
|
|
42
32
|
type Telemetry,
|
|
43
33
|
type TelemetryConfig,
|
|
44
34
|
type Variant,
|
|
45
|
-
} from "./v8/index";
|
|
35
|
+
} from "./v8/index.ts";
|
package/src/protocol/client.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* A small content-protocol client: one method per protocol method, plus
|
|
3
3
|
* batches. Uses `fetch`, so it runs in browsers, on Workers and on Node.
|
|
4
4
|
*/
|
|
5
|
-
import { ContentProtocolError, ErrorCode, type RpcErrorObject } from "./errors";
|
|
5
|
+
import { ContentProtocolError, ErrorCode, type RpcErrorObject } from "./errors.ts";
|
|
6
6
|
import {
|
|
7
7
|
type DescribeResult,
|
|
8
8
|
type MethodName,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
PROTOCOL_NAME,
|
|
11
11
|
PROTOCOL_VERSION,
|
|
12
12
|
type RpcId,
|
|
13
|
-
} from "./types";
|
|
13
|
+
} from "./types.ts";
|
|
14
14
|
|
|
15
15
|
export interface ContentClientOptions {
|
|
16
16
|
/** The endpoint URL, such as `http://127.0.0.1:4545/rpc`. */
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Uploads beside the protocol: `PUT /assets/<name>`. These cases run only
|
|
3
3
|
* when the harness passes `assetsEndpoint`.
|
|
4
4
|
*/
|
|
5
|
-
import { ErrorCode } from "../../errors";
|
|
6
|
-
import { assert, assertEqual, type ConformanceContext, rawErrorCode } from "../context";
|
|
7
|
-
import type { ConformanceCase } from "./types";
|
|
5
|
+
import { ErrorCode } from "../../errors.ts";
|
|
6
|
+
import { assert, assertEqual, type ConformanceContext, rawErrorCode } from "../context.ts";
|
|
7
|
+
import type { ConformanceCase } from "./types.ts";
|
|
8
8
|
|
|
9
9
|
/** The smallest PNG header: enough bytes for an upload, never executed. */
|
|
10
10
|
const PNG = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Limits, the secret guard and request-key idempotency.
|
|
3
3
|
*/
|
|
4
|
-
import { encryptToCiphertext, publicKeyPemFromDer } from "../../ciphertext";
|
|
5
|
-
import { ErrorCode, type InvalidBlockData } from "../../errors";
|
|
4
|
+
import { encryptToCiphertext, publicKeyPemFromDer } from "../../ciphertext.ts";
|
|
5
|
+
import { ErrorCode, type InvalidBlockData } from "../../errors.ts";
|
|
6
6
|
import {
|
|
7
7
|
assert,
|
|
8
8
|
assertEqual,
|
|
9
9
|
type ConformanceContext,
|
|
10
10
|
expectError,
|
|
11
11
|
rawErrorCode,
|
|
12
|
-
} from "../context";
|
|
13
|
-
import type { ConformanceCase } from "./types";
|
|
12
|
+
} from "../context.ts";
|
|
13
|
+
import type { ConformanceCase } from "./types.ts";
|
|
14
14
|
|
|
15
15
|
async function writable(ctx: ConformanceContext) {
|
|
16
16
|
const d = await ctx.describe();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `describe`, `schema.get` and `blocks.list`, including conditional reads.
|
|
3
3
|
*/
|
|
4
|
-
import { ErrorCode } from "../../errors";
|
|
5
|
-
import { PROTOCOL_NAME, SCHEMA_FORMAT } from "../../types";
|
|
6
|
-
import { assert, assertEqual, expectError } from "../context";
|
|
7
|
-
import type { ConformanceCase } from "./types";
|
|
4
|
+
import { ErrorCode } from "../../errors.ts";
|
|
5
|
+
import { PROTOCOL_NAME, SCHEMA_FORMAT } from "../../types.ts";
|
|
6
|
+
import { assert, assertEqual, expectError } from "../context.ts";
|
|
7
|
+
import type { ConformanceCase } from "./types.ts";
|
|
8
8
|
|
|
9
9
|
const LIMIT_KEYS = [
|
|
10
10
|
"maxOpsPerApply",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The wire format: JSON-RPC 2.0 envelopes, batches, HTTP status codes, gzip.
|
|
3
3
|
*/
|
|
4
|
-
import { ErrorCode } from "../../errors";
|
|
5
|
-
import { MAX_BATCH_CALLS } from "../../types";
|
|
6
|
-
import { assert, assertEqual, rawErrorCode } from "../context";
|
|
7
|
-
import type { ConformanceCase } from "./types";
|
|
4
|
+
import { ErrorCode } from "../../errors.ts";
|
|
5
|
+
import { MAX_BATCH_CALLS } from "../../types.ts";
|
|
6
|
+
import { assert, assertEqual, rawErrorCode } from "../context.ts";
|
|
7
|
+
import type { ConformanceCase } from "./types.ts";
|
|
8
8
|
|
|
9
9
|
const req = (id: unknown, method: string, params?: unknown) =>
|
|
10
10
|
params === undefined ? { jsonrpc: "2.0", id, method } : { jsonrpc: "2.0", id, method, params };
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* `blocks.apply`: atomic set and delete, set precedence, validation, the
|
|
3
3
|
* file-name rule and preconditions.
|
|
4
4
|
*/
|
|
5
|
-
import { ErrorCode, type InvalidBlockData } from "../../errors";
|
|
6
|
-
import type { BlocksListResult } from "../../types";
|
|
7
|
-
import { assert, assertEqual, type ConformanceContext, expectError } from "../context";
|
|
8
|
-
import type { ConformanceCase } from "./types";
|
|
5
|
+
import { ErrorCode, type InvalidBlockData } from "../../errors.ts";
|
|
6
|
+
import type { BlocksListResult } from "../../types.ts";
|
|
7
|
+
import { assert, assertEqual, type ConformanceContext, expectError } from "../context.ts";
|
|
8
|
+
import type { ConformanceCase } from "./types.ts";
|
|
9
9
|
|
|
10
10
|
type FullList = Extract<BlocksListResult, { notModified: false }>;
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* What every conformance case gets: a client, raw HTTP access, the endpoint's
|
|
3
3
|
* `describe`, unique names and assertion helpers.
|
|
4
4
|
*/
|
|
5
|
-
import { canonicalJson } from "../canonical";
|
|
6
|
-
import { type ContentClient, createContentClient, readResponseJson } from "../client";
|
|
7
|
-
import { ContentProtocolError } from "../errors";
|
|
8
|
-
import type { DescribeResult } from "../types";
|
|
5
|
+
import { canonicalJson } from "../canonical.ts";
|
|
6
|
+
import { type ContentClient, createContentClient, readResponseJson } from "../client.ts";
|
|
7
|
+
import { ContentProtocolError } from "../errors.ts";
|
|
8
|
+
import type { DescribeResult } from "../types.ts";
|
|
9
9
|
|
|
10
10
|
export interface ConformanceOptions {
|
|
11
11
|
/** The endpoint URL, such as `http://127.0.0.1:4545/rpc`. */
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
* don't apply to an endpoint (a read-only one, one without request keys)
|
|
20
20
|
* skip themselves. Browser-safe: it only needs `fetch`.
|
|
21
21
|
*/
|
|
22
|
-
import { assetCases } from "./cases/assets";
|
|
23
|
-
import { guardCases } from "./cases/guards";
|
|
24
|
-
import { readCases } from "./cases/reads";
|
|
25
|
-
import type { ConformanceCase } from "./cases/types";
|
|
26
|
-
import { wireCases } from "./cases/wire";
|
|
27
|
-
import { writeCases } from "./cases/writes";
|
|
28
|
-
import { ConformanceContext, type ConformanceOptions, SkipCase } from "./context";
|
|
22
|
+
import { assetCases } from "./cases/assets.ts";
|
|
23
|
+
import { guardCases } from "./cases/guards.ts";
|
|
24
|
+
import { readCases } from "./cases/reads.ts";
|
|
25
|
+
import type { ConformanceCase } from "./cases/types.ts";
|
|
26
|
+
import { wireCases } from "./cases/wire.ts";
|
|
27
|
+
import { writeCases } from "./cases/writes.ts";
|
|
28
|
+
import { ConformanceContext, type ConformanceOptions, SkipCase } from "./context.ts";
|
|
29
29
|
|
|
30
|
-
export type { ConformanceCase } from "./cases/types";
|
|
31
|
-
export { type ContentHashFixture, contentHashFixtures } from "./contentHashFixtures";
|
|
32
|
-
export type { ConformanceOptions } from "./context";
|
|
30
|
+
export type { ConformanceCase } from "./cases/types.ts";
|
|
31
|
+
export { type ContentHashFixture, contentHashFixtures } from "./contentHashFixtures.ts";
|
|
32
|
+
export type { ConformanceOptions } from "./context.ts";
|
|
33
33
|
|
|
34
34
|
/** Every conformance case, in the order they run. */
|
|
35
35
|
export const conformanceCases: readonly ConformanceCase[] = [
|