@prisma-next/extension-pgvector 0.12.0-dev.4 → 0.12.0-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -200,16 +200,9 @@ The extension declares the following capabilities:
200
200
 
201
201
  ## Authoring (maintainers)
202
202
 
203
- The extension's contract + baseline migration are emitted on-disk inside this package using the same pipeline application authors use:
203
+ After changing the contract source, run `pnpm migrations:regen` from the repo root to keep migration metadata, `refs/head.json`, and `end-contract.*` consistent with the freshly-built `src/contract.json`; it is also wired into `pnpm fixtures:emit` automatically.
204
204
 
205
- - `pnpm build:contract-space`runs `prisma-next contract emit` to produce `src/contract.{json,d.ts}` from the TS source at `src/contract.ts`.
206
- - `pnpm exec prisma-next migration plan --name <slug>` (run from this package directory) — scaffolds a new migration directory under `migrations/<dirName>/` for schema changes that touch tables / models. **Not chained into `pnpm build`**: `migration plan` is non-idempotent (each invocation generates a new timestamped directory), so it runs manually when the contract source changes. Note: pgvector's contract declares only the parameterised `vector` native type under `storage.types` (no tables / models), so the planner currently refuses to scaffold the baseline migration with `PN-CLI-4020 Contract changed but planner produced no operations` (this is **Path B** authoring per [ADR 212](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md#contract-space-package-layout)). That directory was hand-authored once (Migration subclass + seed `migration.json` preserving the full `toContract`) and `pnpm tsx migrations/<dirName>/migration.ts` re-emits `ops.json` + `migration.json` deterministically. Future migrations that add tables / models can use `migration plan` directly (Path A).
207
- - `pnpm tsx migrations/<dirName>/migration.ts` (run from this package directory) — re-emits `ops.json` + `migration.json` from the hand-edited subclass. Use `tsx`, not bare `node`, because the Migration subclass imports relative TypeScript siblings which Node's native loader can't resolve without a TS-aware loader.
208
- - `migrations/refs/head.json` is hand-pinned with the latest migration's `to` hash + `providedInvariants`.
209
-
210
- The descriptor at `src/exports/control.ts` then JSON-imports those artefacts and synthesises the framework's `MigrationPackage` shape.
211
-
212
- See [ADR 212 — Contract spaces](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md) ("Contract-space package layout") for the canonical layout and rationale.
205
+ See [ADR 212Contract spaces](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md) ("Contract-space package layout") for the layout and rationale.
213
206
 
214
207
  ## References
215
208
 
package/dist/control.mjs CHANGED
@@ -3,10 +3,10 @@ import { contractSpaceFromJson } from "@prisma-next/migration-tools/spaces";
3
3
  //#region migrations/20260601T0000_install_vector_extension/migration.json
4
4
  var migration_default = {
5
5
  from: null,
6
- to: "sha256:29059dfe21ca210e1f8cc382550e24c429f91f9021607b0c61c90228c4fb84a6",
6
+ to: "sha256:3b5e09fea1e4f1ade3ff352b79bf16fb06d76887eb237d0946ca3534caddb0f1",
7
7
  providedInvariants: ["pgvector:install-vector-v1"],
8
8
  createdAt: "2026-06-01T00:00:00.000Z",
9
- migrationHash: "sha256:b96ff47e8da34232e94ceec345de674908979465d8f394965a980e0a958dea56"
9
+ migrationHash: "sha256:28ea1a85f9bbd30b0a765ef1c0c924be8e623489a25cf7dafe6cc5ba7b7f149b"
10
10
  };
11
11
  //#endregion
12
12
  //#region migrations/20260601T0000_install_vector_extension/ops.json
