@prisma-next/framework-components 0.5.0-dev.27 → 0.5.0-dev.29

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.
Files changed (80) hide show
  1. package/README.md +31 -0
  2. package/dist/authoring.d.mts +1 -1
  3. package/dist/authoring.mjs +1 -1
  4. package/dist/authoring.mjs.map +1 -1
  5. package/dist/{codec-types-DQ1Agjom.d.mts → codec-types-DXv-ROhF.d.mts} +33 -7
  6. package/dist/codec-types-DXv-ROhF.d.mts.map +1 -0
  7. package/dist/codec.d.mts +2 -2
  8. package/dist/codec.mjs +1 -1
  9. package/dist/codec.mjs.map +1 -1
  10. package/dist/components.d.mts +1 -1
  11. package/dist/components.mjs +1 -1
  12. package/dist/control.d.mts +54 -13
  13. package/dist/control.d.mts.map +1 -1
  14. package/dist/control.mjs +11 -5
  15. package/dist/control.mjs.map +1 -1
  16. package/dist/{emission-types-BPAALJbF.d.mts → emission-types-D234HxUz.d.mts} +3 -3
  17. package/dist/emission-types-D234HxUz.d.mts.map +1 -0
  18. package/dist/emission.d.mts +2 -2
  19. package/dist/execution.d.mts +5 -5
  20. package/dist/execution.d.mts.map +1 -1
  21. package/dist/execution.mjs +3 -3
  22. package/dist/execution.mjs.map +1 -1
  23. package/dist/{framework-authoring-D1-JZ37B.d.mts → framework-authoring-BdrFDx4x.d.mts} +2 -2
  24. package/dist/framework-authoring-BdrFDx4x.d.mts.map +1 -0
  25. package/dist/{framework-components-C8ZhSwXe.mjs → framework-components-BsWST1Rn.mjs} +2 -2
  26. package/dist/framework-components-BsWST1Rn.mjs.map +1 -0
  27. package/dist/{framework-components-DFZMi2h7.d.mts → framework-components-Buvf7mnC.d.mts} +6 -6
  28. package/dist/framework-components-Buvf7mnC.d.mts.map +1 -0
  29. package/dist/psl-ast-9X5rwo98.d.mts +159 -0
  30. package/dist/psl-ast-9X5rwo98.d.mts.map +1 -0
  31. package/dist/psl-ast.d.mts +2 -0
  32. package/dist/psl-ast.mjs +1 -0
  33. package/dist/runtime.d.mts +110 -25
  34. package/dist/runtime.d.mts.map +1 -1
  35. package/dist/runtime.mjs +103 -8
  36. package/dist/runtime.mjs.map +1 -1
  37. package/dist/{types-import-spec-C4sc7wbb.d.mts → types-import-spec-D-O6GotH.d.mts} +2 -2
  38. package/dist/types-import-spec-D-O6GotH.d.mts.map +1 -0
  39. package/package.json +5 -4
  40. package/src/control/control-capabilities.ts +71 -0
  41. package/src/{control-descriptors.ts → control/control-descriptors.ts} +7 -7
  42. package/src/{control-instances.ts → control/control-instances.ts} +6 -6
  43. package/src/{control-migration-types.ts → control/control-migration-types.ts} +1 -1
  44. package/src/control/control-operation-preview.ts +23 -0
  45. package/src/{control-stack.ts → control/control-stack.ts} +13 -13
  46. package/src/{emission-types.ts → control/emission-types.ts} +1 -1
  47. package/src/control/psl-ast.ts +193 -0
  48. package/src/{execution-descriptors.ts → execution/execution-descriptors.ts} +7 -7
  49. package/src/{execution-instances.ts → execution/execution-instances.ts} +1 -1
  50. package/src/{execution-requirements.ts → execution/execution-requirements.ts} +1 -1
  51. package/src/execution/race-against-abort.ts +85 -0
  52. package/src/{runtime-core.ts → execution/runtime-core.ts} +27 -3
  53. package/src/{runtime-error.ts → execution/runtime-error.ts} +28 -0
  54. package/src/{runtime-middleware.ts → execution/runtime-middleware.ts} +17 -1
  55. package/src/exports/authoring.ts +2 -2
  56. package/src/exports/codec.ts +2 -2
  57. package/src/exports/components.ts +2 -2
  58. package/src/exports/control.ts +26 -12
  59. package/src/exports/emission.ts +2 -2
  60. package/src/exports/execution.ts +5 -5
  61. package/src/exports/psl-ast.ts +1 -0
  62. package/src/exports/runtime.ts +16 -9
  63. package/src/{codec-types.ts → shared/codec-types.ts} +31 -4
  64. package/dist/codec-types-DQ1Agjom.d.mts.map +0 -1
  65. package/dist/emission-types-BPAALJbF.d.mts.map +0 -1
  66. package/dist/framework-authoring-D1-JZ37B.d.mts.map +0 -1
  67. package/dist/framework-components-C8ZhSwXe.mjs.map +0 -1
  68. package/dist/framework-components-DFZMi2h7.d.mts.map +0 -1
  69. package/dist/types-import-spec-C4sc7wbb.d.mts.map +0 -1
  70. package/src/control-capabilities.ts +0 -34
  71. /package/src/{control-result-types.ts → control/control-result-types.ts} +0 -0
  72. /package/src/{control-schema-view.ts → control/control-schema-view.ts} +0 -0
  73. /package/src/{async-iterable-result.ts → execution/async-iterable-result.ts} +0 -0
  74. /package/src/{execution-stack.ts → execution/execution-stack.ts} +0 -0
  75. /package/src/{query-plan.ts → execution/query-plan.ts} +0 -0
  76. /package/src/{run-with-middleware.ts → execution/run-with-middleware.ts} +0 -0
  77. /package/src/{framework-authoring.ts → shared/framework-authoring.ts} +0 -0
  78. /package/src/{framework-components.ts → shared/framework-components.ts} +0 -0
  79. /package/src/{mutation-default-types.ts → shared/mutation-default-types.ts} +0 -0
  80. /package/src/{types-import-spec.ts → shared/types-import-spec.ts} +0 -0
