@prisma-next/family-sql 0.11.0-dev.71 → 0.11.0-dev.73
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/dist/ir.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ir.d.mts","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts","../src/core/ir/sql-schema-verifier-base.ts"],"mappings":";;;;;;;;;KAwCY,yBAAA,IAA6B,KAAA,cAAmB,mBAAmB;;;AAA/E;;;;AAA+E;AA0B/E;;;;;;;;;;;;;;;;;uBAAsB,yBAAA,mBAA4C,QAAA,CAAS,UAAA,cAC9D,kBAAA,CAAmB,SAAA;EAAA,iBAKX,kBAAA;EAAA,iBAHF,cAAA;cAGE,kBAAA,GAAoB,WAAA,SAAoB,yBAAA,GACzD,kBAAA,GAAqB,WAAA,SAAoB,IAAA;EAW3C,mBAAA,WAA8B,SAAA,GAAY,SAAA,CAAA,CAAW,IAAA,YAAgB,CAAA;EAMrE,iBAAA,CAAkB,QAAA,EAAU,SAAA,GAAY,UAAA;EAIxC,mBAAA,EAJkD,gCAAA,CAI/B,sBAAA;EAEnB,WAAA,EAFmB,gCAAA,CAER,WAAA;EAAA,UAED,yBAAA,CAA0B,IAAA,YAAgB,QAAA,CAAS,UAAA;EAAA,UAOnD,iBAAA,CAAkB,SAAA,EAAW,QAAA,CAAS,UAAA,IAAc,QAAA,CAAS,UAAA;EAAA,
|
|
1
|
+
{"version":3,"file":"ir.d.mts","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts","../src/core/ir/sql-schema-verifier-base.ts"],"mappings":";;;;;;;;;KAwCY,yBAAA,IAA6B,KAAA,cAAmB,mBAAmB;;;AAA/E;;;;AAA+E;AA0B/E;;;;;;;;;;;;;;;;;uBAAsB,yBAAA,mBAA4C,QAAA,CAAS,UAAA,cAC9D,kB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AS,mBAAA,CAAoB,SAAA,EAAW,OAAA,aAC9B,WAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-contract-serializer-8axtK4lg.mjs","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts"],"sourcesContent":["import { ContractValidationError } from '@prisma-next/contract/contract-validation-error';\nimport type { Contract } from '@prisma-next/contract/types';\nimport type { ContractSerializer } from '@prisma-next/framework-components/control';\nimport {\n type Namespace,\n NamespaceBase,\n UNBOUND_NAMESPACE_ID,\n} from '@prisma-next/framework-components/ir';\nimport { sqlContractCanonicalizationHooks } from '@prisma-next/sql-contract/canonicalization-hooks';\nimport {\n buildSqlNamespace,\n type SqlNamespaceTablesInput,\n SqlStorage,\n type SqlStorageInput,\n type SqlStorageTypeEntry,\n SqlUnboundNamespace,\n StorageTable,\n type StorageTableInput,\n} from '@prisma-next/sql-contract/types';\nimport {\n createSqlContractSchema,\n validateSqlContractFully,\n} from '@prisma-next/sql-contract/validators';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport type { JsonObject } from '@prisma-next/utils/json';\nimport { type Type, type } from 'arktype';\n\nconst NamespaceRawSchema = type({\n id: 'string',\n 'kind?': 'string',\n // Undeclared keys (`tables`, `enum`, and any pack-contributed slot maps)\n // intentionally pass through; the slot loop below iterates them by name.\n '+': 'ignore',\n});\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport type SqlEntityHydrationFactory = (entry: unknown) => SqlStorageTypeEntry;\n\n/**\n * SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n * deserialization pipeline:\n *\n * 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n * against the SQL contract arktype schema (`validateSqlContractFully`)\n * and returns the validated flat-data shape.\n * 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n * constructs the family-shared SQL Contract IR class hierarchy\n * (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n * / …). The rest of the contract envelope is JSON-clean primitive\n * data and passes through unchanged.\n * 3. `constructTargetContract` is the target-specific extension hook;\n * defaults to identity. Targets that need to attach target-only\n * fields (e.g. target-specific derived storage fields) override it.\n *\n * Default `serializeContract` is identity over the contract — concrete\n * SQL targets ship JSON-clean class instances, so the contract value\n * can be stringified directly. The non-enumerable family-level `kind`\n * discriminator on `SqlNode` instances stays out of the persisted\n * envelope automatically. Targets that need to canonicalize on the way\n * out (key ordering, dropping computed-only fields) override\n * `serializeContract` directly.\n */\nexport abstract class SqlContractSerializerBase<TContract extends Contract<SqlStorage>>\n implements ContractSerializer<TContract>\n{\n private readonly contractSchema: Type<unknown> | undefined;\n\n constructor(\n private readonly entityTypeRegistry: ReadonlyMap<string, SqlEntityHydrationFactory> = new Map(),\n validatorFragments?: ReadonlyMap<string, Type<unknown>>,\n ) {\n // Only build a fragments-aware contract schema when pack contributions\n // exist. The cached module-level default in `validators.ts` covers the\n // no-contributions case and avoids per-instance schema compilation.\n this.contractSchema =\n validatorFragments !== undefined && validatorFragments.size > 0\n ? createSqlContractSchema(validatorFragments)\n : undefined;\n }\n\n deserializeContract<T extends TContract = TContract>(json: unknown): T {\n const validated = this.parseSqlContractStructure(json);\n const hydrated = this.hydrateSqlStorage(validated);\n return this.constructTargetContract(hydrated) as T;\n }\n\n serializeContract(contract: TContract): JsonObject {\n return contract as unknown as JsonObject;\n }\n\n shouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\n sortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\n protected parseSqlContractStructure(json: unknown): Contract<SqlStorage> {\n return validateSqlContractFully<Contract<SqlStorage>>(\n json,\n this.contractSchema !== undefined ? { contractSchema: this.contractSchema } : undefined,\n );\n }\n\n protected hydrateSqlStorage(validated: Contract<SqlStorage>): Contract<SqlStorage> {\n const types = validated.storage.types;\n const hydratedTypes =\n types !== undefined\n ? Object.fromEntries(\n Object.entries(types).map(([name, entry]) => [\n name,\n this.hydrateStorageTypeEntry(entry),\n ]),\n )\n : undefined;\n\n const rawNamespaces = validated.storage.namespaces;\n if (rawNamespaces === undefined) {\n throw new ContractValidationError(\n 'Contract storage.namespaces is required after structural validation',\n 'structural',\n );\n }\n const hydratedNamespaces = this.hydrateSqlNamespaceMap(rawNamespaces);\n // Keep the `__unbound__` brand sound: a deserialized contract may declare\n // only named namespaces (cross-namespace contracts omit the late-bound\n // slot), so inject the family unbound singleton when absent rather than\n // asserting a shape that isn't present.\n const unbound = hydratedNamespaces[UNBOUND_NAMESPACE_ID] ?? SqlUnboundNamespace.instance;\n\n return {\n ...validated,\n storage: new SqlStorage({\n storageHash: validated.storage.storageHash,\n ...ifDefined('types', hydratedTypes),\n // `__unbound__` is guaranteed present above; the residual narrowing is\n // the family invariant that hydrated SQL namespaces are `SqlNamespace`\n // instances (target/family classes, not the wider framework `Namespace`).\n namespaces: blindCast<\n SqlStorageInput['namespaces'],\n 'hydrated SQL namespaces are SqlNamespace instances; __unbound__ guaranteed present (injected above)'\n >({ ...hydratedNamespaces, [UNBOUND_NAMESPACE_ID]: unbound }),\n }),\n };\n }\n\n protected hydrateSqlNamespaceMap(\n namespaces: Readonly<Record<string, Namespace | Record<string, unknown>>>,\n ): Readonly<Record<string, Namespace>> {\n return Object.fromEntries(\n Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n // Raw entries passed structural validation; hydrate materialises family IR class instances.\n const namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n const namespaceMaterialised =\n namespaceHydrated instanceof NamespaceBase\n ? namespaceHydrated\n : buildSqlNamespace(namespaceHydrated);\n return [nsId, namespaceMaterialised];\n }),\n );\n }\n\n protected hydrateSqlNamespaceEntry(\n nsId: string,\n raw: Namespace | Record<string, unknown>,\n ): Namespace | SqlNamespaceTablesInput {\n if (raw instanceof NamespaceBase) {\n return raw;\n }\n const rawRecord = isPlainRecord(raw) ? raw : {};\n const id = typeof rawRecord['id'] === 'string' ? rawRecord['id'] : nsId;\n const parsed = NamespaceRawSchema({ ...rawRecord, id });\n if (parsed instanceof type.errors) {\n const messages = parsed.map((p: { message: string }) => p.message).join('; ');\n throw new ContractValidationError(`Namespace hydration failed: ${messages}`, 'structural');\n }\n const result: Record<string, unknown> = { id };\n\n for (const [propertyKey, slotValue] of Object.entries(parsed)) {\n if (propertyKey === 'id') continue;\n if (slotValue === null || typeof slotValue !== 'object') continue;\n\n if (propertyKey === 'tables') {\n result['tables'] = Object.fromEntries(\n Object.entries(slotValue as Record<string, unknown>).map(([tableName, table]) => [\n tableName,\n table instanceof StorageTable ? table : new StorageTable(table as StorageTableInput),\n ]),\n );\n continue;\n }\n\n const hydratedSlot = Object.fromEntries(\n Object.entries(slotValue as Record<string, unknown>).map(([entryName, entry]) => {\n if (typeof entry !== 'object' || entry === null) {\n return [entryName, entry];\n }\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind === 'string') {\n const factory = this.entityTypeRegistry.get(kind);\n if (factory !== undefined) {\n return [entryName, factory(entry)];\n }\n }\n return [entryName, entry];\n }),\n );\n if (Object.keys(hydratedSlot).length > 0) {\n result[propertyKey] = hydratedSlot;\n }\n }\n\n const enumRaw = rawRecord['enum'];\n if (enumRaw !== undefined && typeof enumRaw === 'object' && enumRaw !== null) {\n for (const entry of Object.values(enumRaw as Record<string, unknown>)) {\n if (typeof entry !== 'object' || entry === null) continue;\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind === 'string' && this.entityTypeRegistry.get(kind) === undefined) {\n throw new ContractValidationError(\n `Entry kind '${kind}' has no registered hydration factory.`,\n 'structural',\n );\n }\n }\n }\n\n const tables = (result['tables'] ?? {}) as Record<string, StorageTable>;\n const enumSlot = result['enum'] as NonNullable<SqlNamespaceTablesInput['enum']> | undefined;\n return {\n ...result,\n tables,\n ...(enumSlot !== undefined ? { enum: enumSlot } : {}),\n } as SqlNamespaceTablesInput;\n }\n\n protected hydrateStorageTypeEntry(entry: SqlStorageTypeEntry): SqlStorageTypeEntry {\n if (typeof entry !== 'object' || entry === null) {\n return entry;\n }\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind !== 'string') {\n return entry;\n }\n const factory = this.entityTypeRegistry.get(kind);\n if (factory === undefined) {\n return entry;\n }\n return factory(entry);\n }\n\n protected constructTargetContract(hydrated: Contract<SqlStorage>): TContract {\n return hydrated as TContract;\n }\n}\n","import type { Contract } from '@prisma-next/contract/types';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport { SqlContractSerializerBase } from './sql-contract-serializer-base';\n\n/**\n * Default SQL family `ContractSerializer` concretion. Inherits the\n * full SQL-shared deserialization pipeline (structural validation +\n * IR-class hydration) without pack-registered `storage.types`\n * hydration factories — targets that emit polymorphic JSON outside the\n * codec-typed envelope wire a target-specific subclass with a populated\n * registry (see Postgres). Family-level call sites instantiate this\n * default directly when no target serializer is supplied.\n */\nexport class SqlContractSerializer extends SqlContractSerializerBase<Contract<SqlStorage>> {\n constructor() {\n super(new Map());\n }\n}\n"],"mappings":";;;;;;;;;AA4BA,MAAM,qBAAqB,KAAK;CAC9B,IAAI;CACJ,SAAS;CAGT,KAAK;AACP,CAAC;AAED,SAAS,cAAc,OAAkD;CACvE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAsB,4BAAtB,MAEA;CAIqB;CAHnB;CAEA,YACE,qCAAsF,IAAI,IAAI,GAC9F,oBACA;EAFiB,KAAA,qBAAA;EAMjB,KAAK,iBACH,uBAAuB,KAAA,KAAa,mBAAmB,OAAO,IAC1D,wBAAwB,kBAAkB,IAC1C,KAAA;CACR;CAEA,oBAAqD,MAAkB;EACrE,MAAM,YAAY,KAAK,0BAA0B,IAAI;EACrD,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,KAAK,wBAAwB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yCACpB,YACF;EAEJ;EAGF,MAAM,SAAU,OAAO,aAAa,CAAC;EACrC,MAAM,WAAW,OAAO;EACxB,OAAO;GACL,GAAG;GACH;GACA,GAAI,aAAa,KAAA,IAAY,EAAE,MAAM,SAAS,IAAI,CAAC;EACrD;CACF;CAEA,wBAAkC,OAAiD;EACjF,IAAI,OAAO,UAAU,YAAY,UAAU,MACzC,OAAO;EAET,MAAM,OAAQ,MAA6B;EAC3C,IAAI,OAAO,SAAS,UAClB,OAAO;EAET,MAAM,UAAU,KAAK,mBAAmB,IAAI,IAAI;EAChD,IAAI,YAAY,KAAA,GACd,OAAO;EAET,OAAO,QAAQ,KAAK;CACtB;CAEA,wBAAkC,UAA2C;EAC3E,OAAO;CACT;AACF;;;;;;;;;;;;ACjPA,IAAa,wBAAb,cAA2C,0BAAgD;CACzF,cAAc;EACZ,sBAAM,IAAI,IAAI,CAAC;CACjB;AACF"}
|
|
1
|
+
{"version":3,"file":"sql-contract-serializer-8axtK4lg.mjs","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts"],"sourcesContent":["import { ContractValidationError } from '@prisma-next/contract/contract-validation-error';\nimport type { Contract } from '@prisma-next/contract/types';\nimport type { ContractSerializer } from '@prisma-next/framework-components/control';\nimport {\n type Namespace,\n NamespaceBase,\n UNBOUND_NAMESPACE_ID,\n} from '@prisma-next/framework-components/ir';\nimport { sqlContractCanonicalizationHooks } from '@prisma-next/sql-contract/canonicalization-hooks';\nimport {\n buildSqlNamespace,\n type SqlNamespaceTablesInput,\n SqlStorage,\n type SqlStorageInput,\n type SqlStorageTypeEntry,\n SqlUnboundNamespace,\n StorageTable,\n type StorageTableInput,\n} from '@prisma-next/sql-contract/types';\nimport {\n createSqlContractSchema,\n validateSqlContractFully,\n} from '@prisma-next/sql-contract/validators';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport type { JsonObject } from '@prisma-next/utils/json';\nimport { type Type, type } from 'arktype';\n\nconst NamespaceRawSchema = type({\n id: 'string',\n 'kind?': 'string',\n // Undeclared keys (`tables`, `enum`, and any pack-contributed slot maps)\n // intentionally pass through; the slot loop below iterates them by name.\n '+': 'ignore',\n});\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport type SqlEntityHydrationFactory = (entry: unknown) => SqlStorageTypeEntry;\n\n/**\n * SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n * deserialization pipeline:\n *\n * 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n * against the SQL contract arktype schema (`validateSqlContractFully`)\n * and returns the validated flat-data shape.\n * 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n * constructs the family-shared SQL Contract IR class hierarchy\n * (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n * / …). The rest of the contract envelope is JSON-clean primitive\n * data and passes through unchanged.\n * 3. `constructTargetContract` is the target-specific extension hook;\n * defaults to identity. Targets that need to attach target-only\n * fields (e.g. target-specific derived storage fields) override it.\n *\n * Default `serializeContract` is identity over the contract — concrete\n * SQL targets ship JSON-clean class instances, so the contract value\n * can be stringified directly. The non-enumerable family-level `kind`\n * discriminator on `SqlNode` instances stays out of the persisted\n * envelope automatically. Targets that need to canonicalize on the way\n * out (key ordering, dropping computed-only fields) override\n * `serializeContract` directly.\n */\nexport abstract class SqlContractSerializerBase<TContract extends Contract<SqlStorage>>\n implements ContractSerializer<TContract>\n{\n private readonly contractSchema: Type<unknown> | undefined;\n\n constructor(\n private readonly entityTypeRegistry: ReadonlyMap<string, SqlEntityHydrationFactory> = new Map(),\n validatorFragments?: ReadonlyMap<string, Type<unknown>>,\n ) {\n // Only build a fragments-aware contract schema when pack contributions\n // exist. The cached module-level default in `validators.ts` covers the\n // no-contributions case and avoids per-instance schema compilation.\n this.contractSchema =\n validatorFragments !== undefined && validatorFragments.size > 0\n ? createSqlContractSchema(validatorFragments)\n : undefined;\n }\n\n deserializeContract<T extends TContract = TContract>(json: unknown): T {\n const validated = this.parseSqlContractStructure(json);\n const hydrated = this.hydrateSqlStorage(validated);\n return this.constructTargetContract(hydrated) as T;\n }\n\n serializeContract(contract: TContract): JsonObject {\n return contract as unknown as JsonObject;\n }\n\n shouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\n sortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\n protected parseSqlContractStructure(json: unknown): Contract<SqlStorage> {\n return validateSqlContractFully<Contract<SqlStorage>>(\n json,\n this.contractSchema !== undefined ? { contractSchema: this.contractSchema } : undefined,\n );\n }\n\n protected hydrateSqlStorage(validated: Contract<SqlStorage>): Contract<SqlStorage> {\n const types = validated.storage.types;\n const hydratedTypes =\n types !== undefined\n ? Object.fromEntries(\n Object.entries(types).map(([name, entry]) => [\n name,\n this.hydrateStorageTypeEntry(entry),\n ]),\n )\n : undefined;\n\n const rawNamespaces = validated.storage.namespaces;\n if (rawNamespaces === undefined) {\n throw new ContractValidationError(\n 'Contract storage.namespaces is required after structural validation',\n 'structural',\n );\n }\n const hydratedNamespaces = this.hydrateSqlNamespaceMap(rawNamespaces);\n // Compatibility shim: production code that addresses `__unbound__` for table\n // metadata lookups (collection-contract, query-plan-mutations, model-accessor,\n // query-plan-meta, where-binding) uses optional chaining and tolerates absence,\n // but runtime-qualification (TML-2605) has not yet landed cross-namespace table\n // routing. Injecting the empty singleton here keeps helpers that augment the\n // deserialized JSON (e.g. buildMixedPolyContract) working by providing a slot to\n // write into. Once runtime-qualification routes table lookups by namespace, this\n // shim should be removed.\n const unbound = hydratedNamespaces[UNBOUND_NAMESPACE_ID] ?? SqlUnboundNamespace.instance;\n\n return {\n ...validated,\n storage: new SqlStorage({\n storageHash: validated.storage.storageHash,\n ...ifDefined('types', hydratedTypes),\n // Cast narrows the result of hydrateSqlNamespaceMap from the wider\n // framework `Namespace` to the SQL-family `SqlNamespace`.\n namespaces: blindCast<\n SqlStorageInput['namespaces'],\n 'hydrated SQL namespaces are SqlNamespace instances (family hydration guarantees this)'\n >({ ...hydratedNamespaces, [UNBOUND_NAMESPACE_ID]: unbound }),\n }),\n };\n }\n\n protected hydrateSqlNamespaceMap(\n namespaces: Readonly<Record<string, Namespace | Record<string, unknown>>>,\n ): Readonly<Record<string, Namespace>> {\n return Object.fromEntries(\n Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n // Raw entries passed structural validation; hydrate materialises family IR class instances.\n const namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n const namespaceMaterialised =\n namespaceHydrated instanceof NamespaceBase\n ? namespaceHydrated\n : buildSqlNamespace(namespaceHydrated);\n return [nsId, namespaceMaterialised];\n }),\n );\n }\n\n protected hydrateSqlNamespaceEntry(\n nsId: string,\n raw: Namespace | Record<string, unknown>,\n ): Namespace | SqlNamespaceTablesInput {\n if (raw instanceof NamespaceBase) {\n return raw;\n }\n const rawRecord = isPlainRecord(raw) ? raw : {};\n const id = typeof rawRecord['id'] === 'string' ? rawRecord['id'] : nsId;\n const parsed = NamespaceRawSchema({ ...rawRecord, id });\n if (parsed instanceof type.errors) {\n const messages = parsed.map((p: { message: string }) => p.message).join('; ');\n throw new ContractValidationError(`Namespace hydration failed: ${messages}`, 'structural');\n }\n const result: Record<string, unknown> = { id };\n\n for (const [propertyKey, slotValue] of Object.entries(parsed)) {\n if (propertyKey === 'id') continue;\n if (slotValue === null || typeof slotValue !== 'object') continue;\n\n if (propertyKey === 'tables') {\n result['tables'] = Object.fromEntries(\n Object.entries(slotValue as Record<string, unknown>).map(([tableName, table]) => [\n tableName,\n table instanceof StorageTable ? table : new StorageTable(table as StorageTableInput),\n ]),\n );\n continue;\n }\n\n const hydratedSlot = Object.fromEntries(\n Object.entries(slotValue as Record<string, unknown>).map(([entryName, entry]) => {\n if (typeof entry !== 'object' || entry === null) {\n return [entryName, entry];\n }\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind === 'string') {\n const factory = this.entityTypeRegistry.get(kind);\n if (factory !== undefined) {\n return [entryName, factory(entry)];\n }\n }\n return [entryName, entry];\n }),\n );\n if (Object.keys(hydratedSlot).length > 0) {\n result[propertyKey] = hydratedSlot;\n }\n }\n\n const enumRaw = rawRecord['enum'];\n if (enumRaw !== undefined && typeof enumRaw === 'object' && enumRaw !== null) {\n for (const entry of Object.values(enumRaw as Record<string, unknown>)) {\n if (typeof entry !== 'object' || entry === null) continue;\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind === 'string' && this.entityTypeRegistry.get(kind) === undefined) {\n throw new ContractValidationError(\n `Entry kind '${kind}' has no registered hydration factory.`,\n 'structural',\n );\n }\n }\n }\n\n const tables = (result['tables'] ?? {}) as Record<string, StorageTable>;\n const enumSlot = result['enum'] as NonNullable<SqlNamespaceTablesInput['enum']> | undefined;\n return {\n ...result,\n tables,\n ...(enumSlot !== undefined ? { enum: enumSlot } : {}),\n } as SqlNamespaceTablesInput;\n }\n\n protected hydrateStorageTypeEntry(entry: SqlStorageTypeEntry): SqlStorageTypeEntry {\n if (typeof entry !== 'object' || entry === null) {\n return entry;\n }\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind !== 'string') {\n return entry;\n }\n const factory = this.entityTypeRegistry.get(kind);\n if (factory === undefined) {\n return entry;\n }\n return factory(entry);\n }\n\n protected constructTargetContract(hydrated: Contract<SqlStorage>): TContract {\n return hydrated as TContract;\n }\n}\n","import type { Contract } from '@prisma-next/contract/types';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport { SqlContractSerializerBase } from './sql-contract-serializer-base';\n\n/**\n * Default SQL family `ContractSerializer` concretion. Inherits the\n * full SQL-shared deserialization pipeline (structural validation +\n * IR-class hydration) without pack-registered `storage.types`\n * hydration factories — targets that emit polymorphic JSON outside the\n * codec-typed envelope wire a target-specific subclass with a populated\n * registry (see Postgres). Family-level call sites instantiate this\n * default directly when no target serializer is supplied.\n */\nexport class SqlContractSerializer extends SqlContractSerializ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
|
"name": "@prisma-next/family-sql",
|
|
3
|
-
"version": "0.11.0-dev.
|
|
3
|
+
"version": "0.11.0-dev.73",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "SQL family descriptor for Prisma Next",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@prisma-next/contract": "0.11.0-dev.
|
|
10
|
-
"@prisma-next/emitter": "0.11.0-dev.
|
|
11
|
-
"@prisma-next/framework-components": "0.11.0-dev.
|
|
12
|
-
"@prisma-next/migration-tools": "0.11.0-dev.
|
|
13
|
-
"@prisma-next/operations": "0.11.0-dev.
|
|
14
|
-
"@prisma-next/sql-contract": "0.11.0-dev.
|
|
15
|
-
"@prisma-next/sql-contract-emitter": "0.11.0-dev.
|
|
16
|
-
"@prisma-next/sql-contract-ts": "0.11.0-dev.
|
|
17
|
-
"@prisma-next/sql-operations": "0.11.0-dev.
|
|
18
|
-
"@prisma-next/sql-relational-core": "0.11.0-dev.
|
|
19
|
-
"@prisma-next/sql-runtime": "0.11.0-dev.
|
|
20
|
-
"@prisma-next/sql-schema-ir": "0.11.0-dev.
|
|
21
|
-
"@prisma-next/utils": "0.11.0-dev.
|
|
9
|
+
"@prisma-next/contract": "0.11.0-dev.73",
|
|
10
|
+
"@prisma-next/emitter": "0.11.0-dev.73",
|
|
11
|
+
"@prisma-next/framework-components": "0.11.0-dev.73",
|
|
12
|
+
"@prisma-next/migration-tools": "0.11.0-dev.73",
|
|
13
|
+
"@prisma-next/operations": "0.11.0-dev.73",
|
|
14
|
+
"@prisma-next/sql-contract": "0.11.0-dev.73",
|
|
15
|
+
"@prisma-next/sql-contract-emitter": "0.11.0-dev.73",
|
|
16
|
+
"@prisma-next/sql-contract-ts": "0.11.0-dev.73",
|
|
17
|
+
"@prisma-next/sql-operations": "0.11.0-dev.73",
|
|
18
|
+
"@prisma-next/sql-relational-core": "0.11.0-dev.73",
|
|
19
|
+
"@prisma-next/sql-runtime": "0.11.0-dev.73",
|
|
20
|
+
"@prisma-next/sql-schema-ir": "0.11.0-dev.73",
|
|
21
|
+
"@prisma-next/utils": "0.11.0-dev.73",
|
|
22
22
|
"arktype": "^2.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@prisma-next/driver-postgres": "0.11.0-dev.
|
|
26
|
-
"@prisma-next/psl-parser": "0.11.0-dev.
|
|
27
|
-
"@prisma-next/psl-printer": "0.11.0-dev.
|
|
28
|
-
"@prisma-next/sql-contract-psl": "0.11.0-dev.
|
|
29
|
-
"@prisma-next/test-utils": "0.11.0-dev.
|
|
30
|
-
"@prisma-next/tsconfig": "0.11.0-dev.
|
|
31
|
-
"@prisma-next/tsdown": "0.11.0-dev.
|
|
25
|
+
"@prisma-next/driver-postgres": "0.11.0-dev.73",
|
|
26
|
+
"@prisma-next/psl-parser": "0.11.0-dev.73",
|
|
27
|
+
"@prisma-next/psl-printer": "0.11.0-dev.73",
|
|
28
|
+
"@prisma-next/sql-contract-psl": "0.11.0-dev.73",
|
|
29
|
+
"@prisma-next/test-utils": "0.11.0-dev.73",
|
|
30
|
+
"@prisma-next/tsconfig": "0.11.0-dev.73",
|
|
31
|
+
"@prisma-next/tsdown": "0.11.0-dev.73",
|
|
32
32
|
"tsdown": "0.22.0",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "4.1.6"
|
|
35
35
|
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"typescript": ">=5.9"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"typescript": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
36
44
|
"files": [
|
|
37
45
|
"dist",
|
|
38
46
|
"src"
|
|
@@ -49,6 +57,9 @@
|
|
|
49
57
|
"./verify": "./dist/verify.mjs",
|
|
50
58
|
"./package.json": "./package.json"
|
|
51
59
|
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=24"
|
|
62
|
+
},
|
|
52
63
|
"repository": {
|
|
53
64
|
"type": "git",
|
|
54
65
|
"url": "https://github.com/prisma/prisma-next.git",
|
|
@@ -123,10 +123,14 @@ export abstract class SqlContractSerializerBase<TContract extends Contract<SqlSt
|
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
const hydratedNamespaces = this.hydrateSqlNamespaceMap(rawNamespaces);
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
126
|
+
// Compatibility shim: production code that addresses `__unbound__` for table
|
|
127
|
+
// metadata lookups (collection-contract, query-plan-mutations, model-accessor,
|
|
128
|
+
// query-plan-meta, where-binding) uses optional chaining and tolerates absence,
|
|
129
|
+
// but runtime-qualification (TML-2605) has not yet landed cross-namespace table
|
|
130
|
+
// routing. Injecting the empty singleton here keeps helpers that augment the
|
|
131
|
+
// deserialized JSON (e.g. buildMixedPolyContract) working by providing a slot to
|
|
132
|
+
// write into. Once runtime-qualification routes table lookups by namespace, this
|
|
133
|
+
// shim should be removed.
|
|
130
134
|
const unbound = hydratedNamespaces[UNBOUND_NAMESPACE_ID] ?? SqlUnboundNamespace.instance;
|
|
131
135
|
|
|
132
136
|
return {
|
|
@@ -134,12 +138,11 @@ export abstract class SqlContractSerializerBase<TContract extends Contract<SqlSt
|
|
|
134
138
|
storage: new SqlStorage({
|
|
135
139
|
storageHash: validated.storage.storageHash,
|
|
136
140
|
...ifDefined('types', hydratedTypes),
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
// instances (target/family classes, not the wider framework `Namespace`).
|
|
141
|
+
// Cast narrows the result of hydrateSqlNamespaceMap from the wider
|
|
142
|
+
// framework `Namespace` to the SQL-family `SqlNamespace`.
|
|
140
143
|
namespaces: blindCast<
|
|
141
144
|
SqlStorageInput['namespaces'],
|
|
142
|
-
'hydrated SQL namespaces are SqlNamespace instances
|
|
145
|
+
'hydrated SQL namespaces are SqlNamespace instances (family hydration guarantees this)'
|
|
143
146
|
>({ ...hydratedNamespaces, [UNBOUND_NAMESPACE_ID]: unbound }),
|
|
144
147
|
}),
|
|
145
148
|
};
|