@@ -39,7 +39,7 @@ var ops_default = [{
39
39
  //#endregion
40
40
  //#region migrations/refs/head.json
41
41
  var head_default = {
42
- hash: "sha256:29059dfe21ca210e1f8cc382550e24c429f91f9021607b0c61c90228c4fb84a6",
42
+ hash: "sha256:3b5e09fea1e4f1ade3ff352b79bf16fb06d76887eb237d0946ca3534caddb0f1",
43
43
  invariants: ["pgvector:install-vector-v1"]
44
44
  };
45
45
  //#endregion
@@ -52,12 +52,19 @@ var contract_default = {
52
52
  roots: {},
53
53
  domain: { "namespaces": { "public": { "models": {} } } },
54
54
  storage: {
55
- "namespaces": { "public": {
56
- "id": "public",
57
- "kind": "postgres-schema",
58
- "tables": {}
59
- } },
60
- "storageHash": "sha256:29059dfe21ca210e1f8cc382550e24c429f91f9021607b0c61c90228c4fb84a6",
55
+ "namespaces": {
56
+ "__unbound__": {
57
+ "entries": { "table": {} },
58
+ "id": "__unbound__",
59
+ "kind": "postgres-unbound-schema"
60
+ },
61
+ "public": {
62
+ "entries": { "table": {} },
63
+ "id": "public",
64
+ "kind": "postgres-schema"
65
+ }
66
+ },
67
+ "storageHash": "sha256:3b5e09fea1e4f1ade3ff352b79bf16fb06d76887eb237d0946ca3534caddb0f1",
61
68
  "types": { "vector": {
62
69
  "codecId": "pg/vector@1",
63
70
  "kind": "codec-instance",
@@ -1 +1 @@
1
- {"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260601T0000_install_vector_extension/migration.json","../migrations/20260601T0000_install_vector_extension/ops.json","../migrations/refs/head.json","../src/contract.json","../src/core/contract-space-constants.ts","../src/exports/control.ts"],"sourcesContent":["","","","","/**\n * Static names and identifiers used across pgvector's contract space.\n *\n * Centralised here so the contract IR (`./contract`), the baseline\n * migration ops (`./migrations`), the head ref, and the descriptor\n * (`../exports/control`) all reference the same values without typos.\n *\n * The space identifier `'pgvector'` is what the framework writes to\n * `migrations/` in the user's repo and what the marker table's\n * `space` column carries for pgvector-owned rows.\n *\n * The `pgvector:*` invariantId namespace is locked here — once\n * published, an invariantId is immutable so downstream consumers can\n * reference it by literal string match.\n */\n\nexport const PGVECTOR_SPACE_ID = 'pgvector' as const;\n\nexport const PGVECTOR_NATIVE_TYPE = 'vector' as const;\n\nexport const PGVECTOR_BASELINE_MIGRATION_NAME = '20260601T0000_install_vector_extension' as const;\n\n/**\n * `pgvector:*` invariantIds emitted by the baseline migration. Each id,\n * once published, is immutable: downstream consumers (other extensions,\n * the marker table) reference them by literal string match.\n */\nexport const PGVECTOR_INVARIANTS = {\n installVector: 'pgvector:install-vector-v1',\n} as const;\n","/**\n * Control-plane descriptor for the pgvector extension.\n *\n * **Contract-space package layout.** The extension's contract\n * + migrations are emitted by the same pipeline application authors use:\n *\n * `prisma-next contract emit` → `<package>/src/contract.{json,d.ts}`\n * `prisma-next migration plan` → `<package>/migrations/<dir>/...`\n *\n * The descriptor wires those JSON artefacts via JSON-import declarations\n * so they flow through the consuming application's module resolver\n * without filesystem assumptions, and synthesises the canonical\n * {@link import('@prisma-next/framework-components/control').MigrationPackage}\n * shape for the framework's runner / verifier to consume. Readers in\n * `@prisma-next/migration-tools` add `dirPath` when loading from disk\n * (`OnDiskMigrationPackage`); descriptor-bundled packages do not need\n * it because the framework reads them directly from the descriptor.\n *\n * Wired surfaces:\n *\n * - `contractSpace.{contractJson,migrations,headRef}` — sourced from\n * the on-disk artefacts emitted by `build:contract-space`.\n * - `types.codecTypes.controlPlaneHooks[PGVECTOR_CODEC_ID]` — codec\n * control hooks (`expandNativeType`, `resolveIdentityValue`) the\n * SQL planner extracts via `extractCodecControlHooks` and uses to\n * render `vector(N)` column types and the canonical zero-vector\n * identity literal.\n *\n * @see docs/architecture docs/adrs/ADR 212 - Contract spaces.md\n * (contract-space package layout convention).\n */\n\nimport type { Contract } from '@prisma-next/contract/types';\nimport type {\n CodecControlHooks,\n SqlControlExtensionDescriptor,\n} from '@prisma-next/family-sql/control';\nimport { contractSpaceFromJson } from '@prisma-next/migration-tools/spaces';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport baselineMetadata from '../../migrations/20260601T0000_install_vector_extension/migration.json' with {\n type: 'json',\n};\nimport baselineOps from '../../migrations/20260601T0000_install_vector_extension/ops.json' with {\n type: 'json',\n};\nimport headRef from '../../migrations/refs/head.json' with { type: 'json' };\nimport contractJson from '../contract.json' with { type: 'json' };\nimport { PGVECTOR_SPACE_ID } from '../core/contract-space-constants';\nimport { pgvectorPackMeta, pgvectorQueryOperations } from '../core/descriptor-meta';\n\nconst PGVECTOR_CODEC_ID = 'pg/vector@1' as const;\nconst BASELINE_DIR_NAME = '20260601T0000_install_vector_extension';\n\nfunction buildVectorIdentityValue(typeParams: Record<string, unknown> | undefined): string | null {\n const length = typeParams?.['length'];\n if (typeof length !== 'number' || !Number.isInteger(length) || length <= 0) {\n return null;\n }\n\n const zeroVector = `[${new Array(length).fill('0').join(',')}]`;\n return `'${zeroVector}'::vector`;\n}\n\nconst vectorControlPlaneHooks: CodecControlHooks = {\n expandNativeType: ({ nativeType, typeParams }) => {\n const length = typeParams?.['length'];\n if (typeof length === 'number' && Number.isInteger(length) && length > 0) {\n return `${nativeType}(${length})`;\n }\n return nativeType;\n },\n resolveIdentityValue: ({ typeParams }) => buildVectorIdentityValue(typeParams),\n};\n\nconst pgvectorContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: BASELINE_DIR_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst pgvectorExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> = {\n ...pgvectorPackMeta,\n id: PGVECTOR_SPACE_ID,\n contractSpace: pgvectorContractSpace,\n types: {\n ...pgvectorPackMeta.types,\n codecTypes: {\n ...pgvectorPackMeta.types.codecTypes,\n controlPlaneHooks: {\n [PGVECTOR_CODEC_ID]: vectorControlPlaneHooks,\n },\n },\n },\n queryOperations: () => pgvectorQueryOperations(),\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n};\n\nexport { pgvectorExtensionDescriptor };\nexport default pgvectorExtensionDescriptor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIgBA,MAAa,oBAAoB;;;ACkCjC,MAAM,oBAAoB;AAC1B,MAAM,oBAAoB;AAE1B,SAAS,yBAAyB,YAAgE;CAChG,MAAM,SAAS,aAAa;CAC5B,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,UAAU,MAAM,KAAK,UAAU,GACvE,OAAO;CAIT,OAAO,IAAI,IADY,IAAI,MAAM,MAAM,EAAE,KAAK,GAAG,EAAE,KAAK,GAAG,EAAE,GACvC;AACxB;AAEA,MAAM,0BAA6C;CACjD,mBAAmB,EAAE,YAAY,iBAAiB;EAChD,MAAM,SAAS,aAAa;EAC5B,IAAI,OAAO,WAAW,YAAY,OAAO,UAAU,MAAM,KAAK,SAAS,GACrE,OAAO,GAAG,WAAW,GAAG,OAAO;EAEjC,OAAO;CACT;CACA,uBAAuB,EAAE,iBAAiB,yBAAyB,UAAU;AAC/E;AAEA,MAAM,wBAAwB,sBAA4C;CACxE,cAAA;CACA,YAAY,CACV;EACE,SAAS;EACT,UAAUA;EACV,KAAKC;CACP,CACF;CACA,SAAA;AACF,CAAC;AAED,MAAM,8BAAyE;CAC7E,GAAG;CACH,IAAI;CACJ,eAAe;CACf,OAAO;EACL,GAAG,iBAAiB;EACpB,YAAY;GACV,GAAG,iBAAiB,MAAM;GAC1B,mBAAmB,GAChB,oBAAoB,wBACvB;EACF;CACF;CACA,uBAAuB,wBAAwB;CAC/C,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF"}
1
+ {"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260601T0000_install_vector_extension/migration.json","../migrations/20260601T0000_install_vector_extension/ops.json","../migrations/refs/head.json","../src/contract.json","../src/core/contract-space-constants.ts","../src/exports/control.ts"],"sourcesContent":["","","","","/**\n * Static names and identifiers used across pgvector's contract space.\n *\n * Centralised here so the contract IR (`./contract`), the baseline\n * migration ops (`./migrations`), the head ref, and the descriptor\n * (`../exports/control`) all reference the same values without typos.\n *\n * The space identifier `'pgvector'` is what the framework writes to\n * `migrations/` in the user's repo and what the marker table's\n * `space` column carries for pgvector-owned rows.\n *\n * The `pgvector:*` invariantId namespace is locked here — once\n * published, an invariantId is immutable so downstream consumers can\n * reference it by literal string match.\n */\n\nexport const PGVECTOR_SPACE_ID = 'pgvector' as const;\n\nexport const PGVECTOR_NATIVE_TYPE = 'vector' as const;\n\nexport const PGVECTOR_BASELINE_MIGRATION_NAME = '20260601T0000_install_vector_extension' as const;\n\n/**\n * `pgvector:*` invariantIds emitted by the baseline migration. Each id,\n * once published, is immutable: downstream consumers (other extensions,\n * the marker table) reference them by literal string match.\n */\nexport const PGVECTOR_INVARIANTS = {\n installVector: 'pgvector:install-vector-v1',\n} as const;\n","/**\n * Control-plane descriptor for the pgvector extension.\n *\n * **Contract-space package layout.** The extension's contract\n * + migrations are emitted by the same pipeline application authors use:\n *\n * `prisma-next contract emit` → `<package>/src/contract.{json,d.ts}`\n * `prisma-next migration plan` → `<package>/migrations/<dir>/...`\n *\n * The descriptor wires those JSON artefacts via JSON-import declarations\n * so they flow through the consuming application's module resolver\n * without filesystem assumptions, and synthesises the canonical\n * {@link import('@prisma-next/framework-components/control').MigrationPackage}\n * shape for the framework's runner / verifier to consume. Readers in\n * `@prisma-next/migration-tools` add `dirPath` when loading from disk\n * (`OnDiskMigrationPackage`); descriptor-bundled packages do not need\n * it because the framework reads them directly from the descriptor.\n *\n * Wired surfaces:\n *\n * - `contractSpace.{contractJson,migrations,headRef}` — sourced from\n * the on-disk artefacts emitted by `build:contract-space`.\n * - `types.codecTypes.controlPlaneHooks[PGVECTOR_CODEC_ID]` — codec\n * control hooks (`expandNativeType`, `resolveIdentityValue`) the\n * SQL planner extracts via `extractCodecControlHooks` and uses to\n * render `vector(N)` column types and the canonical zero-vector\n * identity literal.\n *\n * @see docs/architecture docs/adrs/ADR 212 - Contract spaces.md\n * (contract-space package layout convention).\n */\n\nimport type { Contract } from '@prisma-next/contract/types';\nimport type {\n CodecControlHooks,\n SqlControlExtensionDescriptor,\n} from '@prisma-next/family-sql/control';\nimport { contractSpaceFromJson } from '@prisma-next/migration-tools/spaces';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport baselineMetadata from '../../migrations/20260601T0000_install_vector_extension/migration.json' with {\n type: 'json',\n};\nimport baselineOps from '../../migrations/20260601T0000_install_vector_extension/ops.json' with {\n type: 'json',\n};\nimport headRef from '../../migrations/refs/head.json' with { type: 'json' };\nimport contractJson from '../contract.json' with { type: 'json' };\nimport { PGVECTOR_SPACE_ID } from '../core/contract-space-constants';\nimport { pgvectorPackMeta, pgvectorQueryOperations } from '../core/descriptor-meta';\n\nconst PGVECTOR_CODEC_ID = 'pg/vector@1' as const;\nconst BASELINE_DIR_NAME = '20260601T0000_install_vector_extension';\n\nfunction buildVectorIdentityValue(typeParams: Record<string, unknown> | undefined): string | null {\n const length = typeParams?.['length'];\n if (typeof length !== 'number' || !Number.isInteger(length) || length <= 0) {\n return null;\n }\n\n const zeroVector = `[${new Array(length).fill('0').join(',')}]`;\n return `'${zeroVector}'::vector`;\n}\n\nconst vectorControlPlaneHooks: CodecControlHooks = {\n expandNativeType: ({ nativeType, typeParams }) => {\n const length = typeParams?.['length'];\n if (typeof length === 'number' && Number.isInteger(length) && length > 0) {\n return `${nativeType}(${length})`;\n }\n return nativeType;\n },\n resolveIdentityValue: ({ typeParams }) => buildVectorIdentityValue(typeParams),\n};\n\nconst pgvectorContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: BASELINE_DIR_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst pgvectorExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> = {\n ...pgvectorPackMeta,\n id: PGVECTOR_SPACE_ID,\n contractSpace: pgvectorContractSpace,\n types: {\n ...pgvectorPackMeta.types,\n codecTypes: {\n ...pgvectorPackMeta.types.codecTypes,\n controlPlaneHooks: {\n [PGVECTOR_CODEC_ID]: vectorControlPlaneHooks,\n },\n },\n },\n queryOperations: () => pgvectorQueryOperations(),\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n};\n\nexport { pgvectorExtensionDescriptor };\nexport default pgvectorExtensionDescriptor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIgBA,MAAa,oBAAoB;;;ACkCjC,MAAM,oBAAoB;AAC1B,MAAM,oBAAoB;AAE1B,SAAS,yBAAyB,YAAgE;CAChG,MAAM,SAAS,aAAa;CAC5B,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,UAAU,MAAM,KAAK,UAAU,GACvE,OAAO;CAIT,OAAO,IAAI,IADY,IAAI,MAAM,MAAM,EAAE,KAAK,GAAG,EAAE,KAAK,GAAG,EAAE,GACvC;AACxB;AAEA,MAAM,0BAA6C;CACjD,mBAAmB,EAAE,YAAY,iBAAiB;EAChD,MAAM,SAAS,aAAa;EAC5B,IAAI,OAAO,WAAW,YAAY,OAAO,UAAU,MAAM,KAAK,SAAS,GACrE,OAAO,GAAG,WAAW,GAAG,OAAO;EAEjC,OAAO;CACT;CACA,uBAAuB,EAAE,iBAAiB,yBAAyB,UAAU;AAC/E;AAEA,MAAM,wBAAwB,sBAA4C;CACxE,cAAA;CACA,YAAY,CACV;EACE,SAAS;EACT,UAAUA;EACV,KAAKC;CACP,CACF;CACA,SAAA;AACF,CAAC;AAED,MAAM,8BAAyE;CAC7E,GAAG;CACH,IAAI;CACJ,eAAe;CACf,OAAO;EACL,GAAG,iBAAiB;EACpB,YAAY;GACV,GAAG,iBAAiB,MAAM;GAC1B,mBAAmB,GAChB,oBAAoB,wBACvB;EACF;CACF;CACA,uBAAuB,wBAAwB;CAC/C,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF"}
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
2
  "name": "@prisma-next/extension-pgvector",
3
- "version": "0.12.0-dev.4",
3
+ "version": "0.12.0-dev.41",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
- "@prisma-next/contract": "0.12.0-dev.4",
9
- "@prisma-next/contract-authoring": "0.12.0-dev.4",
10
- "@prisma-next/family-sql": "0.12.0-dev.4",
11
- "@prisma-next/framework-components": "0.12.0-dev.4",
12
- "@prisma-next/migration-tools": "0.12.0-dev.4",
13
- "@prisma-next/sql-contract": "0.12.0-dev.4",
14
- "@prisma-next/sql-operations": "0.12.0-dev.4",
15
- "@prisma-next/sql-relational-core": "0.12.0-dev.4",
16
- "@prisma-next/sql-runtime": "0.12.0-dev.4",
17
- "@prisma-next/sql-schema-ir": "0.12.0-dev.4",
8
+ "@prisma-next/contract": "0.12.0-dev.41",
9
+ "@prisma-next/contract-authoring": "0.12.0-dev.41",
10
+ "@prisma-next/family-sql": "0.12.0-dev.41",
11
+ "@prisma-next/framework-components": "0.12.0-dev.41",
12
+ "@prisma-next/migration-tools": "0.12.0-dev.41",
13
+ "@prisma-next/sql-contract": "0.12.0-dev.41",
14
+ "@prisma-next/sql-operations": "0.12.0-dev.41",
15
+ "@prisma-next/sql-relational-core": "0.12.0-dev.41",
16
+ "@prisma-next/sql-runtime": "0.12.0-dev.41",
17
+ "@prisma-next/sql-schema-ir": "0.12.0-dev.41",
18
18
  "@standard-schema/spec": "^1.1.0",
19
19
  "arktype": "^2.2.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@prisma-next/adapter-postgres": "0.12.0-dev.4",
23
- "@prisma-next/cli": "0.12.0-dev.4",
24
- "@prisma-next/operations": "0.12.0-dev.4",
25
- "@prisma-next/postgres": "0.12.0-dev.4",
26
- "@prisma-next/sql-contract-ts": "0.12.0-dev.4",
27
- "@prisma-next/target-postgres": "0.12.0-dev.4",
28
- "@prisma-next/test-utils": "0.12.0-dev.4",
29
- "@prisma-next/tsconfig": "0.12.0-dev.4",
30
- "@prisma-next/tsdown": "0.12.0-dev.4",
22
+ "@prisma-next/adapter-postgres": "0.12.0-dev.41",
23
+ "@prisma-next/cli": "0.12.0-dev.41",
24
+ "@prisma-next/operations": "0.12.0-dev.41",
25
+ "@prisma-next/postgres": "0.12.0-dev.41",
26
+ "@prisma-next/sql-contract-ts": "0.12.0-dev.41",
27
+ "@prisma-next/target-postgres": "0.12.0-dev.41",
28
+ "@prisma-next/test-utils": "0.12.0-dev.41",
29
+ "@prisma-next/tsconfig": "0.12.0-dev.41",
30
+ "@prisma-next/tsdown": "0.12.0-dev.41",
31
31
  "tsdown": "0.22.0",
32
32
  "typescript": "5.9.3",
33
33
  "vitest": "4.1.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@prisma-next/adapter-postgres": "0.12.0-dev.4",
36
+ "@prisma-next/adapter-postgres": "0.12.0-dev.41",
37
37
  "typescript": ">=5.9"
38
38
  },
39
39
  "peerDependenciesMeta": {
package/src/contract.d.ts CHANGED
@@ -23,7 +23,7 @@ import type {
23
23
  } from '@prisma-next/sql-contract/types';
24
24
  import type {
25
25
  Contract as ContractType,
26
- ContractModelsMap,
26
+ ContractModelDefinitions,
27
27
  ExecutionHashBase,
28
28
  NamespaceId,
29
29
  ProfileHashBase,
@@ -31,7 +31,7 @@ import type {
31
31
  } from '@prisma-next/contract/types';
32
32
 
33
33
  export type StorageHash =
34
- StorageHashBase<'sha256:29059dfe21ca210e1f8cc382550e24c429f91f9021607b0c61c90228c4fb84a6'>;
34
+ StorageHashBase<'sha256:3b5e09fea1e4f1ade3ff352b79bf16fb06d76887eb237d0946ca3534caddb0f1'>;
35
35
  export type ExecutionHash = ExecutionHashBase<string>;
36
36
  export type ProfileHash =
37
37
  ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>;
@@ -56,10 +56,15 @@ type ContractBase = Omit<
56
56
  ContractType<
57
57
  {
58
58
  readonly namespaces: {
59
+ readonly __unbound__: {
60
+ readonly id: '__unbound__';
61
+ readonly kind: 'postgres-unbound-schema';
62
+ readonly entries: { readonly table: {}; readonly type: Record<string, never> };
63
+ };
59
64
  readonly public: {
60
65
  readonly id: 'public';
61
- readonly kind: 'sql-namespace';
62
- readonly tables: {};
66
+ readonly kind: 'postgres-schema';
67
+ readonly entries: { readonly table: {}; readonly type: Record<string, never> };
63
68
  };
64
69
  };
65
70
  readonly types: {
@@ -108,7 +113,8 @@ type ContractBase = Omit<
108
113
  readonly profileHash: ProfileHash;
109
114
  };
110
115
 
116
+ export type Models = ContractModelDefinitions<Contract>;
117
+
111
118
  export type Contract = ContractWithTypeMaps<ContractBase, TypeMaps>;
112
119
 
113
120
  export type Namespaces = Contract['storage']['namespaces'];
114
- export type Models = ContractModelsMap<Contract>;
package/src/contract.json CHANGED
@@ -13,13 +13,22 @@
13
13
  },
14
14
  "storage": {
15
15
  "namespaces": {
16
+ "__unbound__": {
17
+ "entries": {
18
+ "table": {}
19
+ },
20
+ "id": "__unbound__",
21
+ "kind": "postgres-unbound-schema"
22
+ },
16
23
  "public": {
24
+ "entries": {
25
+ "table": {}
26
+ },
17
27
  "id": "public",
18
- "kind": "postgres-schema",
19
- "tables": {}
28
+ "kind": "postgres-schema"
20
29
  }
21
30
  },
22
- "storageHash": "sha256:29059dfe21ca210e1f8cc382550e24c429f91f9021607b0c61c90228c4fb84a6",
31
+ "storageHash": "sha256:3b5e09fea1e4f1ade3ff352b79bf16fb06d76887eb237d0946ca3534caddb0f1",
23
32
  "types": {
24
33
  "vector": {
25
34
  "codecId": "pg/vector@1",