package/README.md CHANGED
@@ -36,6 +36,37 @@ The base `Codec` interface lands on the seam between **query-time** methods (per
36
36
 
37
37
  There is no `runtime` / `kind` / equivalent async marker on the interface and no `TRuntime` generic. The runtime always awaits the query-time methods. See [ADR 204 — Single-Path Async Codec Runtime](../../../../../docs/architecture%20docs/adrs/ADR%20204%20-%20Single-Path%20Async%20Codec%20Runtime.md) for the full design.
38
38
 
39
+ ### Codec call context (`ctx`)
40
+
41
+ Codecs receive a second `ctx` options argument; you may ignore it. The runtime allocates one `CodecCallContext` per `execute()` call and threads the same reference to every codec dispatch site as a non-optional argument — when no `signal` is supplied the runtime still threads an empty `{}`, never `undefined`. The framework `CodecCallContext` is signal-only:
42
+
43
+ ```ts
44
+ export interface CodecCallContext {
45
+ readonly signal?: AbortSignal;
46
+ }
47
+ ```
48
+
49
+ The internal `Codec` interface declares the parameter as required:
50
+
51
+ ```ts
52
+ encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
53
+ decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
54
+ ```
55
+
56
+ Codec authors who write `(value) => …` continue to compile via TypeScript's bivariance for trailing parameters; nothing at the author surface changes.
57
+
58
+ Family layers extend the context where they have a per-call concept that doesn't generalise. SQL declares `SqlCodecCallContext extends CodecCallContext { column?: SqlColumnRef }` (see `@prisma-next/sql-relational-core`); Mongo continues to use the framework type directly. Codec authors that take a `(value, ctx)` author signature can forward `ctx.signal` to network SDKs:
59
+
60
+ ```ts
61
+ // Sketch — actual factory lives in a family package (codec() / mongoCodec()).
62
+ encode: async (v: string, ctx) =>
63
+ kms.encrypt({ plaintext: v }, { signal: ctx?.signal });
64
+ ```
65
+
66
+ Aborts surface to the caller as `RUNTIME.ABORTED` with `details.phase ∈ { 'encode', 'decode', 'stream' }`. Codec bodies that ignore the signal complete in the background (cooperative cancellation). The `runtimeAborted(phase, cause?)` envelope helper and the `raceAgainstAbort(work, signal, phase)` race helper are exported from `@prisma-next/framework-components/runtime`.
67
+
68
+ See [ADR 207 — Codec call context: per-query `AbortSignal` and column metadata](../../../../docs/architecture%20docs/adrs/ADR%20207%20-%20Codec%20call%20context%20per-query%20AbortSignal%20and%20column%20metadata.md) for the full design.
69
+
39
70
  ## Why SPI types live here (dependency inversion)
40
71
 
41
72
  This package sits in the **core** layer — below the tooling layer where family-specific emitters and control implementations live. SPI interfaces like `EmissionSpi` define the contract between framework orchestration code (control-plane emission, CLI) and family-specific implementations (SQL emitter, Mongo emitter).
@@ -1,2 +1,2 @@
1
- import { _ as resolveAuthoringTemplateValue, a as AuthoringFieldNamespace, c as AuthoringStorageTypeTemplate, d as AuthoringTypeNamespace, f as instantiateAuthoringFieldPreset, g as isAuthoringTypeConstructorDescriptor, h as isAuthoringFieldPresetDescriptor, i as AuthoringContributions, l as AuthoringTemplateValue, m as isAuthoringArgRef, n as AuthoringArgumentDescriptor, o as AuthoringFieldPresetDescriptor, p as instantiateAuthoringTypeConstructor, r as AuthoringColumnDefaultTemplate, s as AuthoringFieldPresetOutput, t as AuthoringArgRef, u as AuthoringTypeConstructorDescriptor, v as validateAuthoringHelperArguments } from "./framework-authoring-D1-JZ37B.mjs";
1
+ import { _ as resolveAuthoringTemplateValue, a as AuthoringFieldNamespace, c as AuthoringStorageTypeTemplate, d as AuthoringTypeNamespace, f as instantiateAuthoringFieldPreset, g as isAuthoringTypeConstructorDescriptor, h as isAuthoringFieldPresetDescriptor, i as AuthoringContributions, l as AuthoringTemplateValue, m as isAuthoringArgRef, n as AuthoringArgumentDescriptor, o as AuthoringFieldPresetDescriptor, p as instantiateAuthoringTypeConstructor, r as AuthoringColumnDefaultTemplate, s as AuthoringFieldPresetOutput, t as AuthoringArgRef, u as AuthoringTypeConstructorDescriptor, v as validateAuthoringHelperArguments } from "./framework-authoring-BdrFDx4x.mjs";
2
2
  export { type AuthoringArgRef, type AuthoringArgumentDescriptor, type AuthoringColumnDefaultTemplate, type AuthoringContributions, type AuthoringFieldNamespace, type AuthoringFieldPresetDescriptor, type AuthoringFieldPresetOutput, type AuthoringStorageTypeTemplate, type AuthoringTemplateValue, type AuthoringTypeConstructorDescriptor, type AuthoringTypeNamespace, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringArgRef, isAuthoringFieldPresetDescriptor, isAuthoringTypeConstructorDescriptor, resolveAuthoringTemplateValue, validateAuthoringHelperArguments };
@@ -1,6 +1,6 @@
1
1
  import { ifDefined } from "@prisma-next/utils/defined";
2
2
 
3
- //#region src/framework-authoring.ts
3
+ //#region src/shared/framework-authoring.ts
4
4
  function isAuthoringArgRef(value) {
5
5
  if (typeof value !== "object" || value === null || value.kind !== "arg") return false;
6
6
  const { index, path } = value;
@@ -1 +1 @@
1
- {"version":3,"file":"authoring.mjs","names":["resolved: Record<string, unknown>"],"sources":["../src/framework-authoring.ts"],"sourcesContent":["import { ifDefined } from '@prisma-next/utils/defined';\n\nexport type AuthoringArgRef = {\n readonly kind: 'arg';\n readonly index: number;\n readonly path?: readonly string[];\n readonly default?: AuthoringTemplateValue;\n};\n\nexport type AuthoringTemplateValue =\n | string\n | number\n | boolean\n | null\n | AuthoringArgRef\n | readonly AuthoringTemplateValue[]\n | { readonly [key: string]: AuthoringTemplateValue };\n\ninterface AuthoringArgumentDescriptorCommon {\n readonly name?: string;\n readonly optional?: boolean;\n}\n\nexport type AuthoringArgumentDescriptor = AuthoringArgumentDescriptorCommon &\n (\n | { readonly kind: 'string' }\n | {\n readonly kind: 'number';\n readonly integer?: boolean;\n readonly minimum?: number;\n readonly maximum?: number;\n }\n | { readonly kind: 'stringArray' }\n | {\n readonly kind: 'object';\n readonly properties: Record<string, AuthoringArgumentDescriptor>;\n }\n );\n\nexport interface AuthoringStorageTypeTemplate {\n readonly codecId: string;\n readonly nativeType: AuthoringTemplateValue;\n readonly typeParams?: Record<string, AuthoringTemplateValue>;\n}\n\nexport interface AuthoringTypeConstructorDescriptor {\n readonly kind: 'typeConstructor';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringStorageTypeTemplate;\n}\n\nexport interface AuthoringColumnDefaultTemplateLiteral {\n readonly kind: 'literal';\n readonly value: AuthoringTemplateValue;\n}\n\nexport interface AuthoringColumnDefaultTemplateFunction {\n readonly kind: 'function';\n readonly expression: AuthoringTemplateValue;\n}\n\nexport type AuthoringColumnDefaultTemplate =\n | AuthoringColumnDefaultTemplateLiteral\n | AuthoringColumnDefaultTemplateFunction;\n\nexport interface AuthoringFieldPresetOutput extends AuthoringStorageTypeTemplate {\n readonly nullable?: boolean;\n readonly default?: AuthoringColumnDefaultTemplate;\n readonly executionDefault?: AuthoringTemplateValue;\n readonly id?: boolean;\n readonly unique?: boolean;\n}\n\nexport interface AuthoringFieldPresetDescriptor {\n readonly kind: 'fieldPreset';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringFieldPresetOutput;\n}\n\nexport type AuthoringTypeNamespace = {\n readonly [name: string]: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace;\n};\n\nexport type AuthoringFieldNamespace = {\n readonly [name: string]: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace;\n};\n\nexport interface AuthoringContributions {\n readonly type?: AuthoringTypeNamespace;\n readonly field?: AuthoringFieldNamespace;\n}\n\nexport function isAuthoringArgRef(value: unknown): value is AuthoringArgRef {\n if (typeof value !== 'object' || value === null || (value as { kind?: unknown }).kind !== 'arg') {\n return false;\n }\n const { index, path } = value as { index?: unknown; path?: unknown };\n if (typeof index !== 'number' || !Number.isInteger(index) || index < 0) {\n return false;\n }\n if (path !== undefined && (!Array.isArray(path) || path.some((s) => typeof s !== 'string'))) {\n return false;\n }\n return true;\n}\n\nfunction isAuthoringTemplateRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function isAuthoringTypeConstructorDescriptor(\n value: unknown,\n): value is AuthoringTypeConstructorDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'typeConstructor' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function isAuthoringFieldPresetDescriptor(\n value: unknown,\n): value is AuthoringFieldPresetDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'fieldPreset' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function resolveAuthoringTemplateValue(\n template: AuthoringTemplateValue,\n args: readonly unknown[],\n): unknown {\n if (isAuthoringArgRef(template)) {\n let value = args[template.index];\n\n for (const segment of template.path ?? []) {\n if (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) {\n value = undefined;\n break;\n }\n value = (value as Record<string, unknown>)[segment];\n }\n\n if (value === undefined && template.default !== undefined) {\n return resolveAuthoringTemplateValue(template.default, args);\n }\n\n return value;\n }\n if (Array.isArray(template)) {\n return template.map((value) => resolveAuthoringTemplateValue(value, args));\n }\n if (typeof template === 'object' && template !== null) {\n const resolved: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(template)) {\n const resolvedValue = resolveAuthoringTemplateValue(value, args);\n if (resolvedValue !== undefined) {\n resolved[key] = resolvedValue;\n }\n }\n return resolved;\n }\n return template;\n}\n\nfunction validateAuthoringArgument(\n descriptor: AuthoringArgumentDescriptor,\n value: unknown,\n path: string,\n): void {\n if (value === undefined) {\n if (descriptor.optional) {\n return;\n }\n throw new Error(`Missing required authoring helper argument at ${path}`);\n }\n\n if (descriptor.kind === 'string') {\n if (typeof value !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be a string`);\n }\n return;\n }\n\n if (descriptor.kind === 'stringArray') {\n if (!Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n for (const entry of value) {\n if (typeof entry !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n }\n return;\n }\n\n if (descriptor.kind === 'object') {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an object`);\n }\n\n const input = value as Record<string, unknown>;\n const expectedKeys = new Set(Object.keys(descriptor.properties));\n\n for (const key of Object.keys(input)) {\n if (!expectedKeys.has(key)) {\n throw new Error(`Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n }\n }\n\n for (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) {\n validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n }\n\n return;\n }\n\n if (typeof value !== 'number' || Number.isNaN(value)) {\n throw new Error(`Authoring helper argument at ${path} must be a number`);\n }\n\n if (descriptor.integer && !Number.isInteger(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an integer`);\n }\n if (descriptor.minimum !== undefined && value < descriptor.minimum) {\n throw new Error(\n `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`,\n );\n }\n if (descriptor.maximum !== undefined && value > descriptor.maximum) {\n throw new Error(\n `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`,\n );\n }\n}\n\nexport function validateAuthoringHelperArguments(\n helperPath: string,\n descriptors: readonly AuthoringArgumentDescriptor[] | undefined,\n args: readonly unknown[],\n): void {\n const expected = descriptors ?? [];\n const minimumArgs = expected.reduce(\n (count, descriptor, index) => (descriptor.optional ? count : index + 1),\n 0,\n );\n if (args.length < minimumArgs || args.length > expected.length) {\n throw new Error(\n `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`,\n );\n }\n\n expected.forEach((descriptor, index) => {\n validateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n });\n}\n\nfunction resolveAuthoringStorageTypeTemplate(\n template: AuthoringStorageTypeTemplate,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n const nativeType = resolveAuthoringTemplateValue(template.nativeType, args);\n if (typeof nativeType !== 'string') {\n throw new Error(\n `Resolved authoring nativeType must be a string for codec \"${template.codecId}\", received ${String(nativeType)}`,\n );\n }\n const typeParams =\n template.typeParams === undefined\n ? undefined\n : resolveAuthoringTemplateValue(template.typeParams, args);\n if (typeParams !== undefined && !isAuthoringTemplateRecord(typeParams)) {\n throw new Error(\n `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`,\n );\n }\n\n return {\n codecId: template.codecId,\n nativeType,\n ...(typeParams === undefined ? {} : { typeParams }),\n };\n}\n\nfunction resolveAuthoringColumnDefaultTemplate(\n template: AuthoringColumnDefaultTemplate,\n args: readonly unknown[],\n):\n | {\n readonly kind: 'literal';\n readonly value: unknown;\n }\n | {\n readonly kind: 'function';\n readonly expression: string;\n } {\n if (template.kind === 'literal') {\n const value = resolveAuthoringTemplateValue(template.value, args);\n if (value === undefined) {\n throw new Error('Resolved authoring literal default must not be undefined');\n }\n return {\n kind: 'literal',\n value,\n };\n }\n\n const expression = resolveAuthoringTemplateValue(template.expression, args);\n if (expression === undefined || (typeof expression === 'object' && expression !== null)) {\n throw new Error(\n `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`,\n );\n }\n return {\n kind: 'function',\n expression: String(expression),\n };\n}\n\nexport function instantiateAuthoringTypeConstructor(\n descriptor: AuthoringTypeConstructorDescriptor,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n return resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\n\nexport function instantiateAuthoringFieldPreset(\n descriptor: AuthoringFieldPresetDescriptor,\n args: readonly unknown[],\n): {\n readonly descriptor: {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n };\n readonly nullable: boolean;\n readonly default?:\n | {\n readonly kind: 'literal';\n readonly value: unknown;\n }\n | {\n readonly kind: 'function';\n readonly expression: string;\n };\n readonly executionDefault?: unknown;\n readonly id: boolean;\n readonly unique: boolean;\n} {\n return {\n descriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n nullable: descriptor.output.nullable ?? false,\n ...ifDefined(\n 'default',\n descriptor.output.default !== undefined\n ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args)\n : undefined,\n ),\n ...ifDefined(\n 'executionDefault',\n descriptor.output.executionDefault !== undefined\n ? resolveAuthoringTemplateValue(descriptor.output.executionDefault, args)\n : undefined,\n ),\n id: descriptor.output.id ?? false,\n unique: descriptor.output.unique ?? false,\n };\n}\n"],"mappings":";;;AA4FA,SAAgB,kBAAkB,OAA0C;AAC1E,KAAI,OAAO,UAAU,YAAY,UAAU,QAAS,MAA6B,SAAS,MACxF,QAAO;CAET,MAAM,EAAE,OAAO,SAAS;AACxB,KAAI,OAAO,UAAU,YAAY,CAAC,OAAO,UAAU,MAAM,IAAI,QAAQ,EACnE,QAAO;AAET,KAAI,SAAS,WAAc,CAAC,MAAM,QAAQ,KAAK,IAAI,KAAK,MAAM,MAAM,OAAO,MAAM,SAAS,EACxF,QAAO;AAET,QAAO;;AAGT,SAAS,0BAA0B,OAAkD;AACnF,QAAO,OAAO,UAAU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AAO;EACL,YAAY,oCAAoC,WAAW,QAAQ,KAAK;EACxE,UAAU,WAAW,OAAO,YAAY;EACxC,GAAG,UACD,WACA,WAAW,OAAO,YAAY,SAC1B,sCAAsC,WAAW,OAAO,SAAS,KAAK,GACtE,OACL;EACD,GAAG,UACD,oBACA,WAAW,OAAO,qBAAqB,SACnC,8BAA8B,WAAW,OAAO,kBAAkB,KAAK,GACvE,OACL;EACD,IAAI,WAAW,OAAO,MAAM;EAC5B,QAAQ,WAAW,OAAO,UAAU;EACrC"}
1
+ {"version":3,"file":"authoring.mjs","names":["resolved: Record<string, unknown>"],"sources":["../src/shared/framework-authoring.ts"],"sourcesContent":["import { ifDefined } from '@prisma-next/utils/defined';\n\nexport type AuthoringArgRef = {\n readonly kind: 'arg';\n readonly index: number;\n readonly path?: readonly string[];\n readonly default?: AuthoringTemplateValue;\n};\n\nexport type AuthoringTemplateValue =\n | string\n | number\n | boolean\n | null\n | AuthoringArgRef\n | readonly AuthoringTemplateValue[]\n | { readonly [key: string]: AuthoringTemplateValue };\n\ninterface AuthoringArgumentDescriptorCommon {\n readonly name?: string;\n readonly optional?: boolean;\n}\n\nexport type AuthoringArgumentDescriptor = AuthoringArgumentDescriptorCommon &\n (\n | { readonly kind: 'string' }\n | {\n readonly kind: 'number';\n readonly integer?: boolean;\n readonly minimum?: number;\n readonly maximum?: number;\n }\n | { readonly kind: 'stringArray' }\n | {\n readonly kind: 'object';\n readonly properties: Record<string, AuthoringArgumentDescriptor>;\n }\n );\n\nexport interface AuthoringStorageTypeTemplate {\n readonly codecId: string;\n readonly nativeType: AuthoringTemplateValue;\n readonly typeParams?: Record<string, AuthoringTemplateValue>;\n}\n\nexport interface AuthoringTypeConstructorDescriptor {\n readonly kind: 'typeConstructor';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringStorageTypeTemplate;\n}\n\nexport interface AuthoringColumnDefaultTemplateLiteral {\n readonly kind: 'literal';\n readonly value: AuthoringTemplateValue;\n}\n\nexport interface AuthoringColumnDefaultTemplateFunction {\n readonly kind: 'function';\n readonly expression: AuthoringTemplateValue;\n}\n\nexport type AuthoringColumnDefaultTemplate =\n | AuthoringColumnDefaultTemplateLiteral\n | AuthoringColumnDefaultTemplateFunction;\n\nexport interface AuthoringFieldPresetOutput extends AuthoringStorageTypeTemplate {\n readonly nullable?: boolean;\n readonly default?: AuthoringColumnDefaultTemplate;\n readonly executionDefault?: AuthoringTemplateValue;\n readonly id?: boolean;\n readonly unique?: boolean;\n}\n\nexport interface AuthoringFieldPresetDescriptor {\n readonly kind: 'fieldPreset';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringFieldPresetOutput;\n}\n\nexport type AuthoringTypeNamespace = {\n readonly [name: string]: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace;\n};\n\nexport type AuthoringFieldNamespace = {\n readonly [name: string]: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace;\n};\n\nexport interface AuthoringContributions {\n readonly type?: AuthoringTypeNamespace;\n readonly field?: AuthoringFieldNamespace;\n}\n\nexport function isAuthoringArgRef(value: unknown): value is AuthoringArgRef {\n if (typeof value !== 'object' || value === null || (value as { kind?: unknown }).kind !== 'arg') {\n return false;\n }\n const { index, path } = value as { index?: unknown; path?: unknown };\n if (typeof index !== 'number' || !Number.isInteger(index) || index < 0) {\n return false;\n }\n if (path !== undefined && (!Array.isArray(path) || path.some((s) => typeof s !== 'string'))) {\n return false;\n }\n return true;\n}\n\nfunction isAuthoringTemplateRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function isAuthoringTypeConstructorDescriptor(\n value: unknown,\n): value is AuthoringTypeConstructorDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'typeConstructor' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function isAuthoringFieldPresetDescriptor(\n value: unknown,\n): value is AuthoringFieldPresetDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'fieldPreset' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function resolveAuthoringTemplateValue(\n template: AuthoringTemplateValue,\n args: readonly unknown[],\n): unknown {\n if (isAuthoringArgRef(template)) {\n let value = args[template.index];\n\n for (const segment of template.path ?? []) {\n if (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) {\n value = undefined;\n break;\n }\n value = (value as Record<string, unknown>)[segment];\n }\n\n if (value === undefined && template.default !== undefined) {\n return resolveAuthoringTemplateValue(template.default, args);\n }\n\n return value;\n }\n if (Array.isArray(template)) {\n return template.map((value) => resolveAuthoringTemplateValue(value, args));\n }\n if (typeof template === 'object' && template !== null) {\n const resolved: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(template)) {\n const resolvedValue = resolveAuthoringTemplateValue(value, args);\n if (resolvedValue !== undefined) {\n resolved[key] = resolvedValue;\n }\n }\n return resolved;\n }\n return template;\n}\n\nfunction validateAuthoringArgument(\n descriptor: AuthoringArgumentDescriptor,\n value: unknown,\n path: string,\n): void {\n if (value === undefined) {\n if (descriptor.optional) {\n return;\n }\n throw new Error(`Missing required authoring helper argument at ${path}`);\n }\n\n if (descriptor.kind === 'string') {\n if (typeof value !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be a string`);\n }\n return;\n }\n\n if (descriptor.kind === 'stringArray') {\n if (!Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n for (const entry of value) {\n if (typeof entry !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n }\n return;\n }\n\n if (descriptor.kind === 'object') {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an object`);\n }\n\n const input = value as Record<string, unknown>;\n const expectedKeys = new Set(Object.keys(descriptor.properties));\n\n for (const key of Object.keys(input)) {\n if (!expectedKeys.has(key)) {\n throw new Error(`Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n }\n }\n\n for (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) {\n validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n }\n\n return;\n }\n\n if (typeof value !== 'number' || Number.isNaN(value)) {\n throw new Error(`Authoring helper argument at ${path} must be a number`);\n }\n\n if (descriptor.integer && !Number.isInteger(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an integer`);\n }\n if (descriptor.minimum !== undefined && value < descriptor.minimum) {\n throw new Error(\n `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`,\n );\n }\n if (descriptor.maximum !== undefined && value > descriptor.maximum) {\n throw new Error(\n `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`,\n );\n }\n}\n\nexport function validateAuthoringHelperArguments(\n helperPath: string,\n descriptors: readonly AuthoringArgumentDescriptor[] | undefined,\n args: readonly unknown[],\n): void {\n const expected = descriptors ?? [];\n const minimumArgs = expected.reduce(\n (count, descriptor, index) => (descriptor.optional ? count : index + 1),\n 0,\n );\n if (args.length < minimumArgs || args.length > expected.length) {\n throw new Error(\n `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`,\n );\n }\n\n expected.forEach((descriptor, index) => {\n validateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n });\n}\n\nfunction resolveAuthoringStorageTypeTemplate(\n template: AuthoringStorageTypeTemplate,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n const nativeType = resolveAuthoringTemplateValue(template.nativeType, args);\n if (typeof nativeType !== 'string') {\n throw new Error(\n `Resolved authoring nativeType must be a string for codec \"${template.codecId}\", received ${String(nativeType)}`,\n );\n }\n const typeParams =\n template.typeParams === undefined\n ? undefined\n : resolveAuthoringTemplateValue(template.typeParams, args);\n if (typeParams !== undefined && !isAuthoringTemplateRecord(typeParams)) {\n throw new Error(\n `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`,\n );\n }\n\n return {\n codecId: template.codecId,\n nativeType,\n ...(typeParams === undefined ? {} : { typeParams }),\n };\n}\n\nfunction resolveAuthoringColumnDefaultTemplate(\n template: AuthoringColumnDefaultTemplate,\n args: readonly unknown[],\n):\n | {\n readonly kind: 'literal';\n readonly value: unknown;\n }\n | {\n readonly kind: 'function';\n readonly expression: string;\n } {\n if (template.kind === 'literal') {\n const value = resolveAuthoringTemplateValue(template.value, args);\n if (value === undefined) {\n throw new Error('Resolved authoring literal default must not be undefined');\n }\n return {\n kind: 'literal',\n value,\n };\n }\n\n const expression = resolveAuthoringTemplateValue(template.expression, args);\n if (expression === undefined || (typeof expression === 'object' && expression !== null)) {\n throw new Error(\n `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`,\n );\n }\n return {\n kind: 'function',\n expression: String(expression),\n };\n}\n\nexport function instantiateAuthoringTypeConstructor(\n descriptor: AuthoringTypeConstructorDescriptor,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n return resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\n\nexport function instantiateAuthoringFieldPreset(\n descriptor: AuthoringFieldPresetDescriptor,\n args: readonly unknown[],\n): {\n readonly descriptor: {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n };\n readonly nullable: boolean;\n readonly default?:\n | {\n readonly kind: 'literal';\n readonly value: unknown;\n }\n | {\n readonly kind: 'function';\n readonly expression: string;\n };\n readonly executionDefault?: unknown;\n readonly id: boolean;\n readonly unique: boolean;\n} {\n return {\n descriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n nullable: descriptor.output.nullable ?? false,\n ...ifDefined(\n 'default',\n descriptor.output.default !== undefined\n ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args)\n : undefined,\n ),\n ...ifDefined(\n 'executionDefault',\n descriptor.output.executionDefault !== undefined\n ? resolveAuthoringTemplateValue(descriptor.output.executionDefault, args)\n : undefined,\n ),\n id: descriptor.output.id ?? false,\n unique: descriptor.output.unique ?? false,\n };\n}\n"],"mappings":";;;AA4FA,SAAgB,kBAAkB,OAA0C;AAC1E,KAAI,OAAO,UAAU,YAAY,UAAU,QAAS,MAA6B,SAAS,MACxF,QAAO;CAET,MAAM,EAAE,OAAO,SAAS;AACxB,KAAI,OAAO,UAAU,YAAY,CAAC,OAAO,UAAU,MAAM,IAAI,QAAQ,EACnE,QAAO;AAET,KAAI,SAAS,WAAc,CAAC,MAAM,QAAQ,KAAK,IAAI,KAAK,MAAM,MAAM,OAAO,MAAM,SAAS,EACxF,QAAO;AAET,QAAO;;AAGT,SAAS,0BAA0B,OAAkD;AACnF,QAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAgB,qCACd,OAC6C;AAC7C,QACE,OAAO,UAAU,YACjB,UAAU,QACT,MAA6B,SAAS,qBACvC,OAAQ,MAA+B,WAAW,YACjD,MAA+B,WAAW;;AAI/C,SAAgB,iCACd,OACyC;AACzC,QACE,OAAO,UAAU,YACjB,UAAU,QACT,MAA6B,SAAS,iBACvC,OAAQ,MAA+B,WAAW,YACjD,MAA+B,WAAW;;AAI/C,SAAgB,8BACd,UACA,MACS;AACT,KAAI,kBAAkB,SAAS,EAAE;EAC/B,IAAI,QAAQ,KAAK,SAAS;AAE1B,OAAK,MAAM,WAAW,SAAS,QAAQ,EAAE,EAAE;AACzC,OAAI,CAAC,0BAA0B,MAAM,IAAI,CAAC,OAAO,OAAO,OAAO,QAAQ,EAAE;AACvE,YAAQ;AACR;;AAEF,WAAS,MAAkC;;AAG7C,MAAI,UAAU,UAAa,SAAS,YAAY,OAC9C,QAAO,8BAA8B,SAAS,SAAS,KAAK;AAG9D,SAAO;;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O;EACL,SAAS,SAAS;EAClB;EACA,GAAI,eAAe,SAAY,EAAE,GAAG,EAAE,YAAY;EACnD;;AAGH,SAAS,sCACP,UACA,MASI;AACJ,KAAI,SAAS,SAAS,WAAW;EAC/B,MAAM,QAAQ,8BAA8B,SAAS,OAAO,KAAK;AACjE,MAAI,UAAU,OACZ,OAAM,IAAI,MAAM,2DAA2D;AAE7E,SAAO;GACL,MAAM;GACN;GACD;;CAGH,MAAM,aAAa,8BAA8B,SAAS,YAAY,KAAK;AAC3E,KAAI,eAAe,UAAc,OAAO,eAAe,YAAY,eAAe,KAChF,OAAM,IAAI,MACR,wFAAwF,OAAO,WAAW,GAC3G;AAEH,QAAO;EACL,MAAM;EACN,YAAY,OAAO,WAAW;EAC/B;;AAGH,SAAgB,oCACd,YACA,MAKA;AACA,QAAO,oCAAoC,WAAW,QAAQ,KAAK;;AAGrE,SAAgB,gCACd,YACA,MAoBA;AACA,QAAO;EACL,YAAY,oCAAoC,WAAW,QAAQ,KAAK;EACxE,UAAU,WAAW,OAAO,YAAY;EACxC,GAAG,UACD,WACA,WAAW,OAAO,YAAY,SAC1B,sCAAsC,WAAW,OAAO,SAAS,KAAK,GACtE,OACL;EACD,GAAG,UACD,oBACA,WAAW,OAAO,qBAAqB,SACnC,8BAA8B,WAAW,OAAO,kBAAkB,KAAK,GACvE,OACL;EACD,IAAI,WAAW,OAAO,MAAM;EAC5B,QAAQ,WAAW,OAAO,UAAU;EACrC"}
@@ -1,7 +1,33 @@
1
1
  import { JsonValue } from "@prisma-next/contract/types";
2
2
 
3
- //#region src/codec-types.d.ts
3
+ //#region src/shared/codec-types.d.ts
4
4
  type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual';
5
+ /**
6
+ * Per-call context the runtime threads to every `codec.encode` /
7
+ * `codec.decode` invocation for a single `runtime.execute()` call.
8
+ *
9
+ * The framework-level shape is family-agnostic and carries one field:
10
+ *
11
+ * - `signal?: AbortSignal` — per-query cancellation. The runtime returns
12
+ * a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors
13
+ * who forward `signal` to their underlying SDK get true cancellation
14
+ * of in-flight network calls.
15
+ *
16
+ * Family layers extend this base with their own shape-of-call metadata:
17
+ * the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`
18
+ * (see `@prisma-next/sql-relational-core`). Mongo currently uses this
19
+ * framework type unchanged. Column metadata is intentionally **not** on
20
+ * the framework type — it is a SQL-family concept rooted in SQL's
21
+ * `(table, column)` addressing model and would not generalise to other
22
+ * families.
23
+ *
24
+ * The interface is named explicitly (not inlined) so future framework
25
+ * fields and family extensions can land additively without breaking
26
+ * codec author signatures.
27
+ */
28
+ interface CodecCallContext {
29
+ readonly signal?: AbortSignal;
30
+ }
5
31
  /**
6
32
  * A codec is the contract between an application value and its on-wire and
7
33
  * on-contract-disk representations.
@@ -38,10 +64,10 @@ interface Codec<Id extends string = string, TTraits extends readonly CodecTrait[
38
64
  readonly targetTypes: readonly string[];
39
65
  /** Semantic traits for operator gating (e.g. equality, order, numeric). */
40
66
  readonly traits?: TTraits;
41
- /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. */
42
- encode(value: TInput): Promise<TWire>;
43
- /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. */
44
- decode(wire: TWire): Promise<TInput>;
67
+ /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
68
+ encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
69
+ /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
70
+ decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
45
71
  /** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */
46
72
  encodeJson(value: TInput): JsonValue;
47
73
  /** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */
@@ -54,5 +80,5 @@ interface CodecLookup {
54
80
  }
55
81
  declare const emptyCodecLookup: CodecLookup;
56
82
  //#endregion
57
- export { emptyCodecLookup as i, CodecLookup as n, CodecTrait as r, Codec as t };
58
- //# sourceMappingURL=codec-types-DQ1Agjom.d.mts.map
83
+ export { emptyCodecLookup as a, CodecTrait as i, CodecCallContext as n, CodecLookup as r, Codec as t };
84
+ //# sourceMappingURL=codec-types-DXv-ROhF.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-types-DXv-ROhF.d.mts","names":[],"sources":["../src/shared/codec-types.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;;AAAZ;AAyBA;AAiCA;;;;;;;;;;;;;;;;;;;AAwBA;AAIa,UA7DI,gBAAA,CA+DhB;oBA9DmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgCH,2DAEU,wBAAwB;;eAKpC;;;;oBAIK;;gBAEJ,aAAa,mBAAmB,QAAQ;;eAEzC,YAAY,mBAAmB,QAAQ;;oBAElC,SAAS;;mBAEV,YAAY;;gCAEC;;UAGf,WAAA;mBACE;;cAGN,kBAAkB"}
package/dist/codec.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as emptyCodecLookup, n as CodecLookup, r as CodecTrait, t as Codec } from "./codec-types-DQ1Agjom.mjs";
2
- export { type Codec, type CodecLookup, type CodecTrait, emptyCodecLookup };
1
+ import { a as emptyCodecLookup, i as CodecTrait, n as CodecCallContext, r as CodecLookup, t as Codec } from "./codec-types-DXv-ROhF.mjs";
2
+ export { type Codec, type CodecCallContext, type CodecLookup, type CodecTrait, emptyCodecLookup };
package/dist/codec.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/codec-types.ts
1
+ //#region src/shared/codec-types.ts
2
2
  const emptyCodecLookup = { get: () => void 0 };
3
3
 
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"codec.mjs","names":["emptyCodecLookup: CodecLookup"],"sources":["../src/codec-types.ts"],"sourcesContent":["import type { JsonValue } from '@prisma-next/contract/types';\n\nexport type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual';\n\n/**\n * A codec is the contract between an application value and its on-wire and\n * on-contract-disk representations.\n *\n * The author's mental model is two JS-side types — `TInput` (the\n * application JS type) and `TWire` (the database driver wire format) —\n * plus `JsonValue` for build-time contract artifacts. The codec translates\n * `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`\n * during contract emission and loading.\n *\n * Three representations participate:\n * - **Input** (`TInput`): the JS type at the application boundary.\n * - **Wire** (`TWire`): the format exchanged with the database driver.\n * - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.\n *\n * Codec methods split into two groups:\n *\n * - **Query-time** methods (`encode`, `decode`) run per row/parameter at the\n * IO boundary; they are required and Promise-returning. The per-family\n * codec factory accepts sync or async author functions and lifts sync\n * ones to Promise-shaped methods automatically.\n * - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)\n * run when the contract is serialized, loaded, or when client types are\n * emitted. They stay synchronous so contract validation and client\n * construction are synchronous.\n *\n * Target-family codec interfaces extend this base with target-shaped\n * metadata.\n */\nexport interface Codec<\n Id extends string = string,\n TTraits extends readonly CodecTrait[] = readonly CodecTrait[],\n TWire = unknown,\n TInput = unknown,\n> {\n /** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */\n readonly id: Id;\n /** Database-native type names this codec handles (e.g. `['timestamptz']`). */\n readonly targetTypes: readonly string[];\n /** Semantic traits for operator gating (e.g. equality, order, numeric). */\n readonly traits?: TTraits;\n /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. */\n encode(value: TInput): Promise<TWire>;\n /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. */\n decode(wire: TWire): Promise<TInput>;\n /** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */\n encodeJson(value: TInput): JsonValue;\n /** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */\n decodeJson(json: JsonValue): TInput;\n /** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */\n renderOutputType?(typeParams: Record<string, unknown>): string | undefined;\n}\n\nexport interface CodecLookup {\n get(id: string): Codec | undefined;\n}\n\nexport const emptyCodecLookup: CodecLookup = {\n get: () => undefined,\n};\n"],"mappings":";AA6DA,MAAaA,mBAAgC,EAC3C,WAAW,QACZ"}
1
+ {"version":3,"file":"codec.mjs","names":["emptyCodecLookup: CodecLookup"],"sources":["../src/shared/codec-types.ts"],"sourcesContent":["import type { JsonValue } from '@prisma-next/contract/types';\n\nexport type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual';\n\n/**\n * Per-call context the runtime threads to every `codec.encode` /\n * `codec.decode` invocation for a single `runtime.execute()` call.\n *\n * The framework-level shape is family-agnostic and carries one field:\n *\n * - `signal?: AbortSignal` — per-query cancellation. The runtime returns\n * a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors\n * who forward `signal` to their underlying SDK get true cancellation\n * of in-flight network calls.\n *\n * Family layers extend this base with their own shape-of-call metadata:\n * the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`\n * (see `@prisma-next/sql-relational-core`). Mongo currently uses this\n * framework type unchanged. Column metadata is intentionally **not** on\n * the framework type — it is a SQL-family concept rooted in SQL's\n * `(table, column)` addressing model and would not generalise to other\n * families.\n *\n * The interface is named explicitly (not inlined) so future framework\n * fields and family extensions can land additively without breaking\n * codec author signatures.\n */\nexport interface CodecCallContext {\n readonly signal?: AbortSignal;\n}\n\n/**\n * A codec is the contract between an application value and its on-wire and\n * on-contract-disk representations.\n *\n * The author's mental model is two JS-side types — `TInput` (the\n * application JS type) and `TWire` (the database driver wire format) —\n * plus `JsonValue` for build-time contract artifacts. The codec translates\n * `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`\n * during contract emission and loading.\n *\n * Three representations participate:\n * - **Input** (`TInput`): the JS type at the application boundary.\n * - **Wire** (`TWire`): the format exchanged with the database driver.\n * - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.\n *\n * Codec methods split into two groups:\n *\n * - **Query-time** methods (`encode`, `decode`) run per row/parameter at the\n * IO boundary; they are required and Promise-returning. The per-family\n * codec factory accepts sync or async author functions and lifts sync\n * ones to Promise-shaped methods automatically.\n * - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)\n * run when the contract is serialized, loaded, or when client types are\n * emitted. They stay synchronous so contract validation and client\n * construction are synchronous.\n *\n * Target-family codec interfaces extend this base with target-shaped\n * metadata.\n */\nexport interface Codec<\n Id extends string = string,\n TTraits extends readonly CodecTrait[] = readonly CodecTrait[],\n TWire = unknown,\n TInput = unknown,\n> {\n /** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */\n readonly id: Id;\n /** Database-native type names this codec handles (e.g. `['timestamptz']`). */\n readonly targetTypes: readonly string[];\n /** Semantic traits for operator gating (e.g. equality, order, numeric). */\n readonly traits?: TTraits;\n /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;\n /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;\n /** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */\n encodeJson(value: TInput): JsonValue;\n /** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */\n decodeJson(json: JsonValue): TInput;\n /** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */\n renderOutputType?(typeParams: Record<string, unknown>): string | undefined;\n}\n\nexport interface CodecLookup {\n get(id: string): Codec | undefined;\n}\n\nexport const emptyCodecLookup: CodecLookup = {\n get: () => undefined,\n};\n"],"mappings":";AAwFA,MAAaA,mBAAgC,EAC3C,WAAW,QACZ"}
@@ -1,2 +1,2 @@
1
- import { S as checkContractComponentRequirements, _ as PackRefBase, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, g as FamilyPackRef, h as FamilyInstance, i as ComponentDescriptor, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, o as ContractComponentRequirementsCheckInput, p as ExtensionPackRef, r as AdapterPackRef, s as ContractComponentRequirementsCheckResult, t as AdapterDescriptor, u as DriverPackRef, v as TargetBoundComponentDescriptor, x as TargetPackRef, y as TargetDescriptor } from "./framework-components-DFZMi2h7.mjs";
1
+ import { S as checkContractComponentRequirements, _ as PackRefBase, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, g as FamilyPackRef, h as FamilyInstance, i as ComponentDescriptor, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, o as ContractComponentRequirementsCheckInput, p as ExtensionPackRef, r as AdapterPackRef, s as ContractComponentRequirementsCheckResult, t as AdapterDescriptor, u as DriverPackRef, v as TargetBoundComponentDescriptor, x as TargetPackRef, y as TargetDescriptor } from "./framework-components-Buvf7mnC.mjs";
2
2
  export { type AdapterDescriptor, type AdapterInstance, type AdapterPackRef, type ComponentDescriptor, type ComponentMetadata, type ContractComponentRequirementsCheckInput, type ContractComponentRequirementsCheckResult, type DriverDescriptor, type DriverInstance, type DriverPackRef, type ExtensionDescriptor, type ExtensionInstance, type ExtensionPackRef, type FamilyDescriptor, type FamilyInstance, type FamilyPackRef, type PackRefBase, type TargetBoundComponentDescriptor, type TargetDescriptor, type TargetInstance, type TargetPackRef, checkContractComponentRequirements };
