From af34d020fb30395cd8a76ffdff1ef7f9b9eb2083 Mon Sep 17 00:00:00 2001 From: willbot Date: Wed, 5 Aug 2026 09:19:07 +0200 Subject: [PATCH] feat(stack-prisma)!: upgrade to Prisma Next 0.17 (@prisma/orm-* publish surface) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prisma Next 0.17 retires the @prisma-next/* scope: the framework now publishes as consolidated @prisma/orm-* shells plus the prisma-next bin shim, and an application depends on exactly one database facade. This upgrades the extension, the example app, and the CLI's project detection to that surface, following the upstream 0.16-to-0.17 extension-author recipe. - Depend on @prisma/orm-{framework,family-sql,toolchain} 0.17.0, with @prisma/orm-target-postgres as a peer; rewrite every import to the shell subpaths (one-hop mapping from shells.ts). - Strip the sha256: prefix from all committed hashes (upstream codemod) and move migration contract snapshots into the content-addressed migrations/snapshots/ store (upstream one-shot migrator) — this supersedes the hand-built layout from PR #749; the 0.17 migrator converts the tree cleanly and re-verifies every migrationHash. - Rename extensionPacks -> extensions, re-emit src/contract.{json,d.ts}, and re-anchor the migration set (from/to hashes + recomputed migrationHash; the frozen 3.0.2 upgrade edge keeps its baked 3.0.2 ops bytes). - Declare the emitted type imports under the package's real published name (@cipherstash/stack-prisma/*) instead of the stale @prisma-next/extension-cipherstash/* names, which 0.17 emits verbatim into consumer contract.d.ts files. - Publish the v3 codecs as Postgres target descriptors (postgresCodec with nativeType + identity jsonProjection) through types.codecTypes.codecDescriptors, replacing the deleted meta channel and codecInstances slot. - Example app: single-facade install (@prisma/orm-postgres), facade defineConfig, converted migrations tree, refreshed vendored cipherstash space, deleteCount -> deleteAndCount. - stash CLI: detect 0.17 projects (prisma-next / @prisma/orm-*). - Cooldown exclusions, supply-chain test, stash-prisma skill, and docs updated; changeset included (major for @cipherstash/stack-prisma). Co-Authored-By: Claude Fable 5 Signed-off-by: willbot Signed-off-by: Will Madden --- .changeset/prisma-next-0-17.md | 16 + e2e/tests/supply-chain.e2e.test.ts | 10 +- examples/prisma/README.md | 4 +- .../20260714T2142_initial/end-contract.d.ts | 1801 ---------------- .../20260714T2142_initial/end-contract.json | 1834 ----------------- .../app/20260714T2142_initial/migration.json | 4 +- .../app/20260714T2142_initial/migration.ts | 4 +- .../migration.json | 4 +- .../migration.json | 6 +- .../migration.json | 6 +- .../migrations/cipherstash/contract.d.ts | 10 - .../migrations/cipherstash/refs/head.json | 2 +- .../contract.d.ts | 31 +- .../contract.json | 2 +- .../contract.d.ts | 676 ++++++ .../contract.json | 561 +++++ examples/prisma/package.json | 13 +- examples/prisma/prisma-next.config.ts | 29 +- examples/prisma/src/db.ts | 2 +- examples/prisma/src/index.ts | 2 +- examples/prisma/src/prisma/contract.d.ts | 1034 +--------- examples/prisma/src/prisma/contract.json | 1094 +--------- examples/prisma/test/e2e/mixed.e2e.test.ts | 4 +- packages/cli/src/commands/db/detect.ts | 15 +- packages/stack-prisma/CHANGELOG.md | 10 +- packages/stack-prisma/DEVELOPING.md | 2 + packages/stack-prisma/README.md | 11 +- packages/stack-prisma/integration/adapter.ts | 7 +- .../stack-prisma/integration/json-adapter.ts | 7 +- .../migration.json | 4 +- .../migration.ts | 4 +- .../migration.json | 6 +- .../migration.ts | 6 +- .../migration.json | 6 +- .../migration.ts | 6 +- .../stack-prisma/migrations/refs/head.json | 2 +- .../contract.d.ts | 108 + .../contract.json} | 9 +- packages/stack-prisma/package.json | 26 +- packages/stack-prisma/prisma-next.config.ts | 14 +- .../stack-prisma/src/contract-authoring.ts | 2 +- packages/stack-prisma/src/contract.d.ts | 22 +- packages/stack-prisma/src/contract.json | 6 +- packages/stack-prisma/src/contract.prisma | 2 +- packages/stack-prisma/src/execution/abort.ts | 6 +- .../stack-prisma/src/execution/decrypt-all.ts | 2 +- .../src/execution/envelope-base.ts | 2 +- .../stack-prisma/src/execution/routing.ts | 2 +- .../stack-prisma/src/exports/codec-types.ts | 2 +- .../src/exports/contract-space-typing.ts | 8 +- packages/stack-prisma/src/exports/control.ts | 14 +- .../src/exports/operation-types.ts | 2 +- packages/stack-prisma/src/exports/pack.ts | 2 +- .../src/extension-metadata/codec-metadata.ts | 62 +- .../src/extension-metadata/descriptor-meta.ts | 42 +- .../src/migration/cipherstash-codec-v3.ts | 2 +- .../stack-prisma/src/stack/from-stack-v3.ts | 2 +- .../stack-prisma/src/types/operation-types.ts | 2 +- .../stack-prisma/src/v3/bulk-encrypt-v3.ts | 6 +- .../stack-prisma/src/v3/codec-runtime-v3.ts | 69 +- .../stack-prisma/src/v3/derive-schemas-v3.ts | 2 +- packages/stack-prisma/src/v3/operators-v3.ts | 8 +- packages/stack-prisma/src/v3/query-term.ts | 2 +- packages/stack-prisma/src/v3/runtime-v3.ts | 2 +- packages/stack-prisma/test/abort.test.ts | 2 +- .../test/bulk-encrypt-middleware.helpers.ts | 14 +- packages/stack-prisma/test/descriptor.test.ts | 4 +- .../stack-prisma/test/live/helpers/harness.ts | 16 +- .../test/psl-interpretation.test.ts | 49 +- .../test/v3/bulk-encrypt-v3.test.ts | 4 +- .../test/v3/codec-runtime-v3.test.ts | 19 +- .../stack-prisma/test/v3/migration-v3.test.ts | 13 +- .../test/v3/operator-lowering-v3.helpers.ts | 26 +- .../stack-prisma/test/v3/properties.test.ts | 2 +- .../stack-prisma/test/v3/runtime-v3.test.ts | 2 +- .../test/v3/vendored-space-parity.test.ts | 19 +- pnpm-lock.yaml | 854 ++------ pnpm-workspace.yaml | 7 +- skills/stash-prisma/SKILL.md | 33 +- 79 files changed, 1948 insertions(+), 6779 deletions(-) create mode 100644 .changeset/prisma-next-0-17.md delete mode 100644 examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts delete mode 100644 examples/prisma/migrations/app/20260714T2142_initial/end-contract.json delete mode 100644 examples/prisma/migrations/cipherstash/contract.d.ts rename packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.d.ts => examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts (71%) rename examples/prisma/migrations/{cipherstash => snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599}/contract.json (52%) create mode 100644 examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.d.ts create mode 100644 examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.json create mode 100644 packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts rename packages/stack-prisma/migrations/{20260601T0100_install_eql_v3_bundle/end-contract.json => snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json} (78%) diff --git a/.changeset/prisma-next-0-17.md b/.changeset/prisma-next-0-17.md new file mode 100644 index 000000000..7fec0c84a --- /dev/null +++ b/.changeset/prisma-next-0-17.md @@ -0,0 +1,16 @@ +--- +'@cipherstash/stack-prisma': major +'stash': patch +--- + +Upgrade the Prisma Next integration to Prisma Next 0.17 (the `prisma/prisma` "Prisma 8" main line). Consuming apps must move to the 0.17 publish surface to use this release. + +Breaking changes for consumers: + +- **Dependencies**: the `@prisma-next/*` scope is retired. An application now depends on exactly one database facade — `@prisma/orm-postgres@0.17.0` — plus this extension. `@cipherstash/stack-prisma` itself builds against `@prisma/orm-framework`, `@prisma/orm-family-sql`, and `@prisma/orm-toolchain`, and declares `@prisma/orm-target-postgres` as a peer dependency. +- **Generated imports**: the emitted `contract.d.ts` now imports this extension's types from `@cipherstash/stack-prisma/{codec-types,operation-types,runtime}` (previously the stale `@prisma-next/extension-cipherstash/*` names, which no longer resolve). Re-run `prisma-next contract emit` after upgrading. +- **Contract and migration hashes**: 0.17 renames the contract's `extensionPacks` key to `extensions` and drops the `sha256:` prefix from every content hash, so every contract `storageHash` and `migrationHash` changes. The shipped migration set is re-anchored accordingly; consumer repos convert their checked-in `migrations/` trees with the upstream `strip-sha256-hash-prefixes` codemod and `scripts/migrate-migrations-layout.mjs` (the content-addressed `migrations/snapshots/` store replaces per-migration `end-contract.*` files). Vendored `migrations/cipherstash/` copies must be refreshed (delete and re-run `prisma-next migration plan`, or copy the shipped artefacts). +- **Codec descriptors**: the v3 codec descriptors are now Postgres target descriptors (`nativeTypeFor` / `projectJson` via `postgresCodec`), replacing the deleted `meta.db.sql.postgres` channel, and the pack meta publishes them through `types.codecTypes.codecDescriptors` (0.17 removed `codecInstances`). +- **Config**: in `prisma-next.config.ts` use the facade's `defineConfig` from `@prisma/orm-postgres/config` with `extensions: [cipherstash]` (`extensionPacks` fails loudly on 0.17). + +The `stash` CLI now also detects Prisma Next projects that depend on the 0.17 packages (`prisma-next` or any `@prisma/orm-*` package), and the bundled `stash-prisma` skill documents the 0.17 surface. diff --git a/e2e/tests/supply-chain.e2e.test.ts b/e2e/tests/supply-chain.e2e.test.ts index 5dc9b87a7..b849741ee 100644 --- a/e2e/tests/supply-chain.e2e.test.ts +++ b/e2e/tests/supply-chain.e2e.test.ts @@ -78,7 +78,15 @@ describe('supply chain — pnpm configuration', () => { const ws = readYaml('pnpm-workspace.yaml') as { minimumReleaseAgeExclude?: string[] } - const FIRST_PARTY = [/^@prisma-next\//, /^@cipherstash\//] + const FIRST_PARTY = [ + // The Prisma Next publish surface: the retired @prisma-next/* scope + // (≤ 0.16), the 0.17+ @prisma/orm-* shells, and the prisma-next bin + // shim. All first-party packages the integration is built against. + /^@prisma-next\//, + /^@prisma\/orm-/, + /^prisma-next$/, + /^@cipherstash\//, + ] for (const entry of ws.minimumReleaseAgeExclude ?? []) { expect( FIRST_PARTY.some((re) => re.test(entry)), diff --git a/examples/prisma/README.md b/examples/prisma/README.md index 15fdad0e9..77008f818 100644 --- a/examples/prisma/README.md +++ b/examples/prisma/README.md @@ -1,6 +1,6 @@ # @cipherstash/stack-prisma example -End-to-end demo of [`@cipherstash/stack-prisma`](../../packages/stack-prisma/README.md): searchable application-layer encryption for Postgres with [Prisma Next](https://www.npmjs.com/package/@prisma-next/cli), using [`@cipherstash/stack`](../../packages/stack/README.md) as the encryption SDK — on **EQL v3**, where every encrypted column is a concrete `public.eql_v3_*` Postgres domain and the constructor you pick *is* the capability set. +End-to-end demo of [`@cipherstash/stack-prisma`](../../packages/stack-prisma/README.md): searchable application-layer encryption for Postgres with [Prisma Next](https://www.npmjs.com/package/prisma-next), using [`@cipherstash/stack`](../../packages/stack/README.md) as the encryption SDK — on **EQL v3**, where every encrypted column is a concrete `public.eql_v3_*` Postgres domain and the constructor you pick *is* the capability set. A single `User` model with one column per plaintext family, exercised end-to-end: insert, equality, free-text token search, range, between, in-array, encrypted-order-term sort, JSON containment, and `decryptAll`-amortised read. @@ -21,7 +21,7 @@ A single `User` model with one column per plaintext family, exercised end-to-end | -------------------------- | --------------------------------------------------------------------------------------------- | | `docker-compose.yml` | Local Postgres 16 on port 54338. | | `prisma/schema.prisma` | Application schema (one `User` model exercising six cipherstash v3 domains). | -| `prisma-next.config.ts` | Wires `cipherstash` into `extensionPacks`. | +| `prisma-next.config.ts` | Wires `cipherstash` into `extensions`. | | `src/db.ts` | One-call setup via `cipherstashFromStack({ contractJson })`. | | `src/index.ts` | The demo flow. | | `src/prisma/contract.*` | Emitted by `pnpm emit`. | diff --git a/examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts b/examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts deleted file mode 100644 index 5e0d0650d..000000000 --- a/examples/prisma/migrations/app/20260714T2142_initial/end-contract.d.ts +++ /dev/null @@ -1,1801 +0,0 @@ -// ⚠️ GENERATED FILE - DO NOT EDIT -// This file is automatically generated by 'prisma-next contract emit'. -// To regenerate, run: prisma-next contract emit -import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma-next/adapter-postgres/operation-types'; -import type { CodecTypes as CipherstashTypes } from '@prisma-next/extension-cipherstash/codec-types'; -import type { QueryOperationTypes as CipherstashQueryOperationTypes } from '@prisma-next/extension-cipherstash/operation-types'; -import type { - EncryptedBigInt, - EncryptedBoolean, - EncryptedDate, - EncryptedDouble, - EncryptedJson, - EncryptedNumber, - EncryptedString, -} from '@prisma-next/extension-cipherstash/runtime'; -import type { - Bit, - Char, - CodecTypes as PgTypes, - Interval, - JsonValue, - Numeric, - Time, - Timestamp, - Timestamptz, - Timetz, - VarBit, - Varchar, -} from '@prisma-next/target-postgres/codec-types'; - -import type { - ContractWithTypeMaps, - TypeMaps as TypeMapsType, -} from '@prisma-next/sql-contract/types'; -import type { - Contract as ContractType, - ExecutionHashBase, - NamespaceId, - ProfileHashBase, - StorageHashBase, -} from '@prisma-next/contract/types'; - -export type StorageHash = - StorageHashBase<'sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2'>; -export type ExecutionHash = ExecutionHashBase; -export type ProfileHash = - ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>; - -export type CodecTypes = PgTypes & CipherstashTypes; -export type LaneCodecTypes = CodecTypes; -export type QueryOperationTypes = PgAdapterQueryOps & - CipherstashQueryOperationTypes; -type DefaultLiteralValue = CodecId extends keyof CodecTypes - ? CodecTypes[CodecId]['output'] - : _Encoded; - -export type FieldOutputTypes = { - readonly public: { - readonly User: { - readonly id: CodecTypes['pg/text@1']['output']; - readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['output']; - readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['output']; - readonly accountId: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['output']; - readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['output']; - readonly emailVerified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['output']; - readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['output']; - }; - }; -}; -export type FieldInputTypes = { - readonly public: { - readonly User: { - readonly id: CodecTypes['pg/text@1']['input']; - readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['input']; - readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['input']; - readonly accountId: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['input']; - readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['input']; - readonly emailVerified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['input']; - readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['input']; - }; - }; -}; -export type TypeMaps = TypeMapsType< - CodecTypes, - QueryOperationTypes, - FieldOutputTypes, - FieldInputTypes ->; - -type ContractBase = Omit< - ContractType<{ - readonly namespaces: { - readonly public: { - readonly id: 'public'; - readonly kind: 'sql-namespace'; - readonly entries: { - readonly table: { - readonly users: { - columns: { - readonly id: { - readonly nativeType: 'text'; - readonly codecId: 'pg/text@1'; - readonly nullable: false; - }; - readonly email: { - readonly nativeType: 'public.eql_v3_text_search'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'string'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: true; - }; - }; - }; - readonly salary: { - readonly nativeType: 'public.eql_v3_double_ord'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'number'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - readonly accountid: { - readonly nativeType: 'public.eql_v3_bigint_ord'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'bigint'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - readonly birthday: { - readonly nativeType: 'public.eql_v3_date_ord'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'date'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - readonly emailverified: { - readonly nativeType: 'public.eql_v3_boolean'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'boolean'; - readonly capabilities: { - readonly equality: false; - readonly orderAndRange: false; - readonly freeTextSearch: false; - }; - }; - }; - readonly preferences: { - readonly nativeType: 'public.eql_v3_json_search'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; - readonly nullable: false; - readonly typeParams: { - readonly castAs: 'json'; - readonly capabilities: { - readonly equality: false; - readonly orderAndRange: false; - readonly freeTextSearch: false; - readonly searchableJson: true; - }; - }; - }; - }; - primaryKey: { readonly columns: readonly ['id'] }; - uniques: readonly []; - indexes: readonly []; - foreignKeys: readonly []; - }; - }; - }; - }; - }; - readonly storageHash: StorageHash; - }>, - 'roots' | 'domain' -> & { - readonly target: 'postgres'; - readonly targetFamily: 'sql'; - readonly roots: { - readonly users: { readonly namespace: 'public' & NamespaceId; readonly model: 'User' }; - }; - readonly domain: { - readonly namespaces: { - readonly public: { - readonly models: { - readonly User: { - readonly fields: { - readonly id: { - readonly nullable: false; - readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; - }; - readonly email: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; - readonly typeParams: { - readonly castAs: 'string'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: true; - }; - }; - }; - }; - readonly salary: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; - readonly typeParams: { - readonly castAs: 'number'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - }; - readonly accountId: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; - readonly typeParams: { - readonly castAs: 'bigint'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - }; - readonly birthday: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; - readonly typeParams: { - readonly castAs: 'date'; - readonly capabilities: { - readonly equality: true; - readonly orderAndRange: true; - readonly freeTextSearch: false; - }; - }; - }; - }; - readonly emailVerified: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; - readonly typeParams: { - readonly castAs: 'boolean'; - readonly capabilities: { - readonly equality: false; - readonly orderAndRange: false; - readonly freeTextSearch: false; - }; - }; - }; - }; - readonly preferences: { - readonly nullable: false; - readonly type: { - readonly kind: 'scalar'; - readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; - readonly typeParams: { - readonly castAs: 'json'; - readonly capabilities: { - readonly equality: false; - readonly orderAndRange: false; - readonly freeTextSearch: false; - readonly searchableJson: true; - }; - }; - }; - }; - }; - readonly relations: Record; - readonly storage: { - readonly table: 'users'; - readonly namespaceId: 'public'; - readonly fields: { - readonly id: { readonly column: 'id' }; - readonly email: { readonly column: 'email' }; - readonly salary: { readonly column: 'salary' }; - readonly accountId: { readonly column: 'accountid' }; - readonly birthday: { readonly column: 'birthday' }; - readonly emailVerified: { readonly column: 'emailverified' }; - readonly preferences: { readonly column: 'preferences' }; - }; - }; - }; - }; - }; - }; - }; - readonly capabilities: { - readonly postgres: { - readonly distinctOn: true; - readonly jsonAgg: true; - readonly lateral: true; - readonly limit: true; - readonly orderBy: true; - readonly returning: true; - }; - readonly sql: { - readonly defaultInInsert: true; - readonly enums: true; - readonly lateral: true; - readonly returning: true; - }; - }; - readonly extensionPacks: { - readonly cipherstash: { - readonly familyId: 'sql'; - readonly id: 'cipherstash'; - readonly kind: 'extension'; - readonly targetId: 'postgres'; - readonly types: { - readonly codecTypes: { - readonly codecInstances: readonly [ - { - readonly descriptor: { - readonly codecId: 'cipherstash/string@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly [ - 'cipherstash:equality', - 'cipherstash:free-text-search', - 'cipherstash:order-and-range', - ]; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/double@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/bigint@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/date@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/boolean@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/json@1'; - readonly factory: unknown; - readonly isParameterized: false; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'eql_v2_encrypted' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['eql_v2_encrypted']; - readonly traits: readonly ['cipherstash:searchable-json']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_match@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_match' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_match']; - readonly traits: readonly ['cipherstash:free-text-search']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_search' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_search']; - readonly traits: readonly [ - 'cipherstash:equality', - 'cipherstash:order-and-range', - 'cipherstash:free-text-search', - ]; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_boolean' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_boolean']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_json_search' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_json_search']; - readonly traits: readonly ['cipherstash:searchable-json']; - }; - }, - ]; - readonly import: { - readonly alias: 'CipherstashTypes'; - readonly named: 'CodecTypes'; - readonly package: '@prisma-next/extension-cipherstash/codec-types'; - }; - readonly typeImports: readonly [ - { - readonly alias: 'EncryptedString'; - readonly named: 'EncryptedString'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedDouble'; - readonly named: 'EncryptedDouble'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedBigInt'; - readonly named: 'EncryptedBigInt'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedDate'; - readonly named: 'EncryptedDate'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedBoolean'; - readonly named: 'EncryptedBoolean'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedJson'; - readonly named: 'EncryptedJson'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - { - readonly alias: 'EncryptedNumber'; - readonly named: 'EncryptedNumber'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; - }, - ]; - }; - readonly queryOperationTypes: { - readonly import: { - readonly alias: 'CipherstashQueryOperationTypes'; - readonly named: 'QueryOperationTypes'; - readonly package: '@prisma-next/extension-cipherstash/operation-types'; - }; - }; - readonly storage: readonly [ - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/string@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/double@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/bigint@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/date@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/boolean@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'eql_v2_encrypted'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/json@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_integer'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_integer@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_integer_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_integer_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_integer_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_smallint'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_smallint_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_smallint_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_smallint_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_bigint'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_bigint_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_bigint_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_bigint_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_date'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_date@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_date_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_date_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_date_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_date_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_date_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_timestamp'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_timestamp_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_timestamp_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_timestamp_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_numeric'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_numeric_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_numeric_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_numeric_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text_match'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text_match@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_text_search'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_text_search@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_boolean'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_boolean@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_real'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_real@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_real_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_real_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_real_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_real_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_real_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_real_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_double'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_double@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_double_eq'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_double_eq@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_double_ord_ore'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_double_ord_ore@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_double_ord'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; - }, - { - readonly familyId: 'sql'; - readonly nativeType: 'public.eql_v3_json_search'; - readonly targetId: 'postgres'; - readonly typeId: 'cipherstash/eql-v3/eql_v3_json_search@1'; - }, - ]; - }; - readonly version: '0.0.1'; - }; - }; - readonly meta: {}; - - readonly profileHash: ProfileHash; -}; - -export type Contract = ContractWithTypeMaps; - -export type Namespaces = Contract['storage']['namespaces']; diff --git a/examples/prisma/migrations/app/20260714T2142_initial/end-contract.json b/examples/prisma/migrations/app/20260714T2142_initial/end-contract.json deleted file mode 100644 index 0f2558ee3..000000000 --- a/examples/prisma/migrations/app/20260714T2142_initial/end-contract.json +++ /dev/null @@ -1,1834 +0,0 @@ -{ - "schemaVersion": "1", - "targetFamily": "sql", - "target": "postgres", - "profileHash": "sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb", - "roots": { - "users": { - "model": "User", - "namespace": "public" - } - }, - "domain": { - "namespaces": { - "public": { - "models": { - "User": { - "fields": { - "accountId": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", - "kind": "scalar", - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "bigint" - } - } - }, - "birthday": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", - "kind": "scalar", - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "date" - } - } - }, - "email": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", - "kind": "scalar", - "typeParams": { - "capabilities": { - "equality": true, - "freeTextSearch": true, - "orderAndRange": true - }, - "castAs": "string" - } - } - }, - "emailVerified": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", - "kind": "scalar", - "typeParams": { - "capabilities": {}, - "castAs": "boolean" - } - } - }, - "id": { - "nullable": false, - "type": { - "codecId": "pg/text@1", - "kind": "scalar" - } - }, - "preferences": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", - "kind": "scalar", - "typeParams": { - "capabilities": { - "searchableJson": true - }, - "castAs": "json" - } - } - }, - "salary": { - "nullable": false, - "type": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", - "kind": "scalar", - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "number" - } - } - } - }, - "relations": {}, - "storage": { - "fields": { - "accountId": { - "column": "accountid" - }, - "birthday": { - "column": "birthday" - }, - "email": { - "column": "email" - }, - "emailVerified": { - "column": "emailverified" - }, - "id": { - "column": "id" - }, - "preferences": { - "column": "preferences" - }, - "salary": { - "column": "salary" - } - }, - "namespaceId": "public", - "table": "users" - } - } - } - } - } - }, - "storage": { - "namespaces": { - "public": { - "entries": { - "table": { - "users": { - "columns": { - "accountid": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", - "nativeType": "public.eql_v3_bigint_ord", - "nullable": false, - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "bigint" - } - }, - "birthday": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", - "nativeType": "public.eql_v3_date_ord", - "nullable": false, - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "date" - } - }, - "email": { - "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", - "nativeType": "public.eql_v3_text_search", - "nullable": false, - "typeParams": { - "capabilities": { - "equality": true, - "freeTextSearch": true, - "orderAndRange": true - }, - "castAs": "string" - } - }, - "emailverified": { - "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", - "nativeType": "public.eql_v3_boolean", - "nullable": false, - "typeParams": { - "capabilities": {}, - "castAs": "boolean" - } - }, - "id": { - "codecId": "pg/text@1", - "nativeType": "text", - "nullable": false - }, - "preferences": { - "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", - "nativeType": "public.eql_v3_json_search", - "nullable": false, - "typeParams": { - "capabilities": { - "searchableJson": true - }, - "castAs": "json" - } - }, - "salary": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", - "nativeType": "public.eql_v3_double_ord", - "nullable": false, - "typeParams": { - "capabilities": { - "equality": true, - "orderAndRange": true - }, - "castAs": "number" - } - } - }, - "foreignKeys": [], - "indexes": [], - "primaryKey": { - "columns": [ - "id" - ] - }, - "uniques": [] - } - } - }, - "id": "public", - "kind": "postgres-schema" - } - }, - "storageHash": "sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2" - }, - "capabilities": { - "postgres": { - "distinctOn": true, - "jsonAgg": true, - "lateral": true, - "limit": true, - "orderBy": true, - "returning": true - }, - "sql": { - "defaultInInsert": true, - "enums": true, - "lateral": true, - "returning": true - } - }, - "extensionPacks": { - "cipherstash": { - "familyId": "sql", - "id": "cipherstash", - "kind": "extension", - "targetId": "postgres", - "types": { - "codecTypes": { - "codecInstances": [ - { - "descriptor": { - "codecId": "cipherstash/string@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:free-text-search", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/double@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/bigint@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/date@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/boolean@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/json@1", - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "eql_v2_encrypted" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "eql_v2_encrypted" - ], - "traits": [ - "cipherstash:searchable-json" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_match@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_match" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_match" - ], - "traits": [ - "cipherstash:free-text-search" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_search" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_search" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range", - "cipherstash:free-text-search" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_boolean" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_boolean" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_json_search" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_json_search" - ], - "traits": [ - "cipherstash:searchable-json" - ] - } - } - ], - "import": { - "alias": "CipherstashTypes", - "named": "CodecTypes", - "package": "@prisma-next/extension-cipherstash/codec-types" - }, - "typeImports": [ - { - "alias": "EncryptedString", - "named": "EncryptedString", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedDouble", - "named": "EncryptedDouble", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedBigInt", - "named": "EncryptedBigInt", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedDate", - "named": "EncryptedDate", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedBoolean", - "named": "EncryptedBoolean", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedJson", - "named": "EncryptedJson", - "package": "@prisma-next/extension-cipherstash/runtime" - }, - { - "alias": "EncryptedNumber", - "named": "EncryptedNumber", - "package": "@prisma-next/extension-cipherstash/runtime" - } - ] - }, - "queryOperationTypes": { - "import": { - "alias": "CipherstashQueryOperationTypes", - "named": "QueryOperationTypes", - "package": "@prisma-next/extension-cipherstash/operation-types" - } - }, - "storage": [ - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/string@1" - }, - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/double@1" - }, - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/bigint@1" - }, - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/date@1" - }, - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/boolean@1" - }, - { - "familyId": "sql", - "nativeType": "eql_v2_encrypted", - "targetId": "postgres", - "typeId": "cipherstash/json@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_integer", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_integer@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_integer_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_integer_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_integer_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_integer_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_integer_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_integer_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_smallint", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_smallint@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_smallint_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_smallint_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_smallint_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_smallint_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_smallint_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_smallint_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_bigint", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_bigint@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_bigint_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_bigint_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_bigint_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_bigint_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_bigint_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_bigint_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_date", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_date@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_date_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_date_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_date_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_date_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_date_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_date_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_timestamp", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_timestamp@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_timestamp_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_timestamp_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_timestamp_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_timestamp_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_timestamp_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_numeric", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_numeric@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_numeric_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_numeric_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_numeric_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_numeric_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_numeric_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_numeric_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text_match", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text_match@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_text_search", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_text_search@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_boolean", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_boolean@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_real", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_real@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_real_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_real_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_real_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_real_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_real_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_real_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_double", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_double@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_double_eq", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_double_eq@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_double_ord_ore", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_double_ord_ore@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_double_ord", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_double_ord@1" - }, - { - "familyId": "sql", - "nativeType": "public.eql_v3_json_search", - "targetId": "postgres", - "typeId": "cipherstash/eql-v3/eql_v3_json_search@1" - } - ] - }, - "version": "0.0.1" - } - }, - "meta": {}, - "_generated": { - "warning": "⚠️ GENERATED FILE - DO NOT EDIT", - "message": "This file is automatically generated by \"prisma-next contract emit\".", - "regenerate": "To regenerate, run: prisma-next contract emit" - } -} \ No newline at end of file diff --git a/examples/prisma/migrations/app/20260714T2142_initial/migration.json b/examples/prisma/migrations/app/20260714T2142_initial/migration.json index b0b1830a0..94d0acd81 100644 --- a/examples/prisma/migrations/app/20260714T2142_initial/migration.json +++ b/examples/prisma/migrations/app/20260714T2142_initial/migration.json @@ -1,7 +1,7 @@ { "from": null, - "to": "sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2", + "to": "f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7", "providedInvariants": [], "createdAt": "2026-07-14T21:42:57.497Z", - "migrationHash": "sha256:e17cabe70dac513a9454b77da4a4164f581762ea45ef8d311d8d5e9d48b86464" + "migrationHash": "3e14cd0538a80217276c5d0967dc18d4fa485d62a0f0b1af861c53ca0a9fa802" } \ No newline at end of file diff --git a/examples/prisma/migrations/app/20260714T2142_initial/migration.ts b/examples/prisma/migrations/app/20260714T2142_initial/migration.ts index 7428a42b7..107040ad0 100755 --- a/examples/prisma/migrations/app/20260714T2142_initial/migration.ts +++ b/examples/prisma/migrations/app/20260714T2142_initial/migration.ts @@ -4,13 +4,13 @@ import { Migration, MigrationCLI, primaryKey, -} from '@prisma-next/postgres/migration' +} from '@prisma/orm-postgres/migration' export default class M extends Migration { override describe() { return { from: null, - to: 'sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2', + to: 'f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7', } } diff --git a/examples/prisma/migrations/cipherstash/20260601T0100_install_eql_v3_bundle/migration.json b/examples/prisma/migrations/cipherstash/20260601T0100_install_eql_v3_bundle/migration.json index e360ed2af..0ee3d3e1e 100644 --- a/examples/prisma/migrations/cipherstash/20260601T0100_install_eql_v3_bundle/migration.json +++ b/examples/prisma/migrations/cipherstash/20260601T0100_install_eql_v3_bundle/migration.json @@ -1,11 +1,11 @@ { "from": null, - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:install-eql-v3-bundle-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.4-v1" ], "createdAt": "2026-07-14T20:10:24.325Z", - "migrationHash": "sha256:fc495f7f59e6d18ae8e3df594a38898263ca91f8f5fb5f625bff20d04a0d7223" + "migrationHash": "1030654387540db7a053449e478d4b198d8666b360cca9f9c265eddb83b2dd74" } \ No newline at end of file diff --git a/examples/prisma/migrations/cipherstash/20260720T0000_upgrade_eql_v3_3_0_2/migration.json b/examples/prisma/migrations/cipherstash/20260720T0000_upgrade_eql_v3_3_0_2/migration.json index 2e30955fc..3022f8de6 100644 --- a/examples/prisma/migrations/cipherstash/20260720T0000_upgrade_eql_v3_3_0_2/migration.json +++ b/examples/prisma/migrations/cipherstash/20260720T0000_upgrade_eql_v3_3_0_2/migration.json @@ -1,9 +1,9 @@ { - "from": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "from": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1" ], "createdAt": "2026-07-20T11:40:17.876Z", - "migrationHash": "sha256:7bb960435f9cdb7d7c25e4ff70b02fa050a1b8e695541facc47dd87ec3cc634e" + "migrationHash": "0c56fe6b641c5839c82be72317b2af165fb574b0dcdfc4aa6b50425e371a9d0f" } \ No newline at end of file diff --git a/examples/prisma/migrations/cipherstash/20260728T0000_upgrade_eql_v3_3_0_4/migration.json b/examples/prisma/migrations/cipherstash/20260728T0000_upgrade_eql_v3_3_0_4/migration.json index 9498f6b95..119ec2982 100644 --- a/examples/prisma/migrations/cipherstash/20260728T0000_upgrade_eql_v3_3_0_4/migration.json +++ b/examples/prisma/migrations/cipherstash/20260728T0000_upgrade_eql_v3_3_0_4/migration.json @@ -1,9 +1,9 @@ { - "from": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "from": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:upgrade-eql-v3-bundle-3.0.4-v1" ], "createdAt": "2026-07-28T10:44:32.390Z", - "migrationHash": "sha256:59e124d8a64d31a0f2b27ef9f5b3868f822ec12823aad71fee8e64b36f115bf4" + "migrationHash": "94a2ce9c8e973b7a635d92571ff642429e6ebfb7a4600291ee626201e110e13e" } \ No newline at end of file diff --git a/examples/prisma/migrations/cipherstash/contract.d.ts b/examples/prisma/migrations/cipherstash/contract.d.ts deleted file mode 100644 index 181d93f81..000000000 --- a/examples/prisma/migrations/cipherstash/contract.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Placeholder `.d.ts` for extension space "cipherstash". - * - * The framework re-emits this file on every `migration plan` run - * alongside `contract.json` and `refs/head.json`. A typed `.d.ts` - * rendering pass for extension contracts is tracked separately; - * until that ships, consumers should import `contract.json` - * and pass it through the target descriptor’s `contractSerializer`. - */ -export {}; diff --git a/examples/prisma/migrations/cipherstash/refs/head.json b/examples/prisma/migrations/cipherstash/refs/head.json index 306bb83e4..c8f25e621 100644 --- a/examples/prisma/migrations/cipherstash/refs/head.json +++ b/examples/prisma/migrations/cipherstash/refs/head.json @@ -1,5 +1,5 @@ { - "hash": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "hash": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "invariants": [ "cipherstash:install-eql-v3-bundle-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1", diff --git a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.d.ts b/examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts similarity index 71% rename from packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.d.ts rename to examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts index 22fda37b6..76c859e8a 100644 --- a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.d.ts +++ b/examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts @@ -1,7 +1,7 @@ // ⚠️ GENERATED FILE - DO NOT EDIT // This file is automatically generated by 'prisma-next contract emit'. // To regenerate, run: prisma-next contract emit -import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma-next/adapter-postgres/operation-types'; +import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-target-postgres/adapter/operation-types'; import type { Bit, Char, @@ -15,40 +15,46 @@ import type { Timetz, VarBit, Varchar, -} from '@prisma-next/target-postgres/codec-types'; +} from '@prisma/orm-target-postgres/target/codec-types'; import type { ContractWithTypeMaps, TypeMaps as TypeMapsType, -} from '@prisma-next/sql-contract/types'; +} from '@prisma/orm-family-sql/contract/types'; import type { Contract as ContractType, ExecutionHashBase, NamespaceId, ProfileHashBase, StorageHashBase, -} from '@prisma-next/contract/types'; +} from '@prisma/orm-framework/contract/types'; export type StorageHash = - StorageHashBase<'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e'>; + StorageHashBase<'0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599'>; export type ExecutionHash = ExecutionHashBase; export type ProfileHash = - ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>; + ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; export type CodecTypes = PgTypes; export type LaneCodecTypes = CodecTypes; export type QueryOperationTypes = PgAdapterQueryOps; -type DefaultLiteralValue = CodecId extends keyof CodecTypes - ? CodecTypes[CodecId]['output'] - : _Encoded; +type DefaultLiteralValue = CodecId extends keyof CodecTypes + ? Encoded extends CodecTypes[CodecId]['json'] + ? Encoded + : CodecTypes[CodecId]['json'] + : Encoded; export type FieldOutputTypes = { readonly public: Record }; export type FieldInputTypes = { readonly public: Record }; +export type StorageColumnTypes = { readonly public: {} }; +export type StorageColumnInputTypes = { readonly public: {} }; export type TypeMaps = TypeMapsType< CodecTypes, QueryOperationTypes, FieldOutputTypes, - FieldInputTypes + FieldInputTypes, + StorageColumnTypes, + StorageColumnInputTypes >; type ContractBase = Omit< @@ -56,7 +62,7 @@ type ContractBase = Omit< readonly namespaces: { readonly public: { readonly id: 'public'; - readonly kind: 'sql-namespace'; + readonly kind: 'postgres-schema'; readonly entries: { readonly table: {} }; }; }; @@ -88,9 +94,10 @@ type ContractBase = Omit< readonly enums: true; readonly lateral: true; readonly returning: true; + readonly scalarList: true; }; }; - readonly extensionPacks: {}; + readonly extensions: {}; readonly meta: {}; readonly profileHash: ProfileHash; diff --git a/examples/prisma/migrations/cipherstash/contract.json b/examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json similarity index 52% rename from examples/prisma/migrations/cipherstash/contract.json rename to examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json index 12796be90..624ee37bd 100644 --- a/examples/prisma/migrations/cipherstash/contract.json +++ b/examples/prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json @@ -1 +1 @@ -{"_generated":{"message":"This file is automatically generated by \"prisma-next contract emit\".","regenerate":"To regenerate, run: prisma-next contract emit","warning":"⚠️ GENERATED FILE - DO NOT EDIT"},"capabilities":{"postgres":{"distinctOn":true,"jsonAgg":true,"lateral":true,"limit":true,"orderBy":true,"returning":true},"sql":{"defaultInInsert":true,"enums":true,"lateral":true,"returning":true,"scalarList":true}},"domain":{"namespaces":{"public":{"models":{}}}},"extensionPacks":{},"meta":{},"profileHash":"sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb","roots":{},"schemaVersion":"1","storage":{"namespaces":{"public":{"entries":{"table":{}},"id":"public","kind":"postgres-schema"}},"storageHash":"sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e"},"target":"postgres","targetFamily":"sql"} +{"_generated":{"message":"This file is automatically generated by \"prisma-next contract emit\".","regenerate":"To regenerate, run: prisma-next contract emit","warning":"⚠️ GENERATED FILE - DO NOT EDIT"},"capabilities":{"postgres":{"distinctOn":true,"jsonAgg":true,"lateral":true,"limit":true,"orderBy":true,"returning":true},"sql":{"defaultInInsert":true,"enums":true,"lateral":true,"returning":true,"scalarList":true}},"domain":{"namespaces":{"public":{"models":{}}}},"extensions":{},"meta":{},"profileHash":"3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2","roots":{},"schemaVersion":"1","storage":{"namespaces":{"public":{"entries":{"table":{}},"id":"public","kind":"postgres-schema"}},"storageHash":"0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599"},"target":"postgres","targetFamily":"sql"} diff --git a/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.d.ts b/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.d.ts new file mode 100644 index 000000000..7f6189a61 --- /dev/null +++ b/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.d.ts @@ -0,0 +1,676 @@ +// ⚠️ GENERATED FILE - DO NOT EDIT +// This file is automatically generated by 'prisma-next contract emit'. +// To regenerate, run: prisma-next contract emit +import type { CodecTypes as CipherstashTypes } from '@cipherstash/stack-prisma/codec-types'; +import type { QueryOperationTypes as CipherstashQueryOperationTypes } from '@cipherstash/stack-prisma/operation-types'; +import type { + EncryptedBigInt, + EncryptedBoolean, + EncryptedDate, + EncryptedJson, + EncryptedNumber, + EncryptedString, +} from '@cipherstash/stack-prisma/runtime'; +import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types'; +import type { + Bit, + Char, + CodecTypes as PgTypes, + Interval, + JsonValue, + Numeric, + Time, + Timestamp, + Timestamptz, + Timetz, + VarBit, + Varchar, +} from '@prisma/orm-postgres/target/codec-types'; + +import type { + ContractWithTypeMaps, + TypeMaps as TypeMapsType, +} from '@prisma/orm-postgres/family-contract/types'; +import type { + Contract as ContractType, + ExecutionHashBase, + NamespaceId, + ProfileHashBase, + StorageHashBase, +} from '@prisma/orm-postgres/contract/types'; + +export type StorageHash = + StorageHashBase<'f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7'>; +export type ExecutionHash = ExecutionHashBase; +export type ProfileHash = + ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; + +export type CodecTypes = PgTypes & CipherstashTypes; +export type LaneCodecTypes = CodecTypes; +export type QueryOperationTypes = PgAdapterQueryOps & + CipherstashQueryOperationTypes; +type DefaultLiteralValue = CodecId extends keyof CodecTypes + ? Encoded extends CodecTypes[CodecId]['json'] + ? Encoded + : CodecTypes[CodecId]['json'] + : Encoded; + +export type FieldOutputTypes = { + readonly public: { + readonly User: { + readonly id: CodecTypes['pg/text@1']['output']; + readonly email: EncryptedString; + readonly salary: EncryptedNumber; + readonly accountId: EncryptedBigInt; + readonly birthday: EncryptedDate; + readonly emailVerified: EncryptedBoolean; + readonly preferences: EncryptedJson; + }; + }; +}; +export type FieldInputTypes = { + readonly public: { + readonly User: { + readonly id: CodecTypes['pg/text@1']['input']; + readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['input']; + readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['input']; + readonly accountId: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['input']; + readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['input']; + readonly emailVerified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['input']; + readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['input']; + }; + }; +}; +export type StorageColumnTypes = { + readonly public: { + readonly users: { + readonly accountid: EncryptedBigInt; + readonly birthday: EncryptedDate; + readonly email: EncryptedString; + readonly emailverified: EncryptedBoolean; + readonly id: CodecTypes['pg/text@1']['output']; + readonly preferences: EncryptedJson; + readonly salary: EncryptedNumber; + }; + }; +}; +export type StorageColumnInputTypes = { + readonly public: { + readonly users: { + readonly accountid: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['input']; + readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['input']; + readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['input']; + readonly emailverified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['input']; + readonly id: CodecTypes['pg/text@1']['input']; + readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['input']; + readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['input']; + }; + }; +}; +export type TypeMaps = TypeMapsType< + CodecTypes, + QueryOperationTypes, + FieldOutputTypes, + FieldInputTypes, + StorageColumnTypes, + StorageColumnInputTypes +>; + +type ContractBase = Omit< + ContractType<{ + readonly namespaces: { + readonly public: { + readonly id: 'public'; + readonly kind: 'postgres-schema'; + readonly entries: { + readonly table: { + readonly users: { + columns: { + readonly id: { + readonly nativeType: 'text'; + readonly codecId: 'pg/text@1'; + readonly nullable: false; + }; + readonly email: { + readonly nativeType: 'public.eql_v3_text_search'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'string'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: true; + }; + }; + }; + readonly salary: { + readonly nativeType: 'public.eql_v3_double_ord'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'number'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + readonly accountid: { + readonly nativeType: 'public.eql_v3_bigint_ord'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'bigint'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + readonly birthday: { + readonly nativeType: 'public.eql_v3_date_ord'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'date'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + readonly emailverified: { + readonly nativeType: 'public.eql_v3_boolean'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'boolean'; + readonly capabilities: { + readonly equality: false; + readonly orderAndRange: false; + readonly freeTextSearch: false; + }; + }; + }; + readonly preferences: { + readonly nativeType: 'public.eql_v3_json_search'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; + readonly nullable: false; + readonly typeParams: { + readonly castAs: 'json'; + readonly capabilities: { + readonly equality: false; + readonly orderAndRange: false; + readonly freeTextSearch: false; + readonly searchableJson: true; + }; + }; + }; + }; + primaryKey: { readonly columns: readonly ['id'] }; + uniques: readonly []; + indexes: readonly []; + foreignKeys: readonly []; + }; + }; + }; + }; + }; + readonly storageHash: StorageHash; + }>, + 'roots' | 'domain' +> & { + readonly target: 'postgres'; + readonly targetFamily: 'sql'; + readonly roots: { + readonly users: { readonly namespace: 'public' & NamespaceId; readonly model: 'User' }; + }; + readonly domain: { + readonly namespaces: { + readonly public: { + readonly models: { + readonly User: { + readonly fields: { + readonly id: { + readonly nullable: false; + readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; + }; + readonly email: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; + readonly typeParams: { + readonly castAs: 'string'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: true; + }; + }; + }; + }; + readonly salary: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; + readonly typeParams: { + readonly castAs: 'number'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + }; + readonly accountId: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; + readonly typeParams: { + readonly castAs: 'bigint'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + }; + readonly birthday: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; + readonly typeParams: { + readonly castAs: 'date'; + readonly capabilities: { + readonly equality: true; + readonly orderAndRange: true; + readonly freeTextSearch: false; + }; + }; + }; + }; + readonly emailVerified: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; + readonly typeParams: { + readonly castAs: 'boolean'; + readonly capabilities: { + readonly equality: false; + readonly orderAndRange: false; + readonly freeTextSearch: false; + }; + }; + }; + }; + readonly preferences: { + readonly nullable: false; + readonly type: { + readonly kind: 'scalar'; + readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; + readonly typeParams: { + readonly castAs: 'json'; + readonly capabilities: { + readonly equality: false; + readonly orderAndRange: false; + readonly freeTextSearch: false; + readonly searchableJson: true; + }; + }; + }; + }; + }; + readonly relations: Record; + readonly storage: { + readonly table: 'users'; + readonly namespaceId: 'public'; + readonly fields: { + readonly id: { readonly column: 'id' }; + readonly email: { readonly column: 'email' }; + readonly salary: { readonly column: 'salary' }; + readonly accountId: { readonly column: 'accountid' }; + readonly birthday: { readonly column: 'birthday' }; + readonly emailVerified: { readonly column: 'emailverified' }; + readonly preferences: { readonly column: 'preferences' }; + }; + }; + }; + }; + }; + }; + }; + readonly capabilities: { + readonly postgres: { + readonly distinctOn: true; + readonly jsonAgg: true; + readonly lateral: true; + readonly limit: true; + readonly orderBy: true; + readonly returning: true; + }; + readonly sql: { + readonly defaultInInsert: true; + readonly enums: true; + readonly lateral: true; + readonly returning: true; + readonly scalarList: true; + }; + }; + readonly extensions: { + readonly cipherstash: { + readonly familyId: 'sql'; + readonly id: 'cipherstash'; + readonly kind: 'extension'; + readonly targetId: 'postgres'; + readonly types: { + readonly codecTypes: { + readonly import: { + readonly alias: 'CipherstashTypes'; + readonly named: 'CodecTypes'; + readonly package: '@cipherstash/stack-prisma/codec-types'; + }; + readonly typeImports: readonly [ + { + readonly alias: 'EncryptedString'; + readonly named: 'EncryptedString'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + { + readonly alias: 'EncryptedBigInt'; + readonly named: 'EncryptedBigInt'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + { + readonly alias: 'EncryptedDate'; + readonly named: 'EncryptedDate'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + { + readonly alias: 'EncryptedBoolean'; + readonly named: 'EncryptedBoolean'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + { + readonly alias: 'EncryptedJson'; + readonly named: 'EncryptedJson'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + { + readonly alias: 'EncryptedNumber'; + readonly named: 'EncryptedNumber'; + readonly package: '@cipherstash/stack-prisma/runtime'; + }, + ]; + }; + readonly queryOperationTypes: { + readonly import: { + readonly alias: 'CipherstashQueryOperationTypes'; + readonly named: 'QueryOperationTypes'; + readonly package: '@cipherstash/stack-prisma/operation-types'; + }; + }; + readonly storage: readonly [ + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_integer'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_integer@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_integer_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_integer_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_integer_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_integer_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_smallint'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_smallint_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_smallint_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_smallint_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_smallint_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_bigint'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_bigint_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_bigint_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_bigint_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_date'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_date@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_date_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_date_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_date_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_date_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_date_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_timestamp'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_timestamp_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_timestamp_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_timestamp_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_timestamp_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_numeric'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_numeric_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_numeric_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_numeric_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_numeric_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text_match'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text_match@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_text_search'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_text_search@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_boolean'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_boolean@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_real'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_real@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_real_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_real_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_real_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_real_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_real_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_real_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_double'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_double@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_double_eq'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_double_eq@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_double_ord_ore'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_double_ord_ore@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_double_ord'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; + }, + { + readonly familyId: 'sql'; + readonly nativeType: 'public.eql_v3_json_search'; + readonly targetId: 'postgres'; + readonly typeId: 'cipherstash/eql-v3/eql_v3_json_search@1'; + }, + ]; + }; + readonly version: '0.0.1'; + }; + }; + readonly meta: {}; + + readonly profileHash: ProfileHash; +}; + +export type Contract = ContractWithTypeMaps; + +export type Namespaces = Contract['storage']['namespaces']; diff --git a/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.json b/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.json new file mode 100644 index 000000000..adb10d023 --- /dev/null +++ b/examples/prisma/migrations/snapshots/f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7/contract.json @@ -0,0 +1,561 @@ +{ + "schemaVersion": "1", + "targetFamily": "sql", + "target": "postgres", + "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2", + "roots": { + "users": { + "model": "User", + "namespace": "public" + } + }, + "domain": { + "namespaces": { + "public": { + "models": { + "User": { + "fields": { + "accountId": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", + "kind": "scalar", + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "bigint" + } + } + }, + "birthday": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", + "kind": "scalar", + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "date" + } + } + }, + "email": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", + "kind": "scalar", + "typeParams": { + "capabilities": { + "equality": true, + "freeTextSearch": true, + "orderAndRange": true + }, + "castAs": "string" + } + } + }, + "emailVerified": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", + "kind": "scalar", + "typeParams": { + "capabilities": {}, + "castAs": "boolean" + } + } + }, + "id": { + "nullable": false, + "type": { + "codecId": "pg/text@1", + "kind": "scalar" + } + }, + "preferences": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", + "kind": "scalar", + "typeParams": { + "capabilities": { + "searchableJson": true + }, + "castAs": "json" + } + } + }, + "salary": { + "nullable": false, + "type": { + "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", + "kind": "scalar", + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "number" + } + } + } + }, + "relations": {}, + "storage": { + "fields": { + "accountId": { + "column": "accountid" + }, + "birthday": { + "column": "birthday" + }, + "email": { + "column": "email" + }, + "emailVerified": { + "column": "emailverified" + }, + "id": { + "column": "id" + }, + "preferences": { + "column": "preferences" + }, + "salary": { + "column": "salary" + } + }, + "namespaceId": "public", + "table": "users" + } + } + } + } + } + }, + "storage": { + "namespaces": { + "public": { + "entries": { + "table": { + "users": { + "columns": { + "accountid": { + "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", + "nativeType": "public.eql_v3_bigint_ord", + "nullable": false, + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "bigint" + } + }, + "birthday": { + "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", + "nativeType": "public.eql_v3_date_ord", + "nullable": false, + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "date" + } + }, + "email": { + "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", + "nativeType": "public.eql_v3_text_search", + "nullable": false, + "typeParams": { + "capabilities": { + "equality": true, + "freeTextSearch": true, + "orderAndRange": true + }, + "castAs": "string" + } + }, + "emailverified": { + "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", + "nativeType": "public.eql_v3_boolean", + "nullable": false, + "typeParams": { + "capabilities": {}, + "castAs": "boolean" + } + }, + "id": { + "codecId": "pg/text@1", + "nativeType": "text", + "nullable": false + }, + "preferences": { + "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", + "nativeType": "public.eql_v3_json_search", + "nullable": false, + "typeParams": { + "capabilities": { + "searchableJson": true + }, + "castAs": "json" + } + }, + "salary": { + "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", + "nativeType": "public.eql_v3_double_ord", + "nullable": false, + "typeParams": { + "capabilities": { + "equality": true, + "orderAndRange": true + }, + "castAs": "number" + } + } + }, + "foreignKeys": [], + "indexes": [], + "primaryKey": { + "columns": [ + "id" + ] + }, + "uniques": [] + } + } + }, + "id": "public", + "kind": "postgres-schema" + } + }, + "storageHash": "f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7" + }, + "capabilities": { + "postgres": { + "distinctOn": true, + "jsonAgg": true, + "lateral": true, + "limit": true, + "orderBy": true, + "returning": true + }, + "sql": { + "defaultInInsert": true, + "enums": true, + "lateral": true, + "returning": true, + "scalarList": true + } + }, + "extensions": { + "cipherstash": { + "familyId": "sql", + "id": "cipherstash", + "kind": "extension", + "targetId": "postgres", + "types": { + "codecTypes": { + "import": { + "alias": "CipherstashTypes", + "named": "CodecTypes", + "package": "@cipherstash/stack-prisma/codec-types" + }, + "typeImports": [ + { + "alias": "EncryptedString", + "named": "EncryptedString", + "package": "@cipherstash/stack-prisma/runtime" + }, + { + "alias": "EncryptedBigInt", + "named": "EncryptedBigInt", + "package": "@cipherstash/stack-prisma/runtime" + }, + { + "alias": "EncryptedDate", + "named": "EncryptedDate", + "package": "@cipherstash/stack-prisma/runtime" + }, + { + "alias": "EncryptedBoolean", + "named": "EncryptedBoolean", + "package": "@cipherstash/stack-prisma/runtime" + }, + { + "alias": "EncryptedJson", + "named": "EncryptedJson", + "package": "@cipherstash/stack-prisma/runtime" + }, + { + "alias": "EncryptedNumber", + "named": "EncryptedNumber", + "package": "@cipherstash/stack-prisma/runtime" + } + ] + }, + "queryOperationTypes": { + "import": { + "alias": "CipherstashQueryOperationTypes", + "named": "QueryOperationTypes", + "package": "@cipherstash/stack-prisma/operation-types" + } + }, + "storage": [ + { + "familyId": "sql", + "nativeType": "public.eql_v3_integer", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_integer@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_integer_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_integer_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_integer_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_integer_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_integer_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_integer_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_smallint", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_smallint@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_smallint_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_smallint_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_smallint_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_smallint_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_smallint_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_smallint_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_bigint", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_bigint@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_bigint_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_bigint_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_bigint_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_bigint_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_bigint_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_bigint_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_date", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_date@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_date_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_date_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_date_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_date_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_date_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_date_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_timestamp", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_timestamp@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_timestamp_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_timestamp_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_timestamp_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_timestamp_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_timestamp_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_numeric", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_numeric@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_numeric_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_numeric_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_numeric_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_numeric_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_numeric_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_numeric_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text_match", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text_match@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_text_search", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_text_search@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_boolean", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_boolean@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_real", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_real@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_real_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_real_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_real_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_real_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_real_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_real_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_double", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_double@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_double_eq", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_double_eq@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_double_ord_ore", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_double_ord_ore@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_double_ord", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_double_ord@1" + }, + { + "familyId": "sql", + "nativeType": "public.eql_v3_json_search", + "targetId": "postgres", + "typeId": "cipherstash/eql-v3/eql_v3_json_search@1" + } + ] + }, + "version": "0.0.1" + } + }, + "meta": {}, + "_generated": { + "warning": "⚠️ GENERATED FILE - DO NOT EDIT", + "message": "This file is automatically generated by \"prisma-next contract emit\".", + "regenerate": "To regenerate, run: prisma-next contract emit" + } +} \ No newline at end of file diff --git a/examples/prisma/package.json b/examples/prisma/package.json index c51e477f4..582f0512a 100644 --- a/examples/prisma/package.json +++ b/examples/prisma/package.json @@ -15,21 +15,10 @@ "dependencies": { "@cipherstash/stack-prisma": "workspace:*", "@cipherstash/stack": "workspace:*", - "@prisma-next/adapter-postgres": "0.16.0", - "@prisma-next/contract": "0.16.0", - "@prisma-next/driver-postgres": "0.16.0", - "@prisma-next/family-sql": "0.16.0", - "@prisma-next/framework-components": "0.16.0", - "@prisma-next/postgres": "0.16.0", - "@prisma-next/sql-contract": "0.16.0", - "@prisma-next/sql-contract-psl": "0.16.0", - "@prisma-next/sql-orm-client": "0.16.0", - "@prisma-next/sql-runtime": "0.16.0", - "@prisma-next/target-postgres": "0.16.0", + "@prisma/orm-postgres": "0.17.0", "dotenv": "^17.4.2" }, "devDependencies": { - "@prisma-next/cli": "0.16.0", "@types/node": "^22.20.1", "pathe": "^2.0.3", "tsx": "catalog:repo", diff --git a/examples/prisma/prisma-next.config.ts b/examples/prisma/prisma-next.config.ts index 1cb5a2bdb..a3e77d95a 100644 --- a/examples/prisma/prisma-next.config.ts +++ b/examples/prisma/prisma-next.config.ts @@ -1,31 +1,16 @@ import 'dotenv/config' import cipherstash from '@cipherstash/stack-prisma/control' -import postgresAdapter from '@prisma-next/adapter-postgres/control' -import { defineConfig } from '@prisma-next/cli/config-types' -import postgresDriver from '@prisma-next/driver-postgres/control' -import sql from '@prisma-next/family-sql/control' -import { prismaContract } from '@prisma-next/sql-contract-psl/provider' -import postgres from '@prisma-next/target-postgres/control' -import postgresPack from '@prisma-next/target-postgres/pack' -import { postgresCreateNamespace } from '@prisma-next/target-postgres/types' +import { defineConfig } from '@prisma/orm-postgres/config' const databaseUrl = process.env['DATABASE_URL'] export default defineConfig({ - family: sql, - target: postgres, - driver: postgresDriver, - adapter: postgresAdapter, - extensionPacks: [cipherstash], - contract: prismaContract('./prisma/schema.prisma', { - output: 'src/prisma/contract.json', - // Since 0.14 `prismaContract` takes the target PACK ref (carrying - // `defaultNamespaceId`), not the control descriptor. - target: postgresPack, - // Since 0.15 the SQL family no longer materialises a placeholder - // namespace, so the target's namespace factory is required. - createNamespace: postgresCreateNamespace, - }), + // Since 0.17 an application depends on exactly one database facade + // (`@prisma/orm-postgres`); its `defineConfig` wires the family, + // target, adapter, driver, and PSL provider internally. + contract: './prisma/schema.prisma', + output: 'src/prisma', + extensions: [cipherstash], migrations: { dir: 'migrations', }, diff --git a/examples/prisma/src/db.ts b/examples/prisma/src/db.ts index 511680c52..63997903b 100644 --- a/examples/prisma/src/db.ts +++ b/examples/prisma/src/db.ts @@ -14,7 +14,7 @@ import 'dotenv/config' import { cipherstashFromStack } from '@cipherstash/stack-prisma/v3' -import postgres from '@prisma-next/postgres/runtime' +import postgres from '@prisma/orm-postgres/runtime' import type { Contract } from './prisma/contract.d' import contractJson from './prisma/contract.json' with { type: 'json' } diff --git a/examples/prisma/src/index.ts b/examples/prisma/src/index.ts index f0aeeb183..8dcafd963 100644 --- a/examples/prisma/src/index.ts +++ b/examples/prisma/src/index.ts @@ -132,7 +132,7 @@ async function main() { async function clearUsers(): Promise { const removed = await db.orm.public.User.where((u) => u.id.isNotNull(), - ).deleteCount() + ).deleteAndCount() if (removed > 0) { console.log(`--- Cleanup ---\nRemoved ${removed} existing user row(s).\n`) } diff --git a/examples/prisma/src/prisma/contract.d.ts b/examples/prisma/src/prisma/contract.d.ts index d4edd84c2..7f6189a61 100644 --- a/examples/prisma/src/prisma/contract.d.ts +++ b/examples/prisma/src/prisma/contract.d.ts @@ -1,9 +1,8 @@ // ⚠️ GENERATED FILE - DO NOT EDIT // This file is automatically generated by 'prisma-next contract emit'. // To regenerate, run: prisma-next contract emit -import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma-next/adapter-postgres/operation-types'; -import type { CodecTypes as CipherstashTypes } from '@prisma-next/extension-cipherstash/codec-types'; -import type { QueryOperationTypes as CipherstashQueryOperationTypes } from '@prisma-next/extension-cipherstash/operation-types'; +import type { CodecTypes as CipherstashTypes } from '@cipherstash/stack-prisma/codec-types'; +import type { QueryOperationTypes as CipherstashQueryOperationTypes } from '@cipherstash/stack-prisma/operation-types'; import type { EncryptedBigInt, EncryptedBoolean, @@ -11,7 +10,8 @@ import type { EncryptedJson, EncryptedNumber, EncryptedString, -} from '@prisma-next/extension-cipherstash/runtime'; +} from '@cipherstash/stack-prisma/runtime'; +import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types'; import type { Bit, Char, @@ -25,44 +25,46 @@ import type { Timetz, VarBit, Varchar, -} from '@prisma-next/target-postgres/codec-types'; +} from '@prisma/orm-postgres/target/codec-types'; import type { ContractWithTypeMaps, TypeMaps as TypeMapsType, -} from '@prisma-next/sql-contract/types'; +} from '@prisma/orm-postgres/family-contract/types'; import type { Contract as ContractType, ExecutionHashBase, NamespaceId, ProfileHashBase, StorageHashBase, -} from '@prisma-next/contract/types'; +} from '@prisma/orm-postgres/contract/types'; export type StorageHash = - StorageHashBase<'sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2'>; + StorageHashBase<'f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7'>; export type ExecutionHash = ExecutionHashBase; export type ProfileHash = - ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>; + ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; export type CodecTypes = PgTypes & CipherstashTypes; export type LaneCodecTypes = CodecTypes; export type QueryOperationTypes = PgAdapterQueryOps & CipherstashQueryOperationTypes; -type DefaultLiteralValue = CodecId extends keyof CodecTypes - ? CodecTypes[CodecId]['output'] - : _Encoded; +type DefaultLiteralValue = CodecId extends keyof CodecTypes + ? Encoded extends CodecTypes[CodecId]['json'] + ? Encoded + : CodecTypes[CodecId]['json'] + : Encoded; export type FieldOutputTypes = { readonly public: { readonly User: { readonly id: CodecTypes['pg/text@1']['output']; - readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['output']; - readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['output']; - readonly accountId: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['output']; - readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['output']; - readonly emailVerified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['output']; - readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['output']; + readonly email: EncryptedString; + readonly salary: EncryptedNumber; + readonly accountId: EncryptedBigInt; + readonly birthday: EncryptedDate; + readonly emailVerified: EncryptedBoolean; + readonly preferences: EncryptedJson; }; }; }; @@ -82,13 +84,13 @@ export type FieldInputTypes = { export type StorageColumnTypes = { readonly public: { readonly users: { - readonly accountid: CodecTypes['cipherstash/eql-v3/eql_v3_bigint_ord@1']['output']; - readonly birthday: CodecTypes['cipherstash/eql-v3/eql_v3_date_ord@1']['output']; - readonly email: CodecTypes['cipherstash/eql-v3/eql_v3_text_search@1']['output']; - readonly emailverified: CodecTypes['cipherstash/eql-v3/eql_v3_boolean@1']['output']; + readonly accountid: EncryptedBigInt; + readonly birthday: EncryptedDate; + readonly email: EncryptedString; + readonly emailverified: EncryptedBoolean; readonly id: CodecTypes['pg/text@1']['output']; - readonly preferences: CodecTypes['cipherstash/eql-v3/eql_v3_json_search@1']['output']; - readonly salary: CodecTypes['cipherstash/eql-v3/eql_v3_double_ord@1']['output']; + readonly preferences: EncryptedJson; + readonly salary: EncryptedNumber; }; }; }; @@ -365,7 +367,7 @@ type ContractBase = Omit< readonly scalarList: true; }; }; - readonly extensionPacks: { + readonly extensions: { readonly cipherstash: { readonly familyId: 'sql'; readonly id: 'cipherstash'; @@ -373,1007 +375,41 @@ type ContractBase = Omit< readonly targetId: 'postgres'; readonly types: { readonly codecTypes: { - readonly codecInstances: readonly [ - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_integer_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_integer_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_integer_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_smallint_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_smallint_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_smallint_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_bigint_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_bigint_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_bigint_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_date_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_date_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_date_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_timestamp_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_timestamp_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_timestamp_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_numeric_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_numeric_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_numeric_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_match@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_match' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_match']; - readonly traits: readonly ['cipherstash:free-text-search']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_text_search@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_text_search' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_text_search']; - readonly traits: readonly [ - 'cipherstash:equality', - 'cipherstash:order-and-range', - 'cipherstash:free-text-search', - ]; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_boolean@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_boolean' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_boolean']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_real_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_real_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_real_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double']; - readonly traits: readonly []; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_eq@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_eq' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_eq']; - readonly traits: readonly ['cipherstash:equality']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord_ore@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_ord_ore' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_ord_ore']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_double_ord@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_double_ord' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_double_ord']; - readonly traits: readonly ['cipherstash:equality', 'cipherstash:order-and-range']; - }; - }, - { - readonly descriptor: { - readonly codecId: 'cipherstash/eql-v3/eql_v3_json_search@1'; - readonly factory: unknown; - readonly isParameterized: true; - readonly meta: { - readonly db: { - readonly sql: { - readonly postgres: { readonly nativeType: 'public.eql_v3_json_search' }; - }; - }; - }; - readonly paramsSchema: { - readonly '~standard': { - readonly validate: unknown; - readonly vendor: 'cipherstash'; - readonly version: 1; - }; - }; - readonly renderOutputType: unknown; - readonly targetTypes: readonly ['public.eql_v3_json_search']; - readonly traits: readonly ['cipherstash:searchable-json']; - }; - }, - ]; readonly import: { readonly alias: 'CipherstashTypes'; readonly named: 'CodecTypes'; - readonly package: '@prisma-next/extension-cipherstash/codec-types'; + readonly package: '@cipherstash/stack-prisma/codec-types'; }; readonly typeImports: readonly [ { readonly alias: 'EncryptedString'; readonly named: 'EncryptedString'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, { readonly alias: 'EncryptedBigInt'; readonly named: 'EncryptedBigInt'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, { readonly alias: 'EncryptedDate'; readonly named: 'EncryptedDate'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, { readonly alias: 'EncryptedBoolean'; readonly named: 'EncryptedBoolean'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, { readonly alias: 'EncryptedJson'; readonly named: 'EncryptedJson'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, { readonly alias: 'EncryptedNumber'; readonly named: 'EncryptedNumber'; - readonly package: '@prisma-next/extension-cipherstash/runtime'; + readonly package: '@cipherstash/stack-prisma/runtime'; }, ]; }; @@ -1381,7 +417,7 @@ type ContractBase = Omit< readonly import: { readonly alias: 'CipherstashQueryOperationTypes'; readonly named: 'QueryOperationTypes'; - readonly package: '@prisma-next/extension-cipherstash/operation-types'; + readonly package: '@cipherstash/stack-prisma/operation-types'; }; }; readonly storage: readonly [ diff --git a/examples/prisma/src/prisma/contract.json b/examples/prisma/src/prisma/contract.json index ccc0d1072..adb10d023 100644 --- a/examples/prisma/src/prisma/contract.json +++ b/examples/prisma/src/prisma/contract.json @@ -2,7 +2,7 @@ "schemaVersion": "1", "targetFamily": "sql", "target": "postgres", - "profileHash": "sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb", + "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2", "roots": { "users": { "model": "User", @@ -234,7 +234,7 @@ "kind": "postgres-schema" } }, - "storageHash": "sha256:32984f82d1b089087df107ff4b86310b8640e04f67eb7f6ebf5601694338b8f2" + "storageHash": "f1cd58a4c67d07d7c45d05b6d11a5629e063848d9597a17af2311542622cd8d7" }, "capabilities": { "postgres": { @@ -253,7 +253,7 @@ "scalarList": true } }, - "extensionPacks": { + "extensions": { "cipherstash": { "familyId": "sql", "id": "cipherstash", @@ -261,1113 +261,41 @@ "targetId": "postgres", "types": { "codecTypes": { - "codecInstances": [ - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_integer_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_integer_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_integer_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_smallint_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_smallint_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_smallint_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_bigint_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_bigint_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_bigint_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_date_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_date_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_date_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_timestamp_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_timestamp_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_timestamp_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_numeric_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_numeric_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_numeric_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_match@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_match" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_match" - ], - "traits": [ - "cipherstash:free-text-search" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_text_search@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_text_search" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_text_search" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range", - "cipherstash:free-text-search" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_boolean@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_boolean" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_boolean" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_real_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_real_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_real_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_eq@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_eq" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_eq" - ], - "traits": [ - "cipherstash:equality" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord_ore@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_ord_ore" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_ord_ore" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_double_ord@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_double_ord" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_double_ord" - ], - "traits": [ - "cipherstash:equality", - "cipherstash:order-and-range" - ] - } - }, - { - "descriptor": { - "codecId": "cipherstash/eql-v3/eql_v3_json_search@1", - "isParameterized": true, - "meta": { - "db": { - "sql": { - "postgres": { - "nativeType": "public.eql_v3_json_search" - } - } - } - }, - "paramsSchema": { - "~standard": { - "vendor": "cipherstash", - "version": 1 - } - }, - "targetTypes": [ - "public.eql_v3_json_search" - ], - "traits": [ - "cipherstash:searchable-json" - ] - } - } - ], "import": { "alias": "CipherstashTypes", "named": "CodecTypes", - "package": "@prisma-next/extension-cipherstash/codec-types" + "package": "@cipherstash/stack-prisma/codec-types" }, "typeImports": [ { "alias": "EncryptedString", "named": "EncryptedString", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" }, { "alias": "EncryptedBigInt", "named": "EncryptedBigInt", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" }, { "alias": "EncryptedDate", "named": "EncryptedDate", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" }, { "alias": "EncryptedBoolean", "named": "EncryptedBoolean", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" }, { "alias": "EncryptedJson", "named": "EncryptedJson", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" }, { "alias": "EncryptedNumber", "named": "EncryptedNumber", - "package": "@prisma-next/extension-cipherstash/runtime" + "package": "@cipherstash/stack-prisma/runtime" } ] }, @@ -1375,7 +303,7 @@ "import": { "alias": "CipherstashQueryOperationTypes", "named": "QueryOperationTypes", - "package": "@prisma-next/extension-cipherstash/operation-types" + "package": "@cipherstash/stack-prisma/operation-types" } }, "storage": [ diff --git a/examples/prisma/test/e2e/mixed.e2e.test.ts b/examples/prisma/test/e2e/mixed.e2e.test.ts index da8c6b7d9..074c7d0ad 100644 --- a/examples/prisma/test/e2e/mixed.e2e.test.ts +++ b/examples/prisma/test/e2e/mixed.e2e.test.ts @@ -44,8 +44,8 @@ import { createCipherstashV3Sdk, deriveStackSchemasV3, } from '@cipherstash/stack-prisma/v3' -import postgres from '@prisma-next/postgres/runtime' -import { and } from '@prisma-next/sql-orm-client' +import { and } from '@prisma/orm-postgres/orm-client' +import postgres from '@prisma/orm-postgres/runtime' import { afterAll, beforeAll, describe, expect, it } from 'vitest' import type { Contract } from '../../src/prisma/contract.d' import contractJson from '../../src/prisma/contract.json' with { type: 'json' } diff --git a/packages/cli/src/commands/db/detect.ts b/packages/cli/src/commands/db/detect.ts index 3684c5ca5..4e8c0f211 100644 --- a/packages/cli/src/commands/db/detect.ts +++ b/packages/cli/src/commands/db/detect.ts @@ -129,9 +129,11 @@ export function detectDrizzle(cwd: string): boolean { /** * Return true when the project uses Prisma Next. * - * Detected via a `prisma-next.config.*` at the cwd (fast path) or - * a `@prisma-next/cli` / `@cipherstash/stack-prisma` entry in - * package.json. Either signal alone is enough. + * Detected via a `prisma-next.config.*` at the cwd (fast path) or a + * package.json dependency on the 0.17+ publish surface (the `prisma-next` + * bin shim or an `@prisma/orm-*` facade/platform package), the retired + * `@prisma-next/cli` scope (≤ 0.16), or `@cipherstash/stack-prisma`. + * Any signal alone is enough. */ export function detectPrismaNext(cwd: string): boolean { const configCandidates = [ @@ -160,7 +162,12 @@ export function detectPrismaNext(cwd: string): boolean { ...pkg.peerDependencies, ...pkg.optionalDependencies, } - return '@prisma-next/cli' in deps || '@cipherstash/stack-prisma' in deps + return ( + 'prisma-next' in deps || + '@prisma-next/cli' in deps || + '@cipherstash/stack-prisma' in deps || + Object.keys(deps).some((name) => name.startsWith('@prisma/orm-')) + ) } catch { return false } diff --git a/packages/stack-prisma/CHANGELOG.md b/packages/stack-prisma/CHANGELOG.md index 6a06cbe06..4844ec3c4 100644 --- a/packages/stack-prisma/CHANGELOG.md +++ b/packages/stack-prisma/CHANGELOG.md @@ -102,7 +102,7 @@ - Every v3 codec id registers a control-plane `expandNativeType` hook that strips the `public.` qualifier — `prisma-next migration plan` now renders `CREATE TABLE` columns as bare domain names (`eql_v3_bigint_ord`), matching what introspection reports, with **no `add_search_config` ops** (v3 domains carry their own index metadata). No `onFieldEvent` is registered for v3. - The v3 bundle baseline migration op is reclassified `data` (it is a contract-shape-neutral self-edge; the aggregate integrity checker rejects self-edges without a data-class op), unblocking `prisma-next migration plan` / `migrate` in consuming apps. -- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma-next/*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release. +- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma/orm-*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release. Highlights of the upgrade: @@ -113,7 +113,7 @@ - b7fa61f: Upgrade the Prisma Next integration to Prisma Next 0.16. - All `@prisma-next/*` dependencies move from `0.14.0` to `0.16.0`, in lockstep. The + All `@prisma/orm-*` dependencies move from `0.14.0` to `0.16.0`, in lockstep. The CipherStash encryption surface is unchanged — column types, envelopes, the `eql*` operators, `cipherstashFromStack`, and every subpath export behave exactly as before. @@ -282,7 +282,7 @@ not a function`. The bundled `stash-prisma` skill documents this too. - d2772b0: Renamed `@cipherstash/prisma-next` to **`@cipherstash/stack-prisma`** (#842), matching the `@cipherstash/stack-drizzle` / `@cipherstash/stack-supabase` adapter naming. Only the npm name changes: the `prisma-next` CLI, - `prisma-next.config.ts`, and the `@prisma-next/*` framework packages are the + `prisma-next.config.ts`, and the `@prisma/orm-*` framework packages are the Prisma Next framework's own surface and keep their names. Update imports (`@cipherstash/prisma-next/stack` → `@cipherstash/stack-prisma/stack`, and the other subpaths likewise) and the `extensionPacks` import in @@ -703,7 +703,7 @@ not a function`. The bundled `stash-prisma` skill documents this too. ### Minor Changes -- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma-next/*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release. +- d6d23be: Upgrade to Prisma Next 0.14.0 (from 0.8.0). Every `@prisma/orm-*` dependency is now pinned at 0.14.0; consuming apps must run Prisma Next 0.14 to use this release. Highlights of the upgrade: @@ -787,7 +787,7 @@ not a function`. The bundled `stash-prisma` skill documents this too. ### Minor Changes -- f2aca22: Upgrade `@prisma-next/*` peer/runtime stack from `0.6.0-dev.8` to `0.8.0`. +- f2aca22: Upgrade `@prisma/orm-*` peer/runtime stack from `0.6.0-dev.8` to `0.8.0`. `@prisma-next/sql-runtime@0.8` reordered the SQL execution pipeline so the `beforeExecute` middleware chain fires _before_ `encodeParams`. `bulkEncryptMiddleware` now mutates params via `replaceValues(...)` ahead of encode, which means `CipherstashCellCodec.encode` is invoked with the wire-format string rather than the original `EncryptedEnvelopeBase`. The cell codec now short-circuits string values through unchanged; the envelope path is preserved for direct (non-runtime) callers such as the codec unit tests. diff --git a/packages/stack-prisma/DEVELOPING.md b/packages/stack-prisma/DEVELOPING.md index 273fbb42d..b1a790756 100644 --- a/packages/stack-prisma/DEVELOPING.md +++ b/packages/stack-prisma/DEVELOPING.md @@ -74,6 +74,8 @@ packages/stack-prisma/ │ EQL v3 bundle (baked, digest-verified SQL) ├── 20260720T0000_upgrade_eql_v3_3_0_2/ invariant-only self-edge upgrading │ already-baselined DBs to the pinned release + ├── snapshots//contract.{json,d.ts} content-addressed contract store (0.17 + │ layout; replaces sibling end-contract.*) └── refs/head.json hand-pinned head ref (both v3 invariants) ``` diff --git a/packages/stack-prisma/README.md b/packages/stack-prisma/README.md index cc7367fe1..6f81578dd 100644 --- a/packages/stack-prisma/README.md +++ b/packages/stack-prisma/README.md @@ -45,10 +45,13 @@ model User { ```typescript // prisma-next.config.ts import cipherstash from "@cipherstash/stack-prisma/control" -// ... other imports +import { defineConfig } from "@prisma/orm-postgres/config" + export default defineConfig({ - // ... family, target, adapter, contract - extensionPacks: [cipherstash], + contract: "./prisma/schema.prisma", + output: "src/prisma", + extensions: [cipherstash], + db: { connection: process.env.DATABASE_URL! }, }) ``` @@ -56,7 +59,7 @@ export default defineConfig({ // src/db.ts import "dotenv/config" import { cipherstashFromStack } from "@cipherstash/stack-prisma/v3" -import postgres from "@prisma-next/postgres/runtime" +import postgres from "@prisma/orm-postgres/runtime" import type { Contract } from "./prisma/contract.d" import contractJson from "./prisma/contract.json" with { type: "json" } diff --git a/packages/stack-prisma/integration/adapter.ts b/packages/stack-prisma/integration/adapter.ts index 81be2bb1b..986f8b5ad 100644 --- a/packages/stack-prisma/integration/adapter.ts +++ b/packages/stack-prisma/integration/adapter.ts @@ -7,8 +7,11 @@ import { type QueryOpKind, type TableSpec, } from '@cipherstash/test-kit' -import type { AnyExpression } from '@prisma-next/sql-relational-core/ast' -import { ColumnRef, OrderByItem } from '@prisma-next/sql-relational-core/ast' +import type { AnyExpression } from '@prisma/orm-family-sql/relational-core/ast' +import { + ColumnRef, + OrderByItem, +} from '@prisma/orm-family-sql/relational-core/ast' import postgres from 'postgres' import { EncryptedBigInt } from '../src/execution/envelope-bigint' import { EncryptedBoolean } from '../src/execution/envelope-boolean' diff --git a/packages/stack-prisma/integration/json-adapter.ts b/packages/stack-prisma/integration/json-adapter.ts index 754c516fd..cf0f7f50c 100644 --- a/packages/stack-prisma/integration/json-adapter.ts +++ b/packages/stack-prisma/integration/json-adapter.ts @@ -8,8 +8,11 @@ import { import type { AnyExpression, SelectAst, -} from '@prisma-next/sql-relational-core/ast' -import { ColumnRef, OrderByItem } from '@prisma-next/sql-relational-core/ast' +} from '@prisma/orm-family-sql/relational-core/ast' +import { + ColumnRef, + OrderByItem, +} from '@prisma/orm-family-sql/relational-core/ast' import postgres from 'postgres' import { EncryptedJson } from '../src/execution/envelope-json' import { toV3CodecId } from '../src/v3/catalog' diff --git a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.json b/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.json index e360ed2af..0ee3d3e1e 100644 --- a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.json +++ b/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.json @@ -1,11 +1,11 @@ { "from": null, - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:install-eql-v3-bundle-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.4-v1" ], "createdAt": "2026-07-14T20:10:24.325Z", - "migrationHash": "sha256:fc495f7f59e6d18ae8e3df594a38898263ca91f8f5fb5f625bff20d04a0d7223" + "migrationHash": "1030654387540db7a053449e478d4b198d8666b360cca9f9c265eddb83b2dd74" } \ No newline at end of file diff --git a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.ts b/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.ts index 1d7f9d464..477d8fe1a 100644 --- a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.ts +++ b/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.ts @@ -42,7 +42,7 @@ import { Migration, MigrationCLI, rawSql, -} from '@prisma-next/target-postgres/migration' +} from '@prisma/orm-target-postgres/target/migration' import { CIPHERSTASH_V3_INVARIANTS } from '../../src/extension-metadata/constants-v3' import { readVerifiedInstallSql, @@ -55,7 +55,7 @@ export default class M extends Migration { override describe() { return { from: null, - to: 'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e', + to: '0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599', } } diff --git a/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.json b/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.json index 2e30955fc..3022f8de6 100644 --- a/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.json +++ b/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.json @@ -1,9 +1,9 @@ { - "from": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "from": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1" ], "createdAt": "2026-07-20T11:40:17.876Z", - "migrationHash": "sha256:7bb960435f9cdb7d7c25e4ff70b02fa050a1b8e695541facc47dd87ec3cc634e" + "migrationHash": "0c56fe6b641c5839c82be72317b2af165fb574b0dcdfc4aa6b50425e371a9d0f" } \ No newline at end of file diff --git a/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts b/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts index 6a025d3ad..a04a73322 100644 --- a/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts +++ b/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts @@ -18,7 +18,7 @@ import { Migration, MigrationCLI, rawSql, -} from '@prisma-next/target-postgres/migration' +} from '@prisma/orm-target-postgres/target/migration' import { CIPHERSTASH_V3_INVARIANTS } from '../../src/extension-metadata/constants-v3' import { readVerifiedInstallSql, @@ -32,8 +32,8 @@ export default class M extends Migration { // Invariant-only self-edge on the v3-only contract space's // empty-storage hash — the same `to` the baseline lands on. return { - from: 'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e', - to: 'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e', + from: '0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599', + to: '0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599', } } diff --git a/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.json b/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.json index 9498f6b95..119ec2982 100644 --- a/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.json +++ b/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.json @@ -1,9 +1,9 @@ { - "from": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", - "to": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "from": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", + "to": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "providedInvariants": [ "cipherstash:upgrade-eql-v3-bundle-3.0.4-v1" ], "createdAt": "2026-07-28T10:44:32.390Z", - "migrationHash": "sha256:59e124d8a64d31a0f2b27ef9f5b3868f822ec12823aad71fee8e64b36f115bf4" + "migrationHash": "94a2ce9c8e973b7a635d92571ff642429e6ebfb7a4600291ee626201e110e13e" } \ No newline at end of file diff --git a/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts b/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts index dc9aa3e35..74127a152 100644 --- a/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts +++ b/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts @@ -22,7 +22,7 @@ import { Migration, MigrationCLI, rawSql, -} from '@prisma-next/target-postgres/migration' +} from '@prisma/orm-target-postgres/target/migration' import { CIPHERSTASH_V3_INVARIANTS } from '../../src/extension-metadata/constants-v3' import { readVerifiedInstallSql, @@ -36,8 +36,8 @@ export default class M extends Migration { // Invariant-only self-edge on the v3-only contract space's // empty-storage hash — the same `to` the baseline lands on. return { - from: 'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e', - to: 'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e', + from: '0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599', + to: '0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599', } } diff --git a/packages/stack-prisma/migrations/refs/head.json b/packages/stack-prisma/migrations/refs/head.json index 306bb83e4..c8f25e621 100644 --- a/packages/stack-prisma/migrations/refs/head.json +++ b/packages/stack-prisma/migrations/refs/head.json @@ -1,5 +1,5 @@ { - "hash": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e", + "hash": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599", "invariants": [ "cipherstash:install-eql-v3-bundle-v1", "cipherstash:upgrade-eql-v3-bundle-3.0.2-v1", diff --git a/packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts b/packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts new file mode 100644 index 000000000..76c859e8a --- /dev/null +++ b/packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.d.ts @@ -0,0 +1,108 @@ +// ⚠️ GENERATED FILE - DO NOT EDIT +// This file is automatically generated by 'prisma-next contract emit'. +// To regenerate, run: prisma-next contract emit +import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-target-postgres/adapter/operation-types'; +import type { + Bit, + Char, + CodecTypes as PgTypes, + Interval, + JsonValue, + Numeric, + Time, + Timestamp, + Timestamptz, + Timetz, + VarBit, + Varchar, +} from '@prisma/orm-target-postgres/target/codec-types'; + +import type { + ContractWithTypeMaps, + TypeMaps as TypeMapsType, +} from '@prisma/orm-family-sql/contract/types'; +import type { + Contract as ContractType, + ExecutionHashBase, + NamespaceId, + ProfileHashBase, + StorageHashBase, +} from '@prisma/orm-framework/contract/types'; + +export type StorageHash = + StorageHashBase<'0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599'>; +export type ExecutionHash = ExecutionHashBase; +export type ProfileHash = + ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; + +export type CodecTypes = PgTypes; +export type LaneCodecTypes = CodecTypes; +export type QueryOperationTypes = PgAdapterQueryOps; +type DefaultLiteralValue = CodecId extends keyof CodecTypes + ? Encoded extends CodecTypes[CodecId]['json'] + ? Encoded + : CodecTypes[CodecId]['json'] + : Encoded; + +export type FieldOutputTypes = { readonly public: Record }; +export type FieldInputTypes = { readonly public: Record }; +export type StorageColumnTypes = { readonly public: {} }; +export type StorageColumnInputTypes = { readonly public: {} }; +export type TypeMaps = TypeMapsType< + CodecTypes, + QueryOperationTypes, + FieldOutputTypes, + FieldInputTypes, + StorageColumnTypes, + StorageColumnInputTypes +>; + +type ContractBase = Omit< + ContractType<{ + readonly namespaces: { + readonly public: { + readonly id: 'public'; + readonly kind: 'postgres-schema'; + readonly entries: { readonly table: {} }; + }; + }; + readonly storageHash: StorageHash; + }>, + 'roots' | 'domain' +> & { + readonly target: 'postgres'; + readonly targetFamily: 'sql'; + readonly roots: Record; + readonly domain: { + readonly namespaces: { + readonly public: { + readonly models: Record; + }; + }; + }; + readonly capabilities: { + readonly postgres: { + readonly distinctOn: true; + readonly jsonAgg: true; + readonly lateral: true; + readonly limit: true; + readonly orderBy: true; + readonly returning: true; + }; + readonly sql: { + readonly defaultInInsert: true; + readonly enums: true; + readonly lateral: true; + readonly returning: true; + readonly scalarList: true; + }; + }; + readonly extensions: {}; + readonly meta: {}; + + readonly profileHash: ProfileHash; +}; + +export type Contract = ContractWithTypeMaps; + +export type Namespaces = Contract['storage']['namespaces']; diff --git a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.json b/packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json similarity index 78% rename from packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.json rename to packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json index e2cd070fe..60f34c0dd 100644 --- a/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/end-contract.json +++ b/packages/stack-prisma/migrations/snapshots/0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599/contract.json @@ -2,7 +2,7 @@ "schemaVersion": "1", "targetFamily": "sql", "target": "postgres", - "profileHash": "sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb", + "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2", "roots": {}, "domain": { "namespaces": { @@ -21,7 +21,7 @@ "kind": "postgres-schema" } }, - "storageHash": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e" + "storageHash": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599" }, "capabilities": { "postgres": { @@ -36,10 +36,11 @@ "defaultInInsert": true, "enums": true, "lateral": true, - "returning": true + "returning": true, + "scalarList": true } }, - "extensionPacks": {}, + "extensions": {}, "meta": {}, "_generated": { "warning": "⚠️ GENERATED FILE - DO NOT EDIT", diff --git a/packages/stack-prisma/package.json b/packages/stack-prisma/package.json index 8844b5129..f7114280f 100644 --- a/packages/stack-prisma/package.json +++ b/packages/stack-prisma/package.json @@ -79,29 +79,17 @@ "dependencies": { "@cipherstash/eql": "3.0.4", "@cipherstash/stack": "workspace:*", - "@prisma-next/contract": "0.16.0", - "@prisma-next/family-sql": "0.16.0", - "@prisma-next/framework-components": "0.16.0", - "@prisma-next/migration-tools": "0.16.0", - "@prisma-next/sql-contract": "0.16.0", - "@prisma-next/sql-operations": "0.16.0", - "@prisma-next/sql-relational-core": "0.16.0", - "@prisma-next/sql-runtime": "0.16.0", - "@prisma-next/ts-render": "0.16.0", - "@prisma-next/utils": "0.16.0", + "@prisma/orm-family-sql": "0.17.0", + "@prisma/orm-framework": "0.17.0", + "@prisma/orm-toolchain": "0.17.0", "arktype": "^2.2.3" }, + "peerDependencies": { + "@prisma/orm-target-postgres": "0.17.0" + }, "devDependencies": { "@cipherstash/test-kit": "workspace:*", - "@prisma-next/adapter-postgres": "0.16.0", - "@prisma-next/cli": "0.16.0", - "@prisma-next/driver-postgres": "0.16.0", - "@prisma-next/extension-author-tools": "0.16.0", - "@prisma-next/psl-parser": "0.16.0", - "@prisma-next/sql-contract-psl": "0.16.0", - "@prisma-next/sql-contract-ts": "0.16.0", - "@prisma-next/sql-schema-ir": "0.16.0", - "@prisma-next/target-postgres": "0.16.0", + "@prisma/orm-target-postgres": "0.17.0", "dotenv": "17.4.2", "fast-check": "^4.8.0", "pathe": "^2.0.3", diff --git a/packages/stack-prisma/prisma-next.config.ts b/packages/stack-prisma/prisma-next.config.ts index 5a9aac56d..570a92dda 100644 --- a/packages/stack-prisma/prisma-next.config.ts +++ b/packages/stack-prisma/prisma-next.config.ts @@ -11,17 +11,17 @@ * * This config is **maintainer-only** — application authors who consume * this package do not need it. Their own `prisma-next.config.ts` - * registers the extension via `extensionPacks: [cipherstash]`; the + * registers the extension via `extensions: [cipherstash]`; the * descriptor at `src/exports/control.ts` JSON-imports the on-disk * artefacts emitted here. */ -import postgresAdapter from '@prisma-next/adapter-postgres/control' -import { defineConfig } from '@prisma-next/cli/config-types' -import sql from '@prisma-next/family-sql/control' -import { prismaContract } from '@prisma-next/sql-contract-psl/provider' -import postgres from '@prisma-next/target-postgres/control' -import { postgresCreateNamespace } from '@prisma-next/target-postgres/types' +import { prismaContract } from '@prisma/orm-family-sql/contract-psl/provider' +import sql from '@prisma/orm-family-sql/family/control' +import postgresAdapter from '@prisma/orm-target-postgres/adapter/control' +import postgres from '@prisma/orm-target-postgres/target/control' +import { postgresCreateNamespace } from '@prisma/orm-target-postgres/target/types' +import { defineConfig } from '@prisma/orm-toolchain/cli/config-types' export default defineConfig({ family: sql, diff --git a/packages/stack-prisma/src/contract-authoring.ts b/packages/stack-prisma/src/contract-authoring.ts index df9eedae4..15654a1d1 100644 --- a/packages/stack-prisma/src/contract-authoring.ts +++ b/packages/stack-prisma/src/contract-authoring.ts @@ -38,7 +38,7 @@ import type { QueryCapabilities } from '@cipherstash/stack/eql/v3' import type { AuthoringTypeConstructorDescriptor, AuthoringTypeNamespace, -} from '@prisma-next/framework-components/authoring' +} from '@prisma/orm-framework/components/authoring' import { EXPOSED_DOMAIN_ENTRIES, type V3DomainMeta } from './v3/catalog' // The stem of a bare domain maps to a JS-friendly display label; the suffix diff --git a/packages/stack-prisma/src/contract.d.ts b/packages/stack-prisma/src/contract.d.ts index b739c2236..76c859e8a 100644 --- a/packages/stack-prisma/src/contract.d.ts +++ b/packages/stack-prisma/src/contract.d.ts @@ -1,7 +1,7 @@ // ⚠️ GENERATED FILE - DO NOT EDIT // This file is automatically generated by 'prisma-next contract emit'. // To regenerate, run: prisma-next contract emit -import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma-next/adapter-postgres/operation-types'; +import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-target-postgres/adapter/operation-types'; import type { Bit, Char, @@ -15,32 +15,34 @@ import type { Timetz, VarBit, Varchar, -} from '@prisma-next/target-postgres/codec-types'; +} from '@prisma/orm-target-postgres/target/codec-types'; import type { ContractWithTypeMaps, TypeMaps as TypeMapsType, -} from '@prisma-next/sql-contract/types'; +} from '@prisma/orm-family-sql/contract/types'; import type { Contract as ContractType, ExecutionHashBase, NamespaceId, ProfileHashBase, StorageHashBase, -} from '@prisma-next/contract/types'; +} from '@prisma/orm-framework/contract/types'; export type StorageHash = - StorageHashBase<'sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e'>; + StorageHashBase<'0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599'>; export type ExecutionHash = ExecutionHashBase; export type ProfileHash = - ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>; + ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; export type CodecTypes = PgTypes; export type LaneCodecTypes = CodecTypes; export type QueryOperationTypes = PgAdapterQueryOps; -type DefaultLiteralValue = CodecId extends keyof CodecTypes - ? CodecTypes[CodecId]['output'] - : _Encoded; +type DefaultLiteralValue = CodecId extends keyof CodecTypes + ? Encoded extends CodecTypes[CodecId]['json'] + ? Encoded + : CodecTypes[CodecId]['json'] + : Encoded; export type FieldOutputTypes = { readonly public: Record }; export type FieldInputTypes = { readonly public: Record }; @@ -95,7 +97,7 @@ type ContractBase = Omit< readonly scalarList: true; }; }; - readonly extensionPacks: {}; + readonly extensions: {}; readonly meta: {}; readonly profileHash: ProfileHash; diff --git a/packages/stack-prisma/src/contract.json b/packages/stack-prisma/src/contract.json index 1c95c094d..60f34c0dd 100644 --- a/packages/stack-prisma/src/contract.json +++ b/packages/stack-prisma/src/contract.json @@ -2,7 +2,7 @@ "schemaVersion": "1", "targetFamily": "sql", "target": "postgres", - "profileHash": "sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb", + "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2", "roots": {}, "domain": { "namespaces": { @@ -21,7 +21,7 @@ "kind": "postgres-schema" } }, - "storageHash": "sha256:efd408cf8924b4d1805bf5acced8898114aa03cd46b465720179c82a4431d51e" + "storageHash": "0c0734babd6eeb868fee1f281ca96963022475611560e9f170f465daa35f8599" }, "capabilities": { "postgres": { @@ -40,7 +40,7 @@ "scalarList": true } }, - "extensionPacks": {}, + "extensions": {}, "meta": {}, "_generated": { "warning": "⚠️ GENERATED FILE - DO NOT EDIT", diff --git a/packages/stack-prisma/src/contract.prisma b/packages/stack-prisma/src/contract.prisma index a060efbca..7e470f024 100644 --- a/packages/stack-prisma/src/contract.prisma +++ b/packages/stack-prisma/src/contract.prisma @@ -15,7 +15,7 @@ // `public.eql_v3_*` storage domains, the `eql_v3.*` operator functions, and the // `eql_v3_internal` helper schema — but **no contract-space storage** (no config // table; unlike the retired EQL v2 bundle's `eql_v2_configuration`). The -// `SqlStorage` IR (`@prisma-next/sql-contract/types`) models tables and +// `SqlStorage` IR (`@prisma/orm-family-sql/contract/types`) models tables and // parameterised type instances, and v3 declares neither at the contract level: // the v3 domains carry their own index metadata, so there is no // `add_search_config` bookkeeping table to model. diff --git a/packages/stack-prisma/src/execution/abort.ts b/packages/stack-prisma/src/execution/abort.ts index 5f349b505..253893b09 100644 --- a/packages/stack-prisma/src/execution/abort.ts +++ b/packages/stack-prisma/src/execution/abort.ts @@ -1,7 +1,7 @@ /** * Cipherstash-internal `RUNTIME.ABORTED` phase wrapping. * - * The framework`s `runtimeAborted(phase)` (`@prisma-next/framework- + * The framework`s `runtimeAborted(phase)` (`@prisma/orm-framework/ * components/runtime`) constructs the canonical `RUNTIME.ABORTED` * envelope (`code === 'RUNTIME.ABORTED'`, `category === 'RUNTIME'`, * `details.phase`, `cause`) but its `phase` parameter is typed as @@ -43,11 +43,11 @@ * cipherstash-internal — no widening of the framework union. */ -import type { RuntimeErrorEnvelope } from '@prisma-next/framework-components/runtime' +import type { RuntimeErrorEnvelope } from '@prisma/orm-framework/components/runtime' import { RUNTIME_ABORTED, runtimeError, -} from '@prisma-next/framework-components/runtime' +} from '@prisma/orm-framework/components/runtime' /** Discriminator placed in `details.phase` of cipherstash-issued aborts. */ export type CipherstashAbortPhase = 'bulk-encrypt' | 'decrypt' | 'decrypt-all' diff --git a/packages/stack-prisma/src/execution/decrypt-all.ts b/packages/stack-prisma/src/execution/decrypt-all.ts index 529419e15..2094fe491 100644 --- a/packages/stack-prisma/src/execution/decrypt-all.ts +++ b/packages/stack-prisma/src/execution/decrypt-all.ts @@ -60,7 +60,7 @@ * observing the signal. */ -import { ifDefined } from '@prisma-next/utils/defined' +import { ifDefined } from '@prisma/orm-framework/utils/defined' import { checkCipherstashAborted, raceCipherstashAbort } from './abort' import { EncryptedEnvelopeBase, isHandleDecrypted } from './envelope-base' import type { CipherstashRoutingKey, CipherstashSdk } from './sdk' diff --git a/packages/stack-prisma/src/execution/envelope-base.ts b/packages/stack-prisma/src/execution/envelope-base.ts index 0f2eb5466..3dcdd8aed 100644 --- a/packages/stack-prisma/src/execution/envelope-base.ts +++ b/packages/stack-prisma/src/execution/envelope-base.ts @@ -35,7 +35,7 @@ * override is what stops that re-exposure path. */ -import { ifDefined } from '@prisma-next/utils/defined' +import { ifDefined } from '@prisma/orm-framework/utils/defined' import { checkCipherstashAborted, raceCipherstashAbort } from './abort' import type { CipherstashSdk } from './sdk' diff --git a/packages/stack-prisma/src/execution/routing.ts b/packages/stack-prisma/src/execution/routing.ts index a30c7b316..e1cb88e01 100644 --- a/packages/stack-prisma/src/execution/routing.ts +++ b/packages/stack-prisma/src/execution/routing.ts @@ -21,7 +21,7 @@ import type { InsertAst, InsertValue, UpdateAst, -} from '@prisma-next/sql-relational-core/ast' +} from '@prisma/orm-family-sql/relational-core/ast' import { EncryptedEnvelopeBase, setHandleRoutingKey } from './envelope-base' import type { CipherstashRoutingKey } from './sdk' diff --git a/packages/stack-prisma/src/exports/codec-types.ts b/packages/stack-prisma/src/exports/codec-types.ts index 6aaade05b..dab6b33b1 100644 --- a/packages/stack-prisma/src/exports/codec-types.ts +++ b/packages/stack-prisma/src/exports/codec-types.ts @@ -2,7 +2,7 @@ * Codec-types subpath entry for the cipherstash extension. Re-exports * the hand-written `CodecTypes` table from `../types/codec-types` so * the contract emitter can pull it via - * `import type { CodecTypes as CipherstashTypes } from '@prisma-next/extension-cipherstash/codec-types'`. + * `import type { CodecTypes as CipherstashTypes } from '@cipherstash/stack-prisma/codec-types'`. * * Mirrors `packages/3-extensions/pgvector/src/exports/codec-types.ts`. */ diff --git a/packages/stack-prisma/src/exports/contract-space-typing.ts b/packages/stack-prisma/src/exports/contract-space-typing.ts index 247b52745..3bdf085e3 100644 --- a/packages/stack-prisma/src/exports/contract-space-typing.ts +++ b/packages/stack-prisma/src/exports/contract-space-typing.ts @@ -21,10 +21,10 @@ * drift while keeping the descriptor module light. */ -import type { Contract } from '@prisma-next/contract/types' -import type { MigrationPlanOperation } from '@prisma-next/framework-components/control' -import type { MigrationMetadata } from '@prisma-next/migration-tools/metadata' -import type { SqlStorage } from '@prisma-next/sql-contract/types' +import type { SqlStorage } from '@prisma/orm-family-sql/contract/types' +import type { MigrationPlanOperation } from '@prisma/orm-framework/components/control' +import type { Contract } from '@prisma/orm-framework/contract/types' +import type { MigrationMetadata } from '@prisma/orm-toolchain/migration-tools/metadata' function fail(field: string, value: unknown): never { throw new Error( diff --git a/packages/stack-prisma/src/exports/control.ts b/packages/stack-prisma/src/exports/control.ts index 1df874f55..c788e2b3f 100644 --- a/packages/stack-prisma/src/exports/control.ts +++ b/packages/stack-prisma/src/exports/control.ts @@ -10,7 +10,7 @@ * The descriptor wires those JSON artefacts via JSON-import declarations * so they flow through the consuming application's module resolver * without filesystem assumptions, and synthesises the canonical - * {@link import('@prisma-next/framework-components/control').MigrationPackage} + * {@link import('@prisma/orm-framework/components/control').MigrationPackage} * shape for the framework's runner / verifier to consume. * * Wired surfaces: @@ -29,10 +29,10 @@ * (contract-space package layout convention). */ -import type { Contract } from '@prisma-next/contract/types' -import type { SqlControlExtensionDescriptor } from '@prisma-next/family-sql/control' -import { contractSpaceFromJson } from '@prisma-next/migration-tools/spaces' -import type { SqlStorage } from '@prisma-next/sql-contract/types' +import type { SqlStorage } from '@prisma/orm-family-sql/contract/types' +import type { SqlControlExtensionDescriptor } from '@prisma/orm-family-sql/family/control' +import type { Contract } from '@prisma/orm-framework/contract/types' +import { contractSpaceFromJson } from '@prisma/orm-toolchain/migration-tools/spaces' import v3BaselineMetadata from '../../migrations/20260601T0100_install_eql_v3_bundle/migration.json' with { type: 'json', } @@ -111,14 +111,14 @@ const cipherstashExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> // Spread pack-meta first so it contributes `kind` / `id` / `familyId` // / `targetId` / `version` / `authoring` / `types.{codecTypes,storage}` // — then overlay the contract-space block and the codec lifecycle - // hook on top. The two `types.codecTypes` slots (`codecInstances` + // hook on top. The two `types.codecTypes` slots (`codecDescriptors` // from pack-meta, `controlPlaneHooks` from this descriptor) coexist // on the same path and are merged below. ...cipherstashPackMeta, contractSpace: cipherstashContractSpace, /** * Free-form `types.codecTypes.controlPlaneHooks` block — the SQL - * family's `extractCodecControlHooks` (in `@prisma-next/family-sql/ + * family's `extractCodecControlHooks` (in `@prisma/orm-family-sql/family/ * control`) finds hooks via duck-typing on this exact path. Mirrors * pgvector's wiring at `packages/3-extensions/pgvector/src/exports/ * control.ts`. diff --git a/packages/stack-prisma/src/exports/operation-types.ts b/packages/stack-prisma/src/exports/operation-types.ts index beb7efa84..65ef54741 100644 --- a/packages/stack-prisma/src/exports/operation-types.ts +++ b/packages/stack-prisma/src/exports/operation-types.ts @@ -2,7 +2,7 @@ * Operation type definitions for the cipherstash extension. * * Re-export from the types module for the public - * `@prisma-next/extension-cipherstash/operation-types` subpath. The + * `@cipherstash/stack-prisma/operation-types` subpath. The * contract emitter pulls these via the `types.operationTypes` / * `types.queryOperationTypes` import declarations on * `cipherstashPackMeta` (see `../extension-metadata/descriptor-meta.ts`); user code diff --git a/packages/stack-prisma/src/exports/pack.ts b/packages/stack-prisma/src/exports/pack.ts index 9cfdde58b..3c5ecb8c5 100644 --- a/packages/stack-prisma/src/exports/pack.ts +++ b/packages/stack-prisma/src/exports/pack.ts @@ -2,7 +2,7 @@ * Pack entry point for the cipherstash extension. * * Re-exports the SDK-free pack metadata so TS contract authoring - * (`defineContract({ extensionPacks: { cipherstash: cipherstashPack } })`) + * (`defineContract({ extensions: { cipherstash: cipherstashPack } })`) * can enable the `cipherstash.*` PSL/TS namespace and the storage type * registration without pulling in any runtime code (envelope, SDK, * codec runtime, middleware). diff --git a/packages/stack-prisma/src/extension-metadata/codec-metadata.ts b/packages/stack-prisma/src/extension-metadata/codec-metadata.ts index 31c764cf0..9d70c528a 100644 --- a/packages/stack-prisma/src/extension-metadata/codec-metadata.ts +++ b/packages/stack-prisma/src/extension-metadata/codec-metadata.ts @@ -1,13 +1,13 @@ /** * SDK-free codec used in pack-meta (`cipherstashPackMeta.types.codecTypes - * .codecInstances`). Pack-meta consumers only read codec *metadata* + * .codecDescriptors`). Pack-meta consumers only read codec *metadata* * (`typeId`, `targetTypes`, `traits`, `renderOutputType`) at contract * emit time — they never call `encode`/`decode`. * * The SDK-bound runtime codec for actual `encode`/`decode` lives in * `../v3/codec-runtime-v3`; it is resolved through the runtime - * descriptor's `codecDescriptors` at runtime instead of through - * pack-meta's `codecInstances`. + * descriptor's SDK-bound `codecDescriptors` at runtime instead of + * through the pack-meta set here. * * Keeping the SDK-free metadata in its own module — and *not* importing * the runtime envelope classes — preserves the control vs runtime @@ -22,12 +22,17 @@ * surfaces immediately instead of silently no-op'ing. */ -import type { JsonValue } from '@prisma-next/contract/types' import { type AnyCodecDescriptor, CodecImpl, type CodecTrait, -} from '@prisma-next/framework-components/codec' +} from '@prisma/orm-framework/components/codec' +import type { JsonValue } from '@prisma/orm-framework/contract/types' +import { + type AnyPostgresCodecDescriptor, + definePostgresCodecs, + postgresCodec, +} from '@prisma/orm-target-postgres/target/codec-descriptor' import { envelopeTypeNameForCastAs, V3_DOMAIN_META_BY_CODEC_ID, @@ -90,14 +95,13 @@ function makeV3MetadataDescriptor( codecId: string, meta: V3DomainMeta, typeName: string, -): AnyCodecDescriptor { - return { +): AnyPostgresCodecDescriptor { + const generic: AnyCodecDescriptor = { codecId, // Type-level adapter into the framework's closed `CodecTrait` union — // same rationale as `v3CodecTraits` in `../v3/codec-runtime-v3.ts`. traits: v3TraitsForCapabilities(meta.capabilities) as readonly CodecTrait[], targetTypes: [meta.nativeType], - meta: { db: { sql: { postgres: { nativeType: meta.nativeType } } } }, paramsSchema: { '~standard': { version: 1, @@ -107,23 +111,37 @@ function makeV3MetadataDescriptor( }, isParameterized: true, renderOutputType: () => typeName, - factory: () => () => { - throw new Error( - 'cipherstash codec: metadata descriptor factory is not callable', - ) - }, + // Representative materialization: 0.17 emitters resolve a Codec + // instance through the descriptor for codec-dispatched type + // rendering, so the factory returns the SDK-free metadata codec + // (whose `encode`/`decode` still throw with a runtime-descriptor + // hint) instead of throwing at materialization time. + factory: () => () => new CipherstashCodecMetadata(descriptor, typeName), } + const descriptor: AnyPostgresCodecDescriptor = postgresCodec(generic, { + // Same identity JSON projection as the runtime descriptors — a v3 + // column is a domain over `jsonb`, so the stored EQL payload + // document already is its canonical JSON form (see + // `v3PostgresCodecOptions` in `../v3/codec-runtime-v3.ts`). + nativeType: () => meta.nativeType, + jsonProjection: (expression) => expression, + }) + return descriptor } -/** All 40 v3 metadata codecs, in catalog order. */ -export const cipherstashV3CodecMetadataInstances: readonly CipherstashCodecMetadata[] = - [...V3_DOMAIN_META_BY_CODEC_ID.entries()].map(([codecId, meta]) => { - const typeName = envelopeTypeNameForCastAs(meta.castAs) - return new CipherstashCodecMetadata( - makeV3MetadataDescriptor(codecId, meta, typeName), - typeName, - ) - }) +/** All 40 v3 SDK-free target descriptors, in catalog order — the + * pack-meta `types.codecTypes.codecDescriptors` set (0.17's replacement + * for the deleted `codecInstances` slot). */ +export const cipherstashV3CodecDescriptors: readonly AnyPostgresCodecDescriptor[] = + definePostgresCodecs( + [...V3_DOMAIN_META_BY_CODEC_ID.entries()].map(([codecId, meta]) => + makeV3MetadataDescriptor( + codecId, + meta, + envelopeTypeNameForCastAs(meta.castAs), + ), + ), + ) /** Pack-meta `types.storage` rows for the v3 codecs — one per domain, * each targeting its own concrete `public.eql_v3_*` native type. */ diff --git a/packages/stack-prisma/src/extension-metadata/descriptor-meta.ts b/packages/stack-prisma/src/extension-metadata/descriptor-meta.ts index 67195c52f..7d2370225 100644 --- a/packages/stack-prisma/src/extension-metadata/descriptor-meta.ts +++ b/packages/stack-prisma/src/extension-metadata/descriptor-meta.ts @@ -3,26 +3,26 @@ * * Mirrors `packages/3-extensions/pgvector/src/extension-metadata/descriptor-meta.ts` — * the metadata block that gets serialized into `contract.json`'s - * `extensionPacks.cipherstash` slot at emit time. + * `extensions.cipherstash` slot at emit time. * - * SDK-free: the runtime descriptor layers SDK-bound codec instances on - * top at execution time. The `codecInstances` slot here uses the - * metadata-only codec from `./codec-metadata` because pack-meta - * consumers only read codec metadata (typeId, targetTypes, traits, - * renderOutputType); runtime encode/decode always go through the - * SDK-bound v3 codecs produced by `createV3CodecDescriptors` (see - * `../v3/codec-runtime-v3`). + * SDK-free: the runtime descriptor layers SDK-bound codec descriptors + * on top at execution time. The `codecDescriptors` slot here uses the + * metadata-only target descriptors from `./codec-metadata` because + * pack-meta consumers only read codec metadata (typeId, targetTypes, + * traits, renderOutputType, nativeType, JSON projection); runtime + * encode/decode always go through the SDK-bound v3 codecs produced by + * `createV3CodecDescriptors` (see `../v3/codec-runtime-v3`). * * The control descriptor in `../exports/control.ts` spreads this pack * meta so the framework's contract emitter sees `authoring`, - * `types.codecTypes.codecInstances`, and `types.storage` alongside + * `types.codecTypes.codecDescriptors`, and `types.storage` alongside * the contract-space and codec-lifecycle-hooks blocks already wired * by the codec lifecycle hook block. */ import { cipherstashAuthoringTypes } from '../contract-authoring' import { - cipherstashV3CodecMetadataInstances, + cipherstashV3CodecDescriptors, cipherstashV3StorageRows, } from './codec-metadata' import { @@ -43,12 +43,12 @@ export const cipherstashPackMeta = { }, types: { codecTypes: { - codecInstances: [ + codecDescriptors: [ // EQL v3 — all 40 catalog domains, derived (see codec-metadata.ts). - ...cipherstashV3CodecMetadataInstances, + ...cipherstashV3CodecDescriptors, ], // Drives the contract emitter to add - // `import type { CodecTypes as CipherstashTypes } from '@prisma-next/extension-cipherstash/codec-types'` + // `import type { CodecTypes as CipherstashTypes } from '@cipherstash/stack-prisma/codec-types'` // and to intersect `CipherstashTypes` into the generated // `CodecTypes` type alias. Without this slot the codec-id-keyed // type lookups (`CodecTypes['cipherstash/eql-v3/eql_v3_text@1']`) @@ -56,7 +56,7 @@ export const cipherstashPackMeta = { // trait-dispatched operators (`eqlGt`, …) never surface on real // model accessors. Mirrors pgvector's `import:` slot. import: { - package: '@prisma-next/extension-cipherstash/codec-types', + package: '@cipherstash/stack-prisma/codec-types', named: 'CodecTypes', alias: 'CipherstashTypes', }, @@ -68,27 +68,27 @@ export const cipherstashPackMeta = { // declaration. typeImports: [ { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedString', alias: 'EncryptedString', }, { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedBigInt', alias: 'EncryptedBigInt', }, { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedDate', alias: 'EncryptedDate', }, { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedBoolean', alias: 'EncryptedBoolean', }, { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedJson', alias: 'EncryptedJson', }, @@ -96,7 +96,7 @@ export const cipherstashPackMeta = { // `EncryptedNumber`; the other v3 domains reuse the // version-neutral envelope classes already imported above). { - package: '@prisma-next/extension-cipherstash/runtime', + package: '@cipherstash/stack-prisma/runtime', named: 'EncryptedNumber', alias: 'EncryptedNumber', }, @@ -104,7 +104,7 @@ export const cipherstashPackMeta = { }, queryOperationTypes: { import: { - package: '@prisma-next/extension-cipherstash/operation-types', + package: '@cipherstash/stack-prisma/operation-types', named: 'QueryOperationTypes', alias: 'CipherstashQueryOperationTypes', }, diff --git a/packages/stack-prisma/src/migration/cipherstash-codec-v3.ts b/packages/stack-prisma/src/migration/cipherstash-codec-v3.ts index 9130e402b..3e14d92ae 100644 --- a/packages/stack-prisma/src/migration/cipherstash-codec-v3.ts +++ b/packages/stack-prisma/src/migration/cipherstash-codec-v3.ts @@ -38,7 +38,7 @@ * end-to-end. */ -import type { CodecControlHooks } from '@prisma-next/family-sql/control' +import type { CodecControlHooks } from '@prisma/orm-family-sql/family/control' import { CIPHERSTASH_V3_CODEC_IDS, type CipherstashV3CodecId, diff --git a/packages/stack-prisma/src/stack/from-stack-v3.ts b/packages/stack-prisma/src/stack/from-stack-v3.ts index b17104c8c..9ba6da458 100644 --- a/packages/stack-prisma/src/stack/from-stack-v3.ts +++ b/packages/stack-prisma/src/stack/from-stack-v3.ts @@ -30,7 +30,7 @@ import { Encryption, type EncryptionClient } from '@cipherstash/stack/v3' import type { SqlMiddleware, SqlRuntimeExtensionDescriptor, -} from '@prisma-next/sql-runtime' +} from '@prisma/orm-family-sql/runtime' import { isCipherstashV3CodecId } from '../extension-metadata/constants-v3' import { bulkEncryptMiddlewareV3 } from '../v3/bulk-encrypt-v3' diff --git a/packages/stack-prisma/src/types/operation-types.ts b/packages/stack-prisma/src/types/operation-types.ts index 14e94a371..f701d7dc6 100644 --- a/packages/stack-prisma/src/types/operation-types.ts +++ b/packages/stack-prisma/src/types/operation-types.ts @@ -23,7 +23,7 @@ * suitable for a WHERE clause. */ -import type { Expression } from '@prisma-next/sql-relational-core/expression' +import type { Expression } from '@prisma/orm-family-sql/relational-core/expression' type CodecTypesBase = Record< string, diff --git a/packages/stack-prisma/src/v3/bulk-encrypt-v3.ts b/packages/stack-prisma/src/v3/bulk-encrypt-v3.ts index d0fa7c28e..db5b201c0 100644 --- a/packages/stack-prisma/src/v3/bulk-encrypt-v3.ts +++ b/packages/stack-prisma/src/v3/bulk-encrypt-v3.ts @@ -41,9 +41,9 @@ import type { ParamRefHandle, SqlParamRefMutator, -} from '@prisma-next/sql-relational-core/middleware' -import type { SqlMiddleware } from '@prisma-next/sql-runtime' -import { ifDefined } from '@prisma-next/utils/defined' +} from '@prisma/orm-family-sql/relational-core/middleware' +import type { SqlMiddleware } from '@prisma/orm-family-sql/runtime' +import { ifDefined } from '@prisma/orm-framework/utils/defined' import { checkCipherstashAborted, raceCipherstashAbort, diff --git a/packages/stack-prisma/src/v3/codec-runtime-v3.ts b/packages/stack-prisma/src/v3/codec-runtime-v3.ts index ec5a5fe0f..fde485164 100644 --- a/packages/stack-prisma/src/v3/codec-runtime-v3.ts +++ b/packages/stack-prisma/src/v3/codec-runtime-v3.ts @@ -23,16 +23,20 @@ * returns one shared codec per domain, mirroring v2 / pgvector. */ -import type { JsonValue } from '@prisma-next/contract/types' +import type { + ProjectionExpr, + SqlCodecCallContext, +} from '@prisma/orm-family-sql/relational-core/ast' +import type { RuntimeParameterizedCodecDescriptor } from '@prisma/orm-family-sql/runtime' import { type AnyCodecDescriptor, CodecImpl, type CodecInstanceContext, type CodecTrait, -} from '@prisma-next/framework-components/codec' -import { runtimeError } from '@prisma-next/framework-components/runtime' -import type { SqlCodecCallContext } from '@prisma-next/sql-relational-core/ast' -import type { RuntimeParameterizedCodecDescriptor } from '@prisma-next/sql-runtime' +} from '@prisma/orm-framework/components/codec' +import { runtimeError } from '@prisma/orm-framework/components/runtime' +import type { JsonValue } from '@prisma/orm-framework/contract/types' +import { postgresCodec } from '@prisma/orm-target-postgres/target/codec-descriptor' import { type as arktype } from 'arktype' import type { EncryptedEnvelopeBase } from '../execution/envelope-base' import { EncryptedBigInt } from '../execution/envelope-bigint' @@ -368,10 +372,32 @@ export class CipherstashV3CellCodec< } } +/** + * Postgres target-descriptor options shared by every v3 descriptor + * (0.17's replacement for the deleted `meta.db.sql.postgres` channel). + * + * The JSON projection is the identity: a v3 column is a Postgres domain + * over `jsonb` whose stored value IS the serialised EQL payload + * document, so the target's native JSON conversion already yields the + * codec's canonical JSON form verbatim. (Decrypting inside the database + * is impossible by design — the payload only resolves to plaintext + * through the SDK — so the ciphertext document is the only honest + * projection.) + */ +export function v3PostgresCodecOptions(meta: V3DomainMeta): { + nativeType: () => string + jsonProjection: (expression: ProjectionExpr) => ProjectionExpr +} { + return { + nativeType: () => meta.nativeType, + jsonProjection: (expression) => expression, + } +} + /** * Auxiliary descriptor for the `CodecImpl` base class — carries truthful - * metadata (codecId, traits, targetTypes, meta, renderOutputType) for - * readers that proxy through `codec.descriptor`, with a throwing + * metadata (codecId, traits, targetTypes, nativeType, renderOutputType) + * for readers that proxy through `codec.descriptor`, with a throwing * `factory` stub: production resolution goes through the parameterized * descriptors below, never `codec.descriptor.factory`. Same shape (and * circularity rationale) as v2's `makeAuxiliaryDescriptor` in @@ -382,11 +408,10 @@ function makeV3AuxiliaryDescriptor( meta: V3DomainMeta, typeName: string, ): AnyCodecDescriptor { - return { + const generic: AnyCodecDescriptor = { codecId, traits: v3CodecTraits(meta), targetTypes: [meta.nativeType], - meta: { db: { sql: { postgres: { nativeType: meta.nativeType } } } }, paramsSchema: cipherstashV3ParamsSchema, isParameterized: true, renderOutputType: () => typeName, @@ -399,6 +424,7 @@ function makeV3AuxiliaryDescriptor( ) }, } + return postgresCodec(generic, v3PostgresCodecOptions(meta)) } function makeV3Descriptor( @@ -413,18 +439,19 @@ function makeV3Descriptor( typeName, fromInternalForCastAs(meta.castAs), ) - return { - codecId, - traits: v3CodecTraits(meta), - targetTypes: [meta.nativeType], - meta: { db: { sql: { postgres: { nativeType: meta.nativeType } } } }, - paramsSchema: cipherstashV3ParamsSchema, - isParameterized: true as const, - renderOutputType: (_params: CipherstashV3CodecParams) => typeName, - factory: - (_params: CipherstashV3CodecParams) => (_ctx: CodecInstanceContext) => - codec, - } + const generic: RuntimeParameterizedCodecDescriptor = + { + codecId, + traits: v3CodecTraits(meta), + targetTypes: [meta.nativeType], + paramsSchema: cipherstashV3ParamsSchema, + isParameterized: true as const, + renderOutputType: (_params: CipherstashV3CodecParams) => typeName, + factory: + (_params: CipherstashV3CodecParams) => (_ctx: CodecInstanceContext) => + codec, + } + return postgresCodec(generic, v3PostgresCodecOptions(meta)) } /** diff --git a/packages/stack-prisma/src/v3/derive-schemas-v3.ts b/packages/stack-prisma/src/v3/derive-schemas-v3.ts index c52d9e356..8c9505425 100644 --- a/packages/stack-prisma/src/v3/derive-schemas-v3.ts +++ b/packages/stack-prisma/src/v3/derive-schemas-v3.ts @@ -45,7 +45,7 @@ interface V3TableView { * reads — the 0.14 `storage.namespaces..entries.table` envelope, * mirroring the v2 `ContractStorageView`. Declared structurally (vs * importing the framework type) so the derivation has no - * `@prisma-next/*` import-edge and is callable against a raw + * `@prisma/orm-*` import-edge and is callable against a raw * JSON-typed import. */ export interface V3ContractShape { diff --git a/packages/stack-prisma/src/v3/operators-v3.ts b/packages/stack-prisma/src/v3/operators-v3.ts index 02957d278..08a18ef37 100644 --- a/packages/stack-prisma/src/v3/operators-v3.ts +++ b/packages/stack-prisma/src/v3/operators-v3.ts @@ -79,25 +79,25 @@ import { parseSelectorSegments, unsupportedLeafReason, } from '@cipherstash/stack/adapter-kit' -import type { CodecTrait } from '@prisma-next/framework-components/codec' import type { SqlOperationDescriptor, SqlOperationDescriptors, -} from '@prisma-next/sql-operations' +} from '@prisma/orm-family-sql/operations' import { type AnyExpression, type CodecRef, type ColumnRef, OrderByItem, ParamRef, -} from '@prisma-next/sql-relational-core/ast' +} from '@prisma/orm-family-sql/relational-core/ast' import { buildOperation, codecOf, type Expression, type ScopeField, toExpr, -} from '@prisma-next/sql-relational-core/expression' +} from '@prisma/orm-family-sql/relational-core/expression' +import type { CodecTrait } from '@prisma/orm-framework/components/codec' import { type EncryptedEnvelopeBase, setHandleRoutingKey, diff --git a/packages/stack-prisma/src/v3/query-term.ts b/packages/stack-prisma/src/v3/query-term.ts index 1f66c2b28..54a508ee2 100644 --- a/packages/stack-prisma/src/v3/query-term.ts +++ b/packages/stack-prisma/src/v3/query-term.ts @@ -17,7 +17,7 @@ * * Extracted from `./operators-v3` so the middleware and SDK adapter can * consume the seam without importing the operator registry (and its - * `@prisma-next/sql-operations` / expression machinery). The operator + * `@prisma/orm-family-sql/operations` / expression machinery). The operator * module re-exports everything here, so its public surface is unchanged. */ diff --git a/packages/stack-prisma/src/v3/runtime-v3.ts b/packages/stack-prisma/src/v3/runtime-v3.ts index 61855235e..5fac2c454 100644 --- a/packages/stack-prisma/src/v3/runtime-v3.ts +++ b/packages/stack-prisma/src/v3/runtime-v3.ts @@ -26,7 +26,7 @@ * `SqlRuntimeExtensionDescriptor` does not own a middleware slot. */ -import type { SqlRuntimeExtensionDescriptor } from '@prisma-next/sql-runtime' +import type { SqlRuntimeExtensionDescriptor } from '@prisma/orm-family-sql/runtime' import type { CipherstashSdk } from '../execution/sdk' import { CIPHERSTASH_SPACE_ID } from '../extension-metadata/constants' import { CIPHERSTASH_V3_EXTENSION_VERSION } from '../extension-metadata/constants-v3' diff --git a/packages/stack-prisma/test/abort.test.ts b/packages/stack-prisma/test/abort.test.ts index bc7ff3b86..8b6f2d768 100644 --- a/packages/stack-prisma/test/abort.test.ts +++ b/packages/stack-prisma/test/abort.test.ts @@ -32,7 +32,7 @@ import { isRuntimeError, RUNTIME_ABORTED, -} from '@prisma-next/framework-components/runtime' +} from '@prisma/orm-framework/components/runtime' import { describe, expect, it } from 'vitest' import { decryptAll } from '../src/execution/decrypt-all' import { diff --git a/packages/stack-prisma/test/bulk-encrypt-middleware.helpers.ts b/packages/stack-prisma/test/bulk-encrypt-middleware.helpers.ts index 8922c3bcf..06ce5c5c3 100644 --- a/packages/stack-prisma/test/bulk-encrypt-middleware.helpers.ts +++ b/packages/stack-prisma/test/bulk-encrypt-middleware.helpers.ts @@ -7,17 +7,17 @@ * caller's `encryptImpl` produces. */ -import type { Contract, PlanMeta } from '@prisma-next/contract/types' -import type { SqlStorage } from '@prisma-next/sql-contract/types' +import type { SqlStorage } from '@prisma/orm-family-sql/contract/types' import { type ColumnRef, InsertAst, ParamRef, TableSource, UpdateAst, -} from '@prisma-next/sql-relational-core/ast' -import type { SqlExecutionPlan } from '@prisma-next/sql-relational-core/plan' -import type { SqlMiddlewareContext } from '@prisma-next/sql-runtime' +} from '@prisma/orm-family-sql/relational-core/ast' +import type { SqlExecutionPlan } from '@prisma/orm-family-sql/relational-core/plan' +import type { SqlMiddlewareContext } from '@prisma/orm-family-sql/runtime' +import type { Contract, PlanMeta } from '@prisma/orm-framework/contract/types' import { vi } from 'vitest' import type { CipherstashBulkDecryptArgs, @@ -30,11 +30,11 @@ import type { // specific domain pass their own). A searchable v3 text domain. const DEFAULT_CODEC_ID = 'cipherstash/eql-v3/eql_v3_text_search@1' -export { createSqlParamRefMutator } from '@prisma-next/sql-relational-core/middleware' +export { createSqlParamRefMutator } from '@prisma/orm-family-sql/relational-core/middleware' export const baseMeta: PlanMeta = { target: 'postgres', - storageHash: 'sha256:test', + storageHash: 'test', lane: 'dsl', } diff --git a/packages/stack-prisma/test/descriptor.test.ts b/packages/stack-prisma/test/descriptor.test.ts index e4ae1de2b..4b183aadd 100644 --- a/packages/stack-prisma/test/descriptor.test.ts +++ b/packages/stack-prisma/test/descriptor.test.ts @@ -30,8 +30,8 @@ * @see docs/architecture docs/adrs/ADR 212 - Contract spaces.md */ -import { assertDescriptorSelfConsistency } from '@prisma-next/migration-tools/spaces' -import { sqlContractCanonicalizationHooks } from '@prisma-next/sql-contract/canonicalization-hooks' +import { sqlContractCanonicalizationHooks } from '@prisma/orm-family-sql/contract/canonicalization-hooks' +import { assertDescriptorSelfConsistency } from '@prisma/orm-toolchain/migration-tools/spaces' import { describe, expect, it } from 'vitest' import cipherstashExtensionDescriptor from '../src/exports/control' import { CIPHERSTASH_SPACE_ID } from '../src/extension-metadata/constants' diff --git a/packages/stack-prisma/test/live/helpers/harness.ts b/packages/stack-prisma/test/live/helpers/harness.ts index 0e1ea4708..6c045eb93 100644 --- a/packages/stack-prisma/test/live/helpers/harness.ts +++ b/packages/stack-prisma/test/live/helpers/harness.ts @@ -23,8 +23,7 @@ * operator-lowering suites, now pointed at a real database. */ -import type { PostgresContract } from '@prisma-next/adapter-postgres/types' -import { validateSqlContractFully } from '@prisma-next/sql-contract/validators' +import { validateSqlContractFully } from '@prisma/orm-family-sql/contract/validators' import { type AnyExpression, ColumnRef, @@ -34,9 +33,10 @@ import { ProjectionItem, SelectAst, TableSource, -} from '@prisma-next/sql-relational-core/ast' -import type { SqlExecutionPlan } from '@prisma-next/sql-relational-core/plan' -import type { SqlMiddleware } from '@prisma-next/sql-runtime' +} from '@prisma/orm-family-sql/relational-core/ast' +import type { SqlExecutionPlan } from '@prisma/orm-family-sql/relational-core/plan' +import type { SqlMiddleware } from '@prisma/orm-family-sql/runtime' +import type { PostgresContract } from '@prisma/orm-target-postgres/adapter/types' import postgres from 'postgres' import type { EncryptedEnvelopeBase } from '../../../src/execution/envelope-base' import type { CipherstashSdk } from '../../../src/execution/sdk' @@ -118,13 +118,13 @@ export function liveV3Contract( return validateSqlContractFully({ target: 'postgres', targetFamily: 'sql', - profileHash: `sha256:cipherstash-live-${tableName}`, + profileHash: `cipherstash-live-${tableName}`, roots: {}, capabilities: {}, - extensionPacks: {}, + extensions: {}, meta: {}, storage: { - storageHash: `sha256:cipherstash-live-${tableName}-storage`, + storageHash: `cipherstash-live-${tableName}-storage`, namespaces: { __unbound__: { id: '__unbound__', diff --git a/packages/stack-prisma/test/psl-interpretation.test.ts b/packages/stack-prisma/test/psl-interpretation.test.ts index 54a06a051..792e4150f 100644 --- a/packages/stack-prisma/test/psl-interpretation.test.ts +++ b/packages/stack-prisma/test/psl-interpretation.test.ts @@ -13,11 +13,13 @@ * `?` produces `nullable: true`; and passing options is rejected. */ -import type { Contract } from '@prisma-next/contract/types' -import { buildSymbolTable } from '@prisma-next/psl-parser' -import { parse } from '@prisma-next/psl-parser/syntax' -import { interpretPslDocumentToSqlContract } from '@prisma-next/sql-contract-psl' -import { postgresCreateNamespace } from '@prisma-next/target-postgres/types' +import { interpretPslDocumentToSqlContract } from '@prisma/orm-family-sql/contract-psl' +import type { AuthoringTypeNamespace } from '@prisma/orm-framework/components/authoring' +import { collectScalarTypeConstructors } from '@prisma/orm-framework/components/authoring' +import type { Contract } from '@prisma/orm-framework/contract/types' +import { buildSymbolTable } from '@prisma/orm-framework/psl-parser' +import { parse } from '@prisma/orm-framework/psl-parser/syntax' +import { postgresCreateNamespace } from '@prisma/orm-target-postgres/target/types' import { describe, expect, it } from 'vitest' import cipherstashControl from '../src/exports/control' import cipherstashPack from '../src/exports/pack' @@ -32,11 +34,29 @@ const postgresTarget = { capabilities: {}, } -const postgresScalarTypeDescriptors = new Map([ - ['String', { codecId: 'pg/text@1', nativeType: 'text' }], - ['Boolean', { codecId: 'pg/bool@1', nativeType: 'bool' }], - ['Int', { codecId: 'pg/int4@1', nativeType: 'int4' }], -]) +// Since 0.17 scalar types are authored through the unified authoring +// type namespace (zero-arg type constructors) — the retired +// `scalarTypeDescriptors` map channel is derived from it via +// `collectScalarTypeConstructors`. +const postgresScalarAuthoringTypes = { + String: { + kind: 'typeConstructor', + output: { codecId: 'pg/text@1', nativeType: 'text' }, + }, + Boolean: { + kind: 'typeConstructor', + output: { codecId: 'pg/bool@1', nativeType: 'bool' }, + }, + Int: { + kind: 'typeConstructor', + output: { codecId: 'pg/int4@1', nativeType: 'int4' }, + }, +} satisfies AuthoringTypeNamespace + +const authoringTypes = { + ...postgresScalarAuthoringTypes, + ...cipherstashPack.authoring.type, +} satisfies AuthoringTypeNamespace // Since 0.15 the SQL PSL interpreter consumes a symbol table built from // the CST parser instead of the legacy `parsePslDocument` AST, and the @@ -47,7 +67,6 @@ function interpret(schema: string) { const { table } = buildSymbolTable({ document, sourceFile, - scalarTypes: [...postgresScalarTypeDescriptors.keys()], pslBlockDescriptors: {}, }) return interpretPslDocumentToSqlContract({ @@ -55,15 +74,17 @@ function interpret(schema: string) { sourceFile, sourceId: 'schema.prisma', target: postgresTarget, - scalarTypeDescriptors: postgresScalarTypeDescriptors, - composedExtensionPacks: [cipherstashControl.id], + scalarColumnDescriptors: collectScalarTypeConstructors( + postgresScalarAuthoringTypes, + ), + composedExtensions: [cipherstashControl.id], composedExtensionContracts: new Map([ [ cipherstashControl.id, cipherstashControl.contractSpace!.contractJson as unknown as Contract, ], ]), - authoringContributions: { type: cipherstashPack.authoring.type, field: {} }, + authoringContributions: { type: authoringTypes, field: {} }, createNamespace: postgresCreateNamespace, capabilities: { sql: { scalarList: true } }, }) diff --git a/packages/stack-prisma/test/v3/bulk-encrypt-v3.test.ts b/packages/stack-prisma/test/v3/bulk-encrypt-v3.test.ts index 10eca14ed..7d12003cf 100644 --- a/packages/stack-prisma/test/v3/bulk-encrypt-v3.test.ts +++ b/packages/stack-prisma/test/v3/bulk-encrypt-v3.test.ts @@ -20,8 +20,8 @@ import { ProjectionItem, SelectAst, TableSource, -} from '@prisma-next/sql-relational-core/ast' -import type { SqlExecutionPlan } from '@prisma-next/sql-relational-core/plan' +} from '@prisma/orm-family-sql/relational-core/ast' +import type { SqlExecutionPlan } from '@prisma/orm-family-sql/relational-core/plan' import { describe, expect, it } from 'vitest' import type { EncryptedEnvelopeBase } from '../../src/execution/envelope-base' import { setHandleRoutingKey } from '../../src/execution/envelope-base' diff --git a/packages/stack-prisma/test/v3/codec-runtime-v3.test.ts b/packages/stack-prisma/test/v3/codec-runtime-v3.test.ts index 90eb733b9..c593b09f4 100644 --- a/packages/stack-prisma/test/v3/codec-runtime-v3.test.ts +++ b/packages/stack-prisma/test/v3/codec-runtime-v3.test.ts @@ -16,8 +16,9 @@ * composite literal. */ -import type { CodecInstanceContext } from '@prisma-next/framework-components/codec' -import type { SqlCodecCallContext } from '@prisma-next/sql-relational-core/ast' +import type { SqlCodecCallContext } from '@prisma/orm-family-sql/relational-core/ast' +import type { CodecInstanceContext } from '@prisma/orm-framework/components/codec' +import { isPostgresCodecDescriptor } from '@prisma/orm-target-postgres/target/codec-descriptor' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { EncryptedBigInt } from '../../src/execution/envelope-bigint' import { EncryptedJson } from '../../src/execution/envelope-json' @@ -61,9 +62,17 @@ describe('createV3CodecDescriptors — descriptor metadata', () => { ) expect(textSearch).toBeDefined() expect(textSearch?.targetTypes).toEqual(['public.eql_v3_text_search']) - expect(textSearch?.meta).toEqual({ - db: { sql: { postgres: { nativeType: 'public.eql_v3_text_search' } } }, - }) + // 0.17: the `meta.db.sql.postgres.nativeType` channel is replaced by + // the postgres target-descriptor protocol (`nativeTypeFor`). + expect(isPostgresCodecDescriptor(textSearch)).toBe(true) + expect( + textSearch !== undefined && isPostgresCodecDescriptor(textSearch) + ? textSearch.nativeTypeFor({ + codecId: 'cipherstash/eql-v3/eql_v3_text_search@1', + typeParams: { castAs: 'string', capabilities: {} }, + }) + : undefined, + ).toBe('public.eql_v3_text_search') expect(textSearch?.isParameterized).toBe(true) for (const d of ds) { expect(d.targetTypes).toHaveLength(1) diff --git a/packages/stack-prisma/test/v3/migration-v3.test.ts b/packages/stack-prisma/test/v3/migration-v3.test.ts index 66844aa2a..4a129e068 100644 --- a/packages/stack-prisma/test/v3/migration-v3.test.ts +++ b/packages/stack-prisma/test/v3/migration-v3.test.ts @@ -30,7 +30,7 @@ import { readInstallSql, releaseManifest } from '@cipherstash/eql/sql' import { materialiseMigrationPackage, readMigrationPackage, -} from '@prisma-next/migration-tools/io' +} from '@prisma/orm-toolchain/migration-tools/io' import { describe, expect, it } from 'vitest' import v3Metadata from '../../migrations/20260601T0100_install_eql_v3_bundle/migration.json' with { type: 'json', @@ -102,7 +102,7 @@ const PUBLISHED_MIGRATIONS = [ // additive-only policy), and bumped the baked bundle to the pinned // eql-3.0.4 release. migrationHash: - 'sha256:fc495f7f59e6d18ae8e3df594a38898263ca91f8f5fb5f625bff20d04a0d7223', + '1030654387540db7a053449e478d4b198d8666b360cca9f9c265eddb83b2dd74', installSqlSha256: '63104a81aac0aebd59fac3765cbe92c3364a7ecbb0bce99e53fbe518d30a0641', }, @@ -111,7 +111,7 @@ const PUBLISHED_MIGRATIONS = [ metadata: v3Upgrade304Metadata, ops: v3Upgrade304Ops, migrationHash: - 'sha256:59e124d8a64d31a0f2b27ef9f5b3868f822ec12823aad71fee8e64b36f115bf4', + '94a2ce9c8e973b7a635d92571ff642429e6ebfb7a4600291ee626201e110e13e', installSqlSha256: '63104a81aac0aebd59fac3765cbe92c3364a7ecbb0bce99e53fbe518d30a0641', }, @@ -120,7 +120,7 @@ const PUBLISHED_MIGRATIONS = [ metadata: v3UpgradeMetadata, ops: v3UpgradeOps, migrationHash: - 'sha256:7bb960435f9cdb7d7c25e4ff70b02fa050a1b8e695541facc47dd87ec3cc634e', + '0c56fe6b641c5839c82be72317b2af165fb574b0dcdfc4aa6b50425e371a9d0f', installSqlSha256: '05860ae47b3760cbba9842b22ddf89cf3f03aa49c33b6386f736c271784094b1', }, @@ -197,7 +197,9 @@ describe('v3 baseline migration (20260601T0100_install_eql_v3_bundle)', () => { // fails here, so the frozen-history guard above can never silently miss a // migration. const onDisk = readdirSync(MIGRATIONS_DIR, { withFileTypes: true }) - .filter((e) => e.isDirectory() && e.name !== 'refs') + .filter( + (e) => e.isDirectory() && e.name !== 'refs' && e.name !== 'snapshots', + ) .map((e) => e.name) .sort() expect(onDisk).toEqual( @@ -247,6 +249,7 @@ describe('v3 baseline migration (20260601T0100_install_eql_v3_bundle)', () => { await materialiseMigrationPackage(root, v3Baseline) const reloaded = await readMigrationPackage( join(root, v3Baseline.dirName), + { migrationsDir: root }, ) expect(reloaded.metadata).toEqual(v3Metadata) expect(reloaded.ops).toEqual(v3Ops) diff --git a/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts b/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts index 0cea7a065..157a14e1c 100644 --- a/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts +++ b/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts @@ -20,11 +20,8 @@ * GA domain registry. */ -import postgresRuntimeAdapter from '@prisma-next/adapter-postgres/runtime' -import type { PostgresContract } from '@prisma-next/adapter-postgres/types' -import type { RuntimeTargetDescriptor } from '@prisma-next/framework-components/execution' -import { validateSqlContractFully } from '@prisma-next/sql-contract/validators' -import type { SqlOperationDescriptor } from '@prisma-next/sql-operations' +import { validateSqlContractFully } from '@prisma/orm-family-sql/contract/validators' +import type { SqlOperationDescriptor } from '@prisma/orm-family-sql/operations' import { type AnyExpression, ColumnRef, @@ -33,12 +30,15 @@ import { ProjectionItem, SelectAst, TableSource, -} from '@prisma-next/sql-relational-core/ast' +} from '@prisma/orm-family-sql/relational-core/ast' import { createExecutionContext, createSqlExecutionStack, type SqlRuntimeExtensionDescriptor, -} from '@prisma-next/sql-runtime' +} from '@prisma/orm-family-sql/runtime' +import type { RuntimeTargetDescriptor } from '@prisma/orm-framework/components/execution' +import postgresRuntimeAdapter from '@prisma/orm-target-postgres/adapter/runtime' +import type { PostgresContract } from '@prisma/orm-target-postgres/adapter/types' import { vi } from 'vitest' import type { CipherstashSdk } from '../../src/execution/sdk' import { @@ -95,13 +95,13 @@ function v3Column(codecId: string) { export const contractV3 = validateSqlContractFully({ target: 'postgres', targetFamily: 'sql', - profileHash: 'sha256:cipherstash-operator-lowering-v3-test', + profileHash: 'cipherstash-operator-lowering-v3-test', roots: {}, capabilities: {}, - extensionPacks: {}, + extensions: {}, meta: {}, storage: { - storageHash: 'sha256:cipherstash-operator-lowering-v3-test-storage', + storageHash: 'cipherstash-operator-lowering-v3-test-storage', namespaces: { __unbound__: { id: '__unbound__', @@ -142,7 +142,7 @@ export const contractV3 = validateSqlContractFully({ // `targetId` on the target during `create`. Same inline replica as the // v2 helper (no postgres-package test-export dependency). The empty // `codecs` contribution mirrors the real -// `@prisma-next/target-postgres/runtime` descriptor (the target +// `@prisma/orm-target-postgres/target/runtime` descriptor (the target // contributes no codecs; they ship from the adapter and extension // packs) and is required by `createExecutionContext`'s contributor // walk in `assembleV3ExecutionContext`. @@ -194,7 +194,7 @@ export function makeV3Adapter( target: stubRuntimeTarget, adapter: postgresRuntimeAdapter, driver: undefined, - extensionPacks: [...extensionPacks], + extensions: [...extensionPacks], }) } @@ -215,7 +215,7 @@ export function assembleV3ExecutionContext( stack: createSqlExecutionStack({ target: stubRuntimeTarget, adapter: postgresRuntimeAdapter, - extensionPacks: [...extensionPacks], + extensions: [...extensionPacks], }), }) } diff --git a/packages/stack-prisma/test/v3/properties.test.ts b/packages/stack-prisma/test/v3/properties.test.ts index b90df1420..516fb79fc 100644 --- a/packages/stack-prisma/test/v3/properties.test.ts +++ b/packages/stack-prisma/test/v3/properties.test.ts @@ -37,7 +37,7 @@ import { type AnyExpression, OperationExpr, -} from '@prisma-next/sql-relational-core/ast' +} from '@prisma/orm-family-sql/relational-core/ast' import fc from 'fast-check' import { describe, expect, it } from 'vitest' import { diff --git a/packages/stack-prisma/test/v3/runtime-v3.test.ts b/packages/stack-prisma/test/v3/runtime-v3.test.ts index b0da9247f..7d3bf39ea 100644 --- a/packages/stack-prisma/test/v3/runtime-v3.test.ts +++ b/packages/stack-prisma/test/v3/runtime-v3.test.ts @@ -39,7 +39,7 @@ describe('createCipherstashV3RuntimeDescriptor — descriptor shape', () => { const descriptor = createCipherstashV3RuntimeDescriptor({ sdk: emptySdk() }) expect(descriptor.kind).toBe('extension') // The id must be the PACK id ('cipherstash'): the runtime matches - // the contract's declared extensionPacks against runtime descriptor + // the contract's declared extensions against runtime descriptor // ids, and both generations' contracts are emitted by the one // cipherstash control descriptor. The VERSION carries v3's own // identity. (CIPHERSTASH_V3_SPACE_ID remains v3's logical space diff --git a/packages/stack-prisma/test/v3/vendored-space-parity.test.ts b/packages/stack-prisma/test/v3/vendored-space-parity.test.ts index b85add1ca..008cc7d2c 100644 --- a/packages/stack-prisma/test/v3/vendored-space-parity.test.ts +++ b/packages/stack-prisma/test/v3/vendored-space-parity.test.ts @@ -46,7 +46,16 @@ const vendoredDir = join( function migrationDirNames(root: string): string[] { return readdirSync(root, { withFileTypes: true }) - .filter((entry) => entry.isDirectory() && entry.name !== 'refs') + .filter( + (entry) => + entry.isDirectory() && + entry.name !== 'refs' && + // The content-addressed contract store (0.17 layout) is not a + // migration package. It sits beside the package's migration dirs, + // but in a consumer repo it sits at the migrations ROOT (shared + // across spaces), so it is never part of the vendored space dir. + entry.name !== 'snapshots', + ) .map((entry) => entry.name) .sort() } @@ -95,8 +104,14 @@ describe('example vendored cipherstash space parity', () => { [...shippedHead.invariants].sort(), ) + // Since the 0.17 snapshot-store layout, the vendored space carries no + // per-space contract.json — the contract the head ref names resolves + // through the consumer root's content-addressed store, + // `migrations/snapshots//contract.json`. const shippedContract = readJson(join(packageRoot, 'src', 'contract.json')) - const vendoredContract = readJson(join(vendoredDir, 'contract.json')) + const vendoredContract = readJson( + join(vendoredDir, '..', 'snapshots', vendoredHead.hash, 'contract.json'), + ) expect(vendoredContract).toEqual(shippedContract) }) }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e3b3783a..6a8451309 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -148,46 +148,13 @@ importers: '@cipherstash/stack-prisma': specifier: workspace:* version: link:../../packages/stack-prisma - '@prisma-next/adapter-postgres': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/contract': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/driver-postgres': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/family-sql': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/postgres': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/sql-contract': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-psl': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-orm-client': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/target-postgres': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) + '@prisma/orm-postgres': + specifier: 0.17.0 + version: 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) dotenv: specifier: ^17.4.2 version: 17.4.2 devDependencies: - '@prisma-next/cli': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) '@types/node': specifier: ^22.20.1 version: 22.20.1 @@ -517,36 +484,15 @@ importers: '@cipherstash/stack': specifier: workspace:* version: link:../stack - '@prisma-next/contract': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/family-sql': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/migration-tools': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/ts-render': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/utils': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) + '@prisma/orm-family-sql': + specifier: 0.17.0 + version: 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@prisma/orm-framework': + specifier: 0.17.0 + version: 0.17.0(typescript@5.9.3) + '@prisma/orm-toolchain': + specifier: 0.17.0 + version: 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) arktype: specifier: ^2.2.3 version: 2.2.3 @@ -554,33 +500,9 @@ importers: '@cipherstash/test-kit': specifier: workspace:* version: link:../test-kit - '@prisma-next/adapter-postgres': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/cli': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/driver-postgres': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/extension-author-tools': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-psl': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-ts': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/sql-schema-ir': - specifier: 0.16.0 - version: 0.16.0(typescript@5.9.3) - '@prisma-next/target-postgres': - specifier: 0.16.0 - version: 0.16.0(typanion@3.14.0)(typescript@5.9.3) + '@prisma/orm-target-postgres': + specifier: 0.17.0 + version: 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) dotenv: specifier: 17.4.2 version: 17.4.2 @@ -1521,27 +1443,24 @@ packages: '@posthog/types@1.397.0': resolution: {integrity: sha512-Pa7FtsBo3V0XrhY4y8Xquwp8U07syuZ2IGQdlsRyxhz0yejQLceFjI58UssCXE5zDCDj3km5l7H3ufD6rHChCg==} - '@prisma-next/adapter-postgres@0.16.0': - resolution: {integrity: sha512-SUldSFt4NXtg5LY8ywCNuukrZj8lNDBQ2++ijRBF2VMMWRQvqztX/4/+9CoS/UjKnev/0QRbjf5oBf1wqAxcEQ==} - engines: {node: '>=24'} + '@prisma/orm-family-sql@0.17.0': + resolution: {integrity: sha512-zyIBxeur7PfIGsuvYaL53XBMgkg/FAiwZlNA41OoZyBP1RZdd7FJG6Jz1sLObQzfZ+IO9rDcoVBPMil4PAC7TA==} peerDependencies: typescript: '>=5.9' peerDependenciesMeta: typescript: optional: true - '@prisma-next/cli-telemetry@0.16.0': - resolution: {integrity: sha512-nhPOSiDQwckRkz/JPd2hDlRbnpoLbSYOQqUtPKgXqZbeNP3hES2clhelmHGFvExbZ8GdHRJUDaohw00Je4FOhw==} - engines: {node: '>=24'} + '@prisma/orm-framework@0.17.0': + resolution: {integrity: sha512-HmJ+ZFX/H7WiVclCSf4pYHWovMRGTrqH9H+75VWMmzCTuwi4mFkflSG6FaNGSz6CDrx2VNZQ0+ZVp1FRbyMnyw==} peerDependencies: typescript: '>=5.9' peerDependenciesMeta: typescript: optional: true - '@prisma-next/cli@0.16.0': - resolution: {integrity: sha512-f3wvWdMaKRHqp9Xtjt3nCgXMdAT4eCdQuGPPKmxpLp0Sj4LcgzOmPI7BtOWIhQEYqsHZLcpC6bl4zlgZsJtGZA==} - engines: {node: '>=24'} + '@prisma/orm-postgres@0.17.0': + resolution: {integrity: sha512-9/LFV7bqQDyF6T0UKRrGjNivAmAXJNEyBxOKYMmCpPh4tDvEeJ+s3bEgspjOSGqG9tUJuMEuC++YXWm0qzynMA==} hasBin: true peerDependencies: typescript: '>=5.9' @@ -1549,284 +1468,24 @@ packages: typescript: optional: true - '@prisma-next/config-loader@0.16.0': - resolution: {integrity: sha512-2Rq0H+I+LBBoNIUX2r3jOT/JhPHBQoIfI8O5PpKRRI+k418r1lnl0ukT8+31u7H8lCHyyp0iUtynb5Qh7DhQMg==} - engines: {node: '>=24'} + '@prisma/orm-target-postgres@0.17.0': + resolution: {integrity: sha512-nnz7OECAgwJccJ/ad+7Z0O+kdjqsGocOEqFOb+mxzwUD2kNXMCKkVoQ81KAuhHSDLMieEOd1uRDhi4qJeB8x2Q==} peerDependencies: typescript: '>=5.9' peerDependenciesMeta: typescript: optional: true - '@prisma-next/config@0.16.0': - resolution: {integrity: sha512-o+52umD7vGJe9TPczsvfMVd0QUxBbEL2OF46noVOoH4yL3DDaTH2q4KGBiLIDvFGzaKp93GX+7nNG1w5/nAIYw==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/contract-authoring@0.16.0': - resolution: {integrity: sha512-3XcwR55QEEWoyrX8oEZOMc12WXPXiLelCGmiQRYSkYMTMaF8+EqkBu8a7kxM+/Wh9gwkw4NDQo4jo8CYelPUsg==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/contract@0.16.0': - resolution: {integrity: sha512-6NJvWCVfuW3Yitrq5VDLUyy61QEwH+3civpoXauTqZ4s6uytG6Ix+LbKAlyImcDVp6OCud1veRwR/C4pH8aR1Q==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/driver-postgres@0.16.0': - resolution: {integrity: sha512-N+sx7CETZ3ok5eis8hsI8wxHSbU+9rRxiPJMSpE5NvjRO6QgSW4udwd1NSbdWHPOheT547lRLNcWhRgsH9A/LQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/emitter@0.16.0': - resolution: {integrity: sha512-J+qLnDoJmPxYrAFg/HjG1lEu1I9U7bZTOydhFOUWaKBgxI0eOMrDwl3FFADl6i0lR2iGWxtedXd+wDtiXk+i5A==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/errors@0.16.0': - resolution: {integrity: sha512-1LJtSN2QVc0RY4vr3+5QYyJnJnFW4XhnPtWuXeI+64LRjQYxC33qvpKQQdMKF+YbdNONW+ABmhNhM7WvQ3YVsA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/extension-author-tools@0.16.0': - resolution: {integrity: sha512-issw0Vm5tBdeP35Ix85ixOk726SLFcFpR074f3gYf5RWh+8/YGKEtoYIUiLCj3Y4p3txwEYK/uxZGfKVK+ccLA==} - engines: {node: '>=24'} + '@prisma/orm-toolchain@0.17.0': + resolution: {integrity: sha512-pH3wOIOAQ2hPbrfbr8ILSCuG1iULcjCpW2NCLXI/RVJsZbrAA+VJ+HBlfX7pTsQMH2Ls4QOX3v70d/6fDYXn2g==} hasBin: true peerDependencies: typescript: '>=5.9' + vite: ~7.3.5 peerDependenciesMeta: typescript: optional: true - - '@prisma-next/family-sql@0.16.0': - resolution: {integrity: sha512-I6T0/E+MTaZ1jq7GZ4Pt68S6EKRepl+1piiszyBUZVvfU9o1XEje/flXv/YJeFs8bATaqy4dOIFO5LoXkmWHHg==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/framework-components@0.16.0': - resolution: {integrity: sha512-VeZ/5NWDIfUNBAg4+QWbIbHDwNEr3zXJSKOdljsaE2ZvWOfYoe5hZa5MGEUR/XP90yRbBim2808iRB4TTm3//g==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/ids@0.16.0': - resolution: {integrity: sha512-Jq6GtYVibSxB0G5wmThCT1aIlkmCC3ccsnA466YBbI/8r1LEyX6cMAvdCN3WWYHepLTLdRfwefPzZYkDXUYLDA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/language-server@0.16.0': - resolution: {integrity: sha512-/YHY/gA4u/0sS+hhwJOiif949TaB/x7+VYayzOKG0NXUnZ2CPTF1BKHJR4y2446QeRsCFIjERxu78+qlcnwmzQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/migration-tools@0.16.0': - resolution: {integrity: sha512-hm9MfRfJAZUq6TZ5nV/+90ClvGbTqvKE8noyu+cLfLqUQ9u8q4d0CZW7Z4r4WuRj6vK7DBctEoGpj7xeilFZhQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/operations@0.16.0': - resolution: {integrity: sha512-n+5HffZ9CMeOCAIMpQ+WfXO+N7S6W94YLtqoySBJyJ1K/WIymUONSnQfmibctYzZcYMa9n36K2saScZQ+blhsQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/postgres@0.16.0': - resolution: {integrity: sha512-H45TKeHuHuR3jhHomkGWe2hRTHa2TreRX9haA2vungooLgJPhYwBjU19bOa0tfEgAWk5P5BmS4OfhF5mWEnwTA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/psl-parser@0.16.0': - resolution: {integrity: sha512-cgPYAVQYEm8yJt+dvNNiq/Uy4hgrN/OLzDkqcO6RIpC24fHIJCIv7om7Fdu7HyS4kNpEeWxA/hNj4Dv8PAKCEw==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/psl-printer@0.16.0': - resolution: {integrity: sha512-0kuozAaLKUP6D9HoIHYQt9gHSUr1xpx+IfGZtbl9vV2ECRE8k8/AARwY3dWK8DPnGN4s+UNCaepKwbUs893INA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-builder@0.16.0': - resolution: {integrity: sha512-lNUR3T6/aLB0GwdX1QvU5s0Fe+V4LkwoQV2KyCbGFOLV/+L/9HJcLYd/RWdq43l7W0U1XvK0GJBcLcC5SseiFw==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-contract-emitter@0.16.0': - resolution: {integrity: sha512-epP3u9FqFPWZyRP1fngBpBNIipUoFqo0ogq0yfbS9nQSeGOlC82bWhSwy6kla3KybbVpp6SkZCk3ciiESziGiQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-contract-psl@0.16.0': - resolution: {integrity: sha512-9Z94wBLQult9cStxL/dvp4sVerrUaj5WJatL1c/9y+RDF0+itYZiUzdKQ6dqUZR+72hW/p+pa2KUFvVYOVbB+g==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-contract-ts@0.16.0': - resolution: {integrity: sha512-O/SEtFZSshWetL16GnnMlqZpZ9dy3Hf6ggAXN0NS9zC+dQkLhdyzt9uA4Fja+mR4zURzz8ZutbpS28FV29wTbw==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-contract@0.16.0': - resolution: {integrity: sha512-reYsOs6m+ZZzPaCLWGtUiPCKQgL8ap6WnVC0Q0RE/zXwBD7cw4knZJNjvpkpJBDQU2lQHXn728ZHZ3r9qTah3Q==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-errors@0.16.0': - resolution: {integrity: sha512-OVQ1GbQfYVCtt5ciUj5dkI7McHLQPgEyapaLawY1ViVH3UUh36L17N8KC0phE/RASsx2JQt5GxOLPtksIHhvRA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-operations@0.16.0': - resolution: {integrity: sha512-T8D2tVVpwZqZsO8aPwhQQA5DFvotWbkyKTdcsUVLt7nIePSSlTOupnA0JXr3O6ZJDLB9Pz9GOIc1KgxtS4oFpA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-orm-client@0.16.0': - resolution: {integrity: sha512-u8IvNI8H/Y44sJCsZUvhbCC8TZMHLq2cFTA7+SsNb4nqOCI9Ip2hUPrbp/fWwOOhI4bUf3EbptfYyfS8uwL5GQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-relational-core@0.16.0': - resolution: {integrity: sha512-PmU6fjX21O6eyspv9n7BbHJWh869oDdFspU0KIy2eLAGH2tqG/1RWYk71VoJFPutdR9HWTlQIWhf3V80qHrYhA==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-runtime@0.16.0': - resolution: {integrity: sha512-3ysbTyDVq3NraFpGrKUlmvLRoG19spxBuwRcU2Uj+VJuTgJctddncDhaS6Uu7pYNqyxnNbyqXIEVUTyeAE8U7g==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/sql-schema-ir@0.16.0': - resolution: {integrity: sha512-vITsu7BYfdKmtacfHO5V/RV6MBNKh/mIzRmHa56PDTJrcJU2B+qatg4rRZ9a6tAGAQ8au2y3DPo8+YoidAfTQQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/target-postgres@0.16.0': - resolution: {integrity: sha512-MXZkNhGwG9xy4097RtC1B2rYFv82qKZDY/p+zccGZxc3727oXLQsiAMD+jSuW/UX1CYihrA2Vpa3qae4yoahSQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/ts-render@0.16.0': - resolution: {integrity: sha512-Be+jx+plchQoTPdtgqKYLmX8JY+SGjFXnfOMpHZMCrpH1wouDPJHqsaU73SYGRAtutlJIUlAahAZW61qqfJptg==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: - optional: true - - '@prisma-next/utils@0.16.0': - resolution: {integrity: sha512-j/Q02VfXO+aSPXIEu+YNQ54/r0zCoxDWRY33H8VULln4Pe9l9s9zw3gGniXV8OqCphBp4eO4z4hQYvXIfXn8mQ==} - engines: {node: '>=24'} - peerDependencies: - typescript: '>=5.9' - peerDependenciesMeta: - typescript: + vite: optional: true '@rollup/rollup-android-arm-eabi@4.60.4': @@ -3109,8 +2768,8 @@ packages: package-manager-detector@0.2.11: resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} - package-manager-detector@1.7.0: - resolution: {integrity: sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==} + package-manager-detector@1.8.0: + resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==} parse-ms@4.0.0: resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} @@ -3286,8 +2945,8 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.9.5: - resolution: {integrity: sha512-/FVl766LpUfB5vXgCYOYa0MeV/441Ia99AeICQIQFTY/Nw0roZwULcXpku5i1/m5kt/baz+s4Zogspd839HSMg==} + prettier@3.9.6: + resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} engines: {node: '>=14'} hasBin: true @@ -3649,8 +3308,8 @@ packages: resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} engines: {node: '>=18'} - uniku@0.3.2: - resolution: {integrity: sha512-+KesDkVak6YJG5kjkeqciTukDo9kzThuK5UFK+HtXzDbls0J5IuNXQ9mApyipyEuLVhVx61Uum8zljO73TBiiA==} + uniku@0.4.3: + resolution: {integrity: sha512-ysuyrPk4xV9cOuJrQ9sPoqbGrf8PJG2PZEeRqs0JFPxhvusNrn0B26p3t7HLH6OGnQieDlDiVkuCWKkwPkUCoA==} engines: {node: '>=20.19.0'} universalify@0.1.2: @@ -4478,423 +4137,160 @@ snapshots: '@posthog/types@1.397.0': {} - '@prisma-next/adapter-postgres@0.16.0(typanion@3.14.0)(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/contract-authoring': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/family-sql': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/ids': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-psl': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-ts': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-schema-ir': 0.16.0(typescript@5.9.3) - '@prisma-next/target-postgres': 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - magicast - - typanion - - '@prisma-next/cli-telemetry@0.16.0(typescript@5.9.3)': + '@prisma/orm-family-sql@0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - '@vercel/detect-agent': 1.2.3 + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@prisma/orm-toolchain': 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@standard-schema/spec': 1.1.0 arktype: 2.2.3 - c12: 3.3.4 pathe: 2.0.3 + pluralize: 8.0.0 + ts-toolbelt: 9.6.0 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - magicast + - typanion + - vite - '@prisma-next/cli@0.16.0(typanion@3.14.0)(typescript@5.9.3)': + '@prisma/orm-family-sql@0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@clack/prompts': 1.7.0 - '@prisma-next/cli-telemetry': 0.16.0(typescript@5.9.3) - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/config-loader': 0.16.0(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/emitter': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/language-server': 0.16.0(typescript@5.9.3) - '@prisma-next/migration-tools': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-printer': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@prisma/orm-toolchain': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@standard-schema/spec': 1.1.0 arktype: 2.2.3 - ci-info: 4.4.0 - clipanion: 4.0.0-rc.4(typanion@3.14.0) - closest-match: 1.3.3 - colorette: 2.0.20 - commander: 15.0.0 - esbuild: 0.28.1 - jsonc-parser: 3.3.1 - package-manager-detector: 1.7.0 pathe: 2.0.3 - string-width: 8.2.2 - strip-ansi: 7.2.0 - wrap-ansi: 10.0.0 + pluralize: 8.0.0 + ts-toolbelt: 9.6.0 optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - magicast - typanion + - vite - '@prisma-next/config-loader@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/emitter': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - c12: 3.3.4 - pathe: 2.0.3 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - magicast - - '@prisma-next/config@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - pathe: 2.0.3 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/contract-authoring@0.16.0(typescript@5.9.3)': + '@prisma/orm-framework@0.17.0(typescript@5.9.3)': dependencies: - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/contract@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/utils': 0.16.0(typescript@5.9.3) '@standard-schema/spec': 1.1.0 arktype: 2.2.3 + pathe: 2.0.3 + uniku: 0.4.3 optionalDependencies: typescript: 5.9.3 - '@prisma-next/driver-postgres@0.16.0(typescript@5.9.3)': + '@prisma/orm-postgres@0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-errors': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 + '@prisma/orm-family-sql': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@prisma/orm-target-postgres': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@prisma/orm-toolchain': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@types/pg': 8.20.0 + pathe: 2.0.3 pg: 8.22.0 - pg-cursor: 2.21.0(pg@8.22.0) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: + - magicast - pg-native + - typanion + - vite - '@prisma-next/emitter@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/ts-render': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - prettier: 3.9.5 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/errors@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/extension-author-tools@0.16.0(typescript@5.9.3)': - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/family-sql@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/emitter': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/migration-tools': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-emitter': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-ts': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-schema-ir': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - pluralize: 8.0.0 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/framework-components@0.16.0(typescript@5.9.3)': + '@prisma/orm-target-postgres@0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/ts-render': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) + '@prisma/orm-family-sql': 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@prisma/orm-toolchain': 0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) '@standard-schema/spec': 1.1.0 + '@types/pg': 8.20.0 arktype: 2.2.3 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/ids@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - uniku: 0.3.2 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/language-server@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/config-loader': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) pathe: 2.0.3 - vscode-languageserver: 10.1.0 - vscode-languageserver-textdocument: 1.0.12 + pg: 8.22.0 + pg-cursor: 2.21.0(pg@8.22.0) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - magicast + - pg-native + - typanion + - vite - '@prisma-next/migration-tools@0.16.0(typescript@5.9.3)': + '@prisma/orm-target-postgres@0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) + '@prisma/orm-family-sql': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@prisma/orm-toolchain': 0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0)) + '@standard-schema/spec': 1.1.0 + '@types/pg': 8.20.0 arktype: 2.2.3 pathe: 2.0.3 - prettier: 3.9.5 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/operations@0.16.0(typescript@5.9.3)': - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/postgres@0.16.0(typanion@3.14.0)(typescript@5.9.3)': - dependencies: - '@prisma-next/adapter-postgres': 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/cli': 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/driver-postgres': 0.16.0(typescript@5.9.3) - '@prisma-next/family-sql': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-builder': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-psl': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-ts': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-orm-client': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': 0.16.0(typescript@5.9.3) - '@prisma-next/target-postgres': 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - pathe: 2.0.3 pg: 8.22.0 + pg-cursor: 2.21.0(pg@8.22.0) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - magicast - pg-native - typanion + - vite - '@prisma-next/psl-parser@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/psl-printer@0.16.0(typescript@5.9.3)': + '@prisma/orm-toolchain@0.17.0(typanion@3.14.0)(typescript@5.9.3)(vite@7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-builder@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-contract-emitter@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/emitter': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-contract-psl@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract-ts': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - pathe: 2.0.3 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-contract-ts@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/config': 0.16.0(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/contract-authoring': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) + '@clack/prompts': 1.7.0 + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@vercel/detect-agent': 1.2.3 arktype: 2.2.3 + c12: 3.3.4 + ci-info: 4.4.0 + clipanion: 4.0.0-rc.4(typanion@3.14.0) + closest-match: 1.3.3 + colorette: 2.0.20 + commander: 15.0.0 + esbuild: 0.28.1 + jsonc-parser: 3.3.1 + package-manager-detector: 1.8.0 pathe: 2.0.3 - ts-toolbelt: 9.6.0 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-contract@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-schema-ir': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-errors@0.16.0(typescript@5.9.3)': - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-operations@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-orm-client@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-errors': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-runtime': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-relational-core@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - '@standard-schema/spec': 1.1.0 - arktype: 2.2.3 - ts-toolbelt: 9.6.0 - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/sql-runtime@0.16.0(typescript@5.9.3)': - dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/ids': 0.16.0(typescript@5.9.3) - '@prisma-next/operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - arktype: 2.2.3 + prettier: 3.9.6 + string-width: 8.2.2 + strip-ansi: 7.2.0 + vscode-languageserver: 10.1.0 + vscode-languageserver-textdocument: 1.0.12 + wrap-ansi: 10.0.0 optionalDependencies: typescript: 5.9.3 + vite: 7.3.6(@types/node@26.1.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0) + transitivePeerDependencies: + - magicast + - typanion - '@prisma-next/sql-schema-ir@0.16.0(typescript@5.9.3)': + '@prisma/orm-toolchain@0.17.0(typescript@5.9.3)(vite@7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0))': dependencies: - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/target-postgres@0.16.0(typanion@3.14.0)(typescript@5.9.3)': - dependencies: - '@prisma-next/cli': 0.16.0(typanion@3.14.0)(typescript@5.9.3) - '@prisma-next/contract': 0.16.0(typescript@5.9.3) - '@prisma-next/errors': 0.16.0(typescript@5.9.3) - '@prisma-next/family-sql': 0.16.0(typescript@5.9.3) - '@prisma-next/framework-components': 0.16.0(typescript@5.9.3) - '@prisma-next/migration-tools': 0.16.0(typescript@5.9.3) - '@prisma-next/psl-parser': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-contract': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-errors': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-operations': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-relational-core': 0.16.0(typescript@5.9.3) - '@prisma-next/sql-schema-ir': 0.16.0(typescript@5.9.3) - '@prisma-next/ts-render': 0.16.0(typescript@5.9.3) - '@prisma-next/utils': 0.16.0(typescript@5.9.3) - '@standard-schema/spec': 1.1.0 + '@clack/prompts': 1.7.0 + '@prisma/orm-framework': 0.17.0(typescript@5.9.3) + '@vercel/detect-agent': 1.2.3 arktype: 2.2.3 + c12: 3.3.4 + ci-info: 4.4.0 + clipanion: 4.0.0-rc.4(typanion@3.14.0) + closest-match: 1.3.3 + colorette: 2.0.20 + commander: 15.0.0 + esbuild: 0.28.1 + jsonc-parser: 3.3.1 + package-manager-detector: 1.8.0 pathe: 2.0.3 + prettier: 3.9.6 + string-width: 8.2.2 + strip-ansi: 7.2.0 + vscode-languageserver: 10.1.0 + vscode-languageserver-textdocument: 1.0.12 + wrap-ansi: 10.0.0 optionalDependencies: typescript: 5.9.3 + vite: 7.3.6(@types/node@22.20.1)(jiti@2.7.0)(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.23.0)(yaml@2.9.0) transitivePeerDependencies: - magicast - typanion - '@prisma-next/ts-render@0.16.0(typescript@5.9.3)': - optionalDependencies: - typescript: 5.9.3 - - '@prisma-next/utils@0.16.0(typescript@5.9.3)': - optionalDependencies: - typescript: 5.9.3 - '@rollup/rollup-android-arm-eabi@4.60.4': optional: true @@ -5973,7 +5369,7 @@ snapshots: dependencies: quansync: 0.2.11 - package-manager-detector@1.7.0: {} + package-manager-detector@1.8.0: {} parse-ms@4.0.0: {} @@ -6100,7 +5496,7 @@ snapshots: prettier@3.7.4: {} - prettier@3.9.5: {} + prettier@3.9.6: {} pretty-ms@9.3.0: dependencies: @@ -6513,7 +5909,7 @@ snapshots: unicorn-magic@0.3.0: {} - uniku@0.3.2: + uniku@0.4.3: dependencies: '@noble/hashes': 2.2.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 99a6ae038..1fe612871 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -89,7 +89,10 @@ blockExoticSubdeps: true # Excluded from the 7-day cooldown: first-party packages we publish or # integrate against directly. These ship on their own release cadence and # are not exotic deps. -# - @prisma-next/* first-party Prisma packages the integration is built against +# - @prisma/orm-*, prisma-next first-party Prisma packages the integration is +# built against (the 0.17 publish surface; the +# retired @prisma-next/* scope is kept while +# examples still pin 0.16) # - @cipherstash/protect-ffi* CipherStash-published native FFI and its # per-platform binary packages (darwin-arm64, # linux-x64-gnu, etc.); bumped in lockstep with stack @@ -101,6 +104,8 @@ blockExoticSubdeps: true # payload format protect-ffi emits; bumped in lockstep. minimumReleaseAgeExclude: - '@prisma-next/*' + - '@prisma/orm-*' + - 'prisma-next' - '@cipherstash/protect-ffi' - '@cipherstash/protect-ffi-*' - '@cipherstash/auth' diff --git a/skills/stash-prisma/SKILL.md b/skills/stash-prisma/SKILL.md index 2f6072e49..382bbb59b 100644 --- a/skills/stash-prisma/SKILL.md +++ b/skills/stash-prisma/SKILL.md @@ -100,35 +100,32 @@ sort needs the matching `*Eq` / `*Ord` / text-search domain. ### 2. Register the extension pack in `prisma-next.config.ts` +Since Prisma Next 0.17 an application depends on exactly one database facade +(`@prisma/orm-postgres`; the retired `@prisma-next/*` scope no longer +publishes), and the facade's `defineConfig` wires the family, target, adapter, +driver, and PSL provider internally: + ```typescript import cipherstash from '@cipherstash/stack-prisma/control' -import { defineConfig } from '@prisma-next/cli/config-types' -import { prismaContract } from '@prisma-next/sql-contract-psl/provider' -import postgresPack from '@prisma-next/target-postgres/pack' -import { postgresCreateNamespace } from '@prisma-next/target-postgres/types' -// ... family, target, driver, adapter +import { defineConfig } from '@prisma/orm-postgres/config' export default defineConfig({ - // ... your existing config - extensionPacks: [cipherstash], - contract: prismaContract('./prisma/schema.prisma', { - output: 'src/prisma/contract.json', - target: postgresPack, - createNamespace: postgresCreateNamespace, - }), + contract: './prisma/schema.prisma', + output: 'src/prisma', + extensions: [cipherstash], + db: { connection: process.env['DATABASE_URL']! }, }) ``` -`createNamespace` is **required** since Prisma Next 0.15 — the SQL family no -longer materialises a placeholder namespace. Omitting it fails at runtime with -`createNamespace is not a function` when you run `prisma-next contract emit`. +The config key is `extensions` (0.17 renamed `extensionPacks`; the old key +fails loudly). ### 3. Wire the runtime with `cipherstashFromStack` in `src/db.ts` ```typescript import 'dotenv/config' import { cipherstashFromStack } from '@cipherstash/stack-prisma/v3' -import postgres from '@prisma-next/postgres/runtime' +import postgres from '@prisma/orm-postgres/runtime' import type { Contract } from './prisma/contract.d' import contractJson from './prisma/contract.json' with { type: 'json' } @@ -231,7 +228,7 @@ operators — operand casts to `eql_v3.query_*`, per-driver parameter binding see the `stash-postgres` skill. In a migration, the recipes ride a raw-SQL operation (`rawSql` from -`@prisma-next/postgres/migration`) in the migration's `operations`: +`@prisma/orm-postgres/migration`) in the migration's `operations`: ```typescript rawSql({ @@ -361,7 +358,7 @@ Run Prisma Next apps on a Node runtime where the native module loads. | Subpath | Purpose | |---|---| | `@cipherstash/stack-prisma/v3` | The v3 surface: `cipherstashFromStack`, the SDK adapter, envelopes/middleware | -| `@cipherstash/stack-prisma/control` | The extension pack for `extensionPacks: [...]` | +| `@cipherstash/stack-prisma/control` | The extension pack for `extensions: [...]` | | `@cipherstash/stack-prisma/runtime` | Envelope classes, `decryptAll`, `eql*` operators, `EncryptedString.from()`… | | `@cipherstash/stack-prisma/stack` | One-call setup against `@cipherstash/stack`: `cipherstashFromStack` | | `@cipherstash/stack-prisma/column-types` | camelCase factories (`textSearch`, `bigIntOrd`, …) for **TS-authored** contracts — emits byte-identical `contract.json` to the PSL constructors |