@cosmicdrift/kumiko-framework 0.368.0 → 0.370.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/AGENTS.md +14 -1
- package/agents/examples/apex-surface-auth.md +2 -1
- package/agents/examples/app-config.md +98 -0
- package/agents/examples/auth-mfa.md +72 -0
- package/agents/examples/compose-stacks.md +188 -0
- package/agents/examples/env-composition.md +268 -0
- package/agents/examples/host-routing.md +181 -0
- package/agents/examples/legal-pages.md +52 -3
- package/agents/examples/managed-config.md +1 -0
- package/agents/examples/managed-pages.md +1 -0
- package/agents/examples/prod-boot-options.md +180 -0
- package/agents/examples/relations.md +4 -0
- package/agents/examples/secrets-demo.md +4 -2
- package/agents/examples/security-baseline.md +20 -17
- package/agents/examples.md +6 -1
- package/agents/features.md +17 -5
- package/dist/api/anonymous-cookie.d.ts +1 -1
- package/dist/api/anonymous-live-entities.d.ts +1 -1
- package/dist/api/auth-middleware.d.ts +2 -2
- package/dist/api/auth-routes.d.ts +7 -7
- package/dist/api/extra-route.d.ts +2 -2
- package/dist/api/index.d.ts +37 -37
- package/dist/api/jwt.d.ts +1 -1
- package/dist/api/observability-middleware.d.ts +1 -1
- package/dist/api/readiness.d.ts +1 -1
- package/dist/api/redis-sse-broker.d.ts +2 -2
- package/dist/api/request-context.d.ts +1 -1
- package/dist/api/request-id-middleware.d.ts +3 -3
- package/dist/api/route-registrars.d.ts +4 -4
- package/dist/api/routes.d.ts +1 -1
- package/dist/api/server.d.ts +16 -16
- package/dist/api/sse-broker.d.ts +1 -1
- package/dist/api/sse-route.d.ts +1 -1
- package/dist/api/websocket-route.d.ts +3 -3
- package/dist/auth/index.d.ts +2 -2
- package/dist/compliance/duration-spec.d.ts +2 -2
- package/dist/compliance/index.d.ts +6 -6
- package/dist/compliance/profiles.d.ts +1 -1
- package/dist/config/index.d.ts +44 -0
- package/dist/config/index.js +61 -0
- package/dist/crypto/blind-index.d.ts +1 -1
- package/dist/crypto/event-pii.d.ts +1 -1
- package/dist/crypto/in-memory-kms-adapter.d.ts +1 -1
- package/dist/crypto/index.d.ts +11 -11
- package/dist/crypto/is-self-pii-field.d.ts +1 -1
- package/dist/crypto/kms-wiring.d.ts +2 -2
- package/dist/crypto/owner-transition-rekey.d.ts +1 -1
- package/dist/crypto/pg-kms-adapter.d.ts +1 -1
- package/dist/crypto/pii-field-encryption.d.ts +4 -4
- package/dist/crypto/request-kms-cache.d.ts +1 -1
- package/dist/crypto/subject-resolver.d.ts +3 -3
- package/dist/db/apply-entity-event.d.ts +4 -4
- package/dist/db/assert-exists-in.d.ts +4 -4
- package/dist/db/blind-index-cleanup.d.ts +2 -2
- package/dist/db/collect-table-metas.d.ts +2 -2
- package/dist/db/compound-types.d.ts +1 -1
- package/dist/db/config-seed.d.ts +5 -5
- package/dist/db/connection.d.ts +1 -6
- package/dist/db/connection.js +15 -4
- package/dist/db/dialect.d.ts +1 -1
- package/dist/db/eagerload.d.ts +3 -3
- package/dist/db/entity-field-encryption.d.ts +3 -3
- package/dist/db/entity-field-encryption.js +3 -1
- package/dist/db/entity-table-from-registry.d.ts +3 -3
- package/dist/db/entity-table-meta.d.ts +3 -3
- package/dist/db/event-store-executor-context.d.ts +9 -9
- package/dist/db/event-store-executor-read.d.ts +2 -2
- package/dist/db/event-store-executor-write.d.ts +2 -2
- package/dist/db/event-store-executor.d.ts +8 -8
- package/dist/db/feature-table-sources.d.ts +1 -1
- package/dist/db/index.d.ts +39 -39
- package/dist/db/located-timestamp.d.ts +1 -1
- package/dist/db/lock-guard.d.ts +2 -2
- package/dist/db/migrate-generator.d.ts +2 -2
- package/dist/db/migrate-runner.d.ts +1 -1
- package/dist/db/money.d.ts +1 -1
- package/dist/db/parent-ref-clause.d.ts +4 -4
- package/dist/db/projection-registry-binding.d.ts +1 -1
- package/dist/db/queries/advisory-lock.d.ts +1 -1
- package/dist/db/queries/backfill-pii.d.ts +2 -2
- package/dist/db/queries/ddl.d.ts +1 -1
- package/dist/db/queries/entity-read.d.ts +1 -1
- package/dist/db/queries/es-ops.d.ts +1 -1
- package/dist/db/queries/event-consumer.d.ts +2 -2
- package/dist/db/queries/event-store-admin.d.ts +1 -1
- package/dist/db/queries/event-store-transfer.d.ts +1 -1
- package/dist/db/queries/event-store.d.ts +1 -1
- package/dist/db/queries/pii-backfill-state.d.ts +1 -1
- package/dist/db/queries/projection-rebuild.d.ts +1 -1
- package/dist/db/queries/raw-sql.d.ts +1 -1
- package/dist/db/queries/seed-context.d.ts +2 -2
- package/dist/db/queries/shadow-swap.d.ts +3 -3
- package/dist/db/queries/table-ops.d.ts +1 -1
- package/dist/db/queries/test-stack.d.ts +2 -2
- package/dist/db/query.d.ts +3 -3
- package/dist/db/rebuild-marker.d.ts +1 -1
- package/dist/db/reference-data.d.ts +3 -3
- package/dist/db/render-ddl.d.ts +1 -1
- package/dist/db/replay-migration-sql.d.ts +1 -1
- package/dist/db/retired-framework-tables.d.ts +1 -1
- package/dist/db/schema-inspection.d.ts +1 -1
- package/dist/db/table-builder.d.ts +4 -4
- package/dist/db/table-push.d.ts +3 -3
- package/dist/db/tenant-db-runner.d.ts +2 -2
- package/dist/db/tenant-db.d.ts +7 -9
- package/dist/db/tenant-db.js +2 -12
- package/dist/derivatives/derivatives-context.d.ts +3 -3
- package/dist/derivatives/field-variants.d.ts +1 -1
- package/dist/derivatives/index.d.ts +6 -6
- package/dist/engine/access.d.ts +1 -1
- package/dist/engine/active-membership.d.ts +2 -2
- package/dist/engine/boot-validator/access-declarations.d.ts +1 -1
- package/dist/engine/boot-validator/access-roles.d.ts +1 -1
- package/dist/engine/boot-validator/action-wiring.d.ts +1 -1
- package/dist/engine/boot-validator/api-ext.d.ts +1 -1
- package/dist/engine/boot-validator/boot-check.d.ts +1 -1
- package/dist/engine/boot-validator/card-meta-overflow.d.ts +1 -1
- package/dist/engine/boot-validator/config-deps.d.ts +1 -1
- package/dist/engine/boot-validator/detail-screens.d.ts +2 -2
- package/dist/engine/boot-validator/entity-handler.d.ts +1 -1
- package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -1
- package/dist/engine/boot-validator/gdpr-storage.d.ts +1 -1
- package/dist/engine/boot-validator/global-tenancy.d.ts +1 -1
- package/dist/engine/boot-validator/handler-field-references.d.ts +1 -1
- package/dist/engine/boot-validator/i18n-keys.d.ts +1 -1
- package/dist/engine/boot-validator/index.d.ts +7 -7
- package/dist/engine/boot-validator/nav.d.ts +1 -1
- package/dist/engine/boot-validator/ownership.d.ts +2 -2
- package/dist/engine/boot-validator/parent-ref.d.ts +1 -1
- package/dist/engine/boot-validator/pii-retention.d.ts +2 -2
- package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -1
- package/dist/engine/boot-validator/query-output-columns.d.ts +1 -1
- package/dist/engine/boot-validator/query-refs.d.ts +1 -1
- package/dist/engine/boot-validator/record-owned.d.ts +1 -1
- package/dist/engine/boot-validator/screens.d.ts +2 -2
- package/dist/engine/boot-validator/screens.js +29 -0
- package/dist/engine/boot-validator/security-baseline.d.ts +1 -1
- package/dist/engine/boot-validator/selector-owner-panels.d.ts +1 -1
- package/dist/engine/boot-validator/transfer-graph.d.ts +2 -2
- package/dist/engine/boot-validator/url-prefill-fields.d.ts +1 -1
- package/dist/engine/boot-validator/workspaces.d.ts +1 -1
- package/dist/engine/boot-validator.d.ts +1 -1
- package/dist/engine/bridge-stub.d.ts +1 -1
- package/dist/engine/build-app-schema.d.ts +2 -2
- package/dist/engine/build-config-feature-schema.d.ts +5 -5
- package/dist/engine/build-config-feature-schema.js +197 -65
- package/dist/engine/build-target.d.ts +2 -2
- package/dist/engine/changeset-changes.d.ts +1 -1
- package/dist/engine/codemod/index.d.ts +2 -2
- package/dist/engine/config-helpers.d.ts +1 -1
- package/dist/engine/constants.d.ts +1 -1
- package/dist/engine/create-app.d.ts +2 -2
- package/dist/engine/cross-tenant.d.ts +2 -2
- package/dist/engine/dedupe-features.d.ts +1 -1
- package/dist/engine/define-feature.d.ts +1 -1
- package/dist/engine/define-feature.js +2 -2
- package/dist/engine/define-handler.d.ts +4 -4
- package/dist/engine/define-step.d.ts +1 -1
- package/dist/engine/define-workflow.d.ts +2 -2
- package/dist/engine/effective-features.d.ts +1 -1
- package/dist/engine/embedded-derived.d.ts +1 -1
- package/dist/engine/entity-handlers.d.ts +6 -5
- package/dist/engine/entity-handlers.js +6 -3
- package/dist/engine/event-def.d.ts +15 -0
- package/dist/engine/event-def.js +123 -0
- package/dist/engine/event-helpers.d.ts +1 -1
- package/dist/engine/extension-names.d.ts +8 -8
- package/dist/engine/extension-selector-plugins.d.ts +4 -1
- package/dist/engine/extension-selector-plugins.js +14 -0
- package/dist/engine/extensions/escape-hatch-usage.d.ts +1 -1
- package/dist/engine/extensions/storage-provider.d.ts +1 -1
- package/dist/engine/extensions/tenant-data.d.ts +3 -3
- package/dist/engine/extensions/tenant-resource.d.ts +2 -2
- package/dist/engine/extensions/user-data.d.ts +2 -2
- package/dist/engine/factories.d.ts +1 -1
- package/dist/engine/feature-ast/extractors/ai-steps.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/events.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/handlers.d.ts +4 -4
- package/dist/engine/feature-ast/extractors/hooks.d.ts +5 -5
- package/dist/engine/feature-ast/extractors/index.d.ts +14 -14
- package/dist/engine/feature-ast/extractors/jobs-routes.d.ts +3 -3
- package/dist/engine/feature-ast/extractors/projections-screens.d.ts +3 -3
- package/dist/engine/feature-ast/extractors/round1.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round2.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round3.d.ts +4 -4
- package/dist/engine/feature-ast/extractors/round5.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round6.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/shared.d.ts +2 -2
- package/dist/engine/feature-ast/index.d.ts +16 -16
- package/dist/engine/feature-ast/parse.d.ts +2 -2
- package/dist/engine/feature-ast/patch.d.ts +1 -1
- package/dist/engine/feature-ast/patcher.d.ts +15 -15
- package/dist/engine/feature-ast/pattern-change-schema.d.ts +10 -10
- package/dist/engine/feature-ast/patterns.d.ts +15 -15
- package/dist/engine/feature-ast/render.d.ts +1 -1
- package/dist/engine/feature-builder-state.d.ts +5 -5
- package/dist/engine/feature-config-events-jobs.d.ts +5 -3
- package/dist/engine/feature-config-events-jobs.js +9 -130
- package/dist/engine/feature-entity-handlers.d.ts +4 -4
- package/dist/engine/feature-entity-handlers.js +11 -5
- package/dist/engine/feature-manifest.d.ts +1 -1
- package/dist/engine/feature-ui-extensions.d.ts +7 -7
- package/dist/engine/feature-ui-extensions.js +2 -2
- package/dist/engine/field-access.d.ts +1 -1
- package/dist/engine/field-helpers.d.ts +1 -1
- package/dist/engine/handler-helpers.d.ts +1 -1
- package/dist/engine/index.d.ts +89 -88
- package/dist/engine/index.js +1 -0
- package/dist/engine/instruction-fields.d.ts +1 -1
- package/dist/engine/object-form.d.ts +1 -1
- package/dist/engine/object-form.js +5 -6
- package/dist/engine/ownership.d.ts +3 -3
- package/dist/engine/pattern-library/index.d.ts +2 -2
- package/dist/engine/pattern-library/library.d.ts +2 -2
- package/dist/engine/pattern-library/mixed-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/opaque-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/shared-fields.d.ts +1 -1
- package/dist/engine/pattern-library/static-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/types.d.ts +1 -1
- package/dist/engine/personal-data-fields.d.ts +2 -2
- package/dist/engine/pipeline.d.ts +2 -2
- package/dist/engine/project-app-schema-for-roles.d.ts +1 -1
- package/dist/engine/projection-helpers.d.ts +4 -4
- package/dist/engine/read-claim.d.ts +1 -1
- package/dist/engine/registry-facade.d.ts +2 -2
- package/dist/engine/registry-ingest.d.ts +2 -2
- package/dist/engine/registry-state.d.ts +2 -2
- package/dist/engine/registry-validate.d.ts +3 -3
- package/dist/engine/registry.d.ts +1 -1
- package/dist/engine/resolve-config-or-param.d.ts +2 -2
- package/dist/engine/role-assignment.d.ts +1 -1
- package/dist/engine/run-in.d.ts +1 -1
- package/dist/engine/run-pipeline.d.ts +3 -3
- package/dist/engine/schema-builder.d.ts +1 -1
- package/dist/engine/screen-filter-ops.d.ts +1 -1
- package/dist/engine/screen-helpers.d.ts +2 -2
- package/dist/engine/soft-delete-cleanup.d.ts +2 -2
- package/dist/engine/steps/_event-match.d.ts +1 -1
- package/dist/engine/steps/_no-return-guard.d.ts +1 -1
- package/dist/engine/steps/_read-source.d.ts +4 -4
- package/dist/engine/steps/_resolver-utils.d.ts +1 -1
- package/dist/engine/steps/aggregate-append-event.d.ts +1 -1
- package/dist/engine/steps/aggregate-create.d.ts +2 -2
- package/dist/engine/steps/aggregate-update.d.ts +3 -3
- package/dist/engine/steps/branch.d.ts +1 -1
- package/dist/engine/steps/call-feature.d.ts +2 -2
- package/dist/engine/steps/compute.d.ts +1 -1
- package/dist/engine/steps/for-each.d.ts +1 -1
- package/dist/engine/steps/mail-send.d.ts +1 -1
- package/dist/engine/steps/read-find-many.d.ts +2 -2
- package/dist/engine/steps/read-find-one.d.ts +2 -2
- package/dist/engine/steps/retry.d.ts +1 -1
- package/dist/engine/steps/return.d.ts +2 -2
- package/dist/engine/steps/unsafe-projection-delete.d.ts +2 -2
- package/dist/engine/steps/unsafe-projection-upsert.d.ts +1 -1
- package/dist/engine/steps/wait-for-event.d.ts +1 -1
- package/dist/engine/steps/wait.d.ts +1 -1
- package/dist/engine/steps/webhook-send.d.ts +1 -1
- package/dist/engine/strip-disabled-features-from-app-schema.d.ts +4 -4
- package/dist/engine/system-user.d.ts +2 -2
- package/dist/engine/template-variables.d.ts +1 -1
- package/dist/engine/tier-resolver-extension.d.ts +4 -4
- package/dist/engine/transfer-adjacency.d.ts +1 -1
- package/dist/engine/types/index.d.ts +6 -6
- package/dist/engine/validate-projection-allowlist.d.ts +1 -1
- package/dist/engine/validation.d.ts +1 -1
- package/dist/entrypoint/index.d.ts +12 -12
- package/dist/env/dry-run.d.ts +14 -1
- package/dist/env/dry-run.js +50 -0
- package/dist/env/index.d.ts +54 -16
- package/dist/env/index.js +60 -6
- package/dist/errors/classes.d.ts +3 -3
- package/dist/errors/docs-url.d.ts +1 -1
- package/dist/errors/index.d.ts +18 -18
- package/dist/errors/member-resolution.d.ts +1 -1
- package/dist/errors/serialize.d.ts +2 -2
- package/dist/errors/subject-erased.d.ts +1 -1
- package/dist/errors/to-kumiko-error.d.ts +1 -1
- package/dist/errors/write-error-info.d.ts +1 -1
- package/dist/errors/zod-bridge.d.ts +1 -1
- package/dist/es-ops/context.d.ts +4 -4
- package/dist/es-ops/index.d.ts +4 -4
- package/dist/es-ops/operations-schema.d.ts +1 -1
- package/dist/es-ops/runner.d.ts +3 -3
- package/dist/es-ops/runner.js +9 -1
- package/dist/es-ops/types.d.ts +2 -2
- package/dist/event-store/admin-api.d.ts +3 -3
- package/dist/event-store/archive.d.ts +2 -2
- package/dist/event-store/event-store.d.ts +2 -2
- package/dist/event-store/events-schema.d.ts +1 -1
- package/dist/event-store/index.d.ts +15 -15
- package/dist/event-store/provenance-append.d.ts +3 -3
- package/dist/event-store/rebuild-dead-letter.d.ts +2 -2
- package/dist/event-store/row-to-stored-event.d.ts +2 -2
- package/dist/event-store/snapshot.d.ts +2 -2
- package/dist/event-store/tenant-db-append.d.ts +2 -2
- package/dist/event-store/transfer.d.ts +3 -3
- package/dist/event-store/upcaster-dead-letter.d.ts +2 -2
- package/dist/event-store/upcaster.d.ts +3 -3
- package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -2
- package/dist/files/bind-pending-file-refs.d.ts +3 -3
- package/dist/files/create-file-ref-from-bytes.d.ts +4 -4
- package/dist/files/create-file-ref.d.ts +3 -3
- package/dist/files/dispose-removed-file-refs.d.ts +2 -2
- package/dist/files/feature.d.ts +3 -3
- package/dist/files/file-handle.d.ts +1 -1
- package/dist/files/file-ref-entity.d.ts +1 -1
- package/dist/files/file-ref-table.d.ts +1 -1
- package/dist/files/file-routes.d.ts +5 -5
- package/dist/files/in-memory-provider.d.ts +1 -1
- package/dist/files/index.d.ts +20 -20
- package/dist/files/load-save-file-refs.d.ts +2 -2
- package/dist/files/local-provider.d.ts +1 -1
- package/dist/files/provider-resolver.d.ts +5 -5
- package/dist/files/purge-expired-file-ref-bytes.d.ts +2 -2
- package/dist/files/record-read-check.d.ts +1 -1
- package/dist/files/record-write-check.d.ts +3 -3
- package/dist/files/storage-tracking.d.ts +2 -2
- package/dist/files/types.d.ts +1 -1
- package/dist/files/zip-stream.d.ts +1 -1
- package/dist/i18n/index.d.ts +4 -4
- package/dist/i18n/mail-registry.d.ts +1 -1
- package/dist/i18n/required-surface-keys.d.ts +1 -1
- package/dist/i18n/settings-hub-keys.d.ts +1 -1
- package/dist/i18n/settings-hub-keys.js +1 -2
- package/dist/internal/stack-support.d.ts +12 -12
- package/dist/internal/testing.d.ts +4 -4
- package/dist/jobs/index.d.ts +2 -2
- package/dist/jobs/job-runner.d.ts +1 -1
- package/dist/jobs/max-per-tenant.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +2 -2
- package/dist/lifecycle/lifecycle.d.ts +1 -1
- package/dist/lifecycle/signal-handlers.d.ts +1 -1
- package/dist/logging/index.d.ts +4 -4
- package/dist/logging/pino-logger.d.ts +1 -1
- package/dist/logging/utils.d.ts +1 -1
- package/dist/migrations/index.d.ts +4 -4
- package/dist/migrations/kumiko-drift.d.ts +1 -1
- package/dist/migrations/pending-rebuilds.d.ts +5 -5
- package/dist/migrations/pii-event-backfill.d.ts +4 -4
- package/dist/migrations/projection-table-index.d.ts +1 -1
- package/dist/observability/console-provider.d.ts +1 -1
- package/dist/observability/context.d.ts +1 -1
- package/dist/observability/escape-hatch-report.d.ts +3 -3
- package/dist/observability/fallback.d.ts +1 -1
- package/dist/observability/index.d.ts +16 -16
- package/dist/observability/metric-validator.d.ts +1 -1
- package/dist/observability/metrics-handle.d.ts +1 -1
- package/dist/observability/metrics-wiring.d.ts +2 -2
- package/dist/observability/noop-provider.d.ts +1 -1
- package/dist/observability/prometheus-meter.d.ts +1 -1
- package/dist/observability/recording-meter.d.ts +1 -1
- package/dist/observability/recording-tracer.d.ts +1 -1
- package/dist/observability/redis-wrapper.d.ts +1 -1
- package/dist/observability/sensitive-filter.d.ts +1 -1
- package/dist/observability/standard-metrics.d.ts +1 -1
- package/dist/pipeline/active-membership.d.ts +4 -4
- package/dist/pipeline/append-event-core.d.ts +3 -3
- package/dist/pipeline/auth-claims-resolver.d.ts +2 -2
- package/dist/pipeline/cascade-handler.d.ts +3 -3
- package/dist/pipeline/dispatch-batch.d.ts +2 -2
- package/dist/pipeline/dispatch-query.d.ts +4 -4
- package/dist/pipeline/dispatch-shared.d.ts +17 -17
- package/dist/pipeline/dispatch-stream.d.ts +2 -2
- package/dist/pipeline/dispatch-write.d.ts +4 -4
- package/dist/pipeline/dispatcher-utils.d.ts +2 -2
- package/dist/pipeline/dispatcher.d.ts +12 -12
- package/dist/pipeline/event-consumer-state.d.ts +1 -1
- package/dist/pipeline/event-dispatcher-admin.d.ts +1 -1
- package/dist/pipeline/event-dispatcher-delivery.d.ts +7 -7
- package/dist/pipeline/event-dispatcher.d.ts +7 -7
- package/dist/pipeline/event-retention.d.ts +1 -1
- package/dist/pipeline/handler-access-error.d.ts +2 -2
- package/dist/pipeline/index.d.ts +42 -42
- package/dist/pipeline/irreversible-operation-gate.d.ts +1 -1
- package/dist/pipeline/lifecycle-pipeline.d.ts +2 -2
- package/dist/pipeline/member-read-only-transaction.d.ts +2 -2
- package/dist/pipeline/member-reader.d.ts +5 -5
- package/dist/pipeline/msp-rebuild.d.ts +4 -4
- package/dist/pipeline/multi-stream-apply-context.d.ts +3 -3
- package/dist/pipeline/notify-scope.d.ts +3 -3
- package/dist/pipeline/pending-gap-ranges.d.ts +2 -2
- package/dist/pipeline/pre-handler-gates.d.ts +3 -3
- package/dist/pipeline/pre-transaction-reservations.d.ts +4 -4
- package/dist/pipeline/projection-rebuild.d.ts +3 -3
- package/dist/pipeline/projection-state.d.ts +1 -1
- package/dist/pipeline/projections-runner.d.ts +3 -3
- package/dist/pipeline/projections-runner.js +3 -4
- package/dist/pipeline/system-hooks.d.ts +4 -4
- package/dist/pipeline/system-identity-switch.d.ts +3 -3
- package/dist/pipeline/tenant-timezone-cache.d.ts +1 -1
- package/dist/pipeline/write-origin.d.ts +3 -3
- package/dist/pipeline/write-result-masking.d.ts +2 -2
- package/dist/random/index.d.ts +2 -2
- package/dist/rate-limit/bucket.d.ts +1 -1
- package/dist/rate-limit/index.d.ts +3 -3
- package/dist/rate-limit/middleware.d.ts +3 -3
- package/dist/redis/cache-sync-bus.d.ts +2 -2
- package/dist/redis/cache-sync-topics.d.ts +1 -1
- package/dist/redis/index.d.ts +8 -8
- package/dist/redis/pubsub-signal.d.ts +1 -1
- package/dist/schema-cli.d.ts +1 -1
- package/dist/schema-cli.js +9 -1
- package/dist/search/derive-search-adapter-config.d.ts +2 -2
- package/dist/search/in-memory-adapter.d.ts +1 -1
- package/dist/search/index.d.ts +6 -6
- package/dist/search/meilisearch-adapter.d.ts +2 -2
- package/dist/search/purge-subject.d.ts +4 -4
- package/dist/search/reindex-entity.d.ts +3 -3
- package/dist/secrets/dek-cache.d.ts +1 -1
- package/dist/secrets/env-master-key-provider.d.ts +1 -1
- package/dist/secrets/env-master-key-provider.js +26 -11
- package/dist/secrets/envelope-cipher.d.ts +2 -2
- package/dist/secrets/envelope.d.ts +1 -1
- package/dist/secrets/index.d.ts +9 -9
- package/dist/secrets/rotation.d.ts +1 -1
- package/dist/secrets/stored-envelope.d.ts +1 -1
- package/dist/seeding/entity-seed.d.ts +1 -1
- package/dist/seeding/index.d.ts +3 -3
- package/dist/seeding/seed-users.d.ts +1 -1
- package/dist/time/index.d.ts +6 -6
- package/dist/ui-types/app-schema.d.ts +5 -5
- package/dist/ui-types/index.d.ts +23 -23
- package/dist/upgrade-cli.js +18 -6
- package/dist/utils/index.d.ts +9 -9
- package/package.json +19 -66
- package/presets/biome-app.json +80 -0
- package/presets/tsconfig.app.json +19 -0
- package/src/changes.json +84 -2
- package/src/scripts/codemod/README.md +18 -0
- package/src/scripts/codemod/codemod-support.ts +1 -1
- package/src/scripts/codemod/db-factory.ts +1 -1
- package/src/scripts/codemod/feature-factory.ts +1 -1
- package/src/scripts/codemod/import-extensions.ts +118 -0
- package/src/scripts/codemod/migrate-cross-tenant.ts +2 -2
- package/src/scripts/codemod/migrate-db-raw.ts +1 -1
- package/src/scripts/codemod/migrate-open-to-all.ts +1 -1
- package/src/scripts/codemod/object-form.ts +1 -1
- package/src/scripts/codemod/s3-imports.ts +1 -1
- package/src/scripts/codemod/tenant-db-options.ts +1 -1
- package/src/scripts/codemod/testing-move.ts +2 -2
- package/dist/db/bun-db-deprecated.d.ts +0 -10
- package/dist/db/bun-db-deprecated.js +0 -5
- package/dist/stack/index.d.ts +0 -10
- package/dist/stack/index.js +0 -11
- package/dist/testing/e2e-generator.d.ts +0 -5
- package/dist/testing/e2e-generator.js +0 -5
- package/dist/testing/handler-context.d.ts +0 -5
- package/dist/testing/handler-context.js +0 -5
- package/dist/testing/index.d.ts +0 -10
- package/dist/testing/index.js +0 -10
- package/dist/testing/real-providers.d.ts +0 -5
- package/dist/testing/real-providers.js +0 -5
package/dist/env/dry-run.js
CHANGED
|
@@ -9,6 +9,24 @@
|
|
|
9
9
|
// by parseEnv drives the output here — single source of truth.
|
|
10
10
|
import { zodShape } from "./_zod-introspect.js";
|
|
11
11
|
import { classifyField, getDefaultValue, getFieldDescription, pulumiConfigKey, readKumikoMeta, } from "./index.js";
|
|
12
|
+
export const DRY_RUN_ENV_VAR = "KUMIKO_DRY_RUN_ENV";
|
|
13
|
+
/** Reads `KUMIKO_DRY_RUN_ENV`. `1` and `true` mean `human`; an unknown value
|
|
14
|
+
* returns undefined, so the caller decides whether to warn or boot. */
|
|
15
|
+
export function parseDryRunEnvMode(raw) {
|
|
16
|
+
if (!raw)
|
|
17
|
+
return undefined;
|
|
18
|
+
const value = raw.toLowerCase();
|
|
19
|
+
if (value === "1" || value === "true" || value === "human")
|
|
20
|
+
return "human";
|
|
21
|
+
if (value === "json" || value === "pulumi" || value === "k8s" || value === "boot")
|
|
22
|
+
return value;
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
/** True while any dry-run mode is requested, for code that runs at module
|
|
26
|
+
* load (key providers, secret derivation) and must not throw on missing env. */
|
|
27
|
+
export function isDryRunEnvActive(env) {
|
|
28
|
+
return parseDryRunEnvMode(env[DRY_RUN_ENV_VAR]) !== undefined;
|
|
29
|
+
}
|
|
12
30
|
function collectFields(schema, sources) {
|
|
13
31
|
const out = [];
|
|
14
32
|
for (const [name, field] of Object.entries(zodShape(schema))) {
|
|
@@ -163,3 +181,35 @@ function renderK8s(fields, options) {
|
|
|
163
181
|
}
|
|
164
182
|
return `${lines.join("\n")}\n`;
|
|
165
183
|
}
|
|
184
|
+
function inspectionStatus(row) {
|
|
185
|
+
return row.status === "invalid" ? `invalid: ${row.message ?? "invalid value"}` : row.status;
|
|
186
|
+
}
|
|
187
|
+
/** Table for `KUMIKO_DRY_RUN_ENV=boot`: one row per variable with its source,
|
|
188
|
+
* whether it is required, and whether it is set. Values are never printed. */
|
|
189
|
+
export function renderEnvInspection(rows) {
|
|
190
|
+
const header = { name: "VARIABLE", source: "SOURCE", klass: "KIND" };
|
|
191
|
+
const nameWidth = Math.max(header.name.length, ...rows.map((r) => r.name.length));
|
|
192
|
+
const sourceWidth = Math.max(header.source.length, ...rows.map((r) => r.source.length));
|
|
193
|
+
const klassWidth = Math.max(header.klass.length, ...rows.map((r) => r.klass.length));
|
|
194
|
+
const line = (name, source, klass, status) => ` ${name.padEnd(nameWidth)} ${source.padEnd(sourceWidth)} ${klass.padEnd(klassWidth)} ${status}`;
|
|
195
|
+
const order = { required: 0, optional: 1, withDefault: 2 };
|
|
196
|
+
const sorted = [...rows].sort((a, b) => order[a.klass] - order[b.klass] ||
|
|
197
|
+
a.source.localeCompare(b.source) ||
|
|
198
|
+
a.name.localeCompare(b.name));
|
|
199
|
+
const missing = rows.filter((r) => r.status === "missing").length;
|
|
200
|
+
const invalid = rows.filter((r) => r.status === "invalid").length;
|
|
201
|
+
const lines = [
|
|
202
|
+
"Env check (values are not printed):",
|
|
203
|
+
line(header.name, header.source, header.klass, "STATUS"),
|
|
204
|
+
...sorted.map((r) => line(r.name, r.source, r.klass, inspectionStatus(r))),
|
|
205
|
+
"",
|
|
206
|
+
];
|
|
207
|
+
if (invalid > 0)
|
|
208
|
+
lines.push(`${invalid} variable(s) invalid.`);
|
|
209
|
+
if (missing > 0) {
|
|
210
|
+
lines.push(`${missing} required variable(s) missing. Feature wiring was NOT validated; set them and rerun to check it.`);
|
|
211
|
+
}
|
|
212
|
+
if (invalid === 0 && missing === 0)
|
|
213
|
+
lines.push("All variables present.");
|
|
214
|
+
return `${lines.join("\n")}\n`;
|
|
215
|
+
}
|
package/dist/env/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import type { FeatureDefinition } from "../engine/types/feature.
|
|
2
|
+
import type { FeatureDefinition } from "../engine/types/feature.ts";
|
|
3
3
|
export type KumikoEnvMeta = {
|
|
4
4
|
readonly pulumi?: {
|
|
5
5
|
/** Override the auto-derived camelCase Pulumi-config-key name. Apps
|
|
@@ -28,31 +28,54 @@ export type EnvFieldClass = "required" | "optional" | "withDefault";
|
|
|
28
28
|
export declare function classifyField(field: z.ZodType): EnvFieldClass;
|
|
29
29
|
export declare function getDefaultValue(field: z.ZodType): unknown;
|
|
30
30
|
export declare function getFieldDescription(field: z.ZodType): string | undefined;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
/** A feature whose registered env schema is visible in its type, so
|
|
32
|
+
* `composeEnvSchema` can type the merged schema from the feature list. */
|
|
33
|
+
export type FeatureWithEnvSchema<TFeature extends FeatureDefinition, TShape extends z.ZodRawShape> = TFeature & {
|
|
34
|
+
readonly envSchema: z.ZodObject<TShape>;
|
|
35
|
+
};
|
|
36
|
+
/** Returns `feature` typed with the env schema it registered via
|
|
37
|
+
* `r.envSchema(schema)`. Throws when the feature registered another
|
|
38
|
+
* instance, so the type never claims fields the runtime schema lacks. */
|
|
39
|
+
export declare function featureWithEnvSchema<TFeature extends FeatureDefinition, TShape extends z.ZodRawShape>(feature: TFeature, schema: z.ZodObject<TShape>): FeatureWithEnvSchema<TFeature, TShape>;
|
|
40
|
+
type EmptyShape = Record<never, never>;
|
|
41
|
+
type DeclaredEnvShape<TFeature> = TFeature extends {
|
|
42
|
+
readonly envSchema: z.ZodObject<infer TShape extends z.ZodRawShape>;
|
|
43
|
+
} ? string extends keyof TShape ? EmptyShape : TShape : EmptyShape;
|
|
44
|
+
type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
45
|
+
type OptionalShape<TShape extends z.ZodRawShape> = {
|
|
46
|
+
[Key in keyof TShape]: z.ZodOptional<TShape[Key]>;
|
|
47
|
+
};
|
|
48
|
+
type FeaturesEnvShape<TFeatures extends readonly FeatureDefinition[]> = UnionToIntersection<DeclaredEnvShape<TFeatures[number]>>;
|
|
49
|
+
type FlattenShape<TShape> = {
|
|
50
|
+
[Key in keyof TShape]: TShape[Key];
|
|
51
|
+
} & {};
|
|
52
|
+
type KnownShape<TShape extends z.ZodRawShape> = string extends keyof TShape ? EmptyShape : TShape;
|
|
53
|
+
/** The merged shape `composeEnvSchema` returns. With `optionalFeatures`
|
|
54
|
+
* every feature field is typed optional: the type cannot tell which feature
|
|
55
|
+
* a name refers to, and over-reporting `undefined` is the safe side. */
|
|
56
|
+
export type ComposedEnvShape<TFeatures extends readonly FeatureDefinition[], TCore extends z.ZodRawShape, TExtend extends z.ZodRawShape, TOptionalFeatures extends readonly string[] | undefined> = Extract<FlattenShape<KnownShape<TCore> & (TOptionalFeatures extends readonly string[] ? OptionalShape<FeaturesEnvShape<TFeatures> & z.ZodRawShape> : FeaturesEnvShape<TFeatures>) & KnownShape<TExtend>>, z.ZodRawShape>;
|
|
57
|
+
export type ComposeEnvSchemaOptions<TFeatures extends readonly FeatureDefinition[] = readonly FeatureDefinition[], TCore extends z.ZodRawShape = z.ZodRawShape, TExtend extends z.ZodRawShape = z.ZodRawShape, TOptionalFeatures extends readonly string[] | undefined = readonly string[] | undefined> = {
|
|
58
|
+
/** All features whose envSchemas should be merged. Bundled features type
|
|
59
|
+
* their fragment, so passing the list inline types the merged schema. */
|
|
60
|
+
readonly features: TFeatures;
|
|
34
61
|
/** App-specific env-vars (e.g. `STUDIO_ADMIN_EMAIL`). Keys here are
|
|
35
62
|
* tagged as source "app" in the resulting sources map. */
|
|
36
|
-
readonly extend?: z.ZodObject<
|
|
63
|
+
readonly extend?: z.ZodObject<TExtend>;
|
|
37
64
|
/** Feature-names whose env-vars should be auto-`.optional()`-wrapped.
|
|
38
65
|
* Lets an app opt out of e.g. `channel-email-smtp`'s vars without
|
|
39
66
|
* manually `.partial()`-ing each shape at the call-site. */
|
|
40
|
-
readonly optionalFeatures?:
|
|
67
|
+
readonly optionalFeatures?: TOptionalFeatures;
|
|
41
68
|
/** Framework-core env-vars (PORT, DATABASE_URL, REDIS_URL, …) from
|
|
42
69
|
* `@cosmicdrift/kumiko-dev-server`. Keys here are tagged as source
|
|
43
70
|
* "framework-core" in error output. Conflict-detection runs across
|
|
44
71
|
* core/features/extend as one merged pool — same key declared in two
|
|
45
72
|
* layers throws KumikoBootError at compose-time. */
|
|
46
|
-
readonly core?: z.ZodObject<
|
|
73
|
+
readonly core?: z.ZodObject<TCore>;
|
|
47
74
|
};
|
|
48
|
-
export type ComposedEnvSchema = {
|
|
49
|
-
/** The merged Zod schema
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
* parallel typed schema manually (see Plan-Doc
|
|
53
|
-
* `kumiko-studio/docs/plans/sprint-9-env-schemas.md` → API-Design)
|
|
54
|
-
* and only pass `composed.schema` to `runProdApp` for validation. */
|
|
55
|
-
readonly schema: z.ZodObject<z.ZodRawShape>;
|
|
75
|
+
export type ComposedEnvSchema<TShape extends z.ZodRawShape = z.ZodRawShape> = {
|
|
76
|
+
/** The merged Zod schema, typed from core, the typed feature fragments and
|
|
77
|
+
* extend; `parseEnv(composed.schema, env)` returns the typed env. */
|
|
78
|
+
readonly schema: z.ZodObject<TShape>;
|
|
56
79
|
/** env-var-name → declaring source-name: feature-name from `r.envSchema()`,
|
|
57
80
|
* "app" from `extend`, or "framework-core" from `core`. */
|
|
58
81
|
readonly sources: Readonly<Record<string, string>>;
|
|
@@ -60,7 +83,7 @@ export type ComposedEnvSchema = {
|
|
|
60
83
|
/** Makes the named env keys optional while keeping their `kms` meta. Keys
|
|
61
84
|
* missing from the schema shape are ignored. */
|
|
62
85
|
export declare function withOptionalEnvKeys(schema: z.ZodObject<z.ZodRawShape>, keys: readonly string[]): z.ZodObject<z.ZodRawShape>;
|
|
63
|
-
export declare function composeEnvSchema(options: ComposeEnvSchemaOptions): ComposedEnvSchema
|
|
86
|
+
export declare function composeEnvSchema<const TFeatures extends readonly FeatureDefinition[], TCore extends z.ZodRawShape = EmptyShape, TExtend extends z.ZodRawShape = EmptyShape, const TOptionalFeatures extends readonly string[] | undefined = undefined>(options: ComposeEnvSchemaOptions<TFeatures, TCore, TExtend, TOptionalFeatures>): ComposedEnvSchema<ComposedEnvShape<TFeatures, TCore, TExtend, TOptionalFeatures>>;
|
|
64
87
|
export type EnvErrorKind = "missing" | "invalid";
|
|
65
88
|
export type EnvError = {
|
|
66
89
|
readonly name: string;
|
|
@@ -100,6 +123,21 @@ export declare function parseEnv<S extends z.ZodObject<z.ZodRawShape>>(schema: S
|
|
|
100
123
|
* scheitern. Ersetzt das `({} as Shape)`-Muster, bei dem JEDER Zugriff
|
|
101
124
|
* silent undefined war und das Compile-Level nichts davon wusste. */
|
|
102
125
|
export declare function parseEnvDryRun<S extends z.ZodObject<z.ZodRawShape>>(schema: S, env: Record<string, string | undefined>): Partial<z.infer<S>>;
|
|
126
|
+
export type EnvFieldStatus = "set" | "unset" | "missing" | "invalid";
|
|
127
|
+
export type EnvFieldInspection = {
|
|
128
|
+
readonly name: string;
|
|
129
|
+
readonly klass: EnvFieldClass;
|
|
130
|
+
readonly source: string;
|
|
131
|
+
readonly status: EnvFieldStatus;
|
|
132
|
+
/** Zod's issue text for an invalid value; never the value itself. */
|
|
133
|
+
readonly message?: string;
|
|
134
|
+
};
|
|
135
|
+
/** Checks every field of `schema` on its own against `env`, for the boot dry
|
|
136
|
+
* run: a missing required value is reported, not thrown, so the inventory
|
|
137
|
+
* renders on an empty env. Object-level refinements do not run here; once
|
|
138
|
+
* nothing is missing or invalid, parseEnv validates the whole object. */
|
|
139
|
+
export declare function inspectEnv(schema: z.ZodObject<z.ZodRawShape>, env: Readonly<Record<string, string | undefined>>, options?: Pick<ParseEnvOptions, "sources">): readonly EnvFieldInspection[];
|
|
103
140
|
export declare function camelCase(snakeShout: string): string;
|
|
104
141
|
export declare function pulumiConfigKey(envName: string, field: z.ZodType | undefined, prefix: string | undefined): string;
|
|
105
142
|
export declare function buildPulumiSuggestion(envName: string, field: z.ZodType, prefix: string | undefined): string | undefined;
|
|
143
|
+
export {};
|
package/dist/env/index.js
CHANGED
|
@@ -115,6 +115,18 @@ export function getDefaultValue(field) {
|
|
|
115
115
|
export function getFieldDescription(field) {
|
|
116
116
|
return zodDescription(field);
|
|
117
117
|
}
|
|
118
|
+
function registersEnvSchema(feature, schema) {
|
|
119
|
+
return feature.envSchema === schema;
|
|
120
|
+
}
|
|
121
|
+
/** Returns `feature` typed with the env schema it registered via
|
|
122
|
+
* `r.envSchema(schema)`. Throws when the feature registered another
|
|
123
|
+
* instance, so the type never claims fields the runtime schema lacks. */
|
|
124
|
+
export function featureWithEnvSchema(feature, schema) {
|
|
125
|
+
if (!registersEnvSchema(feature, schema)) {
|
|
126
|
+
throw new Error(`[Feature ${feature.name}] featureWithEnvSchema: the feature did not register this schema instance via r.envSchema().`);
|
|
127
|
+
}
|
|
128
|
+
return feature;
|
|
129
|
+
}
|
|
118
130
|
// `.optional()` returns a new Zod instance that drops `.meta()`, which would
|
|
119
131
|
// hide the slot from `kmsSlotsOf` on the composed schema.
|
|
120
132
|
function optionalKeepingKmsMeta(field) {
|
|
@@ -214,13 +226,17 @@ export function composeEnvSchema(options) {
|
|
|
214
226
|
}
|
|
215
227
|
if (options.extend) {
|
|
216
228
|
for (const [key, field] of Object.entries(zodShape(options.extend))) {
|
|
229
|
+
// An app spreading a feature's own fragment into extend re-declares the
|
|
230
|
+
// same instance; that is the feature's variable, not a second owner.
|
|
231
|
+
if (featureFields.get(key) === field)
|
|
232
|
+
continue;
|
|
217
233
|
if (merged[key] !== undefined) {
|
|
218
234
|
throw new KumikoBootError([
|
|
219
235
|
{
|
|
220
236
|
name: key,
|
|
221
237
|
kind: "invalid",
|
|
222
|
-
message: `env-var conflict: "${key}" declared by
|
|
223
|
-
`
|
|
238
|
+
message: `env-var conflict: "${key}" is declared by "${sources[key]}" and again in the app's extend block — ` +
|
|
239
|
+
`drop it from extend, the declaring source already owns it.`,
|
|
224
240
|
},
|
|
225
241
|
]);
|
|
226
242
|
}
|
|
@@ -230,10 +246,9 @@ export function composeEnvSchema(options) {
|
|
|
230
246
|
}
|
|
231
247
|
}
|
|
232
248
|
declareKmsCiphertextTwins(merged, sources, kmsFields);
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
};
|
|
249
|
+
// @cast-boundary schema-walk — the loops above merge exactly the core, feature and extend shapes the type names; a key clash throws instead of overwriting.
|
|
250
|
+
const schema = z.object(merged);
|
|
251
|
+
return { schema, sources };
|
|
237
252
|
}
|
|
238
253
|
function formatBootError(errors) {
|
|
239
254
|
const lines = [
|
|
@@ -346,6 +361,45 @@ export function parseEnvDryRun(schema, env) {
|
|
|
346
361
|
// per-Feld-safeParse; jeder enthaltene Wert hat seinen Feld-Parse bestanden.
|
|
347
362
|
return out;
|
|
348
363
|
}
|
|
364
|
+
/** Checks every field of `schema` on its own against `env`, for the boot dry
|
|
365
|
+
* run: a missing required value is reported, not thrown, so the inventory
|
|
366
|
+
* renders on an empty env. Object-level refinements do not run here; once
|
|
367
|
+
* nothing is missing or invalid, parseEnv validates the whole object. */
|
|
368
|
+
export function inspectEnv(schema, env, options = {}) {
|
|
369
|
+
const cleaned = {};
|
|
370
|
+
for (const [k, v] of Object.entries(env)) {
|
|
371
|
+
if (v !== undefined)
|
|
372
|
+
cleaned[k] = v;
|
|
373
|
+
}
|
|
374
|
+
const relaxed = relaxCiphertextOnlySlots(schema, cleaned);
|
|
375
|
+
return Object.entries(zodShape(relaxed)).map(([name, field]) => {
|
|
376
|
+
const klass = classifyField(field);
|
|
377
|
+
const source = options.sources?.[name] ?? "unknown";
|
|
378
|
+
const raw = cleaned[name];
|
|
379
|
+
if (raw === undefined) {
|
|
380
|
+
return { name, klass, source, status: klass === "required" ? "missing" : "unset" };
|
|
381
|
+
}
|
|
382
|
+
const issue = firstFieldIssue(field, raw);
|
|
383
|
+
return issue === undefined
|
|
384
|
+
? { name, klass, source, status: "set" }
|
|
385
|
+
: { name, klass, source, status: "invalid", message: issue };
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
function firstFieldIssue(field, raw) {
|
|
389
|
+
try {
|
|
390
|
+
const result = field.safeParse(raw);
|
|
391
|
+
if (result.success)
|
|
392
|
+
return undefined;
|
|
393
|
+
const message = result.error.issues[0]?.message ?? "invalid value";
|
|
394
|
+
// A custom refine message may interpolate the input; the table must not
|
|
395
|
+
// carry it, so such a message is replaced as a whole.
|
|
396
|
+
return raw.length > 0 && message.includes(raw) ? "invalid value" : message;
|
|
397
|
+
}
|
|
398
|
+
catch {
|
|
399
|
+
// The thrown message may quote the value, so it is not passed on.
|
|
400
|
+
return "a field refinement threw while checking the value";
|
|
401
|
+
}
|
|
402
|
+
}
|
|
349
403
|
export function camelCase(snakeShout) {
|
|
350
404
|
const parts = snakeShout.toLowerCase().split("_").filter(Boolean);
|
|
351
405
|
if (parts.length === 0)
|
package/dist/errors/classes.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FieldIssue } from "./field-issue.
|
|
2
|
-
import { type ErrorOpts, KumikoError } from "./kumiko-error.
|
|
3
|
-
export type { FieldIssue } from "./field-issue.
|
|
1
|
+
import type { FieldIssue } from "./field-issue.ts";
|
|
2
|
+
import { type ErrorOpts, KumikoError } from "./kumiko-error.ts";
|
|
3
|
+
export type { FieldIssue } from "./field-issue.ts";
|
|
4
4
|
export type ValidationDetails = {
|
|
5
5
|
readonly fields: readonly FieldIssue[];
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { KumikoError } from "./kumiko-error.
|
|
1
|
+
import type { KumikoError } from "./kumiko-error.ts";
|
|
2
2
|
/** Links an app's own error reasons to its own docs; without it only framework reasons carry a docsUrl. */
|
|
3
3
|
export type ErrorDocsConfig = {
|
|
4
4
|
readonly baseUrl: string;
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export type { FeatureDisabledDetails, FieldIssue, NotFoundDetails, PreconditionFailedDetails, RateLimitDetails, UnconfiguredDetails, UniqueViolationDetails, UnprocessableOpts, ValidationDetails, VersionConflictDetails, } from "./classes.
|
|
2
|
-
export { AccessDeniedError, ConflictError, FeatureDisabledError, IdempotentReplayError, InternalError, MemberReadTimeoutError, NotFoundError, PreconditionFailedError, RateLimitError, RateLimitUnavailableError, RecordLockedError, UnauthenticatedError, UnconfiguredError, UniqueViolationError, UnprocessableError, ValidationError, VersionConflictError, } from "./classes.
|
|
3
|
-
export type { ErrorDocsConfig } from "./docs-url.
|
|
4
|
-
export { resolveErrorDocsUrl } from "./docs-url.
|
|
5
|
-
export type { ErrorCtorInput, ErrorOpts } from "./kumiko-error.
|
|
6
|
-
export { isKumikoError, KumikoError } from "./kumiko-error.
|
|
7
|
-
export { memberResolutionReadOnlyDenied } from "./member-resolution.
|
|
8
|
-
export type { AgentReason, FrameworkReason } from "./reasons.
|
|
9
|
-
export { AgentReasons, FrameworkReasons } from "./reasons.
|
|
10
|
-
export type { ErrorLogEntry, ErrorResponseBody } from "./serialize.
|
|
11
|
-
export { buildErrorLog, serializeError } from "./serialize.
|
|
12
|
-
export { isSubjectErasedConflict, subjectErasedConflict } from "./subject-erased.
|
|
13
|
-
export { toKumikoError } from "./to-kumiko-error.
|
|
14
|
-
export type { InvalidTransitionDetails } from "./transition-details.
|
|
15
|
-
export { buildInvalidTransitionDetails } from "./transition-details.
|
|
16
|
-
export type { WriteErrorInfo, WriteFailure } from "./write-error-info.
|
|
17
|
-
export { failNotFound, failTransition, failUnprocessable, reraiseAsKumikoError, toWriteErrorInfo, writeFailure, } from "./write-error-info.
|
|
18
|
-
export { validationErrorFromZod } from "./zod-bridge.
|
|
1
|
+
export type { FeatureDisabledDetails, FieldIssue, NotFoundDetails, PreconditionFailedDetails, RateLimitDetails, UnconfiguredDetails, UniqueViolationDetails, UnprocessableOpts, ValidationDetails, VersionConflictDetails, } from "./classes.ts";
|
|
2
|
+
export { AccessDeniedError, ConflictError, FeatureDisabledError, IdempotentReplayError, InternalError, MemberReadTimeoutError, NotFoundError, PreconditionFailedError, RateLimitError, RateLimitUnavailableError, RecordLockedError, UnauthenticatedError, UnconfiguredError, UniqueViolationError, UnprocessableError, ValidationError, VersionConflictError, } from "./classes.ts";
|
|
3
|
+
export type { ErrorDocsConfig } from "./docs-url.ts";
|
|
4
|
+
export { resolveErrorDocsUrl } from "./docs-url.ts";
|
|
5
|
+
export type { ErrorCtorInput, ErrorOpts } from "./kumiko-error.ts";
|
|
6
|
+
export { isKumikoError, KumikoError } from "./kumiko-error.ts";
|
|
7
|
+
export { memberResolutionReadOnlyDenied } from "./member-resolution.ts";
|
|
8
|
+
export type { AgentReason, FrameworkReason } from "./reasons.ts";
|
|
9
|
+
export { AgentReasons, FrameworkReasons } from "./reasons.ts";
|
|
10
|
+
export type { ErrorLogEntry, ErrorResponseBody } from "./serialize.ts";
|
|
11
|
+
export { buildErrorLog, serializeError } from "./serialize.ts";
|
|
12
|
+
export { isSubjectErasedConflict, subjectErasedConflict } from "./subject-erased.ts";
|
|
13
|
+
export { toKumikoError } from "./to-kumiko-error.ts";
|
|
14
|
+
export type { InvalidTransitionDetails } from "./transition-details.ts";
|
|
15
|
+
export { buildInvalidTransitionDetails } from "./transition-details.ts";
|
|
16
|
+
export type { WriteErrorInfo, WriteFailure } from "./write-error-info.ts";
|
|
17
|
+
export { failNotFound, failTransition, failUnprocessable, reraiseAsKumikoError, toWriteErrorInfo, writeFailure, } from "./write-error-info.ts";
|
|
18
|
+
export { validationErrorFromZod } from "./zod-bridge.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AccessDeniedError } from "./classes.
|
|
1
|
+
import { AccessDeniedError } from "./classes.ts";
|
|
2
2
|
export declare function memberResolutionReadOnlyDenied(cause?: unknown): AccessDeniedError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ErrorDocsConfig } from "./docs-url.
|
|
2
|
-
import type { KumikoError } from "./kumiko-error.
|
|
1
|
+
import { type ErrorDocsConfig } from "./docs-url.ts";
|
|
2
|
+
import type { KumikoError } from "./kumiko-error.ts";
|
|
3
3
|
export type ErrorResponseBody = {
|
|
4
4
|
readonly error: {
|
|
5
5
|
readonly code: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type KumikoError } from "./kumiko-error.
|
|
1
|
+
import { type KumikoError } from "./kumiko-error.ts";
|
|
2
2
|
export declare function toKumikoError(e: unknown): KumikoError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WriteErrorInfo, WriteFailure } from "@cosmicdrift/kumiko-types/write-error-info-types";
|
|
2
|
-
import { KumikoError } from "./kumiko-error.
|
|
2
|
+
import { KumikoError } from "./kumiko-error.ts";
|
|
3
3
|
export type { WriteErrorInfo, WriteFailure };
|
|
4
4
|
export declare function writeFailure(err: KumikoError): WriteFailure;
|
|
5
5
|
export declare function failNotFound(entity: string, id?: number | string): WriteFailure;
|
package/dist/es-ops/context.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbRunner } from "../db/index.
|
|
2
|
-
import type { Dispatcher } from "../pipeline/dispatcher.
|
|
3
|
-
import type { SeedMigrationContext } from "./types.
|
|
1
|
+
import type { DbRunner } from "../db/index.ts";
|
|
2
|
+
import type { Dispatcher } from "../pipeline/dispatcher.ts";
|
|
3
|
+
import type { SeedMigrationContext } from "./types.ts";
|
|
4
4
|
export type CreateSeedMigrationContextArgs = {
|
|
5
5
|
readonly dispatcher: Dispatcher;
|
|
6
6
|
readonly dbRunner: DbRunner;
|
|
@@ -16,4 +16,4 @@ export type CreateSeedMigrationContextArgs = {
|
|
|
16
16
|
* bleiben committed. Seeds MÜSSEN deshalb idempotent sein (verifiziert in
|
|
17
17
|
* runner.integration.test.ts „dispatcher-writes vor throw bleiben committed"). */
|
|
18
18
|
export declare function createSeedMigrationContext(args: CreateSeedMigrationContextArgs): SeedMigrationContext;
|
|
19
|
-
export type { SeedMigrationContext } from "./types.
|
|
19
|
+
export type { SeedMigrationContext } from "./types.ts";
|
package/dist/es-ops/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type CreateSeedMigrationContextArgs, createSeedMigrationContext, } from "./context.
|
|
2
|
-
export { createEsOperationsTable, type EsOperationAppliedBy, type EsOperationType, esOperationsTable, } from "./operations-schema.
|
|
3
|
-
export { type RunPendingSeedMigrationsArgs, type RunPendingSeedMigrationsResult, runPendingSeedMigrations, } from "./runner.
|
|
4
|
-
export type { SeedMembershipRow, SeedMigration, SeedMigrationContext, SeedTemplateResourceFilter, SeedTemplateResourceRow, SeedTenantRow, SeedUserRow, } from "./types.
|
|
1
|
+
export { type CreateSeedMigrationContextArgs, createSeedMigrationContext, } from "./context.ts";
|
|
2
|
+
export { createEsOperationsTable, type EsOperationAppliedBy, type EsOperationType, esOperationsTable, } from "./operations-schema.ts";
|
|
3
|
+
export { type RunPendingSeedMigrationsArgs, type RunPendingSeedMigrationsResult, runPendingSeedMigrations, } from "./runner.ts";
|
|
4
|
+
export type { SeedMembershipRow, SeedMigration, SeedMigrationContext, SeedTemplateResourceFilter, SeedTemplateResourceRow, SeedTenantRow, SeedUserRow, } from "./types.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DbConnection } from "../db/index.
|
|
1
|
+
import { type DbConnection } from "../db/index.ts";
|
|
2
2
|
export type EsOperationType = "seed-migration";
|
|
3
3
|
export type EsOperationAppliedBy = "boot" | "cli" | "ci-pipeline";
|
|
4
4
|
export declare const esOperationsTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
package/dist/es-ops/runner.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbConnection, DbRunner } from "../db/index.
|
|
2
|
-
import type { Registry } from "../engine/index.
|
|
3
|
-
import type { EsOperationAppliedBy, SeedMigrationContext } from "./types.
|
|
1
|
+
import type { DbConnection, DbRunner } from "../db/index.ts";
|
|
2
|
+
import type { Registry } from "../engine/index.ts";
|
|
3
|
+
import type { EsOperationAppliedBy, SeedMigrationContext } from "./types.ts";
|
|
4
4
|
export type RunPendingSeedMigrationsArgs = {
|
|
5
5
|
readonly db: DbConnection;
|
|
6
6
|
/** Absoluter Pfad zum seeds-Directory (typically <appRoot>/seeds). */
|
package/dist/es-ops/runner.js
CHANGED
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
// `KUMIKO_SKIP_ES_OPS_<id>=1` env-flag um eine kaputte Migration zu
|
|
20
20
|
// überspringen ohne ihr Code touchen zu müssen. NICHT als
|
|
21
21
|
// Standard-Workflow — wirklich Notfall.
|
|
22
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
23
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
24
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
25
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return path;
|
|
29
|
+
};
|
|
22
30
|
import { readdir, readFile } from "node:fs/promises";
|
|
23
31
|
import path from "node:path";
|
|
24
32
|
import { acquireEsOpsAdvisoryLock, esOperationExists } from "../db/queries/es-ops.js";
|
|
@@ -144,7 +152,7 @@ async function loadAppliedIds(db) {
|
|
|
144
152
|
async function loadSeedModule(filePath) {
|
|
145
153
|
// Bun + Node both honor dynamic import on absolute paths. The seed-files
|
|
146
154
|
// must export their SeedMigration as default.
|
|
147
|
-
const mod = await import(filePath);
|
|
155
|
+
const mod = await import(__rewriteRelativeImportExtension(filePath));
|
|
148
156
|
const migration = mod.default;
|
|
149
157
|
if (!isSeedMigration(migration)) {
|
|
150
158
|
throw new Error(`[es-ops] seed file ${filePath} must export a SeedMigration as default ` +
|
package/dist/es-ops/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DbRunner } from "../db/index.
|
|
2
|
-
import type { TenantId, WriteResult } from "../engine/index.
|
|
1
|
+
import type { DbRunner } from "../db/index.ts";
|
|
2
|
+
import type { TenantId, WriteResult } from "../engine/index.ts";
|
|
3
3
|
export type EsOperationAppliedBy = "boot" | "cli" | "ci-pipeline";
|
|
4
4
|
/** Default-Export einer seed-Migration-File. */
|
|
5
5
|
export type SeedMigration = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
|
-
import type { DbRunner } from "../db/index.
|
|
3
|
-
import type { TenantId } from "../engine/types/index.
|
|
4
|
-
import type { EventMetadata } from "./event-store.
|
|
2
|
+
import type { DbRunner } from "../db/index.ts";
|
|
3
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
4
|
+
import type { EventMetadata } from "./event-store.ts";
|
|
5
5
|
export type RawEventToAppend = {
|
|
6
6
|
readonly aggregateId: string;
|
|
7
7
|
readonly aggregateType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DbConnection, DbRunner } from "../db/connection.
|
|
2
|
-
import type { TenantId } from "../engine/types/index.
|
|
1
|
+
import type { DbConnection, DbRunner } from "../db/connection.ts";
|
|
2
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
3
3
|
export declare const archivedStreamsTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
4
4
|
export declare function createArchivedStreamsTable(db: DbConnection): Promise<void>;
|
|
5
5
|
export type ArchiveStreamArgs = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
2
|
import { type EventMetadata, type StoredEvent } from "@cosmicdrift/kumiko-types/event-store-types";
|
|
3
3
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
4
|
-
import type { DbRunner } from "../db/index.
|
|
5
|
-
import type { TenantId } from "../engine/types/index.
|
|
4
|
+
import type { DbRunner } from "../db/index.ts";
|
|
5
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
6
6
|
export type { EventMetadata, StoredEvent } from "@cosmicdrift/kumiko-types/event-store-types";
|
|
7
7
|
export type EventToAppend = {
|
|
8
8
|
readonly aggregateId: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type DbConnection } from "../db/index.
|
|
1
|
+
import { type DbConnection } from "../db/index.ts";
|
|
2
2
|
export declare const eventsTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
3
3
|
export declare function createEventsTable(db: DbConnection): Promise<void>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { APP_INSTANCE_STREAM_TYPE, APP_STARTED_EVENT_TYPE } from "../crypto/system-event-pii.
|
|
2
|
-
export { backfillEventPiiEncryption, backfillEventPiiEncryptionBatch, type PiiBackfillBatchOptions, type PiiBackfillBatchResult, type PiiBackfillFailure, type PiiBackfillOptions, type PiiBackfillResult, type PiiBackfillScanCache, } from "../db/queries/backfill-pii.
|
|
3
|
-
export { type ArchiveStreamArgs, archivedStreamsTable, archiveStream, createArchivedStreamsTable, isStreamArchived, restoreStream, } from "./archive.
|
|
4
|
-
export { ArchivedStreamError, IdempotentAppendConflictError, SeedTimeOrderError, VersionConflictError, } from "./errors.
|
|
5
|
-
export { append, EVENTS_PUBSUB_CHANNEL, type EventMetadata, type EventToAppend, getEventsHighWaterMark, getStreamVersion, getStreamVersions, getUnscopedAggregateStreamMaxVersion, getUnscopedStreamMaxVersionForSeed, LOAD_ALL_EVENTS_ROW_LIMIT, loadAggregate, loadAggregateAsOf, loadAllEventsByType, loadEventsAfterVersion, type StoredEvent, streamAllEventsByType, } from "./event-store.
|
|
6
|
-
export { createEventsTable, eventsTable } from "./events-schema.
|
|
7
|
-
export { appendProvenanceEvent, type ProvenanceEventInput } from "./provenance-append.
|
|
8
|
-
export { createRebuildDeadLetterTable, listRebuildDeadLetters, type RebuildDeadLetterRow, rebuildDeadLetterTable, recordRebuildDeadLetters, type SkippedApply, } from "./rebuild-dead-letter.
|
|
9
|
-
export { toStoredEvent } from "./row-to-stored-event.
|
|
10
|
-
export { assertSeedModeNotInProduction, isSeedModeEnabled, runSeedWritesAt, SEED_MODE_ENV, SeedModeDisabledError, } from "./seed-clock.
|
|
11
|
-
export { createSnapshotsTable, type LoadAggregateWithSnapshotOptions, type LoadAggregateWithSnapshotResult, loadAggregateWithSnapshot, loadLatestSnapshot, type SaveSnapshotArgs, type Snapshot, type SnapshotReducer, saveSnapshot, snapshotsTable, } from "./snapshot.
|
|
12
|
-
export { type AppendEventInTenantDbOptions, appendEventInTenantDb, getStreamVersionInTenantDb, } from "./tenant-db-append.
|
|
13
|
-
export { AGGREGATE_TRANSFER_STREAM_TYPE, AGGREGATE_TRANSFERRED_EVENT_TYPE, type TransferAggregateStreamsArgs, transferAggregateStreams, } from "./transfer.
|
|
14
|
-
export { type EventUpcasters, makeUpcastCtx, type UpcasterErrorPolicy, type UpcastOptions, upcastStoredEvent, upcastStoredEvents, } from "./upcaster.
|
|
15
|
-
export { createUpcasterDeadLetterTable, type DeadLetterRow, listDeadLetters, recordUpcasterDeadLetter, upcasterDeadLetterTable, } from "./upcaster-dead-letter.
|
|
1
|
+
export { APP_INSTANCE_STREAM_TYPE, APP_STARTED_EVENT_TYPE } from "../crypto/system-event-pii.ts";
|
|
2
|
+
export { backfillEventPiiEncryption, backfillEventPiiEncryptionBatch, type PiiBackfillBatchOptions, type PiiBackfillBatchResult, type PiiBackfillFailure, type PiiBackfillOptions, type PiiBackfillResult, type PiiBackfillScanCache, } from "../db/queries/backfill-pii.ts";
|
|
3
|
+
export { type ArchiveStreamArgs, archivedStreamsTable, archiveStream, createArchivedStreamsTable, isStreamArchived, restoreStream, } from "./archive.ts";
|
|
4
|
+
export { ArchivedStreamError, IdempotentAppendConflictError, SeedTimeOrderError, VersionConflictError, } from "./errors.ts";
|
|
5
|
+
export { append, EVENTS_PUBSUB_CHANNEL, type EventMetadata, type EventToAppend, getEventsHighWaterMark, getStreamVersion, getStreamVersions, getUnscopedAggregateStreamMaxVersion, getUnscopedStreamMaxVersionForSeed, LOAD_ALL_EVENTS_ROW_LIMIT, loadAggregate, loadAggregateAsOf, loadAllEventsByType, loadEventsAfterVersion, type StoredEvent, streamAllEventsByType, } from "./event-store.ts";
|
|
6
|
+
export { createEventsTable, eventsTable } from "./events-schema.ts";
|
|
7
|
+
export { appendProvenanceEvent, type ProvenanceEventInput } from "./provenance-append.ts";
|
|
8
|
+
export { createRebuildDeadLetterTable, listRebuildDeadLetters, type RebuildDeadLetterRow, rebuildDeadLetterTable, recordRebuildDeadLetters, type SkippedApply, } from "./rebuild-dead-letter.ts";
|
|
9
|
+
export { toStoredEvent } from "./row-to-stored-event.ts";
|
|
10
|
+
export { assertSeedModeNotInProduction, isSeedModeEnabled, runSeedWritesAt, SEED_MODE_ENV, SeedModeDisabledError, } from "./seed-clock.ts";
|
|
11
|
+
export { createSnapshotsTable, type LoadAggregateWithSnapshotOptions, type LoadAggregateWithSnapshotResult, loadAggregateWithSnapshot, loadLatestSnapshot, type SaveSnapshotArgs, type Snapshot, type SnapshotReducer, saveSnapshot, snapshotsTable, } from "./snapshot.ts";
|
|
12
|
+
export { type AppendEventInTenantDbOptions, appendEventInTenantDb, getStreamVersionInTenantDb, } from "./tenant-db-append.ts";
|
|
13
|
+
export { AGGREGATE_TRANSFER_STREAM_TYPE, AGGREGATE_TRANSFERRED_EVENT_TYPE, type TransferAggregateStreamsArgs, transferAggregateStreams, } from "./transfer.ts";
|
|
14
|
+
export { type EventUpcasters, makeUpcastCtx, type UpcasterErrorPolicy, type UpcastOptions, upcastStoredEvent, upcastStoredEvents, } from "./upcaster.ts";
|
|
15
|
+
export { createUpcasterDeadLetterTable, type DeadLetterRow, listDeadLetters, recordUpcasterDeadLetter, upcasterDeadLetterTable, } from "./upcaster-dead-letter.ts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type TenantDb } from "../db/tenant-db.
|
|
2
|
-
import type { TenantId } from "../engine/types/index.
|
|
3
|
-
import { type EventMetadata } from "./event-store.
|
|
1
|
+
import { type TenantDb } from "../db/tenant-db.ts";
|
|
2
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
3
|
+
import { type EventMetadata } from "./event-store.ts";
|
|
4
4
|
export type ProvenanceEventInput = {
|
|
5
5
|
readonly aggregateId: string;
|
|
6
6
|
readonly aggregateType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DbConnection, DbRunner } from "../db/connection.
|
|
2
|
-
import type { StoredEvent } from "./event-store.
|
|
1
|
+
import type { DbConnection, DbRunner } from "../db/connection.ts";
|
|
2
|
+
import type { StoredEvent } from "./event-store.ts";
|
|
3
3
|
export declare const rebuildDeadLetterTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
4
4
|
export declare function createRebuildDeadLetterTable(db: DbConnection): Promise<void>;
|
|
5
5
|
export type SkippedApply = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
|
-
import type { TenantId } from "../engine/types/index.
|
|
3
|
-
import type { EventMetadata, StoredEvent } from "./event-store.
|
|
2
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
3
|
+
import type { EventMetadata, StoredEvent } from "./event-store.ts";
|
|
4
4
|
type EventRow = {
|
|
5
5
|
readonly id: bigint;
|
|
6
6
|
readonly aggregateId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
2
|
import type { LoadAggregateWithSnapshotOptions, LoadAggregateWithSnapshotResult, SnapshotReducer } from "@cosmicdrift/kumiko-types/snapshot-types";
|
|
3
|
-
import type { DbConnection, DbRunner } from "../db/connection.
|
|
4
|
-
import type { TenantId } from "../engine/types/index.
|
|
3
|
+
import type { DbConnection, DbRunner } from "../db/connection.ts";
|
|
4
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
5
5
|
export declare const snapshotsTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
6
6
|
export declare function createSnapshotsTable(db: DbConnection): Promise<void>;
|
|
7
7
|
export declare function effectiveSnapshotGeneration(callerVersion: number, entityEventVersion: number | undefined): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TenantDb } from "@cosmicdrift/kumiko-types/tenant-db-types";
|
|
2
|
-
import type { Registry } from "../engine/types/index.
|
|
3
|
-
import { type EventToAppend, type StoredEvent } from "./event-store.
|
|
2
|
+
import type { Registry } from "../engine/types/index.ts";
|
|
3
|
+
import { type EventToAppend, type StoredEvent } from "./event-store.ts";
|
|
4
4
|
export type AppendEventInTenantDbOptions = {
|
|
5
5
|
readonly registry?: Registry;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AGGREGATE_TRANSFERRED_EVENT_TYPE } from "../crypto/system-event-pii.
|
|
2
|
-
import type { DbRunner } from "../db/index.
|
|
3
|
-
import type { TenantId } from "../engine/types/index.
|
|
1
|
+
import { AGGREGATE_TRANSFERRED_EVENT_TYPE } from "../crypto/system-event-pii.ts";
|
|
2
|
+
import type { DbRunner } from "../db/index.ts";
|
|
3
|
+
import type { TenantId } from "../engine/types/index.ts";
|
|
4
4
|
export declare const AGGREGATE_TRANSFER_STREAM_TYPE = "aggregate-transfer";
|
|
5
5
|
export { AGGREGATE_TRANSFERRED_EVENT_TYPE };
|
|
6
6
|
export type TransferAggregateStreamsArgs = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DbConnection, DbRunner } from "../db/connection.
|
|
2
|
-
import type { StoredEvent } from "./event-store.
|
|
1
|
+
import type { DbConnection, DbRunner } from "../db/connection.ts";
|
|
2
|
+
import type { StoredEvent } from "./event-store.ts";
|
|
3
3
|
export declare const upcasterDeadLetterTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
4
4
|
export declare function createUpcasterDeadLetterTable(db: DbConnection): Promise<void>;
|
|
5
5
|
export declare function recordUpcasterDeadLetter(db: DbRunner, args: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbRunner } from "../db/index.
|
|
2
|
-
import type { EventUpcastCtx, EventUpcastFn, TenantId } from "../engine/types/index.
|
|
3
|
-
import type { StoredEvent } from "./event-store.
|
|
1
|
+
import type { DbRunner } from "../db/index.ts";
|
|
2
|
+
import type { EventUpcastCtx, EventUpcastFn, TenantId } from "../engine/types/index.ts";
|
|
3
|
+
import type { StoredEvent } from "./event-store.ts";
|
|
4
4
|
export type UpcasterErrorPolicy = "throw" | "quarantine";
|
|
5
5
|
export type UpcastOptions = {
|
|
6
6
|
readonly errorPolicy?: UpcasterErrorPolicy;
|