@@ -1,3 +1,3 @@
1
- import { t as checkContractComponentRequirements } from "./framework-components-C8ZhSwXe.mjs";
1
+ import { t as checkContractComponentRequirements } from "./framework-components-BsWST1Rn.mjs";
2
2
 
3
3
  export { checkContractComponentRequirements };
@@ -1,12 +1,13 @@
1
- import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-D1-JZ37B.mjs";
2
- import { n as CodecLookup } from "./codec-types-DQ1Agjom.mjs";
3
- import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-DFZMi2h7.mjs";
4
- import { t as TypesImportSpec } from "./types-import-spec-C4sc7wbb.mjs";
5
- import { t as EmissionSpi } from "./emission-types-BPAALJbF.mjs";
1
+ import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-BdrFDx4x.mjs";
2
+ import { r as CodecLookup } from "./codec-types-DXv-ROhF.mjs";
3
+ import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-Buvf7mnC.mjs";
4
+ import { t as TypesImportSpec } from "./types-import-spec-D-O6GotH.mjs";
5
+ import { t as EmissionSpi } from "./emission-types-D234HxUz.mjs";
6
+ import { m as PslDocumentAst } from "./psl-ast-9X5rwo98.mjs";
6
7
  import { Contract, ContractMarkerRecord } from "@prisma-next/contract/types";
