@opensaas/stack-core 0.43.0 → 0.44.0-alpha.1
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/CHANGELOG.md +2720 -0
- package/README.md +182 -115
- package/dist/.build-hash +1 -0
- package/dist/access/declared-dependencies.d.ts +102 -88
- package/dist/access/declared-dependencies.d.ts.map +1 -1
- package/dist/access/declared-dependencies.js +83 -71
- package/dist/access/declared-dependencies.js.map +1 -1
- package/dist/access/depth-limits.d.ts +4 -0
- package/dist/access/depth-limits.d.ts.map +1 -1
- package/dist/access/depth-limits.js +4 -0
- package/dist/access/depth-limits.js.map +1 -1
- package/dist/access/engine.d.ts +68 -20
- package/dist/access/engine.d.ts.map +1 -1
- package/dist/access/engine.js +151 -37
- package/dist/access/engine.js.map +1 -1
- package/dist/access/errors.d.ts +33 -48
- package/dist/access/errors.d.ts.map +1 -1
- package/dist/access/errors.js +73 -63
- package/dist/access/errors.js.map +1 -1
- package/dist/access/field-access.d.ts +76 -5
- package/dist/access/field-access.d.ts.map +1 -1
- package/dist/access/field-access.js +235 -61
- package/dist/access/field-access.js.map +1 -1
- package/dist/access/field-visibility.d.ts +50 -4
- package/dist/access/field-visibility.d.ts.map +1 -1
- package/dist/access/field-visibility.js +143 -160
- package/dist/access/field-visibility.js.map +1 -1
- package/dist/access/index.d.ts +5 -12
- package/dist/access/index.d.ts.map +1 -1
- package/dist/access/index.js +6 -19
- package/dist/access/index.js.map +1 -1
- package/dist/access/orm-client.d.ts +19 -0
- package/dist/access/orm-client.d.ts.map +1 -0
- package/dist/access/orm-client.js +37 -0
- package/dist/access/orm-client.js.map +1 -0
- package/dist/access/query-validation.d.ts +7 -129
- package/dist/access/query-validation.d.ts.map +1 -1
- package/dist/access/query-validation.js +12 -314
- package/dist/access/query-validation.js.map +1 -1
- package/dist/access/system-fields.d.ts +2 -0
- package/dist/access/system-fields.d.ts.map +1 -0
- package/dist/access/system-fields.js +7 -0
- package/dist/access/system-fields.js.map +1 -0
- package/dist/access/transaction-registry.d.ts +25 -2
- package/dist/access/transaction-registry.d.ts.map +1 -1
- package/dist/access/transaction-registry.js +34 -17
- package/dist/access/transaction-registry.js.map +1 -1
- package/dist/access/types.d.ts +217 -131
- package/dist/access/types.d.ts.map +1 -1
- package/dist/config/field-kind.d.ts +66 -0
- package/dist/config/field-kind.d.ts.map +1 -0
- package/dist/config/field-kind.js +63 -0
- package/dist/config/field-kind.js.map +1 -0
- package/dist/config/hook-only-fields.d.ts +3 -0
- package/dist/config/hook-only-fields.d.ts.map +1 -0
- package/dist/config/hook-only-fields.js +17 -0
- package/dist/config/hook-only-fields.js.map +1 -0
- package/dist/config/index.d.ts +3 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +6 -3
- package/dist/config/index.js.map +1 -1
- package/dist/config/mcp-tool-names.d.ts +3 -0
- package/dist/config/mcp-tool-names.d.ts.map +1 -0
- package/dist/config/mcp-tool-names.js +25 -0
- package/dist/config/mcp-tool-names.js.map +1 -0
- package/dist/config/nav-count.d.ts.map +1 -1
- package/dist/config/nav-count.js +4 -4
- package/dist/config/nav-count.js.map +1 -1
- package/dist/config/plugin-engine.d.ts +8 -2
- package/dist/config/plugin-engine.d.ts.map +1 -1
- package/dist/config/plugin-engine.js +102 -38
- package/dist/config/plugin-engine.js.map +1 -1
- package/dist/config/types.d.ts +966 -614
- package/dist/config/types.d.ts.map +1 -1
- package/dist/context/apply-defaults.d.ts +18 -1
- package/dist/context/apply-defaults.d.ts.map +1 -1
- package/dist/context/apply-defaults.js +30 -4
- package/dist/context/apply-defaults.js.map +1 -1
- package/dist/context/engine-context.d.ts +73 -0
- package/dist/context/engine-context.d.ts.map +1 -0
- package/dist/context/engine-context.js +67 -0
- package/dist/context/engine-context.js.map +1 -0
- package/dist/context/hook-pipeline.d.ts +9 -2
- package/dist/context/hook-pipeline.d.ts.map +1 -1
- package/dist/context/hook-pipeline.js +5 -4
- package/dist/context/hook-pipeline.js.map +1 -1
- package/dist/context/index.d.ts +98 -89
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +917 -722
- package/dist/context/index.js.map +1 -1
- package/dist/context/junction.d.ts +59 -0
- package/dist/context/junction.d.ts.map +1 -0
- package/dist/context/junction.js +126 -0
- package/dist/context/junction.js.map +1 -0
- package/dist/context/plugin-field-read.d.ts +33 -0
- package/dist/context/plugin-field-read.d.ts.map +1 -0
- package/dist/context/plugin-field-read.js +41 -0
- package/dist/context/plugin-field-read.js.map +1 -0
- package/dist/context/plugin-field-write.d.ts +104 -0
- package/dist/context/plugin-field-write.d.ts.map +1 -0
- package/dist/context/plugin-field-write.js +184 -0
- package/dist/context/plugin-field-write.js.map +1 -0
- package/dist/context/relationship-input.d.ts +146 -0
- package/dist/context/relationship-input.d.ts.map +1 -0
- package/dist/context/relationship-input.js +453 -0
- package/dist/context/relationship-input.js.map +1 -0
- package/dist/context/transaction-boundary.d.ts +54 -28
- package/dist/context/transaction-boundary.d.ts.map +1 -1
- package/dist/context/transaction-boundary.js +87 -169
- package/dist/context/transaction-boundary.js.map +1 -1
- package/dist/context/write-pipeline.d.ts +33 -51
- package/dist/context/write-pipeline.d.ts.map +1 -1
- package/dist/context/write-pipeline.js +372 -185
- package/dist/context/write-pipeline.js.map +1 -1
- package/dist/contract/dependencies.d.ts +88 -0
- package/dist/contract/dependencies.d.ts.map +1 -0
- package/dist/contract/dependencies.js +237 -0
- package/dist/contract/dependencies.js.map +1 -0
- package/dist/contract/derive.d.ts +49 -0
- package/dist/contract/derive.d.ts.map +1 -0
- package/dist/contract/derive.js +540 -0
- package/dist/contract/derive.js.map +1 -0
- package/dist/contract/fixtures/contract-configs.d.ts +64 -0
- package/dist/contract/fixtures/contract-configs.d.ts.map +1 -0
- package/dist/contract/fixtures/contract-configs.js +345 -0
- package/dist/contract/fixtures/contract-configs.js.map +1 -0
- package/dist/contract/id-boundary.d.ts +53 -0
- package/dist/contract/id-boundary.d.ts.map +1 -0
- package/dist/contract/id-boundary.js +76 -0
- package/dist/contract/id-boundary.js.map +1 -0
- package/dist/contract/index.d.ts +8 -0
- package/dist/contract/index.d.ts.map +1 -0
- package/dist/contract/index.js +11 -0
- package/dist/contract/index.js.map +1 -0
- package/dist/contract/prisma.d.ts +58 -0
- package/dist/contract/prisma.d.ts.map +1 -0
- package/dist/contract/prisma.js +282 -0
- package/dist/contract/prisma.js.map +1 -0
- package/dist/contract/relation-graph.d.ts +70 -0
- package/dist/contract/relation-graph.d.ts.map +1 -0
- package/dist/contract/relation-graph.js +113 -0
- package/dist/contract/relation-graph.js.map +1 -0
- package/dist/contract/types.d.ts +135 -0
- package/dist/contract/types.d.ts.map +1 -0
- package/dist/contract/types.js +2 -0
- package/dist/contract/types.js.map +1 -0
- package/dist/db/client.d.ts +55 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +73 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/dev-database.d.ts +124 -0
- package/dist/db/dev-database.d.ts.map +1 -0
- package/dist/db/dev-database.js +291 -0
- package/dist/db/dev-database.js.map +1 -0
- package/dist/db/password-front.d.ts +10 -0
- package/dist/db/password-front.d.ts.map +1 -0
- package/dist/db/password-front.js +147 -0
- package/dist/db/password-front.js.map +1 -0
- package/dist/db/process-identity.d.ts +36 -0
- package/dist/db/process-identity.d.ts.map +1 -0
- package/dist/db/process-identity.js +114 -0
- package/dist/db/process-identity.js.map +1 -0
- package/dist/db/state-file.d.ts +54 -0
- package/dist/db/state-file.d.ts.map +1 -0
- package/dist/db/state-file.js +91 -0
- package/dist/db/state-file.js.map +1 -0
- package/dist/db/url.d.ts +89 -0
- package/dist/db/url.d.ts.map +1 -0
- package/dist/db/url.js +118 -0
- package/dist/db/url.js.map +1 -0
- package/dist/extend.d.ts +13 -2
- package/dist/extend.d.ts.map +1 -1
- package/dist/extend.js +24 -1
- package/dist/extend.js.map +1 -1
- package/dist/fields/index.d.ts +87 -42
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.js +457 -677
- package/dist/fields/index.js.map +1 -1
- package/dist/filter/collect.d.ts +3 -4
- package/dist/filter/collect.d.ts.map +1 -1
- package/dist/filter/collect.js +2 -2
- package/dist/filter/collect.js.map +1 -1
- package/dist/filter/index.d.ts +1 -2
- package/dist/filter/index.d.ts.map +1 -1
- package/dist/filter/index.js +0 -1
- package/dist/filter/index.js.map +1 -1
- package/dist/filter/map.d.ts +12 -5
- package/dist/filter/map.d.ts.map +1 -1
- package/dist/filter/map.js +47 -19
- package/dist/filter/map.js.map +1 -1
- package/dist/filter/types.d.ts +10 -24
- package/dist/filter/types.d.ts.map +1 -1
- package/dist/filter/types.js +2 -11
- package/dist/filter/types.js.map +1 -1
- package/dist/hooks/index.d.ts +22 -31
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +33 -37
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/transition-guard.d.ts +61 -0
- package/dist/hooks/transition-guard.d.ts.map +1 -0
- package/dist/hooks/transition-guard.js +93 -0
- package/dist/hooks/transition-guard.js.map +1 -0
- package/dist/index.d.ts +52 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -51
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +4 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +16 -0
- package/dist/internal.js.map +1 -1
- package/dist/lib/case-utils.d.ts +0 -1
- package/dist/lib/case-utils.d.ts.map +1 -1
- package/dist/lib/case-utils.js +0 -3
- package/dist/lib/case-utils.js.map +1 -1
- package/dist/lib/client-safe-error.d.ts +9 -0
- package/dist/lib/client-safe-error.d.ts.map +1 -0
- package/dist/lib/client-safe-error.js +23 -0
- package/dist/lib/client-safe-error.js.map +1 -0
- package/dist/lib/database-errors.d.ts +78 -0
- package/dist/lib/database-errors.d.ts.map +1 -0
- package/dist/lib/database-errors.js +148 -0
- package/dist/lib/database-errors.js.map +1 -0
- package/dist/lib/null-prototype-registry.d.ts +9 -0
- package/dist/lib/null-prototype-registry.d.ts.map +1 -0
- package/dist/lib/null-prototype-registry.js +11 -0
- package/dist/lib/null-prototype-registry.js.map +1 -0
- package/dist/lib/prisma-errors.d.ts +30 -32
- package/dist/lib/prisma-errors.d.ts.map +1 -1
- package/dist/lib/prisma-errors.js +86 -46
- package/dist/lib/prisma-errors.js.map +1 -1
- package/dist/lib/process-global.d.ts +23 -0
- package/dist/lib/process-global.d.ts.map +1 -0
- package/dist/lib/process-global.js +33 -0
- package/dist/lib/process-global.js.map +1 -0
- package/dist/lib/warn-once.d.ts +7 -0
- package/dist/lib/warn-once.d.ts.map +1 -0
- package/dist/lib/warn-once.js +13 -0
- package/dist/lib/warn-once.js.map +1 -0
- package/dist/mcp/advertise.d.ts +16 -0
- package/dist/mcp/advertise.d.ts.map +1 -0
- package/dist/mcp/advertise.js +25 -0
- package/dist/mcp/advertise.js.map +1 -0
- package/dist/mcp/arguments.d.ts +10 -0
- package/dist/mcp/arguments.d.ts.map +1 -0
- package/dist/mcp/arguments.js +143 -0
- package/dist/mcp/arguments.js.map +1 -0
- package/dist/mcp/field-schema.d.ts +50 -5
- package/dist/mcp/field-schema.d.ts.map +1 -1
- package/dist/mcp/field-schema.js +137 -14
- package/dist/mcp/field-schema.js.map +1 -1
- package/dist/mcp/handler.d.ts +16 -5
- package/dist/mcp/handler.d.ts.map +1 -1
- package/dist/mcp/handler.js +404 -126
- package/dist/mcp/handler.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/projection.d.ts +42 -34
- package/dist/mcp/projection.d.ts.map +1 -1
- package/dist/mcp/projection.js +246 -200
- package/dist/mcp/projection.js.map +1 -1
- package/dist/mcp/tool-error.d.ts +8 -0
- package/dist/mcp/tool-error.d.ts.map +1 -0
- package/dist/mcp/tool-error.js +11 -0
- package/dist/mcp/tool-error.js.map +1 -0
- package/dist/mcp/types.d.ts +3 -2
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/mcp/where-id-boundary.d.ts +28 -0
- package/dist/mcp/where-id-boundary.d.ts.map +1 -0
- package/dist/mcp/where-id-boundary.js +187 -0
- package/dist/mcp/where-id-boundary.js.map +1 -0
- package/dist/origin.d.ts +147 -0
- package/dist/origin.d.ts.map +1 -0
- package/dist/origin.js +191 -0
- package/dist/origin.js.map +1 -0
- package/dist/query/relationship-options.d.ts +35 -6
- package/dist/query/relationship-options.d.ts.map +1 -1
- package/dist/query/relationship-options.js +33 -23
- package/dist/query/relationship-options.js.map +1 -1
- package/dist/secured/aggregate.d.ts +32 -0
- package/dist/secured/aggregate.d.ts.map +1 -0
- package/dist/secured/aggregate.js +31 -0
- package/dist/secured/aggregate.js.map +1 -0
- package/dist/secured/include.d.ts +320 -0
- package/dist/secured/include.d.ts.map +1 -0
- package/dist/secured/include.js +650 -0
- package/dist/secured/include.js.map +1 -0
- package/dist/secured/lock.d.ts +127 -0
- package/dist/secured/lock.d.ts.map +1 -0
- package/dist/secured/lock.js +275 -0
- package/dist/secured/lock.js.map +1 -0
- package/dist/secured/lower.d.ts +82 -0
- package/dist/secured/lower.d.ts.map +1 -0
- package/dist/secured/lower.js +162 -0
- package/dist/secured/lower.js.map +1 -0
- package/dist/secured/operators.d.ts +7 -0
- package/dist/secured/operators.d.ts.map +1 -0
- package/dist/secured/operators.js +18 -0
- package/dist/secured/operators.js.map +1 -0
- package/dist/secured/read.d.ts +208 -0
- package/dist/secured/read.d.ts.map +1 -0
- package/dist/secured/read.js +1245 -0
- package/dist/secured/read.js.map +1 -0
- package/dist/secured/select.d.ts +87 -0
- package/dist/secured/select.d.ts.map +1 -0
- package/dist/secured/select.js +250 -0
- package/dist/secured/select.js.map +1 -0
- package/dist/secured/vector.d.ts +58 -0
- package/dist/secured/vector.d.ts.map +1 -0
- package/dist/secured/vector.js +113 -0
- package/dist/secured/vector.js.map +1 -0
- package/dist/secured/vocabulary.d.ts +227 -0
- package/dist/secured/vocabulary.d.ts.map +1 -0
- package/dist/secured/vocabulary.js +578 -0
- package/dist/secured/vocabulary.js.map +1 -0
- package/dist/secured/write.d.ts +58 -0
- package/dist/secured/write.d.ts.map +1 -0
- package/dist/secured/write.js +87 -0
- package/dist/secured/write.js.map +1 -0
- package/dist/testing/context.d.ts +236 -0
- package/dist/testing/context.d.ts.map +1 -0
- package/dist/testing/context.js +457 -0
- package/dist/testing/context.js.map +1 -0
- package/dist/testing/escape.d.ts +83 -0
- package/dist/testing/escape.d.ts.map +1 -0
- package/dist/testing/escape.js +148 -0
- package/dist/testing/escape.js.map +1 -0
- package/dist/testing/extensions.d.ts +48 -0
- package/dist/testing/extensions.d.ts.map +1 -0
- package/dist/testing/extensions.js +107 -0
- package/dist/testing/extensions.js.map +1 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +11 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/plans.d.ts +64 -0
- package/dist/testing/plans.d.ts.map +1 -0
- package/dist/testing/plans.js +47 -0
- package/dist/testing/plans.js.map +1 -0
- package/dist/types/context.d.ts +110 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +2 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/contract.d.ts +198 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/contract.js +2 -0
- package/dist/types/contract.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/inputs.d.ts +83 -0
- package/dist/types/inputs.d.ts.map +1 -0
- package/dist/types/inputs.js +2 -0
- package/dist/types/inputs.js.map +1 -0
- package/dist/types/rows.d.ts +76 -0
- package/dist/types/rows.d.ts.map +1 -0
- package/dist/types/rows.js +2 -0
- package/dist/types/rows.js.map +1 -0
- package/dist/types/secured-list.d.ts +396 -0
- package/dist/types/secured-list.d.ts.map +1 -0
- package/dist/types/secured-list.js +2 -0
- package/dist/types/secured-list.js.map +1 -0
- package/dist/unsafe.d.ts +162 -0
- package/dist/unsafe.d.ts.map +1 -0
- package/dist/unsafe.js +177 -0
- package/dist/unsafe.js.map +1 -0
- package/dist/validation/config-refusal.d.ts +16 -0
- package/dist/validation/config-refusal.d.ts.map +1 -0
- package/dist/validation/config-refusal.js +2 -0
- package/dist/validation/config-refusal.js.map +1 -0
- package/dist/validation/database-config.d.ts +19 -0
- package/dist/validation/database-config.d.ts.map +1 -0
- package/dist/validation/database-config.js +221 -0
- package/dist/validation/database-config.js.map +1 -0
- package/dist/validation/default-value.d.ts +21 -0
- package/dist/validation/default-value.d.ts.map +1 -0
- package/dist/validation/default-value.js +72 -0
- package/dist/validation/default-value.js.map +1 -0
- package/dist/validation/extension-packs.d.ts +11 -0
- package/dist/validation/extension-packs.d.ts.map +1 -0
- package/dist/validation/extension-packs.js +53 -0
- package/dist/validation/extension-packs.js.map +1 -0
- package/dist/validation/field-config.d.ts +35 -21
- package/dist/validation/field-config.d.ts.map +1 -1
- package/dist/validation/field-config.js +51 -41
- package/dist/validation/field-config.js.map +1 -1
- package/dist/validation/field-names.d.ts +15 -0
- package/dist/validation/field-names.d.ts.map +1 -0
- package/dist/validation/field-names.js +155 -0
- package/dist/validation/field-names.js.map +1 -0
- package/dist/validation/identifier-names.d.ts +4 -0
- package/dist/validation/identifier-names.d.ts.map +1 -0
- package/dist/validation/identifier-names.js +39 -0
- package/dist/validation/identifier-names.js.map +1 -0
- package/dist/validation/needs-closure.d.ts +20 -30
- package/dist/validation/needs-closure.d.ts.map +1 -1
- package/dist/validation/needs-closure.js +29 -105
- package/dist/validation/needs-closure.js.map +1 -1
- package/dist/validation/relations.d.ts +17 -0
- package/dist/validation/relations.d.ts.map +1 -0
- package/dist/validation/relations.js +268 -0
- package/dist/validation/relations.js.map +1 -0
- package/dist/validation/schema.d.ts.map +1 -1
- package/dist/validation/schema.js +1 -3
- package/dist/validation/schema.js.map +1 -1
- package/dist/where/like.d.ts +32 -0
- package/dist/where/like.d.ts.map +1 -0
- package/dist/where/like.js +42 -0
- package/dist/where/like.js.map +1 -0
- package/package.json +70 -8
- package/.turbo/turbo-build.log +0 -4
- package/CLAUDE.md +0 -609
- package/dist/access/access-filter.d.ts +0 -241
- package/dist/access/access-filter.d.ts.map +0 -1
- package/dist/access/access-filter.js +0 -692
- package/dist/access/access-filter.js.map +0 -1
- package/dist/access/access-filter.test.d.ts +0 -2
- package/dist/access/access-filter.test.d.ts.map +0 -1
- package/dist/access/access-filter.test.js +0 -1256
- package/dist/access/access-filter.test.js.map +0 -1
- package/dist/access/declared-dependencies.test.d.ts +0 -2
- package/dist/access/declared-dependencies.test.d.ts.map +0 -1
- package/dist/access/declared-dependencies.test.js +0 -226
- package/dist/access/declared-dependencies.test.js.map +0 -1
- package/dist/access/denied-relation-visibility.test.d.ts +0 -2
- package/dist/access/denied-relation-visibility.test.d.ts.map +0 -1
- package/dist/access/denied-relation-visibility.test.js +0 -114
- package/dist/access/denied-relation-visibility.test.js.map +0 -1
- package/dist/access/engine.test.d.ts +0 -2
- package/dist/access/engine.test.d.ts.map +0 -1
- package/dist/access/engine.test.js +0 -56
- package/dist/access/engine.test.js.map +0 -1
- package/dist/access/field-access.test.d.ts +0 -2
- package/dist/access/field-access.test.d.ts.map +0 -1
- package/dist/access/field-access.test.js +0 -635
- package/dist/access/field-access.test.js.map +0 -1
- package/dist/access/multi-column-read-write.test.d.ts +0 -2
- package/dist/access/multi-column-read-write.test.d.ts.map +0 -1
- package/dist/access/multi-column-read-write.test.js +0 -183
- package/dist/access/multi-column-read-write.test.js.map +0 -1
- package/dist/access/relationship-count.d.ts +0 -98
- package/dist/access/relationship-count.d.ts.map +0 -1
- package/dist/access/relationship-count.js +0 -262
- package/dist/access/relationship-count.js.map +0 -1
- package/dist/access/relationship-count.test.d.ts +0 -2
- package/dist/access/relationship-count.test.d.ts.map +0 -1
- package/dist/access/relationship-count.test.js +0 -247
- package/dist/access/relationship-count.test.js.map +0 -1
- package/dist/access/relationship-label-filter.d.ts +0 -45
- package/dist/access/relationship-label-filter.d.ts.map +0 -1
- package/dist/access/relationship-label-filter.js +0 -22
- package/dist/access/relationship-label-filter.js.map +0 -1
- package/dist/access/relationship-label-filter.test.d.ts +0 -2
- package/dist/access/relationship-label-filter.test.d.ts.map +0 -1
- package/dist/access/relationship-label-filter.test.js +0 -89
- package/dist/access/relationship-label-filter.test.js.map +0 -1
- package/dist/access/synthetic-include-read.test.d.ts +0 -2
- package/dist/access/synthetic-include-read.test.d.ts.map +0 -1
- package/dist/access/synthetic-include-read.test.js +0 -121
- package/dist/access/synthetic-include-read.test.js.map +0 -1
- package/dist/context/nested-operations.d.ts +0 -74
- package/dist/context/nested-operations.d.ts.map +0 -1
- package/dist/context/nested-operations.js +0 -847
- package/dist/context/nested-operations.js.map +0 -1
- package/dist/fields/calendar-day.test.d.ts +0 -2
- package/dist/fields/calendar-day.test.d.ts.map +0 -1
- package/dist/fields/calendar-day.test.js +0 -246
- package/dist/fields/calendar-day.test.js.map +0 -1
- package/dist/fields/format-prisma-default.d.ts +0 -35
- package/dist/fields/format-prisma-default.d.ts.map +0 -1
- package/dist/fields/format-prisma-default.js +0 -49
- package/dist/fields/format-prisma-default.js.map +0 -1
- package/dist/fields/format-prisma-default.test.d.ts +0 -2
- package/dist/fields/format-prisma-default.test.d.ts.map +0 -1
- package/dist/fields/format-prisma-default.test.js +0 -54
- package/dist/fields/format-prisma-default.test.js.map +0 -1
- package/dist/fields/relationship-foreign-key.test.d.ts +0 -2
- package/dist/fields/relationship-foreign-key.test.d.ts.map +0 -1
- package/dist/fields/relationship-foreign-key.test.js +0 -18
- package/dist/fields/relationship-foreign-key.test.js.map +0 -1
- package/dist/fields/select.test.d.ts +0 -2
- package/dist/fields/select.test.d.ts.map +0 -1
- package/dist/fields/select.test.js +0 -279
- package/dist/fields/select.test.js.map +0 -1
- package/dist/fields/text-keystone-compat.test.d.ts +0 -2
- package/dist/fields/text-keystone-compat.test.d.ts.map +0 -1
- package/dist/fields/text-keystone-compat.test.js +0 -93
- package/dist/fields/text-keystone-compat.test.js.map +0 -1
- package/dist/filter/filter.test.d.ts +0 -2
- package/dist/filter/filter.test.d.ts.map +0 -1
- package/dist/filter/filter.test.js +0 -431
- package/dist/filter/filter.test.js.map +0 -1
- package/dist/filter/serialize.test.d.ts +0 -2
- package/dist/filter/serialize.test.d.ts.map +0 -1
- package/dist/filter/serialize.test.js +0 -83
- package/dist/filter/serialize.test.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -33
- package/dist/index.test.js.map +0 -1
- package/dist/lib/case-utils.test.d.ts +0 -2
- package/dist/lib/case-utils.test.d.ts.map +0 -1
- package/dist/lib/case-utils.test.js +0 -123
- package/dist/lib/case-utils.test.js.map +0 -1
- package/dist/query/index.d.ts +0 -127
- package/dist/query/index.d.ts.map +0 -1
- package/dist/query/index.js +0 -179
- package/dist/query/index.js.map +0 -1
- package/dist/query/index.test.d.ts +0 -2
- package/dist/query/index.test.d.ts.map +0 -1
- package/dist/query/index.test.js +0 -632
- package/dist/query/index.test.js.map +0 -1
- package/dist/query/relationship-options.test.d.ts +0 -2
- package/dist/query/relationship-options.test.d.ts.map +0 -1
- package/dist/query/relationship-options.test.js +0 -150
- package/dist/query/relationship-options.test.js.map +0 -1
- package/dist/validation/field-config.test.d.ts +0 -2
- package/dist/validation/field-config.test.d.ts.map +0 -1
- package/dist/validation/field-config.test.js +0 -159
- package/dist/validation/field-config.test.js.map +0 -1
- package/dist/validation/schema.test.d.ts +0 -2
- package/dist/validation/schema.test.d.ts.map +0 -1
- package/dist/validation/schema.test.js +0 -409
- package/dist/validation/schema.test.js.map +0 -1
- package/docs/type-distribution-fix.md +0 -136
- package/src/access/access-filter.test.ts +0 -1919
- package/src/access/access-filter.ts +0 -1041
- package/src/access/declared-dependencies.test.ts +0 -277
- package/src/access/declared-dependencies.ts +0 -220
- package/src/access/denied-relation-visibility.test.ts +0 -173
- package/src/access/depth-limits.ts +0 -27
- package/src/access/engine.test.ts +0 -67
- package/src/access/engine.ts +0 -193
- package/src/access/errors.ts +0 -242
- package/src/access/field-access.test.ts +0 -792
- package/src/access/field-access.ts +0 -353
- package/src/access/field-transforms.ts +0 -68
- package/src/access/field-visibility.ts +0 -569
- package/src/access/index.ts +0 -82
- package/src/access/multi-column-read-write.test.ts +0 -305
- package/src/access/query-validation.ts +0 -486
- package/src/access/relationship-count.test.ts +0 -344
- package/src/access/relationship-count.ts +0 -346
- package/src/access/relationship-label-filter.test.ts +0 -128
- package/src/access/relationship-label-filter.ts +0 -63
- package/src/access/synthetic-include-read.test.ts +0 -179
- package/src/access/transaction-registry.ts +0 -58
- package/src/access/types.ts +0 -391
- package/src/config/index.ts +0 -177
- package/src/config/label.ts +0 -51
- package/src/config/nav-count.ts +0 -77
- package/src/config/plugin-engine.ts +0 -261
- package/src/config/types.ts +0 -3270
- package/src/context/apply-defaults.ts +0 -47
- package/src/context/hook-pipeline.ts +0 -137
- package/src/context/index.ts +0 -1737
- package/src/context/nested-operations.ts +0 -1470
- package/src/context/transaction-boundary.ts +0 -485
- package/src/context/write-pipeline.ts +0 -732
- package/src/extend.ts +0 -28
- package/src/fields/calendar-day.test.ts +0 -291
- package/src/fields/format-prisma-default.test.ts +0 -64
- package/src/fields/format-prisma-default.ts +0 -64
- package/src/fields/index.ts +0 -1901
- package/src/fields/relationship-foreign-key.test.ts +0 -29
- package/src/fields/select.test.ts +0 -336
- package/src/fields/text-keystone-compat.test.ts +0 -126
- package/src/filter/collect.ts +0 -108
- package/src/filter/filter.test.ts +0 -538
- package/src/filter/index.ts +0 -26
- package/src/filter/map.ts +0 -63
- package/src/filter/parse.ts +0 -99
- package/src/filter/serialize.test.ts +0 -115
- package/src/filter/serialize.ts +0 -73
- package/src/filter/types.ts +0 -120
- package/src/hooks/index.ts +0 -752
- package/src/index.test.ts +0 -50
- package/src/index.ts +0 -192
- package/src/internal.ts +0 -61
- package/src/lib/case-utils.test.ts +0 -159
- package/src/lib/case-utils.ts +0 -68
- package/src/lib/prisma-errors.ts +0 -86
- package/src/mcp/constants.ts +0 -24
- package/src/mcp/field-schema.ts +0 -84
- package/src/mcp/handler.ts +0 -633
- package/src/mcp/index.ts +0 -7
- package/src/mcp/projection.ts +0 -497
- package/src/mcp/types.ts +0 -18
- package/src/query/index.test.ts +0 -830
- package/src/query/index.ts +0 -352
- package/src/query/relationship-options.test.ts +0 -194
- package/src/query/relationship-options.ts +0 -78
- package/src/utils/password.ts +0 -80
- package/src/validation/field-config.test.ts +0 -199
- package/src/validation/field-config.ts +0 -139
- package/src/validation/needs-closure.ts +0 -188
- package/src/validation/schema.test.ts +0 -487
- package/src/validation/schema.ts +0 -51
- package/tests/access-relationships.test.ts +0 -646
- package/tests/access.test.ts +0 -590
- package/tests/apply-defaults.test.ts +0 -119
- package/tests/bare-read-scalars.test.ts +0 -147
- package/tests/computed-field-selective-evaluation.test.ts +0 -418
- package/tests/config.test.ts +0 -242
- package/tests/context.test.ts +0 -3146
- package/tests/default-value-create.test.ts +0 -299
- package/tests/field-hooks.test.ts +0 -410
- package/tests/field-types.test.ts +0 -1291
- package/tests/hook-context-secured.test.ts +0 -424
- package/tests/hook-pipeline.test.ts +0 -233
- package/tests/hooks.test.ts +0 -481
- package/tests/interactive-transaction.test.ts +0 -444
- package/tests/label.test.ts +0 -135
- package/tests/mcp-fields-projection-access.test.ts +0 -250
- package/tests/mcp-handler.test.ts +0 -1411
- package/tests/multi-column-validation-ordering.test.ts +0 -305
- package/tests/nav-count.test.ts +0 -189
- package/tests/needs-declared-dependencies.test.ts +0 -503
- package/tests/nested-access-and-hooks.test.ts +0 -2566
- package/tests/nested-operation-registry.test.ts +0 -317
- package/tests/nested-write-hooks.test.ts +0 -864
- package/tests/nested-write-synthetic-relation.test.ts +0 -437
- package/tests/password-type-distribution.test.ts +0 -154
- package/tests/password-types.test.ts +0 -174
- package/tests/password.test.ts +0 -263
- package/tests/plugin-engine.test.ts +0 -1155
- package/tests/prisma-errors.test.ts +0 -141
- package/tests/resolve-chain.test.ts +0 -411
- package/tests/singleton.test.ts +0 -421
- package/tests/sudo.test.ts +0 -676
- package/tests/to-one-include-access-filter.test.ts +0 -172
- package/tests/transaction-boundary-hooks.test.ts +0 -710
- package/tests/transaction-boundary-outermost.test.ts +0 -530
- package/tests/virtual-fields.test.ts +0 -421
- package/tests/with-session.test.ts +0 -243
- package/tests/write-pipeline.test.ts +0 -617
- package/tsconfig.json +0 -12
- package/tsconfig.tsbuildinfo +0 -1
- package/vitest.config.ts +0 -69
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
* `_resolveOutputChain` (see `AccessContext['_transactionOwner']`), never
|
|
18
18
|
* exposed on the public `StackContext` type.
|
|
19
19
|
*/
|
|
20
|
+
import type { AfterTransactionErrorReport } from '../config/types.js';
|
|
21
|
+
/**
|
|
22
|
+
* Thrown by a transaction owner that cannot commit: a joined `context.db`
|
|
23
|
+
* write threw, or the database aborted the transaction, even though the
|
|
24
|
+
* caller caught the failure and the callback resolved. `cause` is the first
|
|
25
|
+
* failure; the owner has already rolled back.
|
|
26
|
+
*/
|
|
27
|
+
export declare class TransactionRolledBackError extends Error {
|
|
28
|
+
constructor(options: {
|
|
29
|
+
cause: unknown;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
20
32
|
/**
|
|
21
33
|
* The outcome the transaction OWNER observed for the transaction as a whole —
|
|
22
34
|
* distinct from a single write's own {@link import('../hooks/index.js').TransactionOutcome},
|
|
@@ -26,11 +38,12 @@ export interface TransactionSettleOutcome {
|
|
|
26
38
|
status: 'committed' | 'rolled-back';
|
|
27
39
|
error?: unknown;
|
|
28
40
|
}
|
|
41
|
+
export type AfterTransactionFailure = AfterTransactionErrorReport;
|
|
29
42
|
/**
|
|
30
43
|
* One deferred write's flush: given the owner's settle outcome, runs that
|
|
31
44
|
* write's `afterTransaction` bracket and appends any hook errors to `errors`.
|
|
32
45
|
*/
|
|
33
|
-
export type QueuedTransactionFlush = (settle: TransactionSettleOutcome, errors:
|
|
46
|
+
export type QueuedTransactionFlush = (settle: TransactionSettleOutcome, errors: AfterTransactionFailure[]) => Promise<void>;
|
|
34
47
|
/**
|
|
35
48
|
* A FIFO queue of deferred transaction-boundary flushes, owned by whichever
|
|
36
49
|
* component opened the enclosing transaction. One registry per owned
|
|
@@ -39,7 +52,17 @@ export type QueuedTransactionFlush = (settle: TransactionSettleOutcome, errors:
|
|
|
39
52
|
*/
|
|
40
53
|
export declare class TransactionRegistry {
|
|
41
54
|
private readonly queue;
|
|
55
|
+
private poisoned;
|
|
56
|
+
private firstFailure;
|
|
57
|
+
private unsafeReached;
|
|
58
|
+
/** The caller reached the Unsafe surface, whose failures the stack does not observe. */
|
|
59
|
+
noteUnsafeReached(): void;
|
|
60
|
+
get hasReachedUnsafe(): boolean;
|
|
61
|
+
/** Marks the owner rollback-only. The first failure recorded is the one reported. */
|
|
62
|
+
poison(failure: unknown): void;
|
|
63
|
+
get isPoisoned(): boolean;
|
|
64
|
+
get poisonCause(): unknown;
|
|
42
65
|
enqueue(flush: QueuedTransactionFlush): void;
|
|
43
|
-
drain(settle: TransactionSettleOutcome, errors:
|
|
66
|
+
drain(settle: TransactionSettleOutcome, errors: AfterTransactionFailure[]): Promise<void>;
|
|
44
67
|
}
|
|
45
68
|
//# sourceMappingURL=transaction-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-registry.d.ts","sourceRoot":"","sources":["../../src/access/transaction-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"transaction-registry.d.ts","sourceRoot":"","sources":["../../src/access/transaction-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAErE;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,YAAY,OAAO,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,EAOtC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,GAAG,aAAa,CAAA;IACnC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAA;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,uBAAuB,EAAE,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAA;AAElB;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+B;IACrD,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAQ;IAE7B,wFAAwF;IACxF,iBAAiB,IAAI,IAAI,CAExB;IAED,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,qFAAqF;IACrF,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAI7B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,OAAO,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAE3C;IAEK,KAAK,CAAC,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9F;CACF"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* handed exposes no way to open one (a Prisma transaction client, or a plain
|
|
7
|
-
* write issued from a hook whose context is rebound to one) — cannot itself
|
|
8
|
-
* observe when the enclosing transaction settles. Instead of firing
|
|
9
|
-
* `afterTransaction` optimistically at write time, it enqueues a flush here.
|
|
10
|
-
* The transaction owner (`context.transaction()`, or the Write Pipeline when it
|
|
11
|
-
* actually opens the transaction) drains the queue, in enqueue (write) order,
|
|
12
|
-
* once it observes its own transaction settle — supplying the real
|
|
13
|
-
* committed/rolled-back outcome.
|
|
14
|
-
*
|
|
15
|
-
* This is internal plumbing with no public surface: it is threaded through the
|
|
16
|
-
* same context-rebind path ADR-0010/0012 already use for `plugins` and
|
|
17
|
-
* `_resolveOutputChain` (see `AccessContext['_transactionOwner']`), never
|
|
18
|
-
* exposed on the public `StackContext` type.
|
|
2
|
+
* Thrown by a transaction owner that cannot commit: a joined `context.db`
|
|
3
|
+
* write threw, or the database aborted the transaction, even though the
|
|
4
|
+
* caller caught the failure and the callback resolved. `cause` is the first
|
|
5
|
+
* failure; the owner has already rolled back.
|
|
19
6
|
*/
|
|
7
|
+
export class TransactionRolledBackError extends Error {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super('The transaction was rolled back: a write inside it failed and the failure was caught, ' +
|
|
10
|
+
'but a transaction with a failed write cannot commit. See `cause` for the first failure.', options);
|
|
11
|
+
this.name = 'TransactionRolledBackError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
20
14
|
/**
|
|
21
15
|
* A FIFO queue of deferred transaction-boundary flushes, owned by whichever
|
|
22
16
|
* component opened the enclosing transaction. One registry per owned
|
|
@@ -25,6 +19,29 @@
|
|
|
25
19
|
*/
|
|
26
20
|
export class TransactionRegistry {
|
|
27
21
|
queue = [];
|
|
22
|
+
poisoned = false;
|
|
23
|
+
firstFailure;
|
|
24
|
+
unsafeReached = false;
|
|
25
|
+
/** The caller reached the Unsafe surface, whose failures the stack does not observe. */
|
|
26
|
+
noteUnsafeReached() {
|
|
27
|
+
this.unsafeReached = true;
|
|
28
|
+
}
|
|
29
|
+
get hasReachedUnsafe() {
|
|
30
|
+
return this.unsafeReached;
|
|
31
|
+
}
|
|
32
|
+
/** Marks the owner rollback-only. The first failure recorded is the one reported. */
|
|
33
|
+
poison(failure) {
|
|
34
|
+
if (this.poisoned)
|
|
35
|
+
return;
|
|
36
|
+
this.poisoned = true;
|
|
37
|
+
this.firstFailure = failure;
|
|
38
|
+
}
|
|
39
|
+
get isPoisoned() {
|
|
40
|
+
return this.poisoned;
|
|
41
|
+
}
|
|
42
|
+
get poisonCause() {
|
|
43
|
+
return this.firstFailure;
|
|
44
|
+
}
|
|
28
45
|
enqueue(flush) {
|
|
29
46
|
this.queue.push(flush);
|
|
30
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-registry.js","sourceRoot":"","sources":["../../src/access/transaction-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction-registry.js","sourceRoot":"","sources":["../../src/access/transaction-registry.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,YAAY,OAA2B;QACrC,KAAK,CACH,wFAAwF;YACtF,yFAAyF,EAC3F,OAAO,CACR,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAA;IAC1C,CAAC;CACF;AAuBD;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IACb,KAAK,GAA6B,EAAE,CAAA;IAC7C,QAAQ,GAAG,KAAK,CAAA;IAChB,YAAY,CAAS;IACrB,aAAa,GAAG,KAAK,CAAA;IAE7B,wFAAwF;IACxF,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;IAC3B,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,aAAa,CAAA;IAC3B,CAAC;IAED,qFAAqF;IACrF,MAAM,CAAC,OAAgB;QACrB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAM;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;QACpB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAA;IAC7B,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAED,OAAO,CAAC,KAA6B;QACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACxB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,MAAgC,EAAE,MAAiC;QAC7E,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;CACF"}
|
package/dist/access/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RowLockLane } from '../secured/lock.js';
|
|
2
|
+
import type { SecuredQuery } from '../secured/read.js';
|
|
3
|
+
import type { UnsafeTransactionScope } from '../unsafe.js';
|
|
2
4
|
import type { TransactionRegistry } from './transaction-registry.js';
|
|
3
5
|
/**
|
|
4
6
|
* Session interface - can be augmented by developers to add custom fields
|
|
@@ -45,157 +47,152 @@ export type PrismaModelDelegate = {
|
|
|
45
47
|
delete: (args: unknown) => Promise<unknown>;
|
|
46
48
|
count: (args?: unknown) => Promise<number>;
|
|
47
49
|
};
|
|
48
|
-
export type PrismaClientLike = any;
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
take?: number;
|
|
57
|
-
skip?: number;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Overloaded `findMany` that accepts an optional `query` Fragment.
|
|
61
|
-
*
|
|
62
|
-
* - **With `query`**: builds the Prisma `include` from the fragment, executes the
|
|
63
|
-
* query, applies access control, and returns records shaped to `ResultOf<fragment>[]`.
|
|
64
|
-
* - **Without `query`**: behaves exactly like the original Prisma `findMany`.
|
|
51
|
+
* The ORM client the engine drives, structurally. Model keys are resolved at
|
|
52
|
+
* runtime from the config's list names, so the client is reached through an
|
|
53
|
+
* index signature and narrowed to {@link OrmModelDelegate} at the point of
|
|
54
|
+
* use rather than typed per model here — the per-model types belong to the
|
|
55
|
+
* generated bundle, which instantiates them from the emitted contract
|
|
56
|
+
* (ADR-0052).
|
|
65
57
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
58
|
+
* This is the engine's internal handle, not the application's escape hatch:
|
|
59
|
+
* unsecured, and honest about how little the engine assumes of it. An
|
|
60
|
+
* application reaches Prisma through `context.unsafe`.
|
|
68
61
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* // posts: ResultOf<typeof postFragment>[]
|
|
79
|
-
*
|
|
80
|
-
* // Original Prisma behaviour (no fragment)
|
|
81
|
-
* const posts = await context.db.post.findMany({ where: { published: true } })
|
|
82
|
-
* // posts: Post[]
|
|
83
|
-
* ```
|
|
62
|
+
* The index signature's `unknown` is deliberate, and is the one place the
|
|
63
|
+
* repo's "never expose `unknown` externally" rule is relaxed. It replaced
|
|
64
|
+
* `PrismaClientLike = any`: `unknown` forces every consumer to narrow before
|
|
65
|
+
* calling — which is what `ormModel()` does, once — where `any` let a
|
|
66
|
+
* mistyped call compile. What would replace it is a per-model type, and that
|
|
67
|
+
* cannot live here: model keys come from the config's list names, so the
|
|
68
|
+
* typed surface is the generated bundle's `DB`, instantiated from the emitted
|
|
69
|
+
* contract (ADR-0052). Reach for `context.db` when you want types; this is
|
|
70
|
+
* the escape hatch beneath it.
|
|
84
71
|
*/
|
|
85
|
-
export interface
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
72
|
+
export interface OrmClient {
|
|
73
|
+
/**
|
|
74
|
+
* Prisma 7's interactive-transaction opener, which `context.transaction()`
|
|
75
|
+
* still accepts because it is the only shape that carries the transaction
|
|
76
|
+
* options. No Prisma 8 client has it — theirs is `transaction` on the
|
|
77
|
+
* client, reached through {@link TransactionOpener} — so on `prisma-8` this
|
|
78
|
+
* member is only ever populated by a double.
|
|
79
|
+
*/
|
|
80
|
+
$transaction?: unknown;
|
|
81
|
+
[modelKey: string]: unknown;
|
|
91
82
|
}
|
|
92
83
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
84
|
+
* A transaction the stack opened, as the engine consumes it: the ORM handle
|
|
85
|
+
* rebound to the transaction's own collections, and the scope the Unsafe
|
|
86
|
+
* surface binds its executors to.
|
|
95
87
|
*/
|
|
96
|
-
export
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
88
|
+
export interface OpenedTransaction {
|
|
89
|
+
readonly ormHandle: OrmClient;
|
|
90
|
+
readonly unsafe: UnsafeTransactionScope;
|
|
91
|
+
readonly rowLock?: RowLockLane;
|
|
92
|
+
}
|
|
101
93
|
/**
|
|
102
|
-
*
|
|
94
|
+
* Opens one transaction and runs `run` inside it, resolving with `run`'s value
|
|
95
|
+
* and rolling back if it throws.
|
|
103
96
|
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
|
|
97
|
+
* Present on a context built over a Prisma 8 client that is not already inside
|
|
98
|
+
* a transaction, and absent otherwise — so a handle bound to an enclosing
|
|
99
|
+
* transaction, or a hand-built double, joins rather than nesting (ADR-0028).
|
|
100
|
+
* That absence is the signal, not a probe for a method name.
|
|
101
|
+
*/
|
|
102
|
+
export type TransactionOpener = <T>(run: (opened: OpenedTransaction) => Promise<T>) => Promise<T>;
|
|
103
|
+
/**
|
|
104
|
+
* The arguments an ORM operation takes, before the engine lowers them.
|
|
105
|
+
* Untyped for the same reason as {@link OrmClient}: the shape depends on the
|
|
106
|
+
* list, which is a config value. `Record<string, unknown>` still rejects a
|
|
107
|
+
* non-object and forces a narrow at each use.
|
|
108
|
+
*/
|
|
109
|
+
export type OrmOperationArgs = Record<string, unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* One row as the ORM returns it, before Field Visibility runs over it. The
|
|
112
|
+
* typed row is the generated bundle's `Row`; this is what the engine handles
|
|
113
|
+
* on the way there, where the columns are not statically known.
|
|
114
|
+
*/
|
|
115
|
+
export type OrmRow = Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* One model's operations on {@link OrmClient}. Reached through `ormModel()`,
|
|
118
|
+
* which narrows the key rather than assuming it is present.
|
|
122
119
|
*/
|
|
123
|
-
export interface
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
(
|
|
128
|
-
(args
|
|
120
|
+
export interface OrmModelDelegate {
|
|
121
|
+
findUnique: (args: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
122
|
+
findFirst: (args?: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
123
|
+
findMany: (args?: OrmOperationArgs) => Promise<OrmRow[]>;
|
|
124
|
+
create: (args: OrmOperationArgs) => Promise<OrmRow>;
|
|
125
|
+
update: (args: OrmOperationArgs) => Promise<OrmRow>;
|
|
126
|
+
delete: (args: OrmOperationArgs) => Promise<OrmRow>;
|
|
127
|
+
count: (args?: OrmOperationArgs) => Promise<number>;
|
|
129
128
|
}
|
|
130
129
|
/**
|
|
131
|
-
*
|
|
130
|
+
* One list's access-controlled delegate. Every operation runs the list's
|
|
131
|
+
* access rules and hooks, and denial is silent rather than thrown: a
|
|
132
|
+
* single-record terminal returns `null` and a read of many returns `[]`
|
|
133
|
+
* (Silent failure).
|
|
132
134
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* - **Without `query`**: behaves exactly like the original Prisma `findUnique`.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* const post = await context.db.post.findUnique({
|
|
141
|
-
* where: { id: postId },
|
|
142
|
-
* query: postFragment,
|
|
143
|
-
* })
|
|
144
|
-
* // post: ResultOf<typeof postFragment> | null
|
|
145
|
-
* ```
|
|
135
|
+
* Rows are untyped here on purpose: the per-list shapes live in the generated
|
|
136
|
+
* bundle, which instantiates `SecuredList` from the emitted contract
|
|
137
|
+
* (ADR-0052). This is the engine's own view of its output.
|
|
146
138
|
*/
|
|
147
|
-
export interface
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(
|
|
153
|
-
|
|
139
|
+
export interface AccessControlledDelegate extends SecuredQuery {
|
|
140
|
+
create: (args: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
141
|
+
update: (args: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
142
|
+
delete: (args: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
143
|
+
/** Present only on a list declared `isSingleton` (ADR-0039). */
|
|
144
|
+
get?: (args?: OrmOperationArgs) => Promise<OrmRow | null>;
|
|
145
|
+
}
|
|
146
|
+
/** The keys that mark an ORM client rather than a secured `db` surface. */
|
|
147
|
+
type OrmClientMarker = '$connect' | '$disconnect' | '$transaction' | '$extends' | '$queryRaw' | '$queryRawUnsafe' | '$executeRaw' | '$executeRawUnsafe';
|
|
148
|
+
/**
|
|
149
|
+
* Reported in place of a bare `never` when an ORM client is passed where a
|
|
150
|
+
* secured `db` surface belongs, so the constraint failure names its own cause.
|
|
151
|
+
*/
|
|
152
|
+
export interface OrmClientIsNotADbSurface {
|
|
153
|
+
readonly 'StackContext takes the generated `db` surface, not the ORM client': never;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The bound on a generated `db` surface. The generated `DB` is an `interface`
|
|
157
|
+
* (ADR-0032), which has no implicit index signature, so this cannot demand a
|
|
158
|
+
* per-member shape. What it can do is refuse what the parameter used to hold:
|
|
159
|
+
* before ADR-0052 `StackContext`'s first argument was the Prisma client, and
|
|
160
|
+
* `StackContext<MyPrismaClient>` would otherwise still compile and silently
|
|
161
|
+
* mean `db: MyPrismaClient`.
|
|
162
|
+
*/
|
|
163
|
+
export type StackDb<DB = object> = [Extract<keyof DB, OrmClientMarker>] extends [never] ? object : OrmClientIsNotADbSurface;
|
|
164
|
+
/**
|
|
165
|
+
* The secured `db` surface, keyed by the PascalCase list name — the same
|
|
166
|
+
* spelling the config uses (ADR-0041). List names come from the config at
|
|
167
|
+
* runtime, so this is an index signature; the generated bundle names each
|
|
168
|
+
* member and gives it its contract-derived type, which is where a misspelt
|
|
169
|
+
* key becomes a compile error.
|
|
170
|
+
*/
|
|
171
|
+
export interface AccessControlledDB {
|
|
172
|
+
[listKey: string]: AccessControlledDelegate;
|
|
154
173
|
}
|
|
155
|
-
export type AccessControlledDB<TPrisma extends PrismaClientLike> = {
|
|
156
|
-
[K in keyof TPrisma]: TPrisma[K] extends {
|
|
157
|
-
findUnique: any;
|
|
158
|
-
findFirst: any;
|
|
159
|
-
findMany: any;
|
|
160
|
-
create: any;
|
|
161
|
-
update: any;
|
|
162
|
-
delete: any;
|
|
163
|
-
count: any;
|
|
164
|
-
} ? {
|
|
165
|
-
findUnique: AugmentedFindUnique<TPrisma[K]['findUnique']>;
|
|
166
|
-
findFirst: AugmentedFindFirst<TPrisma[K]['findFirst']>;
|
|
167
|
-
findMany: AugmentedFindMany<TPrisma[K]['findMany']>;
|
|
168
|
-
create: TPrisma[K]['create'];
|
|
169
|
-
update: TPrisma[K]['update'];
|
|
170
|
-
delete: TPrisma[K]['delete'];
|
|
171
|
-
count: TPrisma[K]['count'];
|
|
172
|
-
createMany: Parameters<TPrisma[K]['create']>[0] extends {
|
|
173
|
-
data: infer TData;
|
|
174
|
-
} ? (args: {
|
|
175
|
-
data: TData[];
|
|
176
|
-
}) => Promise<Awaited<ReturnType<TPrisma[K]['create']>>[]> : never;
|
|
177
|
-
updateMany: Parameters<TPrisma[K]['update']>[0] extends {
|
|
178
|
-
data: infer TData;
|
|
179
|
-
} ? Parameters<TPrisma[K]['findMany']>[0] extends {
|
|
180
|
-
where?: infer TWhere;
|
|
181
|
-
} ? (args: {
|
|
182
|
-
where?: TWhere;
|
|
183
|
-
data: TData;
|
|
184
|
-
}) => Promise<Awaited<ReturnType<TPrisma[K]['update']>>[]> : never : never;
|
|
185
|
-
} : never;
|
|
186
|
-
} & {
|
|
187
|
-
[key: string]: any;
|
|
188
|
-
};
|
|
189
174
|
export type StorageUtils = {
|
|
190
175
|
uploadFile: (providerName: string, file: File, buffer: Buffer, options?: unknown) => Promise<unknown>;
|
|
191
176
|
uploadImage: (providerName: string, file: File, buffer: Buffer, options?: unknown) => Promise<unknown>;
|
|
192
177
|
deleteFile: (providerName: string, filename: string) => Promise<void>;
|
|
193
178
|
deleteImage: (metadata: unknown) => Promise<void>;
|
|
194
179
|
};
|
|
195
|
-
export interface AccessContext<
|
|
180
|
+
export interface AccessContext<DB = AccessControlledDB> {
|
|
196
181
|
session: Session | null;
|
|
197
|
-
|
|
198
|
-
|
|
182
|
+
/**
|
|
183
|
+
* The engine's own ORM handle: the client `db`'s terminals, the Write
|
|
184
|
+
* Pipeline and the access filter run their queries through, narrowed to one
|
|
185
|
+
* model by `ormModel()`. It is engine plumbing, not an application seam —
|
|
186
|
+
* the engine applies the Access Filter, Field Visibility and hooks *around*
|
|
187
|
+
* it, so the handle itself enforces none of them.
|
|
188
|
+
*
|
|
189
|
+
* The application's deliberate bypass is a different thing under a different
|
|
190
|
+
* name: `unsafe` on the request context (`StackBaseContext.unsafe`), which
|
|
191
|
+
* is Prisma's own query lanes with every execution marked intentionally
|
|
192
|
+
* unscoped, and is not a member of this type.
|
|
193
|
+
*/
|
|
194
|
+
ormHandle: OrmClient;
|
|
195
|
+
db: DB;
|
|
199
196
|
storage: StorageUtils;
|
|
200
197
|
plugins: Record<string, unknown>;
|
|
201
198
|
_isSudo: boolean;
|
|
@@ -227,6 +224,58 @@ export interface AccessContext<TPrisma extends PrismaClientLike = PrismaClientLi
|
|
|
227
224
|
* @internal
|
|
228
225
|
*/
|
|
229
226
|
_transactionOwner?: TransactionRegistry;
|
|
227
|
+
/**
|
|
228
|
+
* The nearest ancestor context that is itself base-client-bound — never a
|
|
229
|
+
* transaction client — or `undefined` when this context already is one
|
|
230
|
+
* (ADR-0028, issue #1348). Set only when this context is bound to (or
|
|
231
|
+
* joins) a transaction — by `bindContextToTransaction` in
|
|
232
|
+
* `write-pipeline.ts` for a write's own transaction, and by `getContext`'s
|
|
233
|
+
* transaction-child construction for `context.transaction()` — and carried
|
|
234
|
+
* forward unchanged by `sudo()`/`withSession()`, so it always names the
|
|
235
|
+
* ultimate base regardless of nesting depth.
|
|
236
|
+
*
|
|
237
|
+
* This is a source of an `ormHandle`/`_transactionOpener` to rebind to, NOT
|
|
238
|
+
* a context to hand a hook directly: `resolveAfterTransactionContext` in
|
|
239
|
+
* `write-pipeline.ts` rebuilds `db`/`ormHandle` from it while keeping THIS
|
|
240
|
+
* context's own `session`/`_isSudo`/`plugins` — otherwise a joined write
|
|
241
|
+
* issued through `tx.sudo()`/`tx.withSession()` would lose that elevation
|
|
242
|
+
* for its own `afterTransaction` the moment it resolved to this ancestor's
|
|
243
|
+
* (pre-elevation) session instead.
|
|
244
|
+
* @internal
|
|
245
|
+
*/
|
|
246
|
+
_baseContext?: AccessContext;
|
|
247
|
+
/**
|
|
248
|
+
* Opens the transaction a write brackets itself with (ADR-0010), when this
|
|
249
|
+
* context is over a client that can open one and is not already inside one.
|
|
250
|
+
* Absent on a context rebound to a transaction, on a joined write, and on a
|
|
251
|
+
* context over a hand-built double — each of which runs directly against the
|
|
252
|
+
* handle it was given.
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
_transactionOpener?: TransactionOpener;
|
|
256
|
+
/**
|
|
257
|
+
* The lane `forUpdate()` and `advisoryLock()` compose their statements
|
|
258
|
+
* through, present only on a context bound to a transaction (ADR-0047).
|
|
259
|
+
*
|
|
260
|
+
* Carried on the context rather than passed at construction alone because
|
|
261
|
+
* `db`'s terminals capture their lane the way they capture their handle, so
|
|
262
|
+
* every path that REBUILDS the delegate — the Write Pipeline rebinding a
|
|
263
|
+
* hook's `db` to the transaction, `deriveResolveOutputContext` extending the
|
|
264
|
+
* resolve chain — has to hand the lane back or a hook inside
|
|
265
|
+
* `context.transaction()` loses a lock the enclosing context has.
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
_rowLock?: RowLockLane;
|
|
269
|
+
/**
|
|
270
|
+
* The resolved config this context was built from, so a core surface reached
|
|
271
|
+
* with nothing but a context can resolve a list and a field against the
|
|
272
|
+
* authority rather than against what its caller asserted — see
|
|
273
|
+
* `writePluginOwnedField`. Optional because `AccessContext` is a public type
|
|
274
|
+
* a test double may build; a context core built always carries it, and a
|
|
275
|
+
* surface that needs it refuses a context that does not.
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
278
|
+
_config?: import('../config/types.js').OpenSaasConfig;
|
|
230
279
|
}
|
|
231
280
|
export type PrismaFilter<T = Record<string, unknown>> = Partial<Record<keyof T, unknown>>;
|
|
232
281
|
/**
|
|
@@ -298,12 +347,49 @@ export type FieldAccessControl<TItem = Record<string, unknown>, TCreateInput = R
|
|
|
298
347
|
* requires is a valid substitute, same as anywhere else function parameters
|
|
299
348
|
* are contravariant.
|
|
300
349
|
*/
|
|
301
|
-
|
|
350
|
+
type FieldAccessBase<TItem = Record<string, unknown>, TCreateInput = Record<string, unknown>, TUpdateInput = Record<string, unknown>> = {
|
|
302
351
|
read?: (args: Extract<FieldAccessControlArgs<TItem, TCreateInput, TUpdateInput>, {
|
|
303
352
|
operation: 'read';
|
|
304
353
|
}>) => boolean | Promise<boolean>;
|
|
305
354
|
create?: FieldAccessControl<TItem, TCreateInput, TUpdateInput>;
|
|
306
355
|
update?: FieldAccessControl<TItem, TCreateInput, TUpdateInput>;
|
|
356
|
+
/**
|
|
357
|
+
* Exempts this field's OWN declared `defaultValue` from the `create` rule
|
|
358
|
+
* above, when the caller and every `resolveInput` hook left the field
|
|
359
|
+
* omitted (`applyCreateDefaults` filled it, not a write anyone made). Off
|
|
360
|
+
* by default: a `create` denial ordinarily blocks the whole create for any
|
|
361
|
+
* session it denies, even one relying on the field's default (deliberate —
|
|
362
|
+
* see `packages/core/src/access/field-access.test.ts`'s
|
|
363
|
+
* `defaultedFields` suite for the `total`-style counter-example this
|
|
364
|
+
* default preserves).
|
|
365
|
+
*
|
|
366
|
+
* Set this only when a `create` denial is UNCONDITIONAL — denies every
|
|
367
|
+
* session, sudo aside — and the field's own default is meant to always
|
|
368
|
+
* settle regardless (a plugin-derived column better-auth itself never
|
|
369
|
+
* accepts as client input is the motivating case, ADR-0073). A
|
|
370
|
+
* session-dependent `create` rule (allows one session, denies another)
|
|
371
|
+
* should leave this unset: the denied session should not create the row
|
|
372
|
+
* at all, the same as any other required field it cannot write.
|
|
373
|
+
*/
|
|
374
|
+
allowCreateDefault?: boolean;
|
|
307
375
|
};
|
|
376
|
+
/**
|
|
377
|
+
* `write: 'hooks'` makes the field hook-only: no caller — a session, `sudo()`,
|
|
378
|
+
* a server action, the admin UI, MCP or another list's hook — may name it in a
|
|
379
|
+
* create or update payload (a `ValidationError` names the field). Only the
|
|
380
|
+
* list's own list-level and field-level `resolveInput` may set it. It cannot be
|
|
381
|
+
* combined with `create`/`update` rules; `read` is unaffected.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* state: select({ options, access: { write: 'hooks' } })
|
|
385
|
+
*/
|
|
386
|
+
export type FieldAccess<TItem = Record<string, unknown>, TCreateInput = Record<string, unknown>, TUpdateInput = Record<string, unknown>> = (FieldAccessBase<TItem, TCreateInput, TUpdateInput> & {
|
|
387
|
+
write?: undefined;
|
|
388
|
+
}) | (Pick<FieldAccessBase<TItem, TCreateInput, TUpdateInput>, 'read'> & {
|
|
389
|
+
write: 'hooks';
|
|
390
|
+
create?: never;
|
|
391
|
+
update?: never;
|
|
392
|
+
allowCreateDefault?: never;
|
|
393
|
+
});
|
|
308
394
|
export {};
|
|
309
395
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/access/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/access/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/C,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAC/C,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC3C,KAAK,EAAE,CAAC,IAAI,CAA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