@prisma/orm-family-sql 8.0.0-rc.11-dev.26 → 8.0.0-rc.11-dev.28
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/{authoring-type-constructors-I_mkqWGC-D9IpXjba.mjs → authoring-type-constructors-C1ogrr_x-DZtwhqV-.mjs} +4 -2
- package/dist/authoring-type-constructors-C1ogrr_x-DZtwhqV-.mjs.map +1 -0
- package/dist/{control-BbwkxMMY.d.mts → control-D7OmKjH2.d.mts} +15 -9
- package/dist/control-D7OmKjH2.d.mts.map +1 -0
- package/dist/{control-CtBvtfSa.mjs → control-DCVNWLzt.mjs} +2 -2
- package/dist/{control-CtBvtfSa.mjs.map → control-DCVNWLzt.mjs.map} +1 -1
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +3 -3
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +2 -2
- package/dist/family__pack.d.mts +2 -0
- package/dist/family__pack.d.mts.map +1 -1
- package/dist/family__pack.mjs +1 -1
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__runtime.mjs +1 -1
- package/dist/orm-client.mjs +5 -5
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{runtime-PknWErjr.mjs → runtime-DfvE_FqD.mjs} +2 -2
- package/dist/{runtime-PknWErjr.mjs.map → runtime-DfvE_FqD.mjs.map} +1 -1
- package/dist/{timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs → timestamp-now-generator-CVrEeaJp-Bt_PHBSf.mjs} +8 -8
- package/dist/timestamp-now-generator-CVrEeaJp-Bt_PHBSf.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/authoring-type-constructors-I_mkqWGC-D9IpXjba.mjs.map +0 -1
- package/dist/control-BbwkxMMY.d.mts.map +0 -1
- package/dist/timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TIMESTAMP_NOW_GENERATOR_ID } from "./timestamp-now-generator-
|
|
1
|
+
import { t as TIMESTAMP_NOW_GENERATOR_ID } from "./timestamp-now-generator-CVrEeaJp-Bt_PHBSf.mjs";
|
|
2
2
|
import { UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma/orm-framework/contract/types";
|
|
3
3
|
//#region ../../../2-sql/9-family/dist/runtime.mjs
|
|
4
4
|
/**
|
|
@@ -52,4 +52,4 @@ var runtime_default = sqlRuntimeFamilyDescriptor;
|
|
|
52
52
|
//#endregion
|
|
53
53
|
export { timestampNowRuntimeGenerator as i, resolveDomainModel as n, runtime_default as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=runtime-
|
|
55
|
+
//# sourceMappingURL=runtime-DfvE_FqD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-
|
|
1
|
+
{"version":3,"file":"runtime-DfvE_FqD.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.mjs"],"sourcesContent":["import { t as TIMESTAMP_NOW_GENERATOR_ID } from \"./timestamp-now-generator-CVrEeaJp.mjs\";\nimport { UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from \"@internal/contract/types\";\nimport { resolveStorageTable } from \"@internal/sql-contract/resolve-storage-table\";\n//#region src/core/runtime-instance.ts\n/**\n* Creates a SQL execution-plane family instance.\n*\n* This will be renamed to `createSqlExecutionFamilyInstance()` as part of `TML-1842`.\n*/\nfunction createSqlRuntimeFamilyInstance() {\n\treturn { familyId: \"sql\" };\n}\n//#endregion\n//#region src/core/runtime-descriptor.ts\n/**\n* SQL execution-plane family descriptor.\n*\n* Note: this is currently named `sqlRuntimeFamilyDescriptor` because the execution plane\n* framework types are still using the `Runtime*` naming (`RuntimeFamilyDescriptor`, etc.).\n*\n* This will be renamed to `sqlExecutionFamilyDescriptor` as part of `TML-1842`.\n*/\nconst sqlRuntimeFamilyDescriptor = {\n\tkind: \"family\",\n\tid: \"sql\",\n\tfamilyId: \"sql\",\n\tversion: \"0.0.1\",\n\tcreate() {\n\t\treturn createSqlRuntimeFamilyInstance();\n\t}\n};\nObject.freeze(sqlRuntimeFamilyDescriptor);\n//#endregion\n//#region src/core/timestamp-now-runtime-generator.ts\n/**\n* Builds the canonical runtime-plane generator for the wall-clock-now\n* mutation default. Returns `new Date()`; semantics are target-agnostic\n* so all SQL targets share this single implementation.\n*\n* Declares `stability: 'query'` so a single ORM bulk operation\n* (e.g. `createAll([...])`) shares one timestamp across every row and\n* every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`\n* semantics: one `new Date()` per lowered mutation, not per row.\n*\n* Lives in a runtime-plane-only module so the control-plane\n* `timestamp-now-generator.ts` (descriptor + authoring presets) stays\n* free of `@internal/sql-runtime` imports.\n*/\nfunction timestampNowRuntimeGenerator() {\n\treturn {\n\t\tid: TIMESTAMP_NOW_GENERATOR_ID,\n\t\tgenerate: () => /* @__PURE__ */ new Date(),\n\t\tstability: \"query\"\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\nvar runtime_default = sqlRuntimeFamilyDescriptor;\n//#endregion\nexport { UNBOUND_DOMAIN_NAMESPACE_ID, runtime_default as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;AASA,SAAS,iCAAiC;CACzC,OAAO,EAAE,UAAU,MAAM;AAC1B;;;;;;;;;AAWA,MAAM,6BAA6B;CAClC,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,SAAS;EACR,OAAO,+BAA+B;CACvC;AACD;AACA,OAAO,OAAO,0BAA0B;;;;;;;;;;;;;;;AAiBxC,SAAS,+BAA+B;CACvC,OAAO;EACN,IAAI;EACJ,gCAAgC,IAAI,KAAK;EACzC,WAAW;CACZ;AACD;AAGA,IAAI,kBAAkB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../../2-sql/9-family/dist/timestamp-now-generator-
|
|
1
|
+
//#region ../../../2-sql/9-family/dist/timestamp-now-generator-CVrEeaJp.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Canonical id for the wall-clock-now mutation default generator.
|
|
4
4
|
*
|
|
@@ -39,8 +39,8 @@ function timestampNowControlDescriptor() {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair
|
|
42
|
-
* for a SQL target. `createdAt` lowers to
|
|
43
|
-
* `updatedAt` lowers to
|
|
42
|
+
* for a SQL target. `createdAt` lowers to an execution generator on `onCreate`;
|
|
43
|
+
* `updatedAt` lowers to the same generator on both `onCreate` and
|
|
44
44
|
* `onUpdate` (RD: "last modified time", non-null). Targets supply the
|
|
45
45
|
* codec/native-type pair that matches their timestamp column; everything
|
|
46
46
|
* else is shared so PSL `temporal.updatedAt()` and TS
|
|
@@ -57,10 +57,10 @@ function temporalAuthoringPresets(input) {
|
|
|
57
57
|
output: {
|
|
58
58
|
codecId,
|
|
59
59
|
nativeType,
|
|
60
|
-
|
|
61
|
-
kind: "
|
|
62
|
-
|
|
63
|
-
}
|
|
60
|
+
executionDefaults: { onCreate: {
|
|
61
|
+
kind: "generator",
|
|
62
|
+
id: generatorId
|
|
63
|
+
} }
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
updatedAt: {
|
|
@@ -178,4 +178,4 @@ function temporalCodecPreset(input) {
|
|
|
178
178
|
//#endregion
|
|
179
179
|
export { temporalStringAuthoringPresets as a, temporalCodecPresetWithPrecision as i, temporalAuthoringPresets as n, timestampNowControlDescriptor as o, temporalCodecPreset as r, TIMESTAMP_NOW_GENERATOR_ID as t };
|
|
180
180
|
|
|
181
|
-
//# sourceMappingURL=timestamp-now-generator-
|
|
181
|
+
//# sourceMappingURL=timestamp-now-generator-CVrEeaJp-Bt_PHBSf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamp-now-generator-CVrEeaJp-Bt_PHBSf.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/timestamp-now-generator-CVrEeaJp.mjs"],"sourcesContent":["//#region src/core/timestamp-now-generator.ts\n/**\n* Canonical id for the wall-clock-now mutation default generator.\n*\n* Owned by `family-sql` because that's where the generator lives. The\n* id flows out from here to (1) the control-plane descriptor and the\n* temporal field-preset pair below, (2) the runtime-plane sibling\n* `timestamp-now-runtime-generator.ts`, and (3) authoring surfaces\n* (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) via\n* the descriptor flow. Co-locating the constant with its only owner\n* keeps the framework layer free of concrete generator ids.\n*/\nconst TIMESTAMP_NOW_GENERATOR_ID = \"timestampNow\";\n/**\n* Builds the canonical control-plane descriptor for the wall-clock-now\n* mutation default generator. The descriptor's `id` and `buildPhases`\n* are target-agnostic so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts.\n*\n* `applicableCodecIds` is omitted: `timestampNow` is preset-only (not\n* reachable via `@default(timestampNow())` lowering), and the codec is\n* co-registered by the preset descriptor itself, so the\n* `@default(...)` compatibility check has no role to play here.\n*/\nfunction timestampNowControlDescriptor() {\n\treturn {\n\t\tid: TIMESTAMP_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\n/**\n* Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair\n* for a SQL target. `createdAt` lowers to an execution generator on `onCreate`;\n* `updatedAt` lowers to the same generator on both `onCreate` and\n* `onUpdate` (RD: \"last modified time\", non-null). Targets supply the\n* codec/native-type pair that matches their timestamp column; everything\n* else is shared so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts across\n* targets by construction.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalAuthoringPresets(input) {\n\tconst { codecId, nativeType } = input;\n\tconst generatorId = input.generatorId ?? \"timestampNow\";\n\treturn {\n\t\tcreatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: generatorId\n\t\t\t\t} }\n\t\t\t}\n\t\t},\n\t\tupdatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\texecutionDefaults: {\n\t\t\t\t\tonCreate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t},\n\t\t\t\t\tonUpdate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction temporalStringAuthoringPresets(input) {\n\tconst presets = /* @__PURE__ */ temporalAuthoringPresets(input);\n\treturn {\n\t\tcreatedAtString: presets.createdAt,\n\t\tupdatedAtString: presets.updatedAt\n\t};\n}\nconst TEMPORAL_PRECISION_ARG = {\n\tname: \"precision\",\n\tkind: \"number\",\n\toptional: true,\n\tinteger: true,\n\tminimum: 0\n};\nconst TEMPORAL_ON_CREATE_ARG = {\n\tname: \"onCreate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\nconst TEMPORAL_ON_UPDATE_ARG = {\n\tname: \"onUpdate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\n/**\n* Selects a generator descriptor for the preset's `now` token. The token is preset vocabulary; the\n* generator id never appears in a user's spelling (ADR 169 — these generators are preset-only).\n*/\nfunction temporalPhaseTemplate(index, generatorId) {\n\treturn {\n\t\tkind: \"select\",\n\t\tindex,\n\t\tcases: { now: {\n\t\t\tkind: \"generator\",\n\t\t\tid: generatorId\n\t\t} }\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec that takes a precision\n* parameter (`pg/timestamp-temporal@1`, `pg/timestamptz-temporal@1`). Arguments change field\n* properties only — never the codec, which the caller fixes here.\n*\n* All three arguments are optional: omitting `precision` omits `typeParams`\n* entirely, and omitting a phase omits that phase (both omitted omits\n* `executionDefaults`).\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPresetWithPrecision(input) {\n\tconst generatorId = input.generatorId ?? \"timestampNow\";\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [\n\t\t\tTEMPORAL_PRECISION_ARG,\n\t\t\tTEMPORAL_ON_CREATE_ARG,\n\t\t\tTEMPORAL_ON_UPDATE_ARG\n\t\t],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} },\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(1, generatorId),\n\t\t\t\tonUpdate: temporalPhaseTemplate(2, generatorId)\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec with no type\n* parameters (`sqlite/datetime@1`). As with the precision-bearing variant,\n* both phase arguments are optional and omitting one omits that phase.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPreset(input) {\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(0, TIMESTAMP_NOW_GENERATOR_ID),\n\t\t\t\tonUpdate: temporalPhaseTemplate(1, TIMESTAMP_NOW_GENERATOR_ID)\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\nexport { temporalStringAuthoringPresets as a, temporalCodecPresetWithPrecision as i, temporalAuthoringPresets as n, timestampNowControlDescriptor as o, temporalCodecPreset as r, TIMESTAMP_NOW_GENERATOR_ID as t };\n\n//# sourceMappingURL=timestamp-now-generator-CVrEeaJp.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,6BAA6B;;;;;;;;;;;;AAYnC,SAAS,gCAAgC;CACxC,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;;;;;;;;;;;;AAYA,SAAS,yBAAyB,OAAO;CACxC,MAAM,EAAE,SAAS,eAAe;CAChC,MAAM,cAAc,MAAM,eAAe;CACzC,OAAO;EACN,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;GACH;EACD;EACA,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,mBAAmB;KAClB,UAAU;MACT,MAAM;MACN,IAAI;KACL;KACA,UAAU;MACT,MAAM;MACN,IAAI;KACL;IACD;GACD;EACD;CACD;AACD;AACA,SAAS,+BAA+B,OAAO;CAC9C,MAAM,UAA0B,yCAAyB,KAAK;CAC9D,OAAO;EACN,iBAAiB,QAAQ;EACzB,iBAAiB,QAAQ;CAC1B;AACD;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,UAAU;CACV,SAAS;CACT,SAAS;AACV;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,QAAQ,CAAC,KAAK;CACd,UAAU;AACX;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,QAAQ,CAAC,KAAK;CACd,UAAU;AACX;;;;;AAKA,SAAS,sBAAsB,OAAO,aAAa;CAClD,OAAO;EACN,MAAM;EACN;EACA,OAAO,EAAE,KAAK;GACb,MAAM;GACN,IAAI;EACL,EAAE;CACH;AACD;;;;;;;;;;;AAWA,SAAS,iCAAiC,OAAO;CAChD,MAAM,cAAc,MAAM,eAAe;CACzC,OAAO;EACN,MAAM;EACN,MAAM;GACL;GACA;GACA;EACD;EACA,QAAQ;GACP,SAAS,MAAM;GACf,YAAY,MAAM;GAClB,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;GACF,mBAAmB;IAClB,UAAU,sBAAsB,GAAG,WAAW;IAC9C,UAAU,sBAAsB,GAAG,WAAW;GAC/C;EACD;CACD;AACD;;;;;;;AAOA,SAAS,oBAAoB,OAAO;CACnC,OAAO;EACN,MAAM;EACN,MAAM,CAAC,wBAAwB,sBAAsB;EACrD,QAAQ;GACP,SAAS,MAAM;GACf,YAAY,MAAM;GAClB,mBAAmB;IAClB,UAAU,sBAAsB,GAAG,0BAA0B;IAC7D,UAAU,sBAAsB,GAAG,0BAA0B;GAC9D;EACD;CACD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-family-sql",
|
|
3
|
-
"version": "8.0.0-rc.11-dev.
|
|
3
|
+
"version": "8.0.0-rc.11-dev.28",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-framework": "8.0.0-rc.11-dev.
|
|
13
|
-
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.
|
|
12
|
+
"@prisma/orm-framework": "8.0.0-rc.11-dev.28",
|
|
13
|
+
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.28",
|
|
14
14
|
"@standard-schema/spec": "^1.1.0",
|
|
15
15
|
"arktype": "^2.2.2",
|
|
16
16
|
"pathe": "^2.0.3",
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"ts-toolbelt": "^9.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@internal/family-sql": "8.0.0-rc.11-dev.
|
|
22
|
-
"@internal/sql-builder": "8.0.0-rc.11-dev.
|
|
23
|
-
"@internal/sql-contract": "8.0.0-rc.11-dev.
|
|
24
|
-
"@internal/sql-contract-emitter": "8.0.0-rc.11-dev.
|
|
25
|
-
"@internal/sql-contract-prisma7": "8.0.0-rc.11-dev.
|
|
26
|
-
"@internal/sql-contract-psl": "8.0.0-rc.11-dev.
|
|
27
|
-
"@internal/sql-contract-ts": "8.0.0-rc.11-dev.
|
|
28
|
-
"@internal/sql-errors": "8.0.0-rc.11-dev.
|
|
29
|
-
"@internal/sql-operations": "8.0.0-rc.11-dev.
|
|
30
|
-
"@internal/sql-orm-client": "8.0.0-rc.11-dev.
|
|
31
|
-
"@internal/sql-relational-core": "8.0.0-rc.11-dev.
|
|
32
|
-
"@internal/sql-runtime": "8.0.0-rc.11-dev.
|
|
33
|
-
"@internal/sql-schema-ir": "8.0.0-rc.11-dev.
|
|
34
|
-
"@repo/tsconfig": "8.0.0-rc.11-dev.
|
|
35
|
-
"@repo/tsdown": "8.0.0-rc.11-dev.
|
|
21
|
+
"@internal/family-sql": "8.0.0-rc.11-dev.28",
|
|
22
|
+
"@internal/sql-builder": "8.0.0-rc.11-dev.28",
|
|
23
|
+
"@internal/sql-contract": "8.0.0-rc.11-dev.28",
|
|
24
|
+
"@internal/sql-contract-emitter": "8.0.0-rc.11-dev.28",
|
|
25
|
+
"@internal/sql-contract-prisma7": "8.0.0-rc.11-dev.28",
|
|
26
|
+
"@internal/sql-contract-psl": "8.0.0-rc.11-dev.28",
|
|
27
|
+
"@internal/sql-contract-ts": "8.0.0-rc.11-dev.28",
|
|
28
|
+
"@internal/sql-errors": "8.0.0-rc.11-dev.28",
|
|
29
|
+
"@internal/sql-operations": "8.0.0-rc.11-dev.28",
|
|
30
|
+
"@internal/sql-orm-client": "8.0.0-rc.11-dev.28",
|
|
31
|
+
"@internal/sql-relational-core": "8.0.0-rc.11-dev.28",
|
|
32
|
+
"@internal/sql-runtime": "8.0.0-rc.11-dev.28",
|
|
33
|
+
"@internal/sql-schema-ir": "8.0.0-rc.11-dev.28",
|
|
34
|
+
"@repo/tsconfig": "8.0.0-rc.11-dev.28",
|
|
35
|
+
"@repo/tsdown": "8.0.0-rc.11-dev.28",
|
|
36
36
|
"tsdown": "0.22.14",
|
|
37
37
|
"typescript": "5.9.3"
|
|
38
38
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-type-constructors-I_mkqWGC-D9IpXjba.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-I_mkqWGC.mjs"],"sourcesContent":["import { resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { blockAttribute, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { blindCast } from \"@internal/utils/casts\";\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst nativeType = ctx.codecLookup?.targetTypesFor(codecId)?.[0];\n\t\tif (nativeType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst codec = ctx.codecLookup?.get(codecId);\n\t\tif (codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" resolves in targetTypesFor but is absent from codecLookup.get`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst seenValues = /* @__PURE__ */ new Set();\n\t\tconst members = [];\n\t\tlet memberError = false;\n\t\tfor (const [memberName, paramValue] of Object.entries(block.parameters)) {\n\t\t\tlet value;\n\t\t\tif (paramValue.kind === \"bare\") try {\n\t\t\t\tvalue = codec.decodeJson(memberName);\n\t\t\t} catch {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC\",\n\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" has no value and codec \"${codecId}\" does not accept a bare name as input`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (paramValue.kind === \"value\") {\n\t\t\t\tlet jsonValue;\n\t\t\t\ttry {\n\t\t\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t\t\t} catch {\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" value \"${paramValue.raw}\" is not valid JSON`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tvalue = codec.decodeJson(blindCast(jsonValue));\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${reason}`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else continue;\n\t\t\tconst valueKey = String(value);\n\t\t\tif (seenValues.has(valueKey)) {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_DUPLICATE_MEMBER_VALUE\",\n\t\t\t\t\tmessage: `enum \"${block.name}\": duplicate member value \"${valueKey}\"`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenValues.add(valueKey);\n\t\t\tmembers.push({\n\t\t\t\tname: memberName,\n\t\t\t\tvalue\n\t\t\t});\n\t\t}\n\t\tif (memberError) return void 0;\n\t\tif (members.length === 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\t\tmessage: `enum \"${block.name}\" must have at least one member`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn enumType(block.name, {\n\t\t\tcodecId,\n\t\t\tnativeType\n\t\t}, ...members.map((m) => ({\n\t\t\tname: m.name,\n\t\t\tvalue: m.value\n\t\t})));\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tparameters: {},\n\tvariadicParameters: true,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst CHARACTER_NATIVE_TYPE = \"character\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\tnativeType: CHARACTER_NATIVE_TYPE,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true,\n\t\tminimum: 1,\n\t\tmaximum: 10485760\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\tnativeType: \"character varying\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\nexport { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringTypes as t };\n\n//# sourceMappingURL=authoring-type-constructors-I_mkqWGC.mjs.map"],"mappings":";;;;;AAIA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,aAAa,eAAe,OAAO,CAAC,GAAG;EAC9D,IAAI,eAAe,KAAK,GAAG;GAC1B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,QAAQ,IAAI,aAAa,IAAI,OAAO;EAC1C,IAAI,UAAU,KAAK,GAAG;GACrB,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,kBAAkB,QAAQ;IACvD;IACA,MAAM;GACP,CAAC;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YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;CACD;AACD;AAGA,MAAM,0BAA0B,EAAE,KAAK,EAAE,QAAQ;CAChD,MAAM;CACN,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;EACT,SAAS;EACT,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY;EACZ,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-BbwkxMMY.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;UAcU;WACC;WACA;WACA;WACA;;KAEN,0BAA0B,YAAY;UACjC;WACC,kBAAkB,cAAc;WAChC,cAAc;WACd,sBAAsB;;UAEvB,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,yBAAyB;;;;;;;;;EAS/L,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,KAAK;aACM,QAAQ;aACR;aACA;aACA;MACP,QAAQ;EACZ,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB;EAC7C,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;;;;cAIzD,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV;aACE;eACE;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;;;aAKR;eACE;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;qBACA;uBACE;yBACE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;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;;;;iBAYzB,0BAA0B,8BAA8B,2BAA2B;WACzF,SAAS;WACT,YAAY;;WAEZ;WACA;aACE;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT,YAAY;aACZ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;eAIN;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;;;;;;cASP,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/timestamp-now-generator-BZnBo7IC.mjs"],"sourcesContent":["//#region src/core/timestamp-now-generator.ts\n/**\n* Canonical id for the wall-clock-now mutation default generator.\n*\n* Owned by `family-sql` because that's where the generator lives. The\n* id flows out from here to (1) the control-plane descriptor and the\n* temporal field-preset pair below, (2) the runtime-plane sibling\n* `timestamp-now-runtime-generator.ts`, and (3) authoring surfaces\n* (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) via\n* the descriptor flow. Co-locating the constant with its only owner\n* keeps the framework layer free of concrete generator ids.\n*/\nconst TIMESTAMP_NOW_GENERATOR_ID = \"timestampNow\";\n/**\n* Builds the canonical control-plane descriptor for the wall-clock-now\n* mutation default generator. The descriptor's `id` and `buildPhases`\n* are target-agnostic so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts.\n*\n* `applicableCodecIds` is omitted: `timestampNow` is preset-only (not\n* reachable via `@default(timestampNow())` lowering), and the codec is\n* co-registered by the preset descriptor itself, so the\n* `@default(...)` compatibility check has no role to play here.\n*/\nfunction timestampNowControlDescriptor() {\n\treturn {\n\t\tid: TIMESTAMP_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\n/**\n* Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair\n* for a SQL target. `createdAt` lowers to a `now()` storage default;\n* `updatedAt` lowers to an execution generator on both `onCreate` and\n* `onUpdate` (RD: \"last modified time\", non-null). Targets supply the\n* codec/native-type pair that matches their timestamp column; everything\n* else is shared so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts across\n* targets by construction.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalAuthoringPresets(input) {\n\tconst { codecId, nativeType } = input;\n\tconst generatorId = input.generatorId ?? \"timestampNow\";\n\treturn {\n\t\tcreatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\tdefault: {\n\t\t\t\t\tkind: \"function\",\n\t\t\t\t\texpression: \"now()\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupdatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\texecutionDefaults: {\n\t\t\t\t\tonCreate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t},\n\t\t\t\t\tonUpdate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: generatorId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction temporalStringAuthoringPresets(input) {\n\tconst presets = /* @__PURE__ */ temporalAuthoringPresets(input);\n\treturn {\n\t\tcreatedAtString: presets.createdAt,\n\t\tupdatedAtString: presets.updatedAt\n\t};\n}\nconst TEMPORAL_PRECISION_ARG = {\n\tname: \"precision\",\n\tkind: \"number\",\n\toptional: true,\n\tinteger: true,\n\tminimum: 0\n};\nconst TEMPORAL_ON_CREATE_ARG = {\n\tname: \"onCreate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\nconst TEMPORAL_ON_UPDATE_ARG = {\n\tname: \"onUpdate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\n/**\n* Selects a generator descriptor for the preset's `now` token. The token is preset vocabulary; the\n* generator id never appears in a user's spelling (ADR 169 — these generators are preset-only).\n*/\nfunction temporalPhaseTemplate(index, generatorId) {\n\treturn {\n\t\tkind: \"select\",\n\t\tindex,\n\t\tcases: { now: {\n\t\t\tkind: \"generator\",\n\t\t\tid: generatorId\n\t\t} }\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec that takes a precision\n* parameter (`pg/timestamp-temporal@1`, `pg/timestamptz-temporal@1`). Arguments change field\n* properties only — never the codec, which the caller fixes here.\n*\n* All three arguments are optional: omitting `precision` omits `typeParams`\n* entirely, and omitting a phase omits that phase (both omitted omits\n* `executionDefaults`).\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPresetWithPrecision(input) {\n\tconst generatorId = input.generatorId ?? \"timestampNow\";\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [\n\t\t\tTEMPORAL_PRECISION_ARG,\n\t\t\tTEMPORAL_ON_CREATE_ARG,\n\t\t\tTEMPORAL_ON_UPDATE_ARG\n\t\t],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} },\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(1, generatorId),\n\t\t\t\tonUpdate: temporalPhaseTemplate(2, generatorId)\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec with no type\n* parameters (`sqlite/datetime@1`). As with the precision-bearing variant,\n* both phase arguments are optional and omitting one omits that phase.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPreset(input) {\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(0, TIMESTAMP_NOW_GENERATOR_ID),\n\t\t\t\tonUpdate: temporalPhaseTemplate(1, TIMESTAMP_NOW_GENERATOR_ID)\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\nexport { temporalStringAuthoringPresets as a, temporalCodecPresetWithPrecision as i, temporalAuthoringPresets as n, timestampNowControlDescriptor as o, temporalCodecPreset as r, TIMESTAMP_NOW_GENERATOR_ID as t };\n\n//# sourceMappingURL=timestamp-now-generator-BZnBo7IC.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,6BAA6B;;;;;;;;;;;;AAYnC,SAAS,gCAAgC;CACxC,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;;;;;;;;;;;;AAYA,SAAS,yBAAyB,OAAO;CACxC,MAAM,EAAE,SAAS,eAAe;CAChC,MAAM,cAAc,MAAM,eAAe;CACzC,OAAO;EACN,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,SAAS;KACR,MAAM;KACN,YAAY;IACb;GACD;EACD;EACA,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,mBAAmB;KAClB,UAAU;MACT,MAAM;MACN,IAAI;KACL;KACA,UAAU;MACT,MAAM;MACN,IAAI;KACL;IACD;GACD;EACD;CACD;AACD;AACA,SAAS,+BAA+B,OAAO;CAC9C,MAAM,UAA0B,yCAAyB,KAAK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