7
8
  import { Result } from "@prisma-next/utils/result";
8
9
 
9
- //#region src/control-result-types.d.ts
10
+ //#region src/control/control-result-types.d.ts
10
11
  declare const VERIFY_CODE_MARKER_MISSING = "PN-RUN-3001";
11
12
  declare const VERIFY_CODE_HASH_MISMATCH = "PN-RUN-3002";
12
13
  declare const VERIFY_CODE_TARGET_MISMATCH = "PN-RUN-3003";
@@ -154,7 +155,7 @@ interface SignDatabaseResult {
154
155
  };
155
156
  }
156
157
  //#endregion
157
- //#region src/control-instances.d.ts
158
+ //#region src/control/control-instances.d.ts
158
159
  interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends FamilyInstance<TFamilyId> {
159
160
  validateContract(contractJson: unknown): Contract;
160
161
  verify(options: {
@@ -196,7 +197,7 @@ interface ControlDriverInstance<TFamilyId extends string, TTargetId extends stri
196
197
  }
197
198
  interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
198
199
  //#endregion
199
- //#region src/control-stack.d.ts
200
+ //#region src/control/control-stack.d.ts
200
201
  interface AssembledAuthoringContributions {
201
202
  readonly field: AuthoringFieldNamespace;
202
203
  readonly type: AuthoringTypeNamespace;
@@ -256,7 +257,7 @@ declare function extractCodecLookup(descriptors: ReadonlyArray<Pick<ComponentMet
256
257
  }, 'types' | 'id'>>): CodecLookup;
257
258
  declare function createControlStack<TFamilyId extends string, TTargetId extends string>(input: CreateControlStackInput<TFamilyId, TTargetId>): ControlStack<TFamilyId, TTargetId>;
258
259
  //#endregion
259
- //#region src/control-descriptors.d.ts
260
+ //#region src/control/control-descriptors.d.ts
260
261
  interface ControlFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> extends FamilyDescriptor<TFamilyId> {
261
262
  readonly emission: EmissionSpi;
262
263
  create<TTargetId extends string>(stack: ControlStack<TFamilyId, TTargetId>): TFamilyInstance;
@@ -281,7 +282,7 @@ interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends
281
282
  create(): TExtensionInstance;
282
283
  }
283
284
  //#endregion
284
- //#region src/control-migration-types.d.ts
285
+ //#region src/control/control-migration-types.d.ts
285
286
  /**
286
287
  * Migration operation classes define the safety level of an operation.
287
288
  * - 'additive': Adds new structures without modifying existing ones (safe)
@@ -623,7 +624,30 @@ interface MigrationScaffoldContext {
623
624
  readonly toHash: string;
624
625
  }
625
626
  //#endregion
626
- //#region src/control-schema-view.d.ts
627
+ //#region src/control/control-operation-preview.d.ts
628
+ /**
629
+ * Family-agnostic textual preview of a migration plan, used by the CLI to
630
+ * render a "DDL preview" section for `db init` / `db update` / `migration plan`
631
+ * / `migration show`. Each statement carries a free-form `language` tag so
632
+ * formatters can suffix `;` for SQL but render Mongo shell lines verbatim.
633
+ *
634
+ * Producers are family-specific: SQL emits `language: 'sql'` (existing DDL
635
+ * extraction); Mongo emits `language: 'mongodb-shell'` via the
636
+ * `MongoDdlCommandFormatter` visitor.
637
+ *
638
+ * The capability `OperationPreviewCapable` (declared in
639
+ * `./control-capabilities`) is how a family announces it can produce these.
640
+ */
641
+ interface OperationPreviewStatement {
642
+ readonly text: string;
643
+ /** Dialect identifier, e.g. `'sql'`, `'mongodb-shell'`. Free-form by design (OQ-3). */
644
+ readonly language: string;
645
+ }
646
+ interface OperationPreview {
647
+ readonly statements: readonly OperationPreviewStatement[];
648
+ }
649
+ //#endregion
650
+ //#region src/control/control-schema-view.d.ts
627
651
  /**
628
652
  * Core schema view types for family-agnostic schema visualization.
629
653
  *
@@ -661,7 +685,7 @@ interface CoreSchemaView {
661
685
  readonly root: SchemaTreeNode;
662
686
  }
663
687
  //#endregion
664
- //#region src/control-capabilities.d.ts
688
+ //#region src/control/control-capabilities.d.ts
665
689
  interface MigratableTargetDescriptor<TFamilyId extends string, TTargetId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> extends ControlTargetDescriptor<TFamilyId, TTargetId> {
666
690
  readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;
667
691
  }
@@ -670,6 +694,23 @@ interface SchemaViewCapable<TSchemaIR = unknown> {
670
694
  toSchemaView(schema: TSchemaIR): CoreSchemaView;
671
695
  }
672
696
  declare function hasSchemaView<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR>;
697
+ /**
698
+ * Capability declaring that a family can infer a PSL contract AST from its
699
+ * opaque introspected schema IR. Consumed by `prisma-next contract infer`.
700
+ */
701
+ interface PslContractInferCapable<TSchemaIR = unknown> {
702
+ inferPslContract(schemaIR: TSchemaIR): PslDocumentAst;
703
+ }
704
+ declare function hasPslContractInfer<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractInferCapable<TSchemaIR>;
705
+ /**
706
+ * Capability declaring that a family can render a textual preview of migration
707
+ * operations for the CLI's "DDL preview" output. SQL families emit
708
+ * `language: 'sql'` statements; Mongo families emit `language: 'mongodb-shell'`.
709
+ */
710
+ interface OperationPreviewCapable {
711
+ toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
712
+ }
713
+ declare function hasOperationPreview<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & OperationPreviewCapable;
673
714
  //#endregion
674
- export { type AssembledAuthoringContributions, type BaseSchemaIssue, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DataTransformOperation, type DefaultFunctionLoweringContext, type DefaultFunctionLoweringHandler, type DefaultFunctionRegistry, type DefaultFunctionRegistryEntry, type EmitContractResult, type EnumValuesChangedIssue, type IntrospectSchemaResult, type LoweredDefaultResult, type LoweredDefaultValue, type MigratableTargetDescriptor, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MutationDefaultGeneratorDescriptor, type OpFactoryCall, type OperationContext, type ParsedDefaultFunctionCall, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type SourceDiagnostic, type SourceSpan, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
715
+ export { type AssembledAuthoringContributions, type BaseSchemaIssue, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DataTransformOperation, type DefaultFunctionLoweringContext, type DefaultFunctionLoweringHandler, type DefaultFunctionRegistry, type DefaultFunctionRegistryEntry, type EmitContractResult, type EnumValuesChangedIssue, type IntrospectSchemaResult, type LoweredDefaultResult, type LoweredDefaultValue, type MigratableTargetDescriptor, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MutationDefaultGeneratorDescriptor, type OpFactoryCall, type OperationContext, type OperationPreview, type OperationPreviewCapable, type OperationPreviewStatement, type ParsedDefaultFunctionCall, type PslContractInferCapable, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type SourceDiagnostic, type SourceSpan, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaView };
675
716
  //# sourceMappingURL=control.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control.d.mts","names":[],"sources":["../src/control-result-types.ts","../src/control-instances.ts","../src/control-stack.ts","../src/control-descriptors.ts","../src/control-migration-types.ts","../src/control-schema-view.ts","../src/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;AARd,UAWI,oBAAA,CAXsB;EAC1B,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EAEI,SAAA,QAAA,EAAgB;IAMhB,SAAA,WAAoB,EAAA,MAAA;IA2BpB,SAAA,WAAe,CAAA,EAAA,MAAA;EAiCf,CAAA;EAQL,SAAA,MAAW,CAAA,EAAA;IAEN,SAAA,WAAA,CAAsB,EAAA,MAAA;IAYtB,SAAA,WAAA,CAAA,EAAA,MAA0B;EAgC1B,CAAA;EAQA,SAAA,MAAA,EAAA;IAiBA,SAAA,QAAkB,EAAA,MAAA;;;;ECvIlB,SAAA,oBAAqB,CAAA,EAAA,OAAA;EACb,SAAA,IAAA,CAAA,EAAA;IACkB,SAAA,UAAA,CAAA,EAAA,MAAA;IAGA,SAAA,YAAA,EAAA,MAAA;EAAtB,CAAA;EAKP,SAAA,OAAA,EAAA;IAAR,SAAA,KAAA,EAAA,MA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YkB,UI4B1B,cAAA,CJ5B0B;EAAtB,SAAA,IAAA,EI6BJ,cJ7BI;;;;UKvBJ,uGAGS,sBAAsB,sBAAsB,sBAClE,6BAGM,wBAAwB,WAAW;uBACtB,2BAA2B,WAAW,WAAW;;iBAGxD,0EACN,wBAAwB,WAAW,uBAChC,2BAA2B,WAAW;UAIlC;ENtBJ,YAAA,CAAA,MAAA,EMuBU,SNvBgB,CAAA,EMuBJ,cNvBI;AACvC;AACa,iBMwBG,aNxBwB,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EMyB5B,qBNzB4B,CMyBN,SNzBM,EMyBK,SNzBL,CAAA,CAAA,EAAA,QAAA,IM0BzB,qBN1ByB,CM0BH,SN1BG,EM0BQ,SN1BR,CAAA,GM0BqB,iBN1BrB,CM0BuC,SN1BvC,CAAA"}
1
+ {"version":3,"file":"control.d.mts","names":[],"sources":["../src/control/control-result-types.ts","../src/control/control-instances.ts","../src/control/control-stack.ts","../src/control/control-descriptors.ts","../src/control/control-migration-types.ts","../src/control/control-operation-preview.ts","../src/control/control-schema-view.ts","../src/control/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;EAXJ,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EACA,SAAA,QAAA,EAAA;IAEI,SAAA,WAAgB,EAAA,MAGN;IAGV,SAAA,WAAoB,CAAA,EAAA,MAAA;EA2BpB,CAAA;EAiCA,SAAA,MAAA,CAAA,EAAA;IAQL,SAAA,WAAW,CAAA,EAAG,MAAA;IAET,SAAA,WAAA,CAAsB,EAAA,MAAA;EAYtB,CAAA;EAgCA,SAAA,MAAA,EAAA;IAQA,SAAA,QAAA,EAAA,MAAsB;IAiBtB,SAAA,MAAA,CAAA,EAAkB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4CA,uBAAA,CN5CqB;EACb,kBAAA,CAAA,UAAA,EAAA,SM4CiB,sBN5CjB,EAAA,CAAA,EM4C4C,gBN5C5C;;AAIkB,iBM2C3B,mBN3C2B,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EM4C/B,qBN5C+B,CM4CT,SN5CS,EM4CE,SN5CF,CAAA,CAAA,EAAA,QAAA,IM6C5B,qBN7C4B,CM6CN,SN7CM,EM6CK,SN7CL,CAAA,GM6CkB,uBN7ClB"}
package/dist/control.mjs CHANGED
@@ -1,20 +1,26 @@
1
- //#region src/control-capabilities.ts
1
+ //#region src/control/control-capabilities.ts
2
2
  function hasMigrations(target) {
3
3
  return "migrations" in target && !!target["migrations"];
4
4
  }
5
5
  function hasSchemaView(instance) {
6
6
  return "toSchemaView" in instance && typeof instance["toSchemaView"] === "function";
7
7
  }
8
+ function hasPslContractInfer(instance) {
9
+ return "inferPslContract" in instance && typeof instance["inferPslContract"] === "function";
10
+ }
11
+ function hasOperationPreview(instance) {
12
+ return "toOperationPreview" in instance && typeof instance["toOperationPreview"] === "function";
13
+ }
8
14
 
9
15
  //#endregion
10
- //#region src/control-result-types.ts
16
+ //#region src/control/control-result-types.ts
11
17
  const VERIFY_CODE_MARKER_MISSING = "PN-RUN-3001";
12
18
  const VERIFY_CODE_HASH_MISMATCH = "PN-RUN-3002";
13
19
  const VERIFY_CODE_TARGET_MISMATCH = "PN-RUN-3003";
14
20
  const VERIFY_CODE_SCHEMA_FAILURE = "PN-RUN-3010";
15
21
 
16
22
  //#endregion
17
- //#region src/control-schema-view.ts
23
+ //#region src/control/control-schema-view.ts
18
24
  var SchemaTreeNode = class {
19
25
  kind;
20
26
  id;
@@ -35,7 +41,7 @@ var SchemaTreeNode = class {
35
41
  };
36
42
 
37
43
  //#endregion
38
- //#region src/control-stack.ts
44
+ //#region src/control/control-stack.ts
39
45
  function addUniqueId(ids, seen, id) {
40
46
  if (!seen.has(id)) {
41
47
  ids.push(id);
@@ -211,5 +217,5 @@ function createControlStack(input) {
211
217
  }
212
218
 
213
219
  //#endregion
214
- export { SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
220
+ export { SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaView };
215
221
  //# sourceMappingURL=control.mjs.map