@prisma/orm-family-sql 8.0.0-rc.13-dev.1 → 8.0.0-rc.13-dev.2
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-entity-types-CZ-vdwYS-GsYvzoFF.d.mts +9 -0
- package/dist/authoring-entity-types-CZ-vdwYS-GsYvzoFF.d.mts.map +1 -0
- package/dist/{authoring-type-constructors-C1ogrr_x-BZQc95SF.mjs → authoring-type-constructors-DQZEX4Sb-DORF5BnN.mjs} +32 -39
- package/dist/authoring-type-constructors-DQZEX4Sb-DORF5BnN.mjs.map +1 -0
- package/dist/{contract-builder-3vURlaBN.mjs → contract-builder-BKfGg37_.mjs} +2 -2
- package/dist/{contract-builder-3vURlaBN.mjs.map → contract-builder-BKfGg37_.mjs.map} +1 -1
- package/dist/{contract-builder-Ct1IMc8_.d.mts → contract-builder-j05FWfIe.d.mts} +2 -2
- package/dist/{contract-builder-Ct1IMc8_.d.mts.map → contract-builder-j05FWfIe.d.mts.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +53 -26
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -3
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +1 -1
- package/dist/contract-ts.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract-ts__contract-builder.mjs +1 -1
- package/dist/contract.d.mts +2 -2
- package/dist/contract.mjs +2 -2
- package/dist/contract__entity-handle-lowering-hook.d.mts +2 -2
- package/dist/contract__entity-handle-lowering-hook.mjs +2 -2
- package/dist/{control-BcWypsQy.mjs → control-DUrW46cS.mjs} +5 -5
- package/dist/{control-BcWypsQy.mjs.map → control-DUrW46cS.mjs.map} +1 -1
- package/dist/{control-BKwzdenn.d.mts → control-VctoviCf.d.mts} +12 -12
- package/dist/control-VctoviCf.d.mts.map +1 -0
- package/dist/diff-B16bL_IR.mjs.map +1 -1
- package/dist/{entity-handle-lowering-hook-CIvRKBfa.d.mts → entity-handle-lowering-hook-93syhZ0p.d.mts} +7 -10
- package/dist/{entity-handle-lowering-hook-CIvRKBfa.d.mts.map → entity-handle-lowering-hook-93syhZ0p.d.mts.map} +1 -1
- package/dist/{entity-handle-lowering-hook-DwLIKNiS.mjs → entity-handle-lowering-hook-B3atrRKX.mjs} +7 -2
- package/dist/entity-handle-lowering-hook-B3atrRKX.mjs.map +1 -0
- package/dist/family.d.mts +2 -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__diff.mjs +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__pack.d.mts +2 -323
- package/dist/family__pack.mjs +2 -2
- package/dist/family__pack.mjs.map +1 -1
- package/dist/{interpreter-BrW0_y8Q-ChkFlzaN.mjs → interpreter-BMMGMTBa-CT5iKl13.mjs} +102 -142
- package/dist/interpreter-BMMGMTBa-CT5iKl13.mjs.map +1 -0
- package/dist/ir-I-xciGUH.mjs.map +1 -1
- package/dist/pack-CUGnCaEh.d.mts +323 -0
- package/dist/pack-CUGnCaEh.d.mts.map +1 -0
- package/dist/{schema-verify-CrvQZ5V8-BfrNHJbX.mjs → schema-verify-DI0aJQ9d-D5SmSZg3.mjs} +2 -2
- package/dist/{schema-verify-CrvQZ5V8-BfrNHJbX.mjs.map → schema-verify-DI0aJQ9d-D5SmSZg3.mjs.map} +1 -1
- package/dist/{sql-attribute-specs-DH3Yxb21-CZV-L28L.mjs → sql-attribute-specs-4YqT9Gt_-DkPyYEaE.mjs} +12 -3
- package/dist/sql-attribute-specs-4YqT9Gt_-DkPyYEaE.mjs.map +1 -0
- package/dist/{sql-contract-serializer-0a4k494z-tI6ajwvm.mjs → sql-contract-serializer-C90xg7_q-A3_F0w7f.mjs} +2 -2
- package/dist/{sql-contract-serializer-0a4k494z-tI6ajwvm.mjs.map → sql-contract-serializer-C90xg7_q-A3_F0w7f.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/authoring-type-constructors-C1ogrr_x-BZQc95SF.mjs.map +0 -1
- package/dist/control-BKwzdenn.d.mts.map +0 -1
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs.map +0 -1
- package/dist/family__pack.d.mts.map +0 -1
- package/dist/interpreter-BrW0_y8Q-ChkFlzaN.mjs.map +0 -1
- package/dist/sql-attribute-specs-DH3Yxb21-CZV-L28L.mjs.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./contract-builder-j05FWfIe.mjs";
|
|
2
|
+
import "@prisma/orm-framework/components/authoring";
|
|
3
|
+
import "@prisma/orm-framework/psl-parser";
|
|
4
|
+
//#region ../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts
|
|
5
|
+
//#region src/core/authoring-entity-types.d.ts
|
|
6
|
+
declare function sqlFamilyEnumSpec(): import("@prisma/orm-framework/psl-parser").MapBlockSpec<Record<string, import("@prisma/orm-framework/contract/types").JsonValue | undefined>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { sqlFamilyEnumSpec as t };
|
|
9
|
+
//# sourceMappingURL=authoring-entity-types-CZ-vdwYS-GsYvzoFF.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-entity-types-CZ-vdwYS-GsYvzoFF.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts"],"mappings":";;;;;iBAIiB,oDAAoD,aAAa,kDAAkD"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import { s as enumType } from "./contract-builder-
|
|
1
|
+
import { s as enumType } from "./contract-builder-BKfGg37_.mjs";
|
|
2
2
|
import { resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { blockAttribute, jsonValue, mapBlock, str } from "@prisma/orm-framework/psl-parser";
|
|
4
|
+
//#region ../../../2-sql/9-family/dist/authoring-type-constructors-DQZEX4Sb.mjs
|
|
5
|
+
function sqlFamilyEnumSpec() {
|
|
6
|
+
return mapBlock({
|
|
7
|
+
value: {
|
|
8
|
+
type: jsonValue(),
|
|
9
|
+
documentation: "The stored member value; a bare member stores its own name."
|
|
10
|
+
},
|
|
11
|
+
allowBare: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
6
14
|
const sqlFamilyEntityTypes = { enum: {
|
|
7
15
|
kind: "entity",
|
|
8
16
|
discriminator: "enum",
|
|
@@ -35,55 +43,41 @@ const sqlFamilyEntityTypes = { enum: {
|
|
|
35
43
|
const seenValues = /* @__PURE__ */ new Set();
|
|
36
44
|
const members = [];
|
|
37
45
|
let memberError = false;
|
|
38
|
-
for (const [memberName,
|
|
46
|
+
for (const [memberName, memberValue] of Object.entries(block.values)) {
|
|
47
|
+
const span = block.parameterSpans[memberName] ?? block.span;
|
|
39
48
|
let value;
|
|
40
|
-
if (
|
|
49
|
+
if (memberValue === void 0) try {
|
|
41
50
|
value = codec.decodeJson(memberName);
|
|
42
51
|
} catch {
|
|
43
52
|
diagnostics?.push({
|
|
44
53
|
code: "PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC",
|
|
45
54
|
message: `enum "${block.name}" member "${memberName}" has no value and codec "${codecId}" does not accept a bare name as input`,
|
|
46
55
|
sourceId,
|
|
47
|
-
span
|
|
56
|
+
span
|
|
57
|
+
});
|
|
58
|
+
memberError = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
else try {
|
|
62
|
+
value = codec.decodeJson(memberValue);
|
|
63
|
+
} catch (err) {
|
|
64
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
65
|
+
diagnostics?.push({
|
|
66
|
+
code: "PSL_EXTENSION_INVALID_VALUE",
|
|
67
|
+
message: `enum "${block.name}" member "${memberName}" was rejected by codec "${codecId}": ${reason}`,
|
|
68
|
+
sourceId,
|
|
69
|
+
span
|
|
48
70
|
});
|
|
49
71
|
memberError = true;
|
|
50
72
|
continue;
|
|
51
73
|
}
|
|
52
|
-
else if (paramValue.kind === "value") {
|
|
53
|
-
let jsonValue;
|
|
54
|
-
try {
|
|
55
|
-
jsonValue = JSON.parse(paramValue.raw);
|
|
56
|
-
} catch {
|
|
57
|
-
diagnostics?.push({
|
|
58
|
-
code: "PSL_EXTENSION_INVALID_VALUE",
|
|
59
|
-
message: `enum "${block.name}" member "${memberName}" value "${paramValue.raw}" is not valid JSON`,
|
|
60
|
-
sourceId,
|
|
61
|
-
span: paramValue.span
|
|
62
|
-
});
|
|
63
|
-
memberError = true;
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
value = codec.decodeJson(blindCast(jsonValue));
|
|
68
|
-
} catch (err) {
|
|
69
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
70
|
-
diagnostics?.push({
|
|
71
|
-
code: "PSL_EXTENSION_INVALID_VALUE",
|
|
72
|
-
message: `enum "${block.name}" member "${memberName}" was rejected by codec "${codecId}": ${reason}`,
|
|
73
|
-
sourceId,
|
|
74
|
-
span: paramValue.span
|
|
75
|
-
});
|
|
76
|
-
memberError = true;
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
} else continue;
|
|
80
74
|
const valueKey = String(value);
|
|
81
75
|
if (seenValues.has(valueKey)) {
|
|
82
76
|
diagnostics?.push({
|
|
83
77
|
code: "PSL_ENUM_DUPLICATE_MEMBER_VALUE",
|
|
84
78
|
message: `enum "${block.name}": duplicate member value "${valueKey}"`,
|
|
85
79
|
sourceId,
|
|
86
|
-
span
|
|
80
|
+
span
|
|
87
81
|
});
|
|
88
82
|
memberError = true;
|
|
89
83
|
continue;
|
|
@@ -127,8 +121,7 @@ const sqlFamilyPslBlockDescriptors = { enum: {
|
|
|
127
121
|
documentation: "Defines an enum with named values and an inferred or explicitly selected storage codec.",
|
|
128
122
|
discriminator: "enum",
|
|
129
123
|
name: { required: true },
|
|
130
|
-
|
|
131
|
-
variadicParameters: true,
|
|
124
|
+
spec: sqlFamilyEnumSpec,
|
|
132
125
|
attributes: { type: () => enumTypeBlockAttribute }
|
|
133
126
|
} };
|
|
134
127
|
/**
|
|
@@ -325,4 +318,4 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
|
|
|
325
318
|
//#endregion
|
|
326
319
|
export { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringFieldPresets as t };
|
|
327
320
|
|
|
328
|
-
//# sourceMappingURL=authoring-type-constructors-
|
|
321
|
+
//# sourceMappingURL=authoring-type-constructors-DQZEX4Sb-DORF5BnN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-type-constructors-DQZEX4Sb-DORF5BnN.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-DQZEX4Sb.mjs"],"sourcesContent":["import { resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { blockAttribute, jsonValue, mapBlock, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\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, memberValue] of Object.entries(block.values)) {\n\t\t\tconst span = block.parameterSpans[memberName] ?? block.span;\n\t\t\tlet value;\n\t\t\tif (memberValue === void 0) 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\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse try {\n\t\t\t\tvalue = codec.decodeJson(memberValue);\n\t\t\t} catch (err) {\n\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${reason}`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\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\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\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\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\tdocumentation: \"Variable-length text with a required maximum character length.\",\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-DQZEX4Sb.mjs.map"],"mappings":";;;;AAIA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,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;GACD;EACD;EACA,MAAM,6BA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AAY;EACZ,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as providesEntityHandleLowering } from "./entity-handle-lowering-hook-
|
|
1
|
+
import { t as providesEntityHandleLowering } from "./entity-handle-lowering-hook-B3atrRKX.mjs";
|
|
2
2
|
import { d as toStorageTypeInstance } from "./types-D0B65hip.mjs";
|
|
3
3
|
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-DecqO0rE.mjs";
|
|
4
4
|
import { i as toOneNullabilityContradictionMessage, n as buildSqlContractFromDefinition, r as contractError } from "./derived-checks-Bsrdb2Wk-D4UfM06W.mjs";
|
|
@@ -1686,4 +1686,4 @@ function sql(strings, ...values) {
|
|
|
1686
1686
|
//#endregion
|
|
1687
1687
|
export { check as a, extensionModel as c, model as d, now as f, buildContractDefinition as i, field as l, sql as m, bindEnumType as n, defineContract as o, rel as p, buildBoundContract as r, enumType as s, autoincrement as t, member as u };
|
|
1688
1688
|
|
|
1689
|
-
//# sourceMappingURL=contract-builder-
|
|
1689
|
+
//# sourceMappingURL=contract-builder-BKfGg37_.mjs.map
|