@cosmicdrift/kumiko-framework 0.13.0 → 0.15.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/package.json +7 -7
- package/src/__tests__/{anonymous-access.integration.ts → anonymous-access.integration.test.ts} +12 -9
- package/src/__tests__/{error-contract.integration.ts → error-contract.integration.test.ts} +5 -4
- package/src/__tests__/{field-access.integration.ts → field-access.integration.test.ts} +3 -3
- package/src/__tests__/{full-stack.integration.ts → full-stack.integration.test.ts} +7 -16
- package/src/__tests__/{ownership.integration.ts → ownership.integration.test.ts} +3 -2
- package/src/__tests__/{raw-table.integration.ts → raw-table.integration.test.ts} +18 -30
- package/src/__tests__/{reference-data.integration.ts → reference-data.integration.test.ts} +24 -11
- package/src/__tests__/{transition-guard.integration.ts → transition-guard.integration.test.ts} +12 -10
- package/src/api/__tests__/api.test.ts +1 -1
- package/src/api/__tests__/auth-middleware-transport.test.ts +1 -1
- package/src/api/__tests__/auth-routes-cookie.test.ts +1 -1
- package/src/api/__tests__/{batch.integration.ts → batch.integration.test.ts} +30 -30
- package/src/api/__tests__/body-limit.test.ts +1 -1
- package/src/api/__tests__/csrf-middleware.test.ts +1 -1
- package/src/api/__tests__/{dispatcher-live.integration.ts → dispatcher-live.integration.test.ts} +10 -9
- package/src/api/__tests__/metrics-endpoint.test.ts +1 -1
- package/src/api/__tests__/{nested-write.integration.ts → nested-write.integration.test.ts} +13 -16
- package/src/api/__tests__/readiness.test.ts +1 -1
- package/src/api/__tests__/request-id-middleware.test.ts +1 -1
- package/src/api/__tests__/sse-broker.test.ts +12 -12
- package/src/api/__tests__/sse-route.test.ts +1 -1
- package/src/api/readiness.ts +2 -2
- package/src/auth/__tests__/roles.test.ts +2 -2
- package/src/bun-db/__tests__/PATTERN.md +73 -0
- package/src/bun-db/__tests__/_helpers.ts +103 -0
- package/src/bun-db/__tests__/batch-methods.integration.test.ts +143 -0
- package/src/bun-db/__tests__/batch-methods.test.ts +20 -0
- package/src/bun-db/__tests__/bun-test-db.ts +19 -0
- package/src/bun-db/__tests__/bun-test-stack.ts +6 -0
- package/src/bun-db/__tests__/column-types.integration.test.ts +132 -0
- package/src/bun-db/__tests__/compound-types.integration.test.ts +134 -0
- package/src/bun-db/__tests__/jsonb-edge-cases.integration.test.ts +235 -0
- package/src/bun-db/__tests__/smoke.integration.test.ts +43 -0
- package/src/bun-db/__tests__/sql-methods.integration.test.ts +231 -0
- package/src/bun-db/__tests__/where-patterns.integration.test.ts +185 -0
- package/src/bun-db/connection.ts +84 -0
- package/src/bun-db/index.ts +31 -0
- package/src/bun-db/query.ts +845 -0
- package/src/compliance/__tests__/duration-spec.test.ts +1 -1
- package/src/compliance/__tests__/profiles.test.ts +1 -1
- package/src/compliance/__tests__/sub-processors.test.ts +1 -1
- package/src/db/__tests__/{apply-entity-event-tenant.integration.ts → apply-entity-event-tenant.integration.test.ts} +13 -11
- package/src/db/__tests__/big-int-field.test.ts +15 -14
- package/src/db/__tests__/column-ddl.integration.test.ts +113 -0
- package/src/db/__tests__/compound-types.test.ts +1 -1
- package/src/db/__tests__/{config-seed.integration.ts → config-seed.integration.test.ts} +32 -27
- package/src/db/__tests__/connection-options.test.ts +1 -1
- package/src/db/__tests__/dialect-instant.test.ts +1 -1
- package/src/db/__tests__/encryption.test.ts +1 -1
- package/src/db/__tests__/{drizzle-table-types.test.ts → entity-table-types.test.ts} +16 -16
- package/src/db/__tests__/{event-store-executor-list.integration.ts → event-store-executor-list.integration.test.ts} +12 -7
- package/src/db/__tests__/{event-store-executor.integration.ts → event-store-executor.integration.test.ts} +19 -12
- package/src/db/__tests__/{implicit-projection-equivalence.integration.ts → implicit-projection-equivalence.integration.test.ts} +35 -29
- package/src/db/__tests__/located-timestamp.test.ts +1 -1
- package/src/db/__tests__/money.test.ts +1 -1
- package/src/db/__tests__/{multi-row-insert.integration.ts → multi-row-insert.integration.test.ts} +18 -11
- package/src/db/__tests__/parse-auto-verb.test.ts +1 -1
- package/src/db/__tests__/{required-not-null-migration-safety.integration.ts → required-not-null-migration-safety.integration.test.ts} +28 -24
- package/src/db/__tests__/{schema-migration.integration.ts → schema-migration.integration.test.ts} +32 -28
- package/src/db/__tests__/sql-inventory.test.ts +56 -0
- package/src/db/__tests__/table-builder-indexes.test.ts +30 -11
- package/src/db/__tests__/table-builder-required.test.ts +20 -22
- package/src/db/__tests__/{tenant-db.integration.ts → tenant-db.integration.test.ts} +106 -144
- package/src/db/__tests__/{unique-violation-mapping.integration.ts → unique-violation-mapping.integration.test.ts} +13 -8
- package/src/db/api.ts +46 -0
- package/src/db/apply-entity-event.ts +45 -36
- package/src/db/assert-exists-in.ts +5 -16
- package/src/db/bun-provider.ts +37 -0
- package/src/db/config-seed.ts +4 -4
- package/src/db/connection.ts +14 -57
- package/src/db/cursor.ts +5 -56
- package/src/db/dialect.ts +472 -99
- package/src/db/eagerload.ts +5 -12
- package/src/db/entity-table-meta.ts +390 -0
- package/src/db/event-store-executor.ts +158 -100
- package/src/db/index.ts +33 -5
- package/src/db/migrate-generator.ts +350 -0
- package/src/db/migrate-runner.ts +206 -0
- package/src/db/postgres-provider.ts +25 -0
- package/src/db/queries/entity-read.ts +15 -0
- package/src/db/queries/es-ops.ts +17 -0
- package/src/db/queries/event-consumer.ts +170 -0
- package/src/db/queries/event-store-admin.ts +127 -0
- package/src/db/queries/event-store.ts +155 -0
- package/src/db/queries/projection-rebuild.ts +59 -0
- package/src/db/queries/raw-sql.ts +15 -0
- package/src/db/queries/schema-drift.ts +35 -0
- package/src/db/queries/seed-context.ts +58 -0
- package/src/db/queries/table-ops.ts +11 -0
- package/src/db/queries/test-stack.ts +56 -0
- package/src/db/query-api.ts +22 -0
- package/src/db/query.ts +30 -0
- package/src/db/reference-data.ts +19 -22
- package/src/db/render-ddl.ts +57 -0
- package/src/db/row-helpers.ts +3 -52
- package/src/db/schema-inspection.ts +17 -4
- package/src/db/sql-inventory.ts +208 -0
- package/src/db/table-builder.ts +48 -40
- package/src/db/tenant-db.ts +105 -326
- package/src/engine/__tests__/auth-claims-registrar.test.ts +1 -1
- package/src/engine/__tests__/boot-validator-api-exposure.test.ts +3 -3
- package/src/engine/__tests__/boot-validator-located-timestamps.test.ts +1 -1
- package/src/engine/__tests__/boot-validator-pii-retention.test.ts +5 -5
- package/src/engine/__tests__/boot-validator-s0-integration.test.ts +3 -3
- package/src/engine/__tests__/boot-validator.test.ts +4 -3
- package/src/engine/__tests__/build-app-schema.test.ts +1 -1
- package/src/engine/__tests__/build-target.test.ts +1 -1
- package/src/engine/__tests__/claim-keys.test.ts +1 -1
- package/src/engine/__tests__/codemod-pipeline.test.ts +3 -3
- package/src/engine/__tests__/config-helpers.test.ts +1 -1
- package/src/engine/__tests__/effective-features.test.ts +1 -1
- package/src/engine/__tests__/engine.test.ts +1 -1
- package/src/engine/__tests__/entity-handlers.test.ts +3 -3
- package/src/engine/__tests__/event-helpers.test.ts +3 -3
- package/src/engine/__tests__/extends-registrar.test.ts +4 -4
- package/src/engine/__tests__/factories-long-text.test.ts +1 -1
- package/src/engine/__tests__/factories-time.test.ts +1 -1
- package/src/engine/__tests__/field-predicates.test.ts +1 -1
- package/src/engine/__tests__/hook-phases.test.ts +1 -1
- package/src/engine/__tests__/identifiers.test.ts +1 -1
- package/src/engine/__tests__/lifecycle-hooks.test.ts +1 -1
- package/src/engine/__tests__/nav.test.ts +1 -1
- package/src/engine/__tests__/ownership.test.ts +10 -11
- package/src/engine/__tests__/parse-ref-target.test.ts +1 -1
- package/src/engine/__tests__/pipeline-engine.test.ts +1 -1
- package/src/engine/__tests__/{pipeline-handler.integration.ts → pipeline-handler.integration.test.ts} +38 -52
- package/src/engine/__tests__/{pipeline-observability.integration.ts → pipeline-observability.integration.test.ts} +1 -1
- package/src/engine/__tests__/{pipeline-performance.integration.ts → pipeline-performance.integration.test.ts} +1 -1
- package/src/engine/__tests__/pipeline-sub-pipelines.test.ts +1 -1
- package/src/engine/__tests__/post-query-hook.test.ts +1 -1
- package/src/engine/__tests__/projection-helpers.test.ts +25 -17
- package/src/engine/__tests__/projection.test.ts +4 -4
- package/src/engine/__tests__/qualified-name.test.ts +1 -1
- package/src/engine/__tests__/raw-table.test.ts +9 -8
- package/src/engine/__tests__/resolve-config-or-param.test.ts +5 -5
- package/src/engine/__tests__/run-in.test.ts +1 -1
- package/src/engine/__tests__/schema-builder.test.ts +1 -1
- package/src/engine/__tests__/screen.test.ts +1 -1
- package/src/engine/__tests__/search-payload-extension.test.ts +3 -3
- package/src/engine/__tests__/state-machine.test.ts +1 -1
- package/src/engine/__tests__/steps-aggregate-append-event.test.ts +7 -7
- package/src/engine/__tests__/steps-aggregate-create.test.ts +4 -4
- package/src/engine/__tests__/steps-aggregate-update.test.ts +3 -3
- package/src/engine/__tests__/steps-call-feature.test.ts +5 -5
- package/src/engine/__tests__/steps-mail-send.test.ts +7 -7
- package/src/engine/__tests__/steps-read.test.ts +34 -40
- package/src/engine/__tests__/steps-resolver-utils.test.ts +6 -6
- package/src/engine/__tests__/steps-unsafe-projection-delete.test.ts +24 -19
- package/src/engine/__tests__/steps-unsafe-projection-upsert.test.ts +28 -17
- package/src/engine/__tests__/steps-webhook-send.test.ts +6 -6
- package/src/engine/__tests__/steps-workflow.test.ts +7 -7
- package/src/engine/__tests__/system-user.test.ts +1 -1
- package/src/engine/__tests__/validate-projection-allowlist.test.ts +4 -5
- package/src/engine/__tests__/validation-hooks.test.ts +1 -1
- package/src/engine/__tests__/visual-tree-patterns.test.ts +1 -1
- package/src/engine/boot-validator/entity-handler.ts +3 -3
- package/src/engine/boot-validator/ownership.ts +1 -1
- package/src/engine/define-feature.ts +1 -2
- package/src/engine/entity-handlers.ts +5 -5
- package/src/engine/factories.ts +1 -1
- package/src/engine/feature-ast/__tests__/canonical-form.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/parse-happy-path.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/parse-real-features.test.ts +2 -2
- package/src/engine/feature-ast/__tests__/parse.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/patch.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/patcher.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/render-roundtrip.test.ts +1 -1
- package/src/engine/feature-ast/__tests__/visual-tree-parse.test.ts +1 -1
- package/src/engine/ownership.ts +113 -41
- package/src/engine/pattern-library/__tests__/library.test.ts +2 -2
- package/src/engine/projection-helpers.ts +2 -11
- package/src/engine/registry.ts +2 -2
- package/src/engine/steps/read-find-many.ts +13 -13
- package/src/engine/steps/read-find-one.ts +7 -9
- package/src/engine/steps/unsafe-projection-delete.ts +4 -5
- package/src/engine/steps/unsafe-projection-upsert.ts +63 -31
- package/src/engine/types/feature.ts +7 -2
- package/src/engine/types/fields.ts +4 -5
- package/src/engine/types/step.ts +10 -10
- package/src/engine/validate-projection-allowlist.ts +23 -3
- package/src/entrypoint/__tests__/{entrypoint-job-wiring.integration.ts → entrypoint-job-wiring.integration.test.ts} +4 -3
- package/src/entrypoint/__tests__/{split-deploy.integration.ts → split-deploy.integration.test.ts} +4 -3
- package/src/env/__tests__/compose-env-schema.test.ts +1 -1
- package/src/env/__tests__/dry-run.test.ts +1 -1
- package/src/errors/__tests__/classes.test.ts +1 -1
- package/src/errors/__tests__/write-failures.test.ts +1 -1
- package/src/es-ops/__tests__/{context.integration.ts → context.integration.test.ts} +43 -29
- package/src/es-ops/__tests__/{runner.integration.ts → runner.integration.test.ts} +25 -23
- package/src/es-ops/__tests__/runner.test.ts +29 -19
- package/src/es-ops/context.ts +9 -43
- package/src/es-ops/operations-schema.ts +2 -2
- package/src/es-ops/runner.ts +12 -26
- package/src/event-store/__tests__/{admin-api.integration.ts → admin-api.integration.test.ts} +71 -45
- package/src/event-store/__tests__/{event-store.integration.ts → event-store.integration.test.ts} +7 -5
- package/src/event-store/__tests__/{get-stream-version-perf.integration.ts → get-stream-version-perf.integration.test.ts} +5 -3
- package/src/event-store/__tests__/{perf.integration.ts → perf.integration.test.ts} +24 -16
- package/src/event-store/__tests__/{snapshot.integration.ts → snapshot.integration.test.ts} +34 -28
- package/src/event-store/__tests__/{upcaster-dead-letter.integration.ts → upcaster-dead-letter.integration.test.ts} +11 -12
- package/src/event-store/__tests__/{upcaster.integration.ts → upcaster.integration.test.ts} +19 -32
- package/src/event-store/admin-api.ts +55 -83
- package/src/event-store/archive.ts +15 -39
- package/src/event-store/event-store.ts +92 -86
- package/src/event-store/events-schema.ts +2 -1
- package/src/event-store/index.ts +1 -0
- package/src/event-store/snapshot.ts +26 -24
- package/src/event-store/upcaster-dead-letter.ts +19 -18
- package/src/files/__tests__/content-disposition.test.ts +1 -1
- package/src/files/__tests__/{file-field-pipeline.integration.ts → file-field-pipeline.integration.test.ts} +8 -5
- package/src/files/__tests__/file-handle.test.ts +1 -1
- package/src/files/__tests__/{files.integration.ts → files.integration.test.ts} +32 -17
- package/src/files/__tests__/read-stream.test.ts +1 -1
- package/src/files/__tests__/{storage-tracking.integration.ts → storage-tracking.integration.test.ts} +26 -30
- package/src/files/__tests__/write-stream.test.ts +1 -1
- package/src/files/__tests__/zip-stream.test.ts +1 -1
- package/src/files/file-ref-table.ts +2 -2
- package/src/files/file-routes.ts +7 -9
- package/src/files/storage-tracking.ts +9 -17
- package/src/i18n/__tests__/i18n.test.ts +1 -1
- package/src/jobs/__tests__/{job-event-trigger.integration.ts → job-event-trigger.integration.test.ts} +6 -3
- package/src/jobs/__tests__/{job-multi-trigger.integration.ts → job-multi-trigger.integration.test.ts} +6 -3
- package/src/jobs/__tests__/{jobs.integration.ts → jobs.integration.test.ts} +5 -7
- package/src/lifecycle/__tests__/{lifecycle-server.integration.ts → lifecycle-server.integration.test.ts} +1 -1
- package/src/lifecycle/__tests__/lifecycle.test.ts +6 -6
- package/src/lifecycle/__tests__/signal-handlers.test.ts +6 -6
- package/src/logging/__tests__/pino-trace-bridge.test.ts +1 -1
- package/src/migrations/__tests__/compare-snapshots.test.ts +1 -1
- package/src/migrations/__tests__/{detect-drift.integration.ts → detect-drift.integration.test.ts} +34 -26
- package/src/migrations/__tests__/{detect-projections-to-rebuild.integration.ts → detect-projections-to-rebuild.integration.test.ts} +1 -1
- package/src/migrations/__tests__/rebuild-marker.test.ts +1 -1
- package/src/migrations/projection-detection.ts +12 -1
- package/src/migrations/schema-drift.ts +7 -23
- package/src/observability/__tests__/console-provider.test.ts +1 -1
- package/src/observability/__tests__/metric-validator.test.ts +1 -1
- package/src/observability/__tests__/noop-provider.test.ts +1 -1
- package/src/observability/__tests__/{observability.integration.ts → observability.integration.test.ts} +5 -8
- package/src/observability/__tests__/prometheus-meter.test.ts +1 -1
- package/src/observability/__tests__/recording-meter.test.ts +1 -1
- package/src/observability/__tests__/recording-tracer.test.ts +1 -1
- package/src/observability/__tests__/sensitive-filter.test.ts +1 -1
- package/src/pipeline/__tests__/{archive-stream.integration.ts → archive-stream.integration.test.ts} +3 -3
- package/src/pipeline/__tests__/auth-claims-resolver.test.ts +9 -9
- package/src/pipeline/__tests__/{cascade-handler.integration.ts → cascade-handler.integration.test.ts} +18 -15
- package/src/pipeline/__tests__/cascade-handler.test.ts +1 -1
- package/src/pipeline/__tests__/{causation-chain.integration.ts → causation-chain.integration.test.ts} +12 -13
- package/src/pipeline/__tests__/{ctx-bridge.integration.ts → ctx-bridge.integration.test.ts} +12 -11
- package/src/pipeline/__tests__/dispatcher.test.ts +2 -2
- package/src/pipeline/__tests__/{distributed-lock.integration.ts → distributed-lock.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{domain-events-projections.integration.ts → domain-events-projections.integration.test.ts} +13 -15
- package/src/pipeline/__tests__/{event-dedup.integration.ts → event-dedup.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{event-define-event-strict.integration.ts → event-define-event-strict.integration.test.ts} +6 -16
- package/src/pipeline/__tests__/{event-dispatcher-lifecycle.integration.ts → event-dispatcher-lifecycle.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{event-dispatcher-multi-instance.integration.ts → event-dispatcher-multi-instance.integration.test.ts} +3 -2
- package/src/pipeline/__tests__/{event-dispatcher-pg-listen.integration.ts → event-dispatcher-pg-listen.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{event-dispatcher-recovery.integration.ts → event-dispatcher-recovery.integration.test.ts} +2 -2
- package/src/pipeline/__tests__/{event-dispatcher-second-audit.integration.ts → event-dispatcher-second-audit.integration.test.ts} +17 -16
- package/src/pipeline/__tests__/event-dispatcher-strict.test.ts +14 -12
- package/src/pipeline/__tests__/{event-dispatcher.integration.ts → event-dispatcher.integration.test.ts} +8 -15
- package/src/pipeline/__tests__/{event-retention.integration.ts → event-retention.integration.test.ts} +28 -25
- package/src/pipeline/__tests__/{fetch-for-writing.integration.ts → fetch-for-writing.integration.test.ts} +6 -6
- package/src/pipeline/__tests__/lifecycle-pipeline.test.ts +4 -4
- package/src/pipeline/__tests__/{load-aggregate-query.integration.ts → load-aggregate-query.integration.test.ts} +9 -5
- package/src/pipeline/__tests__/{msp-error-mode.integration.ts → msp-error-mode.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{msp-multi-hop.integration.ts → msp-multi-hop.integration.test.ts} +9 -8
- package/src/pipeline/__tests__/{msp-rebuild.integration.ts → msp-rebuild.integration.test.ts} +47 -55
- package/src/pipeline/__tests__/{multi-stream-projection.integration.ts → multi-stream-projection.integration.test.ts} +19 -53
- package/src/pipeline/__tests__/{perf-rebuild.integration.ts → perf-rebuild.integration.test.ts} +36 -34
- package/src/pipeline/__tests__/{post-query-hook.integration.ts → post-query-hook.integration.test.ts} +1 -1
- package/src/pipeline/__tests__/{projection-rebuild.integration.ts → projection-rebuild.integration.test.ts} +21 -30
- package/src/pipeline/__tests__/{query-projection.integration.ts → query-projection.integration.test.ts} +6 -5
- package/src/pipeline/__tests__/{redis-pipeline.integration.ts → redis-pipeline.integration.test.ts} +3 -1
- package/src/pipeline/cascade-handler.ts +13 -21
- package/src/pipeline/dispatcher.ts +43 -48
- package/src/pipeline/event-consumer-state.ts +11 -2
- package/src/pipeline/event-dispatcher.ts +86 -146
- package/src/pipeline/event-retention.ts +14 -24
- package/src/pipeline/msp-rebuild.ts +54 -78
- package/src/pipeline/projection-rebuild.ts +65 -67
- package/src/pipeline/projection-state.ts +2 -2
- package/src/random/__tests__/generate.test.ts +13 -13
- package/src/rate-limit/__tests__/{dispatcher-l3.integration.ts → dispatcher-l3.integration.test.ts} +1 -1
- package/src/rate-limit/__tests__/{middleware.integration.ts → middleware.integration.test.ts} +1 -1
- package/src/rate-limit/__tests__/{resolver.integration.ts → resolver.integration.test.ts} +1 -1
- package/src/redis/__tests__/redis-options.test.ts +1 -1
- package/src/search/__tests__/{meilisearch-adapter.integration.ts → meilisearch-adapter.integration.test.ts} +1 -1
- package/src/search/__tests__/search-adapter.test.ts +1 -1
- package/src/secrets/__tests__/dek-cache.test.ts +1 -3
- package/src/secrets/__tests__/env-master-key-provider.test.ts +1 -1
- package/src/secrets/__tests__/envelope.test.ts +1 -1
- package/src/secrets/__tests__/leak-guard.test.ts +1 -1
- package/src/secrets/__tests__/rotation.test.ts +1 -1
- package/src/stack/db.ts +25 -48
- package/src/stack/push-entity-projection-tables.ts +2 -4
- package/src/stack/table-helpers.ts +98 -61
- package/src/stack/test-stack.ts +8 -7
- package/src/testing/__tests__/db-cleanup.test.ts +40 -0
- package/src/testing/__tests__/e2e-generator.test.ts +1 -1
- package/src/testing/__tests__/{ensure-entity-table.integration.ts → ensure-entity-table.integration.test.ts} +7 -14
- package/src/testing/db-cleanup.ts +44 -0
- package/src/testing/expect-error.ts +1 -1
- package/src/testing/index.ts +2 -0
- package/src/testing/multipart-helper.ts +94 -0
- package/src/testing/shared-entities.ts +5 -5
- package/src/time/__tests__/polyfill.test.ts +1 -1
- package/src/time/__tests__/tz-context.test.ts +1 -1
- package/src/utils/__tests__/assert.test.ts +1 -1
- package/src/utils/__tests__/env-parse.test.ts +1 -1
- package/CHANGELOG.md +0 -472
- package/src/db/__tests__/cursor.test.ts +0 -41
- package/src/db/__tests__/db-helpers.test.ts +0 -369
- package/src/db/__tests__/drizzle-helpers.integration.ts +0 -186
- package/src/db/__tests__/row-helpers.test.ts +0 -59
- package/src/engine/steps/_drizzle-boundary.ts +0 -19
- package/src/files/__tests__/file-field-column.integration.ts +0 -103
package/CHANGELOG.md
DELETED
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
# @cosmicdrift/kumiko-framework
|
|
2
|
-
|
|
3
|
-
## 0.13.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 7f56b2f: **Framework**: add `JsonbFieldDef` + `createJsonbField()` primitive. Schema-less jsonb-Spalte (default `{}`, NOT NULL) für tenant-defined extension-data, AI-inferred metadata, free-form config-blobs. Vs. `embedded` (typed sub-schema): jsonb akzeptiert beliebige keys. Table-builder + schema-builder + e2e-generator alle aktualisiert.
|
|
8
|
-
|
|
9
|
-
**custom-fields-Bundle (B2)**: ergänzt B1 um Custom-Field-VALUES:
|
|
10
|
-
|
|
11
|
-
- `customField.set` + `customField.cleared` Event-Types (auf host-aggregate stream)
|
|
12
|
-
- `set-custom-field` + `clear-custom-field` write-handlers (emit events)
|
|
13
|
-
- `r.extendsRegistrar("customFields")` für consumer opt-in via `useExtension`
|
|
14
|
-
- `customFieldsField()` helper für entity-fields-definition
|
|
15
|
-
- `wireCustomFieldsFor(r, entityName, entityTable)` consumer-side-API registriert:
|
|
16
|
-
- `r.useExtension("customFields", entity)` opt-in marker
|
|
17
|
-
- MultiStreamProjection: customField.set/.cleared/fieldDefinition.deleted → UPDATE entityTable.customFields jsonb (jsonb_set / minus-operator)
|
|
18
|
-
- `r.entityHook("postQuery", entity, ...)` — flatten row.customFields auf API-root (Spec-Promise "indistinguishable von Stammfeldern")
|
|
19
|
-
- `r.searchPayloadExtension(entity, ...)` — customFields-keys flach ins Meilisearch-Index (F3 wiring)
|
|
20
|
-
|
|
21
|
-
**Out-of-B2** (future iterations): cross-scope-conflict (tenant override system fieldKey), cap-counter quota, user-data-rights anonymization, value-validation gegen fieldDefinition.serializedField, system+tenant UNION-read.
|
|
22
|
-
|
|
23
|
-
Part of custom-fields-bundle Sprint Phase B2 (Plan-Doc: kumiko-platform/docs/plans/custom-fields-sprint.md).
|
|
24
|
-
|
|
25
|
-
## 0.12.2
|
|
26
|
-
|
|
27
|
-
### Patch Changes
|
|
28
|
-
|
|
29
|
-
- 597de52: `createRegistry` guards all `Object.entries(feature.X)` against undefined slots — bun-bundled features can have optional slots dropped by minification. Pauschal-fix für alle 22 sites in registry.ts (entities, relations, writeHandlers, queryHandlers, configKeys, jobs, notifications, events, translations, searchPayloadExtensions, registrarExtensions, metrics, projections, multiStreamProjections, rawTables, screens, navs, workspaces, handlerEntityMappings, ...).
|
|
30
|
-
|
|
31
|
-
## 0.12.1
|
|
32
|
-
|
|
33
|
-
### Patch Changes
|
|
34
|
-
|
|
35
|
-
- f2ad7c4: `mergeHookList` (the entity-hook variant) also tolerates undefined slots — same fix as `mergeHookListQualified` in 0.11.2 but for the second function. defineFeature leaves `entityHooks.postSave`/`preDelete`/`postDelete`/`postQuery` undefined when not declared; `createRegistry` crashed on `Object.entries(undefined)`.
|
|
36
|
-
|
|
37
|
-
## 0.12.0
|
|
38
|
-
|
|
39
|
-
## 0.11.2
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- 92a84f0: `mergeHookListQualified` tolerates undefined hook-slots.
|
|
44
|
-
|
|
45
|
-
`defineFeature` leaves `feature.hooks.preSave`/`postSave`/etc. undefined when no hooks of that type are declared. `createRegistry` called `Object.entries(undefined)` and crashed with `Object.entries requires that input parameter not be null or undefined`.
|
|
46
|
-
|
|
47
|
-
Now `mergeHookListQualified` short-circuits on undefined source. Surfaced in studio's production-bundle boot.
|
|
48
|
-
|
|
49
|
-
## 0.11.1
|
|
50
|
-
|
|
51
|
-
## 0.11.0
|
|
52
|
-
|
|
53
|
-
### Minor Changes
|
|
54
|
-
|
|
55
|
-
- 9347212: Add `r.searchPayloadExtension(entity, fn)` API. Contributor functions add flat fields to an entity's search-index document during `buildSearchDocument` indexing.
|
|
56
|
-
|
|
57
|
-
Use-cases:
|
|
58
|
-
|
|
59
|
-
- `custom-fields-bundle` (upcoming): merge customFields-jsonb-keys flat into search-doc so tenant-defined fields are searchable
|
|
60
|
-
- Tags-bundle: project tags-array into searchable form
|
|
61
|
-
- Computed-fields: denormalize related-counts (e.g., `messageCount` on conversation)
|
|
62
|
-
|
|
63
|
-
Contributor receives `{entityName, entityId, state}`, returns extras to merge. Async-allowed but discouraged (indexing-path hot loop).
|
|
64
|
-
|
|
65
|
-
Boot-validation: typo'd entity-names fail-fast at registry-build (sibling to entity-hooks boot-validation).
|
|
66
|
-
|
|
67
|
-
**Behavior-change**: entities without any stammfeld `searchable: true` now get a search-doc indexed when at least one extension registers contributors for them. Before this PR, such entities were skipped entirely. This enables custom-fields-only-indexing (the customFields-bundle use-case) but slightly increases Meilisearch-Index-Membership.
|
|
68
|
-
|
|
69
|
-
Ownership-tracking: contributors are stored as `OwnedFn` and filtered by `effectiveFeatures` in the getter — feature-toggle-disabled bundles' contributors don't fire (consistent with postQuery-Hooks).
|
|
70
|
-
|
|
71
|
-
Part of custom-fields-bundle Sprint Phase F3.
|
|
72
|
-
|
|
73
|
-
### Patch Changes
|
|
74
|
-
|
|
75
|
-
- 30ea981: `validateEntityIndexes` allows UNIQUE constraints on single-column `tenantId`.
|
|
76
|
-
|
|
77
|
-
Previously any single-column index on `tenantId` was rejected as redundant — `buildDrizzleTable` auto-creates an index on tenantId for query-performance. But that auto-index is **not** a UNIQUE constraint; entities that need a 1:1 relation to the tenant (e.g. `tenant-compliance-profile`) declared `{ unique: true, columns: ["tenantId"] }` explicitly and the validator rejected them, breaking boot.
|
|
78
|
-
|
|
79
|
-
Now: `{ unique: true, columns: ["tenantId"] }` passes (semantic UNIQUE constraint, not a duplicate performance-hint). The original block stays in place for `{ unique: false, columns: ["tenantId"] }` (still redundant).
|
|
80
|
-
|
|
81
|
-
Surfaced when studio.kumiko.so booted in production-bundle and the bundled-features `compliance-profiles` entity hit the validator.
|
|
82
|
-
|
|
83
|
-
## 0.10.0
|
|
84
|
-
|
|
85
|
-
### Minor Changes
|
|
86
|
-
|
|
87
|
-
- 753d392: Add `postQuery` lifecycle-hook. Fires after query-handler-execute, before field-access-read-filter (dispatcher.ts). Supports two registration paths:
|
|
88
|
-
|
|
89
|
-
- `r.hook("postQuery", "ns:query:handler", fn)` — handler-keyed, fires only for that specific query-handler
|
|
90
|
-
- `r.entityHook("postQuery", entity, fn)` — entity-keyed, fires for ALL query-handlers of the entity
|
|
91
|
-
|
|
92
|
-
Hook receives `{ entityName, rows }` and returns `{ rows }` (possibly modified). Each hook is responsible for its own field-access on values it adds — the built-in field-access-filter only knows the entity's stammfields.
|
|
93
|
-
|
|
94
|
-
Use-cases: tags/comments-count/computed-fields/custom-fields-merge. Part of custom-fields-bundle Sprint Phase F1 (see `kumiko-platform/docs/plans/custom-fields-sprint.md`).
|
|
95
|
-
|
|
96
|
-
### Patch Changes
|
|
97
|
-
|
|
98
|
-
- d06f029: `validateExtensionUsages` allows self-extension (feature provides AND consumes the same extension).
|
|
99
|
-
|
|
100
|
-
Previously a feature like tier-engine — which defines the `tenantTierResolver` extension-point AND ships a default plugin against it — failed boot-validation with `Feature "tier-engine" uses extension "tenantTierResolver" but missing requires("tier-engine")`. `r.requires(self)` would be a circular declaration that the registry-build rejects too, so the only escape was to not validate self-extension. That's now the contract: providerFeature === feature.name short-circuits the dependency check.
|
|
101
|
-
|
|
102
|
-
Surfaced when studio.kumiko.so booted in production-bundle for the first time (Sprint 9.8). The same source had run for months in monorepo-dev-mode because composeFeatures' bundled-additions happen to come BEFORE the validate step in a different order — only a real `bun build`-bundled boot triggers the path. Memory `feedback_audit_drift_root_cause_now`: framework-bug, not per-app workaround.
|
|
103
|
-
|
|
104
|
-
## 0.9.0
|
|
105
|
-
|
|
106
|
-
### Patch Changes
|
|
107
|
-
|
|
108
|
-
- 51e22f5: Add deploy-template scaffolding (Sprint 9.6).
|
|
109
|
-
|
|
110
|
-
**New API:**
|
|
111
|
-
|
|
112
|
-
- `scaffoldDeploy({ appName, port?, githubOrg?, destination?, force? })` exported from `@cosmicdrift/kumiko-dev-server`. Generates `deploy/Dockerfile`, `deploy/Dockerfile.dockerignore`, and `deploy/migrate-step.sh` from canonical templates shipped with the package. Substitutes `{{appName}}`, `{{port}}`, `{{githubOrg}}` placeholders.
|
|
113
|
-
- New CLI command: `kumiko init-deploy --app <name> [--port <n>] [--github-org <org>] [--out <dir>] [--force]`.
|
|
114
|
-
|
|
115
|
-
The templates are extracted from publicstatus's production-tested `deploy/Dockerfile` (node-alpine build stage → bun-alpine runtime, drizzle migrations baked in, healthcheck wired). Refuses to overwrite existing files unless `--force` is passed so a tuned per-app Dockerfile isn't clobbered.
|
|
116
|
-
|
|
117
|
-
**Templates are a starting point, not a contract.** Apps should review and adjust:
|
|
118
|
-
|
|
119
|
-
- **Image tag** is hardcoded `:latest` in `migrate-step.sh.template`. Swap to `:${BUILD_SHA}` for atomic deploys.
|
|
120
|
-
- **DB defaults** in `migrate-step.sh.template` assume `db user = db name = appName`, host `db`, port `5432`. Adjust to your stack.
|
|
121
|
-
- **`COPY /app/seeds`** assumes the app uses ES-Operations seed migrations. Comment out if your app has no `seeds/` directory (otherwise `docker build` fails).
|
|
122
|
-
- **`docker build`-smoke-test:** the templates run untested against a non-publicstatus app-tree. Verify locally before pushing to CI.
|
|
123
|
-
|
|
124
|
-
**Deferred to Sprint 9.7+:** `.github/workflows/build-image.yml.suggested`, `pulumi/secrets-bootstrap.sh`, `pulumi/extraEnv.snippet.ts`.
|
|
125
|
-
|
|
126
|
-
**Plan-Doc drift (for 9.9 update):** Plan-Doc-Tabelle nennt `start.sh` (in-container migrate-then-run); diese Implementation liefert `migrate-step.sh` (host-side deploy-pipeline). Beide Konzepte sind gültig — Plan-Doc-Update sollte das klarstellen.
|
|
127
|
-
|
|
128
|
-
## 0.8.1
|
|
129
|
-
|
|
130
|
-
### Patch Changes
|
|
131
|
-
|
|
132
|
-
- 4b5f91e: Expose `./package.json` via subpath export so downstream tooling (publish/materialize, app-templates) can derive the installed framework version at runtime without manual version-pin drift.
|
|
133
|
-
|
|
134
|
-
## 0.8.0
|
|
135
|
-
|
|
136
|
-
### Minor Changes
|
|
137
|
-
|
|
138
|
-
- f34af9a: Add framework-core env-schema (Sprint 9.2, Migration Phase 1).
|
|
139
|
-
|
|
140
|
-
**New API:**
|
|
141
|
-
|
|
142
|
-
- `frameworkCoreEnvSchema` exported from `@cosmicdrift/kumiko-dev-server` — Zod-object covering the vars read by framework-core: `PORT` (default `"3000"`), `DATABASE_URL`, `REDIS_URL`, `KUMIKO_INSTANCE_ID`, `KUMIKO_SKIP_ES_OPS`. `DATABASE_URL` + `REDIS_URL` carry `.meta({ kumiko: { pulumi: { secret: true } } })` so `KUMIKO_DRY_RUN_ENV=pulumi` emits `--secret` flags. Plus `FrameworkCoreEnv` type via `z.infer`. `NODE_ENV` is excluded: build-prod-bundle inlines it as a literal at build-time (esbuild define), so runtime env-validation can't observe it.
|
|
143
|
-
- `composeEnvSchema({ core, features, extend, optionalFeatures })` accepts a new `core?` option. Keys from `core` are tagged with source `"framework-core"` in the resulting sources map and in `KumikoBootError.format()` output. Conflict detection runs across core/features/extend — a feature or `extend` block that re-declares a core var throws `KumikoBootError` at compose-time.
|
|
144
|
-
|
|
145
|
-
**Why:** Phase 1 of the Sprint 9 env-schema migration (`kumiko-studio/docs/plans/sprint-9-env-schemas.md`). Apps wire `composeEnvSchema({ core: frameworkCoreEnvSchema, features, extend })` into `runProdApp` to get aggregated boot-validation for the vars that framework-core reads. `KUMIKO_DRY_RUN_ENV=pulumi|k8s` then enumerates them with source attribution per row — operators see "(framework-core)" next to `DATABASE_URL` rather than guessing whether the framework or the app is the consumer.
|
|
146
|
-
|
|
147
|
-
**Backward-compat:** Purely additive. `runProdApp`'s existing `requireEnv("DATABASE_URL")` / `process.env["KUMIKO_INSTANCE_ID"]` reads remain unchanged. Apps that don't pass `envSchema` behave exactly as before.
|
|
148
|
-
|
|
149
|
-
**Feature-specific vars (Phase 2):** `JWT_SECRET` (auth-email-password), `KUMIKO_SECRETS_MASTER_KEY_*` (secrets), `SMTP_*` (channel-email-smtp), `STRIPE_*` / `MOLLIE_*` (subscription-\*) stay scoped to their owning feature's `r.envSchema()` and are NOT in `frameworkCoreEnvSchema`.
|
|
150
|
-
|
|
151
|
-
- dff4123: Add Zod-based env-schema declarations and boot-time validation (Sprint 9.1).
|
|
152
|
-
|
|
153
|
-
**New API:**
|
|
154
|
-
|
|
155
|
-
- `r.envSchema(z.object({...}))` — declare per-feature env-vars at registration time.
|
|
156
|
-
- `@cosmicdrift/kumiko-framework/env`: `composeEnvSchema({features, extend, optionalFeatures})` merges feature schemas into one app-wide schema, returning `{schema, sources}`. `parseEnv(schema, env, {sources, pulumiPrefix})` validates `process.env` and throws `KumikoBootError` listing ALL problems at once (aggregated, not first-fail).
|
|
157
|
-
- `@cosmicdrift/kumiko-framework/env/dry-run`: `renderDryRun(composed, mode, opts)` for `human|json|pulumi|k8s` introspection of the required env-vars without booting.
|
|
158
|
-
- `runProdApp({envSchema, pulumiPrefix, bootErrorReporter, envSource})` runs schema validation before any DB/Redis connection. `KUMIKO_DRY_RUN_ENV=1|human|json|pulumi|k8s` prints the inventory and exits.
|
|
159
|
-
- Per-var metadata via Zod's `.meta({ kumiko: { pulumi: { name, generator, secret } } })` for deploy-time tooling overrides.
|
|
160
|
-
|
|
161
|
-
**Backward-compat:** Apps without `envSchema` keep working — existing `requireEnv("DATABASE_URL")` calls in `runProdApp` are untouched. Sprint-9.2-9.5 migrates framework + bundled-features + apps to schema-only env handling.
|
|
162
|
-
|
|
163
|
-
**Why:** 2026-05-21 Studio deploy stacked 7 hacks chasing missing env-vars (10+ pipeline-fail iterations, ended in rollback). Schema-first boot validation surfaces ALL misconfigs upfront with `pulumi config set …` suggestions, replacing the discover-by-failing loop with a single dry-run + secrets-bootstrap pass.
|
|
164
|
-
|
|
165
|
-
## 0.7.0
|
|
166
|
-
|
|
167
|
-
### Minor Changes
|
|
168
|
-
|
|
169
|
-
- bcf43b6: es-ops: `SeedMembershipRow` exposes `streamTenantId` (stream-tenant aus `kumiko_events.v1`) neben dem payload-`tenantId`. Seed-Authors müssen den `kumiko_events`-JOIN nicht mehr selbst bauen — `m.streamTenantId` ist der korrekte Wert für `systemWriteAs`'s `tenantIdOverride` wenn das Aggregate von einem fremden Executor angelegt wurde (typisches `seedTenantMembership(by=systemAdmin)`-Pattern).
|
|
170
|
-
|
|
171
|
-
## 0.6.0
|
|
172
|
-
|
|
173
|
-
### Minor Changes
|
|
174
|
-
|
|
175
|
-
- 8489d18: feat(es-ops): Phase 1.5 — tenantIdOverride + dry-run-validator + E2E-Test + Doku
|
|
176
|
-
|
|
177
|
-
Phase 1.5 schließt die Lücken aus Phase 1 die den ersten Driver-Use-Case
|
|
178
|
-
(publicstatus admin-roles) blockten. Siehe Retro:
|
|
179
|
-
`kumiko-platform/docs/plans/features/es-ops-phase1-retro.md` (PR #9).
|
|
180
|
-
|
|
181
|
-
**A1 — tenantIdOverride:**
|
|
182
|
-
`SeedMigrationContext.systemWriteAs(qn, payload, tenantIdOverride?)`.
|
|
183
|
-
Default SYSTEM_TENANT_ID (unverändert für System-scope-Aggregates wie
|
|
184
|
-
config-values). Mit override: `createSystemUser(tenantIdOverride)` als
|
|
185
|
-
Executor, damit der Event-Store-Executor den Aggregate-Stream im
|
|
186
|
-
richtigen Tenant findet. Fix für die `version_conflict`-Klasse-Bug
|
|
187
|
-
(Memory `feedback_event_store_tenant_consistency.md`).
|
|
188
|
-
|
|
189
|
-
**A2 — dry-run-validator:**
|
|
190
|
-
Runner parsed seed-files vor `migration.run()` per regex
|
|
191
|
-
`systemWriteAs\(["']([^"']+)["']`, sammelt handler-QNs, validiert
|
|
192
|
-
gegen `registry.getWriteHandler(qn)`. Fail-fast mit klarer Message
|
|
193
|
-
|
|
194
|
-
- Datei + QN statt zur Runtime "handler not found". Catched camelCase-
|
|
195
|
-
typos (kebab-case-vs-camelCase Drift) + andere QN-Drift zur Boot-Zeit.
|
|
196
|
-
runProdApp reicht den richtigen Registry rein (`registry` neu in
|
|
197
|
-
RunPendingSeedMigrationsArgs).
|
|
198
|
-
|
|
199
|
-
**A3 — E2E-Test:**
|
|
200
|
-
`packages/bundled-features/src/__tests__/es-ops-e2e.integration.ts`
|
|
201
|
-
mit `setupTestStack`-Pattern: tenant+config Features echt geladen,
|
|
202
|
-
echtes Membership-Aggregate via TenantHandlers.addMember im Demo-Tenant,
|
|
203
|
-
seed-migration ruft update-member-roles mit tenantIdOverride → write
|
|
204
|
-
geht durch, Marker landed, Event in Store, Read-Model aktualisiert.
|
|
205
|
-
Plus typo-Test: seed mit camelCase fail-t Dry-Run mit
|
|
206
|
-
`/dry-run found.*unknown handler-QN/`. **TDD-First**: ohne A1+A2 wäre
|
|
207
|
-
der test rot.
|
|
208
|
-
|
|
209
|
-
**A4 — Doku:**
|
|
210
|
-
`framework/src/es-ops/README.md` erweitert um „Wann brauche ich
|
|
211
|
-
tenantIdOverride?" + „Deployment-Anforderungen" (Docker COPY, Idempotenz,
|
|
212
|
-
Multi-Replica) + „Lokaler Smoke vor Push". Recipe-README + seed-files
|
|
213
|
-
auf neue API aktualisiert.
|
|
214
|
-
|
|
215
|
-
**A5 — Smoke-Skript-Template:**
|
|
216
|
-
`samples/recipes/seed-migration/scripts/smoke.ts` als copy-paste-Template
|
|
217
|
-
für App-Authors: Bun-runnable, offline (read-only, kein DB-Write),
|
|
218
|
-
validiert Module-Load + QN-Resolution + System-User-Access. Recipe-
|
|
219
|
-
README dokumentiert Pflicht-Pattern.
|
|
220
|
-
|
|
221
|
-
**Bonus-Fix:**
|
|
222
|
-
`tenant:write:create`-access auf `["system", "SystemAdmin"]` erweitert
|
|
223
|
-
(symmetrisch zu update-member-roles). Aufgedeckt durch Recipe-Smoke +
|
|
224
|
-
initial-tenants-Seed. Pinning-Test in `tenant.integration.ts` updated.
|
|
225
|
-
|
|
226
|
-
**Test-State:** 45/45 grün (Pre-Push). Typecheck clean. Biome clean.
|
|
227
|
-
as-cast-Audit clean. Guard-silent-skip clean. Recipe-Smoke clean.
|
|
228
|
-
|
|
229
|
-
**Folge-Step (separater PR):** publicstatus driver-sample reaktivieren
|
|
230
|
-
mit lokalem Pre-Push-Smoke gegen publicstatus' echtes Feature-Set.
|
|
231
|
-
|
|
232
|
-
## 0.5.2
|
|
233
|
-
|
|
234
|
-
### Patch Changes
|
|
235
|
-
|
|
236
|
-
- 4f0d781: fix(tenant): updateMemberRoles erlaubt "system"-Rolle (symmetrisch zu create)
|
|
237
|
-
|
|
238
|
-
Drift innerhalb des tenant-Features: `tenant:write:create` akzeptierte
|
|
239
|
-
`["system", "SystemAdmin"]`, `tenant:write:update-member-roles` aber
|
|
240
|
-
nur `["SystemAdmin"]`. Konsequenz: ops-tooling und seed-migrations
|
|
241
|
-
(`createSystemUser` mit `roles: ["system"]`) konnten den Handler nicht
|
|
242
|
-
aufrufen — `access_denied`.
|
|
243
|
-
|
|
244
|
-
Live entdeckt beim ersten Driver-Sample der es-ops Phase 1: publicstatus
|
|
245
|
-
seed `2026-05-20-fix-admin-roles.ts` rief `update-member-roles` via
|
|
246
|
-
`systemWriteAs` → access_denied → Pod CrashLoopBackOff.
|
|
247
|
-
|
|
248
|
-
Plus access-rule-Pinning-Test in `tenant.integration.ts`-scenario-7.
|
|
249
|
-
|
|
250
|
-
## 0.5.1
|
|
251
|
-
|
|
252
|
-
### Patch Changes
|
|
253
|
-
|
|
254
|
-
- 0e00015: fix(es-ops): path.resolve statt path.join für seedsDir → seed-files
|
|
255
|
-
|
|
256
|
-
Bun's `await import()` braucht absolute Pfade. Wenn der App-Author
|
|
257
|
-
`runProdApp({ seedsDir: "./seeds" })` setzt (relativ), würde
|
|
258
|
-
`path.join("./seeds", "foo.ts")` einen relativen Pfad liefern → Bun's
|
|
259
|
-
Import-Resolver such relativ zum `runner.ts`-Modul (nicht zum
|
|
260
|
-
`process.cwd()`) → `Cannot find module 'seeds/...' from '<runner-path>'`.
|
|
261
|
-
|
|
262
|
-
`path.resolve` löst gegen `process.cwd()` auf → absolute Pfade →
|
|
263
|
-
Import funktioniert. Aufgedeckt beim ersten Live-Boot der publicstatus-
|
|
264
|
-
Driver-Migration (Pod CrashLoopBackOff).
|
|
265
|
-
|
|
266
|
-
## 0.5.0
|
|
267
|
-
|
|
268
|
-
### Minor Changes
|
|
269
|
-
|
|
270
|
-
- 7ff69ab: feat(es-ops): Phase 1 — file-based seed-migrations
|
|
271
|
-
|
|
272
|
-
Neues first-class Operations-Pattern fürs Framework. Liefert `seed-migrations`
|
|
273
|
-
als drizzle-migrate-equivalent für Event-Sourcing-Aggregate-Updates die
|
|
274
|
-
idempotent-Seeder nicht erfassen können (z.B. „Member hat schon eine
|
|
275
|
-
Rolle, aber jetzt soll noch eine dazukommen").
|
|
276
|
-
|
|
277
|
-
Public-API:
|
|
278
|
-
|
|
279
|
-
- `runProdApp({ seedsDir })` — Auto-apply pending Migrations beim Boot
|
|
280
|
-
- `SeedMigration`-Interface (default-Export einer `seeds/<id>.ts`-File)
|
|
281
|
-
- `SeedMigrationContext` mit `systemWriteAs` (ruft existing write-handler
|
|
282
|
-
als System-User) + Read-Helpers (`findUserByEmail`,
|
|
283
|
-
`findMembershipsOfUser`, `findTenants`)
|
|
284
|
-
- CLI: `bunx kumiko ops seed:new|status|apply`
|
|
285
|
-
- Tracking-Table `kumiko_es_operations` mit `operation_type`-Discriminator
|
|
286
|
-
(vorbereitet auf Phase 2+ Operations: projection-rebuild, event-replay,
|
|
287
|
-
stream-migration, ...)
|
|
288
|
-
- Env-Flags: `KUMIKO_SKIP_ES_OPS=1` (alle skippen für Recovery),
|
|
289
|
-
`KUMIKO_SKIP_ES_OPS_<ID>=1` (einzelne kaputte skippen)
|
|
290
|
-
|
|
291
|
-
Garantien: single-run via tracking, atomic via per-migration-Tx,
|
|
292
|
-
chronological order via filename-prefix, fail-stop bei Failure (kein
|
|
293
|
-
Partial-Apply), ES-konform via Handler-Dispatch.
|
|
294
|
-
|
|
295
|
-
Sub-path-Export: `@cosmicdrift/kumiko-framework/es-ops`
|
|
296
|
-
|
|
297
|
-
Plan-Doc: `kumiko-platform/docs/plans/features/es-ops.md`
|
|
298
|
-
Recipe: `samples/recipes/seed-migration/`
|
|
299
|
-
Driver-Use-Case: publicstatus admin-roles-drift (parallel-Branch
|
|
300
|
-
`feat/es-ops-driver-admin-roles`).
|
|
301
|
-
|
|
302
|
-
Phase 2+ skizziert + offen markiert — Implementation pro Use-Case.
|
|
303
|
-
|
|
304
|
-
## 0.4.1
|
|
305
|
-
|
|
306
|
-
### Patch Changes
|
|
307
|
-
|
|
308
|
-
- 010b410: feat(auth-email-password): "Bestätigungs-Mail erneut senden" im LoginScreen
|
|
309
|
-
|
|
310
|
-
LoginScreen bietet bei reason=email_not_verified jetzt einen Resend-Link
|
|
311
|
-
im Fehler-Banner — der existierende `requestEmailVerification`-Endpoint
|
|
312
|
-
wird direkt aufgerufen, der Banner wechselt nach Erfolg zum Info-Variant
|
|
313
|
-
("Wir haben dir eine neue Bestätigungs-Mail geschickt.").
|
|
314
|
-
|
|
315
|
-
UX-Details:
|
|
316
|
-
|
|
317
|
-
- Bei 429 → inline-Hint "Bitte warte kurz und versuche es erneut."
|
|
318
|
-
- Bei Netzwerk/sonstigen Fehlern → inline-Hint "Konnte nicht senden."
|
|
319
|
-
- Anti-Typo-Gate: ändert der User die Email-Eingabe nach dem Login-Fail,
|
|
320
|
-
verschwindet der Resend-Link — sonst würde Resend silent-success an die
|
|
321
|
-
geänderte (potentiell typoed) Adresse gehen ohne User-Feedback.
|
|
322
|
-
- Andere Failure-Codes (invalid_credentials etc.) zeigen weiterhin keinen
|
|
323
|
-
Resend-Link.
|
|
324
|
-
|
|
325
|
-
i18n: 4 neue Keys (DE+EN) im `auth.login.resend*`-Namespace, additive.
|
|
326
|
-
Apps die ihre Translations override-en müssen nichts ändern.
|
|
327
|
-
|
|
328
|
-
Additive UI-Feature — keine API-Breaks, keine Schema-Migration.
|
|
329
|
-
|
|
330
|
-
## 0.4.0
|
|
331
|
-
|
|
332
|
-
### Minor Changes
|
|
333
|
-
|
|
334
|
-
- 825e7d2: Visual-Tree V.1.4 → V.1.6 — Feature-complete Editor + Folder-Hierarchy + Roving-tabindex.
|
|
335
|
-
|
|
336
|
-
**V.1.4** — explicit `folder?: string` Schema-Field auf text-block-entity. Slug bleibt
|
|
337
|
-
kebab-only validiert, Folder explizit gesetzt. Tree gruppiert via `groupBlocksByFolder`
|
|
338
|
-
(ersetzt `groupBlocksBySlugPrefix`). `Subscribe<T>` Signature um optional `emitError`
|
|
339
|
-
erweitert für explicit async-error-Pfade. ProviderBranch zeigt Error-Banner mit
|
|
340
|
-
Retry-Button. Drift-Test pinnt seedTextBlock-vs-set.write Slug-Validation.
|
|
341
|
-
|
|
342
|
-
**V.1.4b** — URL-State-Routing für Editor-Target via `nav.searchParams`. F5 + Back-Button
|
|
343
|
-
stellen den Editor-State wieder her. Format: `?t=text-content:edit&a_slug=...&a_lang=...`.
|
|
344
|
-
Plus `useDispatchTarget` hook ersetzt globalen `dispatchTarget` als empfohlenen Production-
|
|
345
|
-
Pfad (legacy bleibt für Test-Hooks).
|
|
346
|
-
|
|
347
|
-
**V.1.5** — Arrow-Key-Navigation (`<aside role="tree">`, ARIA-tree-Pattern) + SSE-driven
|
|
348
|
-
Tree-Refresh. `ClientFeatureDefinition.treeEntities?: string[]` listet Entity-Namen pro
|
|
349
|
-
Provider; live-events triggern provider-re-mount → Stale-Tree-state="stub"→"filled"
|
|
350
|
-
flippt nach save automatisch.
|
|
351
|
-
|
|
352
|
-
**V.1.5c+d** — Active-Node-Highlight (explicit blue + 2px border-l + scrollIntoView),
|
|
353
|
-
VS-Code-Polish (compact spacing, focus-visible, folder-icon-color text-amber, indent-
|
|
354
|
-
guides per ancestor-depth), Folder-Wrapper für legal-pages ("📁 Legal" + slug-first
|
|
355
|
-
Verschachtelung) und text-content ("📁 Content").
|
|
356
|
-
|
|
357
|
-
**V.1.6** — Multi-level Folder-Splitting (`folder="page/marketing"` → nested folders,
|
|
358
|
-
walk-or-create-pattern, folder/leaf-collision-tolerant). Roving-tabindex (nur focused-
|
|
359
|
-
treeitem hat tabIndex=0, Tab cyclt aus dem Tree raus).
|
|
360
|
-
|
|
361
|
-
35/35 kumiko check PASS, 13/13 group-blocks + 22/22 text-content integration tests grün.
|
|
362
|
-
Browser + Keyboard lokal validated.
|
|
363
|
-
|
|
364
|
-
**Breaking**: `TreeContext` Type entfernt (V.1.2 SR2-Rip — war nie genutzt). Provider sind
|
|
365
|
-
session-bound: `TreeChildrenSubscribe = () => Subscribe<T>` statt `(ctx) => Subscribe<T>`.
|
|
366
|
-
|
|
367
|
-
**V.1.7-Followups**: useEffect-deps in VisualTree-focus-init (Performance), Cancellation-
|
|
368
|
-
Token in TreeProvider's fetch (emit-after-unmount-warning), inline-rename, drag-drop,
|
|
369
|
-
file-icons per slug-extension, parent-jump bei ArrowLeft auf collapsed-item.
|
|
370
|
-
|
|
371
|
-
## 0.3.0
|
|
372
|
-
|
|
373
|
-
### Minor Changes
|
|
374
|
-
|
|
375
|
-
- 0.3.0 bringt zwei neue Subsysteme (Step-Engine Tier-3 + Visual-Tree) plus
|
|
376
|
-
eine AST-Codemod-Pipeline als Vorarbeit für den L2-AI-Layer.
|
|
377
|
-
|
|
378
|
-
### Breaking Changes
|
|
379
|
-
|
|
380
|
-
- `skipTransitionGuard` → `unsafeSkipTransitionGuard` (Rename in
|
|
381
|
-
feature-ast + engine). Der `unsafe`-Prefix macht die Tragweite des
|
|
382
|
-
Casts sichtbar und ist konsistent zur `unsafeProjectionUpsert`- und
|
|
383
|
-
`r.rawTable`-Konvention. Migration: 1:1-Ersetzung, keine Verhaltens-Änderung.
|
|
384
|
-
|
|
385
|
-
### Features
|
|
386
|
-
|
|
387
|
-
- **Step-Engine M.4 — Tier-3 Workflow-Engine.** Neue Step-Vocabulary
|
|
388
|
-
`wait`, `waitForEvent`, `retry` ermöglicht persistierte Long-Running-Flows
|
|
389
|
-
über Job-Boundaries hinweg. Q7 Snapshot-at-Start hängt jedem Step-Run
|
|
390
|
-
einen SHA-256-Fingerprint des Aggregat-Zustands an, sodass Replays
|
|
391
|
-
deterministisch gegen den ursprünglichen Eingangszustand laufen.
|
|
392
|
-
- **Visual-Tree V.1.x — Tree-API + Editor-Panel.** Neue `VisualTree`-
|
|
393
|
-
Component plus TreeProvider-Pattern; erste TreeProviders für
|
|
394
|
-
`text-content` und `legal-pages` (CMS-light + Impressum/Privacy).
|
|
395
|
-
Fundament für den späteren No-Code-Designer (~3000 LOC, 98 Tests).
|
|
396
|
-
- **Codemod-Pipeline.** AST-basierte Patcher-Module für strukturelle
|
|
397
|
-
Feature-Edits — wird vom kommenden L2-AI-Layer als Tool-Surface
|
|
398
|
-
verwendet, ist aber eigenständig nutzbar für ts-morph-style Migrationen.
|
|
399
|
-
- **user-data-rights Sample-Recipe.** DSGVO Art. 15/17/18/20 vollständig
|
|
400
|
-
als Sample-Recipe (`samples/recipes/`) inklusive README — zeigt die
|
|
401
|
-
Export- und Forget-Pipeline gegen den `compliance-profiles`-Default
|
|
402
|
-
(`eu-dsgvo`).
|
|
403
|
-
|
|
404
|
-
### Fixes
|
|
405
|
-
|
|
406
|
-
- `tier-engine`: auto-default-tier-Hook benutzt jetzt `ctx.db.raw` für
|
|
407
|
-
Event-Store-Operationen (#37, vorher: stiller Bug, 22 Tage live).
|
|
408
|
-
- `engine`: unsafe-projection-upsert nutzt `as never` statt `as any` —
|
|
409
|
-
schmaler Cast-Surface, weniger Compiler-Knebel.
|
|
410
|
-
- `visual-tree`: runtime-isolation marker für client-konsumierte Files,
|
|
411
|
-
damit der Multi-Entry-Build den richtigen Bundle-Split bekommt.
|
|
412
|
-
- `feature-ast`: vollständiger `unsafeSkipTransitionGuard`-Rename (war
|
|
413
|
-
in zwei Modulen noch der alte Name).
|
|
414
|
-
- `framework`: Error-Reasons + `noConsole`-Lint + No-Date-API-Guard
|
|
415
|
-
wieder push-ready.
|
|
416
|
-
|
|
417
|
-
### Library-Updates
|
|
418
|
-
|
|
419
|
-
hono 4.12, jose 6.2, stripe 22.1, meilisearch 0.58, marked 18,
|
|
420
|
-
bun-types 1.3.13, lucide-react 1.14, bullmq 5.76, ioredis 5.10,
|
|
421
|
-
i18next 26.0, react + radix-ui-primitives auf aktuelle Minors.
|
|
422
|
-
|
|
423
|
-
## 0.2.3
|
|
424
|
-
|
|
425
|
-
## 0.2.2
|
|
426
|
-
|
|
427
|
-
### Patch Changes
|
|
428
|
-
|
|
429
|
-
- 7a7da3e: Re-publish 0.2.1 → 0.2.2 mit korrekt aufgelösten cross-package-Versionen.
|
|
430
|
-
0.2.1 hatte `workspace:*` als Wert in den dependencies (npm publish ohne
|
|
431
|
-
yarn-pack rewrite), Konsumenten bekamen "Workspace not found".
|
|
432
|
-
|
|
433
|
-
publish-with-oidc.sh nutzt jetzt `yarn pack` (rewrited workspace:\*) +
|
|
434
|
-
`npm publish <tarball>` (OIDC + provenance).
|
|
435
|
-
|
|
436
|
-
## 0.2.1
|
|
437
|
-
|
|
438
|
-
### Patch Changes
|
|
439
|
-
|
|
440
|
-
- 48b7f6a: CI: switch publish to npm-CLI with OIDC Trusted Publishing + provenance.
|
|
441
|
-
No source changes — verifies the new publish path produces a verified-
|
|
442
|
-
provenance attestation on npmjs.com instead of token-based publish.
|
|
443
|
-
|
|
444
|
-
## 0.2.0
|
|
445
|
-
|
|
446
|
-
### Minor Changes
|
|
447
|
-
|
|
448
|
-
- 6c70b6f: fix(tenant): seedTenant idempotent gegen Event-Store-Projection-Drift.
|
|
449
|
-
|
|
450
|
-
Verhindert version_conflict beim App-Boot wenn Aggregat existiert aber
|
|
451
|
-
Projection-Row fehlt (rebuild-drift, async-lag, manueller DB-Eingriff).
|
|
452
|
-
|
|
453
|
-
## 0.1.0
|
|
454
|
-
|
|
455
|
-
### Minor Changes
|
|
456
|
-
|
|
457
|
-
- 59ba6d7: Initial public release of Kumiko — AI-native backend builder.
|
|
458
|
-
|
|
459
|
-
What ships in 0.1.0:
|
|
460
|
-
|
|
461
|
-
- **Engine** (`@cosmicdrift/kumiko-framework`): `defineFeature`, `r.entity`, `r.writeHandler`, `r.queryHandler`, `r.projection`, `r.multiStreamProjection`, `r.hook`, `r.translations`, `r.crud`, `r.referenceData`, `r.screen`, `r.nav`, `r.authClaims`, full lifecycle pipeline with field-level access checks
|
|
462
|
-
- **Pipeline** (`@cosmicdrift/kumiko-framework`): `createDispatcher`, JWT auth via jose, Zod schema validation, role-based access checks, command/write/query split
|
|
463
|
-
- **DB** (`@cosmicdrift/kumiko-framework`): Drizzle helpers (`buildDrizzleTable`, `applyCursorQuery`), CRUD executor, Postgres dialect, optimistic locking, soft delete, multi-tenant scoping
|
|
464
|
-
- **Event sourcing** (`@cosmicdrift/kumiko-framework`): aggregate streams, single + multi-stream projections, event upcasters, asOf queries, archive support, AsyncDaemon-pattern dispatcher
|
|
465
|
-
- **Bundled features** (`@cosmicdrift/kumiko-bundled-features`): auth-email-password, sessions, tenants, users, jobs, secrets, file-provider-s3, mail-transport-smtp/inmemory, billing-foundation, cap-counter, channel-in-app, delivery, feature-toggles, legal-pages
|
|
466
|
-
- **Renderer** (`@cosmicdrift/kumiko-renderer`, `@cosmicdrift/kumiko-renderer-web`): schema-driven CRUD UI for React + Expo Web, override paths, list debounce, theme tokens
|
|
467
|
-
- **Headless** (`@cosmicdrift/kumiko-headless`): view-models for list/edit screens, locale-aware
|
|
468
|
-
- **Dev server** (`@cosmicdrift/kumiko-dev-server`): `runDevApp`, `runProdApp`, `kumiko-build` for production bundles (client + server), Docker-ready
|
|
469
|
-
- **Realtime** (`@cosmicdrift/kumiko-dispatcher-live`): SSE broadcast across tenants, Redis Pub/Sub backend
|
|
470
|
-
- **CLI** (`bin/kumiko.ts`): interactive dev menu, test runners, check pipeline (Biome + TypeScript + 18 guards + Vitest)
|
|
471
|
-
|
|
472
|
-
This is a pre-1.0 release — APIs may change between minor versions. Breaking changes will be documented per release.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Cursor encoding pinst dass UUID + Integer-IDs beide den gleichen
|
|
2
|
-
// Pfad nehmen — vorher hat decodeCursor mit Number.parseInt versucht
|
|
3
|
-
// einen UUID zu number zu casten und zurück NaN gegeben, der DB-WHERE-
|
|
4
|
-
// Clause hat dann auf "id > NaN" gequeryt → Postgres-Crash. UUIDs
|
|
5
|
-
// sind aktuell der Default (Sprint F idType=uuid), also war cursor-
|
|
6
|
-
// Pagination strukturell broken vor diesem Fix.
|
|
7
|
-
|
|
8
|
-
import { describe, expect, test } from "vitest";
|
|
9
|
-
import { decodeCursor, encodeCursor } from "../cursor";
|
|
10
|
-
|
|
11
|
-
describe("encodeCursor + decodeCursor", () => {
|
|
12
|
-
test("UUIDv7-Roundtrip: encoded → decoded gibt denselben UUID-String", () => {
|
|
13
|
-
const uuid = "019dcd94-d6b9-742c-9a3c-43d7972f6243";
|
|
14
|
-
expect(decodeCursor(encodeCursor(uuid))).toBe(uuid);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
test("Integer-Roundtrip: encoded → decoded gibt String-Form (kompatibel)", () => {
|
|
18
|
-
// String/number als Input erlaubt; output ist immer String. PG
|
|
19
|
-
// castet beim WHERE id > '42' selbst auf integer-Spalten korrekt.
|
|
20
|
-
expect(decodeCursor(encodeCursor(42))).toBe("42");
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
test("encoded String ist URL-safe base64 (kein /, +, =)", () => {
|
|
24
|
-
const encoded = encodeCursor("019dcd94-d6b9-742c-9a3c-43d7972f6243");
|
|
25
|
-
expect(encoded).not.toMatch(/[/+=]/);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test("Leerer Cursor (corrupted base64): wirft Invalid-cursor-Error", () => {
|
|
29
|
-
expect(() => decodeCursor("")).toThrow(/Invalid cursor/);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
test("UUIDs sind lexikografisch sort-stabil (UUIDv7-Voraussetzung)", () => {
|
|
33
|
-
// Cursor-Pagination erwartet dass `gt(id, last-id)` die nächste Seite
|
|
34
|
-
// liefert. Bei UUIDv7 ist das time-ordered, also lexikografisch
|
|
35
|
-
// monoton mit Insert-Reihenfolge. Hier nur eine String-Compare-
|
|
36
|
-
// Sanity-Check — die DB-Seite glaubt das default-mäßig.
|
|
37
|
-
const a = "019dcd94-0000-742c-0000-000000000001";
|
|
38
|
-
const b = "019dcd95-0000-742c-0000-000000000002";
|
|
39
|
-
expect(b > a).toBe(true);
|
|
40
|
-
});
|
|
41
|
-
});
|