@prisma/orm-framework 8.0.0-rc.22-dev.14 → 8.0.0-rc.23
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-CcfXu8Dz.mjs → authoring-DnYn5EZT.mjs} +4 -4
- package/dist/{authoring-CcfXu8Dz.mjs.map → authoring-DnYn5EZT.mjs.map} +1 -1
- package/dist/{codec-descriptor-BNc32mKN-mmex2e4w.mjs → codec-descriptor-CPSGZunM-DxrbRHX1.mjs} +3 -5
- package/dist/codec-descriptor-CPSGZunM-DxrbRHX1.mjs.map +1 -0
- package/dist/{codec-CL-KdP7y.mjs → codec-yFwW7XRh.mjs} +3 -3
- package/dist/{codec-CL-KdP7y.mjs.map → codec-yFwW7XRh.mjs.map} +1 -1
- package/dist/{components-BTHe5Y0g.mjs → components-BaV9iCkq.mjs} +2 -2
- package/dist/{components-BTHe5Y0g.mjs.map → components-BaV9iCkq.mjs.map} +1 -1
- package/dist/components.mjs +8 -8
- package/dist/components__authoring.mjs +2 -2
- package/dist/components__codec.mjs +3 -3
- package/dist/components__components.mjs +1 -1
- package/dist/components__control.mjs +2 -2
- package/dist/components__execution.mjs +1 -1
- package/dist/contract-authoring.mjs +3 -3
- package/dist/{control-CwUsQQ-8.mjs → control-DzRwUDn-.mjs} +3 -5
- package/dist/control-DzRwUDn-.mjs.map +1 -0
- package/dist/{control-MllEQmML-BtyADFtB.mjs → control-MllEQmML-7F84gYuT.mjs} +2 -2
- package/dist/{control-MllEQmML-BtyADFtB.mjs.map → control-MllEQmML-7F84gYuT.mjs.map} +1 -1
- package/dist/{data-type-DPsP4_9m-BRPJX_-z.mjs → data-type-V6mcDhcG-DVQAPOQT.mjs} +3 -8
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs.map +1 -0
- package/dist/{declarations-BgUAq1RG-DvmyJ8LS.mjs → declarations-BgUAq1RG-1LikMIfo.mjs} +2 -2
- package/dist/{declarations-BgUAq1RG-DvmyJ8LS.mjs.map → declarations-BgUAq1RG-1LikMIfo.mjs.map} +1 -1
- package/dist/errors.mjs +3 -3
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/errors__migration.mjs +1 -1
- package/dist/{execution-DcIdFSAR.mjs → execution-DJDqCoRU.mjs} +1 -3
- package/dist/execution-DJDqCoRU.mjs.map +1 -0
- package/dist/{execution-DuM7OvTJ.mjs → execution-Dv2tEKdY.mjs} +2 -2
- package/dist/{execution-DuM7OvTJ.mjs.map → execution-Dv2tEKdY.mjs.map} +1 -1
- package/dist/{expressions-CMQzbnHk-B7zBWJ0c.mjs → expressions-CMQzbnHk-DUoL8DKO.mjs} +2 -2
- package/dist/{expressions-CMQzbnHk-B7zBWJ0c.mjs.map → expressions-CMQzbnHk-DUoL8DKO.mjs.map} +1 -1
- package/dist/{migration-e3jmn5gt.mjs → migration-DyafDAAZ.mjs} +2 -2
- package/dist/{migration-e3jmn5gt.mjs.map → migration-DyafDAAZ.mjs.map} +1 -1
- package/dist/{parse-bZgfjovA-Vk8LMIu5.mjs → parse-bZgfjovA-Duxv-s-s.mjs} +3 -3
- package/dist/{parse-bZgfjovA-Vk8LMIu5.mjs.map → parse-bZgfjovA-Duxv-s-s.mjs.map} +1 -1
- package/dist/psl-parser.mjs +5 -5
- package/dist/psl-parser__format.mjs +3 -3
- package/dist/psl-parser__interpret.mjs +2 -2
- package/dist/psl-parser__syntax.mjs +3 -3
- package/dist/psl-printer.mjs +1 -1
- package/dist/{temporal-type-aliases-BI3SL5iB-DIP8j4Gv.mjs → temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs} +3 -3
- package/dist/{temporal-type-aliases-BI3SL5iB-DIP8j4Gv.mjs.map → temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs.map} +1 -1
- package/dist/{type-constructor-calls-Bfg5ojed-DYHnzC9z.mjs → type-constructor-calls-Bfg5ojed-DwjW6zNQ.mjs} +5 -5
- package/dist/{type-constructor-calls-Bfg5ojed-DYHnzC9z.mjs.map → type-constructor-calls-Bfg5ojed-DwjW6zNQ.mjs.map} +1 -1
- package/package.json +16 -16
- package/dist/codec-descriptor-BNc32mKN-mmex2e4w.mjs.map +0 -1
- package/dist/control-CwUsQQ-8.mjs.map +0 -1
- package/dist/data-type-DPsP4_9m-BRPJX_-z.mjs.map +0 -1
- package/dist/execution-DcIdFSAR.mjs.map +0 -1
- package/dist/framework-copies-DeDyytAc-CK9tduQ6.mjs +0 -121
- package/dist/framework-copies-DeDyytAc-CK9tduQ6.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-CL-KdP7y.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { C as readJsonInteger, D as refuseJsonValue, E as readJsonString, O as DATA_TYPE_ID_PATTERN, S as readJsonFloat, T as readJsonMatching, _ as SAFE_INTEGER_RANGE, a as dataTypeId, b as isNonFiniteText, c as dataTypeValuesEqual, d as requiredParamKeys, f as requiredSchemaKeys, g as SAFE_INTEGER_BIGINT_RANGE, h as INT64_RANGE, i as dataType, l as objectSchemaKeys, m as INT32_RANGE, n as assertDataTypeParams, o as dataTypeParams, p as schemaKeysAllowing, r as createDataTypeLookup, s as dataTypeParamsProblem, t as assembleDataTypes, u as requireValueOf, v as floatToJson, w as readJsonIntegerText, x as readJsonBoolean, y as isIntegerIn } from \"./data-type-DPsP4_9m.mjs\";\nimport { a as readContractValue, i as CodecImpl, n as CodecDescriptorTemplateImpl, o as numeralText, r as enumRefusalOf, t as CodecDescriptorImpl } from \"./codec-descriptor-BNc32mKN.mjs\";\nimport { t as emptyCodecLookup } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { a as resolveCodecDescriptorOrThrow, i as materializeCodec, o as validateCodecTypeParams, r as codecForRef, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-qqMjZrmn.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { tsStringLiteral } from \"@internal/ts-render\";\n//#region src/shared/casts.ts\n/** A cast between two types that store the same shape: the value is already the form this type stores. */\nconst castUnchanged = (value) => value;\n/** Refuses a value that is not in the shape the cast's source type stores. */\nfunction refuseWrongShape(value, expected) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `Expected ${expected}, got ${JSON.stringify(value)}.`, {\n\t\twhy: \"A cast reads the stored form of the type it takes values of.\",\n\t\tfix: \"Hand the cast a value in the shape its source type stores.\"\n\t});\n}\n/** A whole number as the digit text a 64-bit integer or decimal type stores. */\nconst asNumeralText = (value) => typeof value === \"number\" ? numeralText(value) : refuseWrongShape(value, \"a number\");\n/**\n* A number as the floating-point types store it: a JSON number, or one of the three words, which\n* those types keep as text. A magnitude past what a double holds is refused rather than rounded to\n* a word: the database refuses it too, and storing `Infinity` would make a written number\n* indistinguishable from a written `Infinity`.\n*/\nconst asFloat = (value) => {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value !== \"string\") return refuseWrongShape(value, \"a number or numeral text\");\n\tif (isNonFiniteText(value)) return value;\n\tconst converted = Number(value);\n\tif (Number.isFinite(converted)) return converted;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `${value} is out of range: no double holds a number that large.`, {\n\t\twhy: \"The floating-point types store a double, which holds magnitudes up to about 1.8e308.\",\n\t\tfix: \"Use a number a double holds, or a decimal type.\"\n\t});\n};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*/\nfunction column(codecFactory, codecId, typeParams) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams\n\t};\n}\n//#endregion\n//#region src/shared/date-time-stored-form.ts\n/**\n* The reader targets build the stored form of each date and time type with; ADR 254\n* states the forms and the text it reads.\n*/\nconst SHAPES = {\n\tdate: {\n\t\tdescription: \"a date\",\n\t\tplural: \"dates\",\n\t\texample: \"2024-01-01\",\n\t\tdate: true,\n\t\ttime: false,\n\t\toffset: false\n\t},\n\ttime: {\n\t\tdescription: \"a time of day\",\n\t\tplural: \"times of day\",\n\t\texample: \"12:34:56\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\ttimeWithOffset: {\n\t\tdescription: \"a time of day with a UTC offset\",\n\t\tplural: \"times of day with a UTC offset\",\n\t\texample: \"12:34:56+02:00\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: true\n\t},\n\tdateTime: {\n\t\tdescription: \"a date and time\",\n\t\tplural: \"dates and times\",\n\t\texample: \"2024-01-01T12:34:56\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\tinstant: {\n\t\tdescription: \"a date and time with a UTC offset\",\n\t\tplural: \"instants\",\n\t\texample: \"2024-01-01T12:34:56Z\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: true\n\t}\n};\nconst DATE_PREFIX = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})/;\nconst TIME_PREFIX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?/;\nconst OFFSET = /^([+-])(\\d{2})(?::(\\d{2})(?::(\\d{2}))?)?$/;\nconst MAX_FRACTION_DIGITS = 6;\nconst FRACTION_UNITS = {\n\t3: \"milliseconds\",\n\t6: \"microseconds\"\n};\nconst SECONDS_PER_DAY = 86400;\nconst MIDNIGHT = {\n\thour: 0,\n\tminute: 0,\n\tsecond: 0,\n\tfraction: \"\"\n};\nfunction refused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"A date or time type stores one form for each value (ADR 254).\",\n\t\tfix: \"Write text the type holds, as the message shows.\"\n\t});\n}\nfunction isLeapYear(year) {\n\treturn year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nfunction daysInMonth(year, month) {\n\tif (month === 2) return isLeapYear(year) ? 29 : 28;\n\treturn [\n\t\t4,\n\t\t6,\n\t\t9,\n\t\t11\n\t].includes(month) ? 30 : 31;\n}\n/** Days from 1970-01-01 to a date of the proleptic Gregorian calendar, with year 0 as 1 BC. */\nfunction daysFromCivil({ year, month, day }) {\n\tconst shifted = month <= 2 ? year - 1 : year;\n\tconst era = Math.floor(shifted / 400);\n\tconst yearOfEra = shifted - era * 400;\n\tconst dayOfYear = Math.floor((153 * (month + (month > 2 ? -3 : 9)) + 2) / 5) + day - 1;\n\tconst dayOfEra = yearOfEra * 365 + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100) + dayOfYear;\n\treturn era * 146097 + dayOfEra - 719468;\n}\nfunction civilFromDays(days) {\n\tconst shifted = days + 719468;\n\tconst era = Math.floor(shifted / 146097);\n\tconst dayOfEra = shifted - era * 146097;\n\tconst yearOfEra = Math.floor((dayOfEra - Math.floor(dayOfEra / 1460) + Math.floor(dayOfEra / 36524) - Math.floor(dayOfEra / 146096)) / 365);\n\tconst dayOfYear = dayOfEra - (365 * yearOfEra + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100));\n\tconst monthIndex = Math.floor((5 * dayOfYear + 2) / 153);\n\tconst day = dayOfYear - Math.floor((153 * monthIndex + 2) / 5) + 1;\n\tconst month = monthIndex < 10 ? monthIndex + 3 : monthIndex - 9;\n\treturn {\n\t\tyear: yearOfEra + era * 400 + (month <= 2 ? 1 : 0),\n\t\tmonth,\n\t\tday\n\t};\n}\nfunction pad(value, width = 2) {\n\treturn String(value).padStart(width, \"0\");\n}\nfunction yearText(year) {\n\tif (year >= 0 && year <= 9999) return pad(year, 4);\n\treturn `${year < 0 ? \"-\" : \"+\"}${pad(Math.abs(year), 6)}`;\n}\nfunction dateText(date) {\n\treturn `${yearText(date.year)}-${pad(date.month)}-${pad(date.day)}`;\n}\nfunction timeText(time) {\n\tconst fraction = time.fraction.replace(/0+$/, \"\");\n\treturn `${pad(time.hour)}:${pad(time.minute)}:${pad(time.second)}${fraction === \"\" ? \"\" : `.${fraction}`}`;\n}\nfunction offsetText(seconds) {\n\tif (seconds === 0) return \"Z\";\n\tconst magnitude = Math.abs(seconds);\n\tconst rest = magnitude % 60;\n\treturn `${seconds < 0 ? \"-\" : \"+\"}${pad(Math.floor(magnitude / 3600))}:${pad(Math.floor(magnitude / 60) % 60)}${rest === 0 ? \"\" : `:${pad(rest)}`}`;\n}\n/**\n* The fields of an ISO 8601 date, time, or date and time, or `undefined` when the text is not one.\n* Ranges are checked by the caller, which words the refusal.\n*/\nfunction readWritten(text) {\n\tlet rest = text;\n\tlet date;\n\tlet timeFollows = true;\n\tconst dateMatch = DATE_PREFIX.exec(rest);\n\tif (dateMatch !== null) {\n\t\tconst [whole, yearDigits = \"\", month = \"\", day = \"\"] = dateMatch;\n\t\tif (yearDigits === \"-000000\") return void 0;\n\t\tdate = {\n\t\t\tyear: Number(yearDigits),\n\t\t\tmonth: Number(month),\n\t\t\tday: Number(day)\n\t\t};\n\t\trest = rest.slice(whole.length);\n\t\ttimeFollows = /^[Tt ]/.test(rest);\n\t\tif (timeFollows) rest = rest.slice(1);\n\t}\n\tlet time;\n\tlet fractionDigits = 0;\n\tif (timeFollows) {\n\t\tconst timeMatch = TIME_PREFIX.exec(rest);\n\t\tif (timeMatch === null) return void 0;\n\t\tconst [whole, hour = \"\", minute = \"\", second = \"00\", fraction = \"\"] = timeMatch;\n\t\ttime = {\n\t\t\thour: Number(hour),\n\t\t\tminute: Number(minute),\n\t\t\tsecond: Number(second),\n\t\t\tfraction\n\t\t};\n\t\tfractionDigits = fraction.length;\n\t\trest = rest.slice(whole.length);\n\t}\n\tlet offsetSeconds;\n\tif (rest === \"Z\" || rest === \"z\") offsetSeconds = 0;\n\telse if (rest !== \"\") {\n\t\tconst offset = OFFSET.exec(rest);\n\t\tif (offset === null) return void 0;\n\t\tconst [, sign, hours = \"\", minutes = \"00\", seconds = \"00\"] = offset;\n\t\tif (Number(minutes) > 59 || Number(seconds) > 59) return void 0;\n\t\tconst magnitude = Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds);\n\t\toffsetSeconds = sign === \"-\" ? -magnitude : magnitude;\n\t}\n\treturn {\n\t\tdate,\n\t\ttime,\n\t\toffsetSeconds,\n\t\tfractionDigits\n\t};\n}\nfunction withFraction(example, digits) {\n\treturn example.replace(/(\\d{2}:\\d{2}:\\d{2})/, `$1.${\"123456\".slice(0, digits)}`);\n}\n/** The value with an instant moved to UTC. */\nfunction normalized(written, shape) {\n\tconst clock = written.time ?? MIDNIGHT;\n\tconst offsetSeconds = written.offsetSeconds ?? 0;\n\tif (written.date === void 0 || shape !== \"instant\") return {\n\t\tdate: written.date,\n\t\ttime: clock,\n\t\toffsetSeconds\n\t};\n\tconst utc = daysFromCivil(written.date) * SECONDS_PER_DAY + clock.hour * 3600 + clock.minute * 60 + clock.second - offsetSeconds;\n\tconst days = Math.floor(utc / SECONDS_PER_DAY);\n\tconst secondOfDay = utc - days * SECONDS_PER_DAY;\n\treturn {\n\t\tdate: civilFromDays(days),\n\t\ttime: {\n\t\t\thour: Math.floor(secondOfDay / 3600),\n\t\t\tminute: Math.floor(secondOfDay / 60) % 60,\n\t\t\tsecond: secondOfDay % 60,\n\t\t\tfraction: clock.fraction\n\t\t},\n\t\toffsetSeconds: 0\n\t};\n}\nfunction position(value) {\n\tconst { time } = value;\n\treturn [\n\t\tvalue.date === void 0 ? 0 : daysFromCivil(value.date),\n\t\ttime.hour * 3600 + time.minute * 60 + time.second,\n\t\ttime.fraction.padEnd(MAX_FRACTION_DIGITS, \"0\")\n\t];\n}\nfunction isBefore(left, right) {\n\tif (left[0] !== right[0]) return left[0] < right[0];\n\tif (left[1] !== right[1]) return left[1] < right[1];\n\treturn left[2] < right[2];\n}\nfunction printed(value, shape) {\n\tconst { date, time, offsetSeconds } = value;\n\tif (date === void 0) return shape === \"timeWithOffset\" ? `${timeText(time)}${offsetText(offsetSeconds)}` : timeText(time);\n\tif (shape === \"date\") return dateText(date);\n\tif (shape === \"dateTime\") return `${dateText(date)}T${timeText(time)}`;\n\treturn `${dateText(date)}T${timeText(time)}Z`;\n}\n/** The position of a range bound, which the data type declares in stored form. */\nfunction boundPosition(text, shape) {\n\tconst written = readWritten(text);\n\tif (written === void 0) throw new InternalError(`The range bound \"${text}\" is not in its stored form.`);\n\treturn position(normalized(written, shape));\n}\n/**\n* The stored form of written date or time text, or a refusal with a message that says what is\n* wrong and shows text the type holds. `written` is the text as its author wrote it, which the\n* message shows, when a target rewrote it into ISO 8601 before calling this.\n*/\nfunction dateTimeStoredText(text, options, written = text) {\n\tconst shape = SHAPES[options.shape];\n\tconst { ownerId: id } = options;\n\tconst parts = readWritten(text);\n\tif (parts === void 0) refused(`${id} cannot read \"${written}\". Write ${shape.description}, as in \"${shape.example}\".`);\n\tif (parts.date !== void 0 && !shape.date) refused(`${id} holds a time of day without a date, but \"${written}\" has a date. Write the time alone, as in \"${shape.example}\".`);\n\tif (parts.date === void 0 && shape.date) refused(shape.time ? `${id} holds ${shape.description}, but \"${written}\" has no date. Write the date too, as in \"${shape.example}\".` : `${id} holds a date, and \"${written}\" is a time of day. Write a date, as in \"${shape.example}\".`);\n\tif (parts.time !== void 0 && !shape.time) refused(`${id} holds a date without a time of day, but \"${written}\" has a time. Write the date alone, as in \"${shape.example}\".`);\n\tif (parts.time === void 0 && shape.offset) refused(`${id} holds ${shape.description}, but \"${written}\" has no time of day. Write the time too, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds !== void 0 && !shape.offset) refused(`${id} holds no UTC offset, but \"${written}\" has one. Leave it out, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds === void 0 && shape.offset) refused(`${id} needs a UTC offset, but \"${written}\" has none. Add Z for UTC or an offset such as +02:00, as in \"${shape.example}\".`);\n\tconst maxFractionDigits = options.maxFractionDigits ?? MAX_FRACTION_DIGITS;\n\tif (parts.fractionDigits > maxFractionDigits) refused(`\"${written}\" has ${parts.fractionDigits} digits after the decimal point, but ${id} holds ${FRACTION_UNITS[maxFractionDigits]}, so at most ${maxFractionDigits}. Round it, as in \"${withFraction(shape.example, maxFractionDigits)}\".`);\n\tconst { date, time } = parts;\n\tif (date !== void 0 && (date.month < 1 || date.month > 12 || date.day < 1 || date.day > daysInMonth(date.year, date.month))) refused(`\"${written}\" is not a date that exists. Write a real date, as in \"${shape.example}\".`);\n\tif (time !== void 0 && (time.hour > 23 || time.minute > 59 || time.second > 59)) refused(`\"${written}\" is not a time of day that exists: hours run from 00 to 23, and minutes and seconds from 00 to 59. Write one, as in \"${shape.example}\".`);\n\tconst offsetLimit = options.maxOffsetHours ?? 23;\n\tif (parts.offsetSeconds !== void 0 && Math.abs(parts.offsetSeconds) >= (offsetLimit + 1) * 3600) refused(`\"${written}\" has a UTC offset outside -${pad(offsetLimit)}:59 to +${pad(offsetLimit)}:59, which ${id} does not hold. Write a smaller offset, as in \"${shape.example}\".`);\n\tconst value = normalized(parts, options.shape);\n\tconst { range } = options;\n\tif (range !== void 0) {\n\t\tconst at = position(value);\n\t\tif (isBefore(at, boundPosition(range.earliest, options.shape)) || isBefore(boundPosition(range.latest, options.shape), at)) refused(`${id} holds ${shape.plural} from ${range.earliest} to ${range.latest}, and \"${written}\" is outside them.`);\n\t}\n\treturn printed(value, options.shape);\n}\nconst ISO_DATE_STRING_FRACTION = /^(.*:\\d{2})(?:\\.(\\d{1,3}))?Z$/;\n/**\n* The instant in UTC with exactly three fraction digits, the text `Date.prototype.toISOString()` writes, from ISO 8601 text with a UTC offset. The range and the millisecond precision are those of a JavaScript `Date`. Throws `CONTRACT.CAST_REFUSED`, naming `ownerId`, for text that names no instant a `Date` holds.\n*/\nfunction isoDateStringText(text, ownerId) {\n\tconst stored = dateTimeStoredText(text, {\n\t\tshape: \"instant\",\n\t\townerId,\n\t\tmaxFractionDigits: 3,\n\t\trange: {\n\t\t\tearliest: \"-271821-04-20T00:00:00Z\",\n\t\t\tlatest: \"+275760-09-13T00:00:00Z\"\n\t\t}\n\t});\n\tconst match = ISO_DATE_STRING_FRACTION.exec(stored);\n\treturn match === null ? stored : `${match[1]}.${(match[2] ?? \"\").padEnd(3, \"0\")}Z`;\n}\n//#endregion\n//#region src/shared/decimal-text-equality.ts\nconst DECIMAL_TEXT = /^([+-]?)(\\d*)(?:\\.(\\d*))?$/;\n/**\n* The key two decimal texts share exactly when they are the same number, for a data type that stores a decimal as text and keeps the scale it was written with, as `numeric` stores `0.5` and `0.50`: leading zeros, trailing fraction zeros and the sign of zero do not count. `NaN` and the infinities keep their own keys.\n*/\nfunction decimalTextEqualityKey(json) {\n\tconst text = String(json);\n\tconst match = DECIMAL_TEXT.exec(text);\n\tif (match === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = match;\n\tconst digits = whole.replace(/^0+/, \"\");\n\tconst decimals = fraction.replace(/0+$/, \"\");\n\tif (digits === \"\" && decimals === \"\") return \"0\";\n\tconst magnitude = decimals === \"\" ? digits || \"0\" : `${digits || \"0\"}.${decimals}`;\n\treturn sign === \"-\" ? `-${magnitude}` : magnitude;\n}\n//#endregion\n//#region src/shared/json-text.ts\n/**\n* Read JSON text into the document it holds.\n*\n* `JSON.parse` reads a numeral too large for a double as `Infinity`, and `JSON.stringify` writes\n* that back as `null`, so a document holding one would not be the document stored; it is refused\n* here instead, naming where the number is.\n*/\nfunction parseJsonText(text) {\n\tlet value;\n\ttry {\n\t\tvalue = JSON.parse(text);\n\t} catch (error) {\n\t\tthrow structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", error instanceof Error ? error.message : String(error), {\n\t\t\twhy: \"The text is not a JSON document.\",\n\t\t\tfix: \"Write a JSON document.\"\n\t\t});\n\t}\n\tconst overflowed = nonFiniteNumberIn(value, \"\");\n\tif (overflowed !== void 0) throw structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", `${overflowed.path} is ${overflowed.value}, which JSON cannot write back: the number in the text is outside the range a JSON number holds.`, {\n\t\twhy: \"JSON.parse reads a numeral too large for a double as Infinity, which JSON.stringify writes back as null.\",\n\t\tfix: \"Write a number JSON can hold, or write it as text.\"\n\t});\n\treturn value;\n}\n/** Write a document as the text of a JSON literal. */\nfunction printJsonText(value) {\n\treturn JSON.stringify(value);\n}\nfunction nonFiniteNumberIn(value, path) {\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : {\n\t\tpath: path === \"\" ? \"The value\" : path,\n\t\tvalue\n\t};\n\tif (Array.isArray(value)) {\n\t\tfor (const [index, element] of value.entries()) {\n\t\t\tconst found = nonFiniteNumberIn(element, `${path}[${index}]`);\n\t\t\tif (found !== void 0) return found;\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof value === \"object\" && value !== null) for (const [key, member] of Object.entries(value)) {\n\t\tconst found = nonFiniteNumberIn(member, path === \"\" ? key : `${path}.${key}`);\n\t\tif (found !== void 0) return found;\n\t}\n}\n//#endregion\n//#region src/shared/number-classifier.ts\nconst WRITTEN_INTEGER_TEXT = /^[+-]?\\d+$/;\nconst WRITTEN_DECIMAL_TEXT = /^[+-]?\\d+\\.\\d+$/;\nconst DECIMAL_NUMERAL = /^([+-]?)0*(\\d+)(\\.\\d+)?$/;\n/** Whether `text` is a whole number or a decimal as a contract source writes one. */\nfunction isNumeralText(text) {\n\treturn WRITTEN_INTEGER_TEXT.test(text) || WRITTEN_DECIMAL_TEXT.test(text);\n}\n/**\n* A written numeral as the contract stores it. Leading zeros and the sign of zero never change a\n* number, so they go; trailing zeros stay, because a type without a scale keeps them.\n*/\nfunction storedNumeralText(text) {\n\tconst numeral = DECIMAL_NUMERAL.exec(text);\n\tif (numeral === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = numeral;\n\tconst digits = `${whole}${fraction}`;\n\treturn sign !== \"-\" || /^[0.]+$/.test(digits) ? digits : `-${digits}`;\n}\n/** The range of a signed integer of `bits` bits. */\nfunction signedRange(bits) {\n\tconst half = 2n ** (BigInt(bits) - 1n);\n\treturn {\n\t\tmin: -half,\n\t\tmax: half - 1n\n\t};\n}\n/**\n* The classifier one target's plain-number authoring entry carries: it reads the digits and says\n* which of the target's types the value is, in that type's stored form. `undefined` means no\n* type of this target holds the number.\n*/\nfunction createNumberClassifier(spec) {\n\tconst as = (classification, value) => classification === void 0 ? void 0 : {\n\t\ttype: classification.type,\n\t\tvalue\n\t};\n\treturn (text) => {\n\t\tif (isNonFiniteText(text)) return as(spec.words, spec.words?.form === \"number\" ? Number(text) : text);\n\t\tif (WRITTEN_DECIMAL_TEXT.test(text)) {\n\t\t\tconst canonical = storedNumeralText(text);\n\t\t\treturn as(spec.fraction, spec.fraction?.form === \"number\" ? Number(canonical) : canonical);\n\t\t}\n\t\tif (!WRITTEN_INTEGER_TEXT.test(text)) return void 0;\n\t\tconst digits = BigInt(text);\n\t\tconst classification = spec.integers.find(({ min, max }) => digits >= min && digits <= max) ?? spec.largerWhole;\n\t\treturn as(classification, classification?.form === \"number\" ? Number(digits) : digits.toString());\n\t};\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a stored value as a TypeScript literal (e.g. `\"low\"`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for codecs whose application value is the stored JSON** (text, int, float, bool). A\n* codec whose application value differs from the stored JSON (e.g. digit text read as a `bigint`)\n* must NOT use this: it renders the application value in its own `renderValueLiteral`.\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** Renders decimal integer text, read as a `number`, as a number literal, or `undefined` for any other value. */\nfunction decimalTextNumberLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\n}\n/** Renders decimal integer text, read as a `bigint`, as a bigint literal, or `undefined` for any other value. */\nfunction decimalTextBigintLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n}\n/** Renders a float's stored number as a number literal. A target stores an infinity, and NaN where it holds one (SQLite does not), as text, which has no literal type, so it renders nothing. */\nfunction floatNumberLiteral(value) {\n\treturn typeof value === \"number\" ? String(value) : void 0;\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, asFloat, asNumeralText, assembleDataTypes, assertDataTypeParams, castUnchanged, codecForRef, column, createDataTypeLookup, createNumberClassifier, dataType, dataTypeId, dataTypeParams, dataTypeParamsProblem, dataTypeValuesEqual, dateTimeStoredText, decimalTextBigintLiteral, decimalTextEqualityKey, decimalTextNumberLiteral, emptyCodecLookup, enumRefusalOf, floatNumberLiteral, floatToJson, isIntegerIn, isNonFiniteText, isNumeralText, isoDateStringText, materializeCodec, numeralText, objectSchemaKeys, parseJsonText, printJsonText, readContractValue, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape, renderTsLiteral, requireValueOf, requiredParamKeys, requiredSchemaKeys, resolveCodecDescriptorOrThrow, schemaKeysAllowing, signedRange, storedNumeralText, validateCodecTypeParams };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;;AASA,MAAM,iBAAiB,UAAU;;AAEjC,SAAS,iBAAiB,OAAO,UAAU;CAC1C,MAAM,gBAAgB,yBAAyB,YAAY,SAAS,QAAQ,KAAK,UAAU,KAAK,EAAE,IAAI;EACrG,KAAK;EACL,KAAK;CACN,CAAC;AACF;;AAEA,MAAM,iBAAiB,UAAU,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,iBAAiB,OAAO,UAAU;;;;;;;AAOpH,MAAM,WAAW,UAAU;CAC1B,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,UAAU,OAAO,iBAAiB,OAAO,0BAA0B;CACx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,iBAAiB,KAAK,SAAS,MAAM,EAAE,KAAK,UAAU,UAAU,OAAO,UAAU,GAAG,KAAK,KAAK;EACpG,OAAO,GAAG,gBAAgB,gBAAgB,SAAS,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS,CAAC;CACjG;AACD;;;;;;;;;AAWA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF;AACA,MAAM,kBAAkB;;AAExB,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,QAAQ,KAAK;AAChF;;AAEA,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK;AACtF;;AAEA,SAAS,mBAAmB,OAAO;CAClC,OAAO,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;AACzD"}
|
|
1
|
+
{"version":3,"file":"codec-yFwW7XRh.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { C as readJsonInteger, D as refuseJsonValue, E as readJsonString, O as DATA_TYPE_ID_PATTERN, S as readJsonFloat, T as readJsonMatching, _ as SAFE_INTEGER_RANGE, a as dataTypeId, b as isNonFiniteText, c as dataTypeValuesEqual, d as requiredParamKeys, f as requiredSchemaKeys, g as SAFE_INTEGER_BIGINT_RANGE, h as INT64_RANGE, i as dataType, l as objectSchemaKeys, m as INT32_RANGE, n as assertDataTypeParams, o as dataTypeParams, p as schemaKeysAllowing, r as createDataTypeLookup, s as dataTypeParamsProblem, t as assembleDataTypes, u as requireValueOf, v as floatToJson, w as readJsonIntegerText, x as readJsonBoolean, y as isIntegerIn } from \"./data-type-V6mcDhcG.mjs\";\nimport { a as readContractValue, i as CodecImpl, n as CodecDescriptorTemplateImpl, o as numeralText, r as enumRefusalOf, t as CodecDescriptorImpl } from \"./codec-descriptor-CPSGZunM.mjs\";\nimport { t as emptyCodecLookup } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { a as resolveCodecDescriptorOrThrow, i as materializeCodec, o as validateCodecTypeParams, r as codecForRef, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-qqMjZrmn.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { tsStringLiteral } from \"@internal/ts-render\";\n//#region src/shared/casts.ts\n/** A cast between two types that store the same shape: the value is already the form this type stores. */\nconst castUnchanged = (value) => value;\n/** Refuses a value that is not in the shape the cast's source type stores. */\nfunction refuseWrongShape(value, expected) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `Expected ${expected}, got ${JSON.stringify(value)}.`, {\n\t\twhy: \"A cast reads the stored form of the type it takes values of.\",\n\t\tfix: \"Hand the cast a value in the shape its source type stores.\"\n\t});\n}\n/** A whole number as the digit text a 64-bit integer or decimal type stores. */\nconst asNumeralText = (value) => typeof value === \"number\" ? numeralText(value) : refuseWrongShape(value, \"a number\");\n/**\n* A number as the floating-point types store it: a JSON number, or one of the three words, which\n* those types keep as text. A magnitude past what a double holds is refused rather than rounded to\n* a word: the database refuses it too, and storing `Infinity` would make a written number\n* indistinguishable from a written `Infinity`.\n*/\nconst asFloat = (value) => {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value !== \"string\") return refuseWrongShape(value, \"a number or numeral text\");\n\tif (isNonFiniteText(value)) return value;\n\tconst converted = Number(value);\n\tif (Number.isFinite(converted)) return converted;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `${value} is out of range: no double holds a number that large.`, {\n\t\twhy: \"The floating-point types store a double, which holds magnitudes up to about 1.8e308.\",\n\t\tfix: \"Use a number a double holds, or a decimal type.\"\n\t});\n};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*/\nfunction column(codecFactory, codecId, typeParams) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams\n\t};\n}\n//#endregion\n//#region src/shared/date-time-stored-form.ts\n/**\n* The reader targets build the stored form of each date and time type with; ADR 254\n* states the forms and the text it reads.\n*/\nconst SHAPES = {\n\tdate: {\n\t\tdescription: \"a date\",\n\t\tplural: \"dates\",\n\t\texample: \"2024-01-01\",\n\t\tdate: true,\n\t\ttime: false,\n\t\toffset: false\n\t},\n\ttime: {\n\t\tdescription: \"a time of day\",\n\t\tplural: \"times of day\",\n\t\texample: \"12:34:56\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\ttimeWithOffset: {\n\t\tdescription: \"a time of day with a UTC offset\",\n\t\tplural: \"times of day with a UTC offset\",\n\t\texample: \"12:34:56+02:00\",\n\t\tdate: false,\n\t\ttime: true,\n\t\toffset: true\n\t},\n\tdateTime: {\n\t\tdescription: \"a date and time\",\n\t\tplural: \"dates and times\",\n\t\texample: \"2024-01-01T12:34:56\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: false\n\t},\n\tinstant: {\n\t\tdescription: \"a date and time with a UTC offset\",\n\t\tplural: \"instants\",\n\t\texample: \"2024-01-01T12:34:56Z\",\n\t\tdate: true,\n\t\ttime: true,\n\t\toffset: true\n\t}\n};\nconst DATE_PREFIX = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})/;\nconst TIME_PREFIX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?/;\nconst OFFSET = /^([+-])(\\d{2})(?::(\\d{2})(?::(\\d{2}))?)?$/;\nconst MAX_FRACTION_DIGITS = 6;\nconst FRACTION_UNITS = {\n\t3: \"milliseconds\",\n\t6: \"microseconds\"\n};\nconst SECONDS_PER_DAY = 86400;\nconst MIDNIGHT = {\n\thour: 0,\n\tminute: 0,\n\tsecond: 0,\n\tfraction: \"\"\n};\nfunction refused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"A date or time type stores one form for each value (ADR 254).\",\n\t\tfix: \"Write text the type holds, as the message shows.\"\n\t});\n}\nfunction isLeapYear(year) {\n\treturn year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nfunction daysInMonth(year, month) {\n\tif (month === 2) return isLeapYear(year) ? 29 : 28;\n\treturn [\n\t\t4,\n\t\t6,\n\t\t9,\n\t\t11\n\t].includes(month) ? 30 : 31;\n}\n/** Days from 1970-01-01 to a date of the proleptic Gregorian calendar, with year 0 as 1 BC. */\nfunction daysFromCivil({ year, month, day }) {\n\tconst shifted = month <= 2 ? year - 1 : year;\n\tconst era = Math.floor(shifted / 400);\n\tconst yearOfEra = shifted - era * 400;\n\tconst dayOfYear = Math.floor((153 * (month + (month > 2 ? -3 : 9)) + 2) / 5) + day - 1;\n\tconst dayOfEra = yearOfEra * 365 + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100) + dayOfYear;\n\treturn era * 146097 + dayOfEra - 719468;\n}\nfunction civilFromDays(days) {\n\tconst shifted = days + 719468;\n\tconst era = Math.floor(shifted / 146097);\n\tconst dayOfEra = shifted - era * 146097;\n\tconst yearOfEra = Math.floor((dayOfEra - Math.floor(dayOfEra / 1460) + Math.floor(dayOfEra / 36524) - Math.floor(dayOfEra / 146096)) / 365);\n\tconst dayOfYear = dayOfEra - (365 * yearOfEra + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100));\n\tconst monthIndex = Math.floor((5 * dayOfYear + 2) / 153);\n\tconst day = dayOfYear - Math.floor((153 * monthIndex + 2) / 5) + 1;\n\tconst month = monthIndex < 10 ? monthIndex + 3 : monthIndex - 9;\n\treturn {\n\t\tyear: yearOfEra + era * 400 + (month <= 2 ? 1 : 0),\n\t\tmonth,\n\t\tday\n\t};\n}\nfunction pad(value, width = 2) {\n\treturn String(value).padStart(width, \"0\");\n}\nfunction yearText(year) {\n\tif (year >= 0 && year <= 9999) return pad(year, 4);\n\treturn `${year < 0 ? \"-\" : \"+\"}${pad(Math.abs(year), 6)}`;\n}\nfunction dateText(date) {\n\treturn `${yearText(date.year)}-${pad(date.month)}-${pad(date.day)}`;\n}\nfunction timeText(time) {\n\tconst fraction = time.fraction.replace(/0+$/, \"\");\n\treturn `${pad(time.hour)}:${pad(time.minute)}:${pad(time.second)}${fraction === \"\" ? \"\" : `.${fraction}`}`;\n}\nfunction offsetText(seconds) {\n\tif (seconds === 0) return \"Z\";\n\tconst magnitude = Math.abs(seconds);\n\tconst rest = magnitude % 60;\n\treturn `${seconds < 0 ? \"-\" : \"+\"}${pad(Math.floor(magnitude / 3600))}:${pad(Math.floor(magnitude / 60) % 60)}${rest === 0 ? \"\" : `:${pad(rest)}`}`;\n}\n/**\n* The fields of an ISO 8601 date, time, or date and time, or `undefined` when the text is not one.\n* Ranges are checked by the caller, which words the refusal.\n*/\nfunction readWritten(text) {\n\tlet rest = text;\n\tlet date;\n\tlet timeFollows = true;\n\tconst dateMatch = DATE_PREFIX.exec(rest);\n\tif (dateMatch !== null) {\n\t\tconst [whole, yearDigits = \"\", month = \"\", day = \"\"] = dateMatch;\n\t\tif (yearDigits === \"-000000\") return void 0;\n\t\tdate = {\n\t\t\tyear: Number(yearDigits),\n\t\t\tmonth: Number(month),\n\t\t\tday: Number(day)\n\t\t};\n\t\trest = rest.slice(whole.length);\n\t\ttimeFollows = /^[Tt ]/.test(rest);\n\t\tif (timeFollows) rest = rest.slice(1);\n\t}\n\tlet time;\n\tlet fractionDigits = 0;\n\tif (timeFollows) {\n\t\tconst timeMatch = TIME_PREFIX.exec(rest);\n\t\tif (timeMatch === null) return void 0;\n\t\tconst [whole, hour = \"\", minute = \"\", second = \"00\", fraction = \"\"] = timeMatch;\n\t\ttime = {\n\t\t\thour: Number(hour),\n\t\t\tminute: Number(minute),\n\t\t\tsecond: Number(second),\n\t\t\tfraction\n\t\t};\n\t\tfractionDigits = fraction.length;\n\t\trest = rest.slice(whole.length);\n\t}\n\tlet offsetSeconds;\n\tif (rest === \"Z\" || rest === \"z\") offsetSeconds = 0;\n\telse if (rest !== \"\") {\n\t\tconst offset = OFFSET.exec(rest);\n\t\tif (offset === null) return void 0;\n\t\tconst [, sign, hours = \"\", minutes = \"00\", seconds = \"00\"] = offset;\n\t\tif (Number(minutes) > 59 || Number(seconds) > 59) return void 0;\n\t\tconst magnitude = Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds);\n\t\toffsetSeconds = sign === \"-\" ? -magnitude : magnitude;\n\t}\n\treturn {\n\t\tdate,\n\t\ttime,\n\t\toffsetSeconds,\n\t\tfractionDigits\n\t};\n}\nfunction withFraction(example, digits) {\n\treturn example.replace(/(\\d{2}:\\d{2}:\\d{2})/, `$1.${\"123456\".slice(0, digits)}`);\n}\n/** The value with an instant moved to UTC. */\nfunction normalized(written, shape) {\n\tconst clock = written.time ?? MIDNIGHT;\n\tconst offsetSeconds = written.offsetSeconds ?? 0;\n\tif (written.date === void 0 || shape !== \"instant\") return {\n\t\tdate: written.date,\n\t\ttime: clock,\n\t\toffsetSeconds\n\t};\n\tconst utc = daysFromCivil(written.date) * SECONDS_PER_DAY + clock.hour * 3600 + clock.minute * 60 + clock.second - offsetSeconds;\n\tconst days = Math.floor(utc / SECONDS_PER_DAY);\n\tconst secondOfDay = utc - days * SECONDS_PER_DAY;\n\treturn {\n\t\tdate: civilFromDays(days),\n\t\ttime: {\n\t\t\thour: Math.floor(secondOfDay / 3600),\n\t\t\tminute: Math.floor(secondOfDay / 60) % 60,\n\t\t\tsecond: secondOfDay % 60,\n\t\t\tfraction: clock.fraction\n\t\t},\n\t\toffsetSeconds: 0\n\t};\n}\nfunction position(value) {\n\tconst { time } = value;\n\treturn [\n\t\tvalue.date === void 0 ? 0 : daysFromCivil(value.date),\n\t\ttime.hour * 3600 + time.minute * 60 + time.second,\n\t\ttime.fraction.padEnd(MAX_FRACTION_DIGITS, \"0\")\n\t];\n}\nfunction isBefore(left, right) {\n\tif (left[0] !== right[0]) return left[0] < right[0];\n\tif (left[1] !== right[1]) return left[1] < right[1];\n\treturn left[2] < right[2];\n}\nfunction printed(value, shape) {\n\tconst { date, time, offsetSeconds } = value;\n\tif (date === void 0) return shape === \"timeWithOffset\" ? `${timeText(time)}${offsetText(offsetSeconds)}` : timeText(time);\n\tif (shape === \"date\") return dateText(date);\n\tif (shape === \"dateTime\") return `${dateText(date)}T${timeText(time)}`;\n\treturn `${dateText(date)}T${timeText(time)}Z`;\n}\n/** The position of a range bound, which the data type declares in stored form. */\nfunction boundPosition(text, shape) {\n\tconst written = readWritten(text);\n\tif (written === void 0) throw new InternalError(`The range bound \"${text}\" is not in its stored form.`);\n\treturn position(normalized(written, shape));\n}\n/**\n* The stored form of written date or time text, or a refusal with a message that says what is\n* wrong and shows text the type holds. `written` is the text as its author wrote it, which the\n* message shows, when a target rewrote it into ISO 8601 before calling this.\n*/\nfunction dateTimeStoredText(text, options, written = text) {\n\tconst shape = SHAPES[options.shape];\n\tconst { ownerId: id } = options;\n\tconst parts = readWritten(text);\n\tif (parts === void 0) refused(`${id} cannot read \"${written}\". Write ${shape.description}, as in \"${shape.example}\".`);\n\tif (parts.date !== void 0 && !shape.date) refused(`${id} holds a time of day without a date, but \"${written}\" has a date. Write the time alone, as in \"${shape.example}\".`);\n\tif (parts.date === void 0 && shape.date) refused(shape.time ? `${id} holds ${shape.description}, but \"${written}\" has no date. Write the date too, as in \"${shape.example}\".` : `${id} holds a date, and \"${written}\" is a time of day. Write a date, as in \"${shape.example}\".`);\n\tif (parts.time !== void 0 && !shape.time) refused(`${id} holds a date without a time of day, but \"${written}\" has a time. Write the date alone, as in \"${shape.example}\".`);\n\tif (parts.time === void 0 && shape.offset) refused(`${id} holds ${shape.description}, but \"${written}\" has no time of day. Write the time too, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds !== void 0 && !shape.offset) refused(`${id} holds no UTC offset, but \"${written}\" has one. Leave it out, as in \"${shape.example}\".`);\n\tif (parts.offsetSeconds === void 0 && shape.offset) refused(`${id} needs a UTC offset, but \"${written}\" has none. Add Z for UTC or an offset such as +02:00, as in \"${shape.example}\".`);\n\tconst maxFractionDigits = options.maxFractionDigits ?? MAX_FRACTION_DIGITS;\n\tif (parts.fractionDigits > maxFractionDigits) refused(`\"${written}\" has ${parts.fractionDigits} digits after the decimal point, but ${id} holds ${FRACTION_UNITS[maxFractionDigits]}, so at most ${maxFractionDigits}. Round it, as in \"${withFraction(shape.example, maxFractionDigits)}\".`);\n\tconst { date, time } = parts;\n\tif (date !== void 0 && (date.month < 1 || date.month > 12 || date.day < 1 || date.day > daysInMonth(date.year, date.month))) refused(`\"${written}\" is not a date that exists. Write a real date, as in \"${shape.example}\".`);\n\tif (time !== void 0 && (time.hour > 23 || time.minute > 59 || time.second > 59)) refused(`\"${written}\" is not a time of day that exists: hours run from 00 to 23, and minutes and seconds from 00 to 59. Write one, as in \"${shape.example}\".`);\n\tconst offsetLimit = options.maxOffsetHours ?? 23;\n\tif (parts.offsetSeconds !== void 0 && Math.abs(parts.offsetSeconds) >= (offsetLimit + 1) * 3600) refused(`\"${written}\" has a UTC offset outside -${pad(offsetLimit)}:59 to +${pad(offsetLimit)}:59, which ${id} does not hold. Write a smaller offset, as in \"${shape.example}\".`);\n\tconst value = normalized(parts, options.shape);\n\tconst { range } = options;\n\tif (range !== void 0) {\n\t\tconst at = position(value);\n\t\tif (isBefore(at, boundPosition(range.earliest, options.shape)) || isBefore(boundPosition(range.latest, options.shape), at)) refused(`${id} holds ${shape.plural} from ${range.earliest} to ${range.latest}, and \"${written}\" is outside them.`);\n\t}\n\treturn printed(value, options.shape);\n}\nconst ISO_DATE_STRING_FRACTION = /^(.*:\\d{2})(?:\\.(\\d{1,3}))?Z$/;\n/**\n* The instant in UTC with exactly three fraction digits, the text `Date.prototype.toISOString()` writes, from ISO 8601 text with a UTC offset. The range and the millisecond precision are those of a JavaScript `Date`. Throws `CONTRACT.CAST_REFUSED`, naming `ownerId`, for text that names no instant a `Date` holds.\n*/\nfunction isoDateStringText(text, ownerId) {\n\tconst stored = dateTimeStoredText(text, {\n\t\tshape: \"instant\",\n\t\townerId,\n\t\tmaxFractionDigits: 3,\n\t\trange: {\n\t\t\tearliest: \"-271821-04-20T00:00:00Z\",\n\t\t\tlatest: \"+275760-09-13T00:00:00Z\"\n\t\t}\n\t});\n\tconst match = ISO_DATE_STRING_FRACTION.exec(stored);\n\treturn match === null ? stored : `${match[1]}.${(match[2] ?? \"\").padEnd(3, \"0\")}Z`;\n}\n//#endregion\n//#region src/shared/decimal-text-equality.ts\nconst DECIMAL_TEXT = /^([+-]?)(\\d*)(?:\\.(\\d*))?$/;\n/**\n* The key two decimal texts share exactly when they are the same number, for a data type that stores a decimal as text and keeps the scale it was written with, as `numeric` stores `0.5` and `0.50`: leading zeros, trailing fraction zeros and the sign of zero do not count. `NaN` and the infinities keep their own keys.\n*/\nfunction decimalTextEqualityKey(json) {\n\tconst text = String(json);\n\tconst match = DECIMAL_TEXT.exec(text);\n\tif (match === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = match;\n\tconst digits = whole.replace(/^0+/, \"\");\n\tconst decimals = fraction.replace(/0+$/, \"\");\n\tif (digits === \"\" && decimals === \"\") return \"0\";\n\tconst magnitude = decimals === \"\" ? digits || \"0\" : `${digits || \"0\"}.${decimals}`;\n\treturn sign === \"-\" ? `-${magnitude}` : magnitude;\n}\n//#endregion\n//#region src/shared/json-text.ts\n/**\n* Read JSON text into the document it holds.\n*\n* `JSON.parse` reads a numeral too large for a double as `Infinity`, and `JSON.stringify` writes\n* that back as `null`, so a document holding one would not be the document stored; it is refused\n* here instead, naming where the number is.\n*/\nfunction parseJsonText(text) {\n\tlet value;\n\ttry {\n\t\tvalue = JSON.parse(text);\n\t} catch (error) {\n\t\tthrow structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", error instanceof Error ? error.message : String(error), {\n\t\t\twhy: \"The text is not a JSON document.\",\n\t\t\tfix: \"Write a JSON document.\"\n\t\t});\n\t}\n\tconst overflowed = nonFiniteNumberIn(value, \"\");\n\tif (overflowed !== void 0) throw structuredError(\"CONTRACT.INVALID_JSON_LITERAL\", `${overflowed.path} is ${overflowed.value}, which JSON cannot write back: the number in the text is outside the range a JSON number holds.`, {\n\t\twhy: \"JSON.parse reads a numeral too large for a double as Infinity, which JSON.stringify writes back as null.\",\n\t\tfix: \"Write a number JSON can hold, or write it as text.\"\n\t});\n\treturn value;\n}\n/** Write a document as the text of a JSON literal. */\nfunction printJsonText(value) {\n\treturn JSON.stringify(value);\n}\nfunction nonFiniteNumberIn(value, path) {\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : {\n\t\tpath: path === \"\" ? \"The value\" : path,\n\t\tvalue\n\t};\n\tif (Array.isArray(value)) {\n\t\tfor (const [index, element] of value.entries()) {\n\t\t\tconst found = nonFiniteNumberIn(element, `${path}[${index}]`);\n\t\t\tif (found !== void 0) return found;\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof value === \"object\" && value !== null) for (const [key, member] of Object.entries(value)) {\n\t\tconst found = nonFiniteNumberIn(member, path === \"\" ? key : `${path}.${key}`);\n\t\tif (found !== void 0) return found;\n\t}\n}\n//#endregion\n//#region src/shared/number-classifier.ts\nconst WRITTEN_INTEGER_TEXT = /^[+-]?\\d+$/;\nconst WRITTEN_DECIMAL_TEXT = /^[+-]?\\d+\\.\\d+$/;\nconst DECIMAL_NUMERAL = /^([+-]?)0*(\\d+)(\\.\\d+)?$/;\n/** Whether `text` is a whole number or a decimal as a contract source writes one. */\nfunction isNumeralText(text) {\n\treturn WRITTEN_INTEGER_TEXT.test(text) || WRITTEN_DECIMAL_TEXT.test(text);\n}\n/**\n* A written numeral as the contract stores it. Leading zeros and the sign of zero never change a\n* number, so they go; trailing zeros stay, because a type without a scale keeps them.\n*/\nfunction storedNumeralText(text) {\n\tconst numeral = DECIMAL_NUMERAL.exec(text);\n\tif (numeral === null) return text;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\"] = numeral;\n\tconst digits = `${whole}${fraction}`;\n\treturn sign !== \"-\" || /^[0.]+$/.test(digits) ? digits : `-${digits}`;\n}\n/** The range of a signed integer of `bits` bits. */\nfunction signedRange(bits) {\n\tconst half = 2n ** (BigInt(bits) - 1n);\n\treturn {\n\t\tmin: -half,\n\t\tmax: half - 1n\n\t};\n}\n/**\n* The classifier one target's plain-number authoring entry carries: it reads the digits and says\n* which of the target's types the value is, in that type's stored form. `undefined` means no\n* type of this target holds the number.\n*/\nfunction createNumberClassifier(spec) {\n\tconst as = (classification, value) => classification === void 0 ? void 0 : {\n\t\ttype: classification.type,\n\t\tvalue\n\t};\n\treturn (text) => {\n\t\tif (isNonFiniteText(text)) return as(spec.words, spec.words?.form === \"number\" ? Number(text) : text);\n\t\tif (WRITTEN_DECIMAL_TEXT.test(text)) {\n\t\t\tconst canonical = storedNumeralText(text);\n\t\t\treturn as(spec.fraction, spec.fraction?.form === \"number\" ? Number(canonical) : canonical);\n\t\t}\n\t\tif (!WRITTEN_INTEGER_TEXT.test(text)) return void 0;\n\t\tconst digits = BigInt(text);\n\t\tconst classification = spec.integers.find(({ min, max }) => digits >= min && digits <= max) ?? spec.largerWhole;\n\t\treturn as(classification, classification?.form === \"number\" ? Number(digits) : digits.toString());\n\t};\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a stored value as a TypeScript literal (e.g. `\"low\"`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for codecs whose application value is the stored JSON** (text, int, float, bool). A\n* codec whose application value differs from the stored JSON (e.g. digit text read as a `bigint`)\n* must NOT use this: it renders the application value in its own `renderValueLiteral`.\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** Renders decimal integer text, read as a `number`, as a number literal, or `undefined` for any other value. */\nfunction decimalTextNumberLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\n}\n/** Renders decimal integer text, read as a `bigint`, as a bigint literal, or `undefined` for any other value. */\nfunction decimalTextBigintLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n}\n/** Renders a float's stored number as a number literal. A target stores an infinity, and NaN where it holds one (SQLite does not), as text, which has no literal type, so it renders nothing. */\nfunction floatNumberLiteral(value) {\n\treturn typeof value === \"number\" ? String(value) : void 0;\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, asFloat, asNumeralText, assembleDataTypes, assertDataTypeParams, castUnchanged, codecForRef, column, createDataTypeLookup, createNumberClassifier, dataType, dataTypeId, dataTypeParams, dataTypeParamsProblem, dataTypeValuesEqual, dateTimeStoredText, decimalTextBigintLiteral, decimalTextEqualityKey, decimalTextNumberLiteral, emptyCodecLookup, enumRefusalOf, floatNumberLiteral, floatToJson, isIntegerIn, isNonFiniteText, isNumeralText, isoDateStringText, materializeCodec, numeralText, objectSchemaKeys, parseJsonText, printJsonText, readContractValue, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape, renderTsLiteral, requireValueOf, requiredParamKeys, requiredSchemaKeys, resolveCodecDescriptorOrThrow, schemaKeysAllowing, signedRange, storedNumeralText, validateCodecTypeParams };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;;AASA,MAAM,iBAAiB,UAAU;;AAEjC,SAAS,iBAAiB,OAAO,UAAU;CAC1C,MAAM,gBAAgB,yBAAyB,YAAY,SA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OAAO,SAAS,WAAW,OAAO,IAAI,IAAI,IAAI;EACpG,IAAI,qBAAqB,KAAK,IAAI,GAAG;GACpC,MAAM,YAAY,kBAAkB,IAAI;GACxC,OAAO,GAAG,KAAK,UAAU,KAAK,UAAU,SAAS,WAAW,OAAO,SAAS,IAAI,SAAS;EAC1F;EACA,IAAI,CAAC,qBAAqB,KAAK,IAAI,GAAG,OAAO,KAAK;EAClD,MAAM,SAAS,OAAO,IAAI;EAC1B,MAAM,iBAAiB,KAAK,SAAS,MAAM,EAAE,KAAK,UAAU,UAAU,OAAO,UAAU,GAAG,KAAK,KAAK;EACpG,OAAO,GAAG,gBAAgB,gBAAgB,SAAS,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS,CAAC;CACjG;AACD;;;;;;;;;AAWA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF;AACA,MAAM,kBAAkB;;AAExB,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,QAAQ,KAAK;AAChF;;AAEA,SAAS,yBAAyB,OAAO;CACxC,OAAO,OAAO,UAAU,YAAY,gBAAgB,KAAK,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK;AACtF;;AAEA,SAAS,mBAAmB,OAAO;CAClC,OAAO,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;AACzD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { c as createDataTypeLookup } from "./data-type-
|
|
2
|
+
import { c as createDataTypeLookup } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
3
3
|
import { n as aggregateDescriptorKey } from "./generator-functions-CXbQfvYu-BIFU1Ryx.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/framework-components/dist/components.mjs
|
|
5
5
|
/**
|
|
@@ -116,4 +116,4 @@ function createGeneratorHelpers(components) {
|
|
|
116
116
|
//#endregion
|
|
117
117
|
export { settleAggregateOverloads as n, createGeneratorHelpers as t };
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=components-
|
|
119
|
+
//# sourceMappingURL=components-BaV9iCkq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-
|
|
1
|
+
{"version":3,"file":"components-BaV9iCkq.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/components.mjs"],"sourcesContent":["import { r as createDataTypeLookup } from \"./data-type-V6mcDhcG.mjs\";\nimport { n as runtimeError, t as isRuntimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { a as mergeCapabilityMatrices, c as isAnyInputAggregateDescriptor, i as singleGeneratorBinding, l as isNoInputAggregateDescriptor, n as assembleGeneratorFunctions, o as aggregateDescriptorKey, s as isAggregateDescriptor, t as EMPTY_GENERATOR_FUNCTIONS } from \"./generator-functions-CXbQfvYu.mjs\";\nimport { t as checkContractComponentRequirements } from \"./framework-components-D6j4Y5K7.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/aggregate-overloads.ts\n/**\n* Settle every contributed overload against `codecs`.\n*\n* Exact codec overloads win over trait overloads, and trait overloads are expanded only over the codecs given — so a caller that passes the codecs a stack actually composes cannot end up with a row for one it does not. An exact overload survives even for a codec outside that set, because naming a codec id is a claim that stands on its own.\n*\n* The input-agnostic overload is left unexpanded: it answers whatever the other two rungs do not, so materializing it per codec would say the same thing once per codec.\n*\n* A second claim on one `(operation, input)` key is reported as a duplicate and does not unseat the first; both production callers reject duplicates before settling, so the report guards a consumer that calls this directly.\n*/\nfunction settleAggregateOverloads(descriptors, codecs) {\n\tconst byOperation = /* @__PURE__ */ new Map();\n\tconst firstClaims = /* @__PURE__ */ new Map();\n\tconst duplicates = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\tconst first = firstClaims.get(key);\n\t\tif (first !== void 0) {\n\t\t\tduplicates.push({\n\t\t\t\toperation: descriptor.operation,\n\t\t\t\tkey,\n\t\t\t\tfirst,\n\t\t\t\tsecond: descriptor\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tfirstClaims.set(key, descriptor);\n\t\tconst entry = byOperation.get(descriptor.operation) ?? {\n\t\t\texact: /* @__PURE__ */ new Map(),\n\t\t\ttraits: [],\n\t\t\tnoInput: void 0,\n\t\t\tanyInput: void 0\n\t\t};\n\t\tswitch (descriptor.input.kind) {\n\t\t\tcase \"none\":\n\t\t\t\tentry.noInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"any\":\n\t\t\t\tentry.anyInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"codec\":\n\t\t\t\tentry.exact.set(descriptor.input.codecId, descriptor);\n\t\t\t\tbreak;\n\t\t\tcase \"trait\":\n\t\t\t\tentry.traits.push({\n\t\t\t\t\tdescriptor,\n\t\t\t\t\ttrait: descriptor.input.trait\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t\tbyOperation.set(descriptor.operation, entry);\n\t}\n\tconst codecList = [...codecs];\n\tconst operations = /* @__PURE__ */ new Map();\n\tconst ambiguities = [];\n\tfor (const [operation, entry] of byOperation) {\n\t\tconst byCodecId = new Map(entry.exact);\n\t\tfor (const codec of codecList) {\n\t\t\tif (byCodecId.has(codec.codecId)) continue;\n\t\t\tconst claims = entry.traits.filter((candidate) => codec.traits.includes(candidate.trait));\n\t\t\tif (claims.length > 1) {\n\t\t\t\tambiguities.push({\n\t\t\t\t\toperation,\n\t\t\t\t\tcodecId: codec.codecId,\n\t\t\t\t\ttraits: claims.map((claim) => claim.trait)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst claim = claims[0];\n\t\t\tif (claim !== void 0) byCodecId.set(codec.codecId, claim.descriptor);\n\t\t}\n\t\toperations.set(operation, {\n\t\t\tbyCodecId,\n\t\t\tnoInput: entry.noInput,\n\t\t\tanyInput: entry.anyInput\n\t\t});\n\t}\n\treturn {\n\t\toperations,\n\t\tambiguities,\n\t\tduplicates\n\t};\n}\n//#endregion\n//#region src/shared/generator-helpers.ts\n/** The data types of a stack that registers none, which a signature written as a function of them is built against to read its parameter keys. */\nconst NO_DATA_TYPES = {\n\tentries: {},\n\tlookup: createDataTypeLookup([]),\n\tdataTypeOfCodec: () => void 0\n};\nfunction positionalKeys(declared) {\n\tconst signature = typeof declared === \"function\" ? declared(NO_DATA_TYPES) : declared;\n\tif (typeof signature !== \"object\" || signature === null || !(\"positional\" in signature)) return [];\n\tconst positional = signature.positional;\n\tif (!Array.isArray(positional)) return [];\n\treturn positional.flatMap((param) => typeof param === \"object\" && param !== null && \"key\" in param && typeof param.key === \"string\" ? [param.key] : []);\n}\n/**\n* The `gen` helpers of a composed stack: one per generator function its components declare, taking the positional arguments of the function's signature. A call is resolved by the field's codec when the contract is built.\n*/\nfunction createGeneratorHelpers(components) {\n\tconst helpers = {};\n\tfor (const component of components) for (const contribution of component.generatorFunctions ?? []) {\n\t\tif (contribution.signature === void 0) continue;\n\t\tconst keys = positionalKeys(contribution.signature);\n\t\tconst name = contribution.name;\n\t\thelpers[name] = (...values) => ({\n\t\t\tname,\n\t\t\targs: Object.fromEntries(keys.flatMap((key, index) => values[index] === void 0 ? [] : [[key, values[index]]]))\n\t\t});\n\t}\n\treturn blindCast(helpers);\n}\n//#endregion\nexport { EMPTY_GENERATOR_FUNCTIONS, aggregateDescriptorKey, assembleGeneratorFunctions, checkContractComponentRequirements, createGeneratorHelpers, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, isRuntimeError, mergeCapabilityMatrices, runtimeError, settleAggregateOverloads, singleGeneratorBinding };\n\n//# sourceMappingURL=components.mjs.map"],"mappings":";;;;;;;;;;;;;AAeA,SAAS,yBAAyB,aAAa,QA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zdhIx.mjs";
|
|
2
2
|
import { t as canonicalizeJson } from "./canonicalize-json-ZPawceQR-Dua1VNEB.mjs";
|
|
3
3
|
import { n as runtimeError, t as isRuntimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
4
|
-
import { C as readJsonString, D as requiredSchemaKeys, E as requiredParamKeys, O as schemaKeysAllowing, S as readJsonMatching, T as requireValueOf, _ as objectSchemaKeys, a as SAFE_INTEGER_RANGE, b as readJsonInteger, c as createDataTypeLookup, d as dataTypeParams, f as dataTypeParamsProblem, g as isNonFiniteText, h as isIntegerIn, i as SAFE_INTEGER_BIGINT_RANGE, l as dataType, m as floatToJson, n as INT32_RANGE, o as assembleDataTypes, p as dataTypeValuesEqual, r as INT64_RANGE, s as assertDataTypeParams, t as DATA_TYPE_ID_PATTERN, u as dataTypeId, v as readJsonBoolean, w as refuseJsonValue, x as readJsonIntegerText, y as readJsonFloat } from "./data-type-
|
|
4
|
+
import { C as readJsonString, D as requiredSchemaKeys, E as requiredParamKeys, O as schemaKeysAllowing, S as readJsonMatching, T as requireValueOf, _ as objectSchemaKeys, a as SAFE_INTEGER_RANGE, b as readJsonInteger, c as createDataTypeLookup, d as dataTypeParams, f as dataTypeParamsProblem, g as isNonFiniteText, h as isIntegerIn, i as SAFE_INTEGER_BIGINT_RANGE, l as dataType, m as floatToJson, n as INT32_RANGE, o as assembleDataTypes, p as dataTypeValuesEqual, r as INT64_RANGE, s as assertDataTypeParams, t as DATA_TYPE_ID_PATTERN, u as dataTypeId, v as readJsonBoolean, w as refuseJsonValue, x as readJsonIntegerText, y as readJsonFloat } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
5
5
|
import { a as resolveCodecDescriptorOrThrow, i as materializeCodec, o as validateCodecTypeParams, r as codecForRef, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from "./resolve-codec-qqMjZrmn-Cok8elAo.mjs";
|
|
6
6
|
import { t as emptyCodecLookup } from "./codec-types-BXLUbk-Y-DpGfKGK0.mjs";
|
|
7
7
|
import { a as isAggregateDescriptor, c as mergeCapabilityMatrices, l as singleGeneratorBinding, n as aggregateDescriptorKey, o as isAnyInputAggregateDescriptor, r as assembleGeneratorFunctions, s as isNoInputAggregateDescriptor, t as EMPTY_GENERATOR_FUNCTIONS } from "./generator-functions-CXbQfvYu-BIFU1Ryx.mjs";
|
|
8
|
-
import { $ as validateAuthoringTypeChoiceParams, A as isAuthoringTypeAliasDescriptor, B as resolveAuthoringTypeChoice, C as instantiateAuthoringTypeCall, D as isAuthoringEntityTypeDescriptor, E as isAuthoringArgRef, G as temporalTypeAliases, H as resolvePslBacktickEscapes, I as mergeAuthoringNamespaces, J as typeChoiceArgumentsFromObject, K as timestampNowControlDescriptor, L as printTaggedLiteral, M as isAuthoringTypeChoiceOption, N as isAuthoringTypeConstructorDescriptor, O as isAuthoringModelAttributeDescriptor, P as isAuthoringTypeDescriptor, Q as validateAuthoringHelperArguments, R as printedTaggedLiteralReadsBack, S as instantiateAuthoringTypeAlias, T as instantiateAuthoringTypeConstructorFromValues, U as resolveTemplateTagEscapes, V as resolveEnumCodecId, W as resolveTypeAliasGenerators, X as typeConstructorLookup, Y as typeChoiceCombinationText, Z as unknownTypeChoiceArgumentMessage, _ as describeTaggedLiteralFailure, a as assembleDataTypeSupport, b as getAuthoringTypeConstructor, c as assertResolvableTypeConstructorTemplates, et as validateAuthoringTypeParams, f as canonicalizeTaggedLiteralBody, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, j as isAuthoringTypeChoiceDescriptor, k as isAuthoringPslBlockDescriptor, l as assertTypeAliasesValid, n as TAGGED_LITERAL_MAX_BYTES, o as assertNoAuthoringFieldNamespace, p as classifyEnumMemberType, q as tsTaggedTemplateSource, r as TIMESTAMP_NOW_GENERATOR_ID, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid, v as flushAuthoringWarnings, w as instantiateAuthoringTypeConstructor, x as instantiateAuthoringEntityType, y as getAuthoringTypeChoice, z as resolveAuthoringTemplateValue } from "./temporal-type-aliases-
|
|
8
|
+
import { $ as validateAuthoringTypeChoiceParams, A as isAuthoringTypeAliasDescriptor, B as resolveAuthoringTypeChoice, C as instantiateAuthoringTypeCall, D as isAuthoringEntityTypeDescriptor, E as isAuthoringArgRef, G as temporalTypeAliases, H as resolvePslBacktickEscapes, I as mergeAuthoringNamespaces, J as typeChoiceArgumentsFromObject, K as timestampNowControlDescriptor, L as printTaggedLiteral, M as isAuthoringTypeChoiceOption, N as isAuthoringTypeConstructorDescriptor, O as isAuthoringModelAttributeDescriptor, P as isAuthoringTypeDescriptor, Q as validateAuthoringHelperArguments, R as printedTaggedLiteralReadsBack, S as instantiateAuthoringTypeAlias, T as instantiateAuthoringTypeConstructorFromValues, U as resolveTemplateTagEscapes, V as resolveEnumCodecId, W as resolveTypeAliasGenerators, X as typeConstructorLookup, Y as typeChoiceCombinationText, Z as unknownTypeChoiceArgumentMessage, _ as describeTaggedLiteralFailure, a as assembleDataTypeSupport, b as getAuthoringTypeConstructor, c as assertResolvableTypeConstructorTemplates, et as validateAuthoringTypeParams, f as canonicalizeTaggedLiteralBody, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, j as isAuthoringTypeChoiceDescriptor, k as isAuthoringPslBlockDescriptor, l as assertTypeAliasesValid, n as TAGGED_LITERAL_MAX_BYTES, o as assertNoAuthoringFieldNamespace, p as classifyEnumMemberType, q as tsTaggedTemplateSource, r as TIMESTAMP_NOW_GENERATOR_ID, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid, v as flushAuthoringWarnings, w as instantiateAuthoringTypeConstructor, x as instantiateAuthoringEntityType, y as getAuthoringTypeChoice, z as resolveAuthoringTemplateValue } from "./temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs";
|
|
9
9
|
import { i as freezeNode, n as NamespaceBase, r as UNBOUND_NAMESPACE_ID, t as IRNodeBase } from "./namespace-VUH2dgnS-By5y75h9.mjs";
|
|
10
|
-
import { $ as schemaIssuesWhy, A as failedPostcheckWhy, B as isStorageHashHex, C as expectAbsent, D as extractComponentIds, E as extractCodecTypeImports, F as hasPslContractBuild, G as migrationSubjectJson, H as issueOutcome, I as hasPslContractInfer, J as modelStatementText, K as migrationSubjectKey, L as hasSchemaSubjectClassifier, M as fieldStatementText, N as hasMigrations, O as extractParameterizedOutputTypeImports, P as hasOperationPreview, Q as schemaCheckWhy, R as hasSchemaView, S as enumValueStatementText, T as extractCodecLookup, U as migrationRunnerFailure, V as issueLabel, W as migrationStatementJson, X as planOriginOf, Y as orderIssuesByDependencies, Z as sameMarkerHashes, _ as diffSchemas, a as VERIFY_CODE_HASH_MISMATCH, b as enumValueCoordinateFromJson, c as VERIFY_CODE_TARGET_MISMATCH, d as assertUniqueCodecOwner, et as storageHashHex, f as buildExtensionLoadOrder, g as describeMigrationStatement, h as createControlStack, i as SchemaTreeNode, j as failedPrecheckWhy, k as extractQueryOperationTypeImports, l as assembleAuthoringContributions, m as contractSnapshotTypesSpecifier, n as CONTRACT_SNAPSHOTS_DIRNAME, nt as withDatabaseUnchanged, o as VERIFY_CODE_MARKER_MISSING, p as contractSnapshotJsonSpecifier, q as modelDisplayName, r as SchemaDiff, rt as withFailingSpace, s as VERIFY_CODE_SCHEMA_FAILURE, t as APP_SPACE_ID, tt as valueObjectFieldStatementText, u as assembleControlMutationDefaults, v as dispositionForCategory, w as expectPresent, x as enumValueCoordinateJson, y as enforceHelperCodecInvariants, z as isRenameStatement } from "./control-
|
|
10
|
+
import { $ as schemaIssuesWhy, A as failedPostcheckWhy, B as isStorageHashHex, C as expectAbsent, D as extractComponentIds, E as extractCodecTypeImports, F as hasPslContractBuild, G as migrationSubjectJson, H as issueOutcome, I as hasPslContractInfer, J as modelStatementText, K as migrationSubjectKey, L as hasSchemaSubjectClassifier, M as fieldStatementText, N as hasMigrations, O as extractParameterizedOutputTypeImports, P as hasOperationPreview, Q as schemaCheckWhy, R as hasSchemaView, S as enumValueStatementText, T as extractCodecLookup, U as migrationRunnerFailure, V as issueLabel, W as migrationStatementJson, X as planOriginOf, Y as orderIssuesByDependencies, Z as sameMarkerHashes, _ as diffSchemas, a as VERIFY_CODE_HASH_MISMATCH, b as enumValueCoordinateFromJson, c as VERIFY_CODE_TARGET_MISMATCH, d as assertUniqueCodecOwner, et as storageHashHex, f as buildExtensionLoadOrder, g as describeMigrationStatement, h as createControlStack, i as SchemaTreeNode, j as failedPrecheckWhy, k as extractQueryOperationTypeImports, l as assembleAuthoringContributions, m as contractSnapshotTypesSpecifier, n as CONTRACT_SNAPSHOTS_DIRNAME, nt as withDatabaseUnchanged, o as VERIFY_CODE_MARKER_MISSING, p as contractSnapshotJsonSpecifier, q as modelDisplayName, r as SchemaDiff, rt as withFailingSpace, s as VERIFY_CODE_SCHEMA_FAILURE, t as APP_SPACE_ID, tt as valueObjectFieldStatementText, u as assembleControlMutationDefaults, v as dispositionForCategory, w as expectPresent, x as enumValueCoordinateJson, y as enforceHelperCodecInvariants, z as isRenameStatement } from "./control-DzRwUDn-.mjs";
|
|
11
11
|
import { a as domainElementCoordinates, c as hydrateNamespaceEntities, i as coordinateKey, l as promoteBuiltinKinds, n as buildSingleNamespaceView, o as elementCoordinates, r as changedElementCoordinates, s as entityAt, t as buildNamespacedEntities } from "./ir-B7QKO3dq.mjs";
|
|
12
|
-
import { a as numeralText, i as enumRefusalOf, n as CodecDescriptorTemplateImpl, o as readContractValue, r as CodecImpl, t as CodecDescriptorImpl } from "./codec-descriptor-
|
|
13
|
-
import { C as readWrittenValueAs, D as writeTypedLiteral, E as writeDataTypeValue, O as writtenTypeArguments, S as readWrittenValue, T as tagForm, _ as exactRewrite, a as authoringTypeConstructors, b as knownTags, c as describeDiscriminatorRefusal, d as describeRefusedValueType, f as duplicateStoredMembers, g as enumMemberProblemDiagnostic, h as entryForTag, i as authoringTypeConstructorArguments, k as writtenTypeConstructorCall, l as describeExpected, m as entryForPlain, n as admittedTags, o as castTypedValue, p as encodeEnumMembers, r as applyDiscriminatorRule, s as describeAdmittedForms, t as admittedForms, u as describeRefusal, v as findAuthoringTypeChoiceCall, w as readWrittenValueIntoCodec, x as readEnumBlockMembers, y as findAuthoringTypeConstructorCall } from "./authoring-
|
|
14
|
-
import { _ as signedRange, a as createNumberClassifier, c as decimalTextEqualityKey, d as isNumeralText, f as isoDateStringText, g as renderTsLiteral, h as refuseWrongShape, i as column, l as decimalTextNumberLiteral, m as printJsonText, n as asNumeralText, o as dateTimeStoredText, p as parseJsonText, r as castUnchanged, s as decimalTextBigintLiteral, t as asFloat, u as floatNumberLiteral, v as storedNumeralText } from "./codec-
|
|
12
|
+
import { a as numeralText, i as enumRefusalOf, n as CodecDescriptorTemplateImpl, o as readContractValue, r as CodecImpl, t as CodecDescriptorImpl } from "./codec-descriptor-CPSGZunM-DxrbRHX1.mjs";
|
|
13
|
+
import { C as readWrittenValueAs, D as writeTypedLiteral, E as writeDataTypeValue, O as writtenTypeArguments, S as readWrittenValue, T as tagForm, _ as exactRewrite, a as authoringTypeConstructors, b as knownTags, c as describeDiscriminatorRefusal, d as describeRefusedValueType, f as duplicateStoredMembers, g as enumMemberProblemDiagnostic, h as entryForTag, i as authoringTypeConstructorArguments, k as writtenTypeConstructorCall, l as describeExpected, m as entryForPlain, n as admittedTags, o as castTypedValue, p as encodeEnumMembers, r as applyDiscriminatorRule, s as describeAdmittedForms, t as admittedForms, u as describeRefusal, v as findAuthoringTypeChoiceCall, w as readWrittenValueIntoCodec, x as readEnumBlockMembers, y as findAuthoringTypeConstructorCall } from "./authoring-DnYn5EZT.mjs";
|
|
14
|
+
import { _ as signedRange, a as createNumberClassifier, c as decimalTextEqualityKey, d as isNumeralText, f as isoDateStringText, g as renderTsLiteral, h as refuseWrongShape, i as column, l as decimalTextNumberLiteral, m as printJsonText, n as asNumeralText, o as dateTimeStoredText, p as parseJsonText, r as castUnchanged, s as decimalTextBigintLiteral, t as asFloat, u as floatNumberLiteral, v as storedNumeralText } from "./codec-yFwW7XRh.mjs";
|
|
15
15
|
import { t as checkContractComponentRequirements } from "./framework-components-D6j4Y5K7-RW9H184y.mjs";
|
|
16
|
-
import { n as settleAggregateOverloads, t as createGeneratorHelpers } from "./components-
|
|
16
|
+
import { n as settleAggregateOverloads, t as createGeneratorHelpers } from "./components-BaV9iCkq.mjs";
|
|
17
17
|
import { n as resolveRequirementSpecifiers, t as keepInternalSpecifiers } from "./emission-CeoAV9mj.mjs";
|
|
18
|
-
import { n as createExecutionStack, r as instantiateExecutionStack, t as assertRuntimeContractRequirementsSatisfied } from "./execution-
|
|
18
|
+
import { n as createExecutionStack, r as instantiateExecutionStack, t as assertRuntimeContractRequirementsSatisfied } from "./execution-DJDqCoRU.mjs";
|
|
19
19
|
import { a as flatPslModels, c as namespacePslExtensionBlocks, i as flatPslCompositeTypes, n as UNBOUND_PSL_NAMESPACE_NAME, o as makePslNamespace, r as UNSPECIFIED_PSL_NAMESPACE_ID, s as makePslNamespaceEntries, t as BUILTIN_PSL_KIND_KEYS } from "./psl-ast-CyvE6CR-.mjs";
|
|
20
20
|
import { _ as runtimeAborted, a as applyMutationDefaults, b as streamStatement, c as checkAborted, d as createContextBeneath, f as createMetaBuilder, g as raceAgainstAbort, h as executeStatement, i as RuntimeCore, l as checkMiddlewareCompatibility, m as defineAnnotation, n as RUNTIME_ABORTED, o as assertAnnotationsApplicable, p as createStateStore, r as RelationKeys, s as assertMutationDefaultGeneratorsAvailable, t as AsyncIterableResult, u as collectMutationDefaultGenerators, v as startClientActivity, y as startTransactionActivity } from "./runtime-DiBFiGVw.mjs";
|
|
21
21
|
export { APP_SPACE_ID, AUTHORING_TYPE_DESCRIPTOR_KINDS, AsyncIterableResult, BUILTIN_PSL_KIND_KEYS, CONTRACT_CODEC_DESCRIPTOR_MISSING, CONTRACT_SNAPSHOTS_DIRNAME, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, EMPTY_GENERATOR_FUNCTIONS, INT32_RANGE, INT64_RANGE, IRNodeBase, NamespaceBase, RUNTIME_ABORTED, RelationKeys, RuntimeCore, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, SchemaDiff, SchemaTreeNode, TAGGED_LITERAL_MAX_BYTES, TIMESTAMP_NOW_GENERATOR_ID, UNBOUND_NAMESPACE_ID, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, admittedForms, admittedTags, aggregateDescriptorKey, applyDiscriminatorRule, applyMutationDefaults, asFloat, asNumeralText, assembleAuthoringContributions, assembleAuthoringDataTypes, assembleControlMutationDefaults, assembleDataTypeSupport, assembleDataTypes, assembleGeneratorFunctions, assertAnnotationsApplicable, assertDataTypeParams, assertMutationDefaultGeneratorsAvailable, assertNoAuthoringFieldNamespace, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertRuntimeContractRequirementsSatisfied, assertTypeAliasesValid, assertTypeChoicesValid, assertUniqueCodecOwner, authoringTypeConstructorArguments, authoringTypeConstructors, buildExtensionLoadOrder, buildNamespacedEntities, buildSingleNamespaceView, canonicalizeJson, canonicalizeTaggedLiteralBody, castTypedValue, castUnchanged, changedElementCoordinates, checkAborted, checkContractComponentRequirements, checkMiddlewareCompatibility, classifyEnumMemberType, codecForRef, collectMutationDefaultGenerators, collectScalarTypeConstructors, column, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, coordinateKey, createContextBeneath, createControlStack, createDataTypeLookup, createExecutionStack, createGeneratorHelpers, createMetaBuilder, createNumberClassifier, createStateStore, dataType, dataTypeId, dataTypeParams, dataTypeParamsProblem, dataTypeValuesEqual, dateTimeStoredText, decimalTextBigintLiteral, decimalTextEqualityKey, decimalTextNumberLiteral, defineAnnotation, describeAdmittedForms, describeDiscriminatorRefusal, describeExpected, describeMigrationStatement, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, domainElementCoordinates, duplicateStoredMembers, elementCoordinates, emptyCodecLookup, encodeEnumMembers, enforceHelperCodecInvariants, entityAt, entryForPlain, entryForTag, enumMemberProblemDiagnostic, enumRefusalOf, enumValueCoordinateFromJson, enumValueCoordinateJson, enumValueStatementText, exactRewrite, executeStatement, expectAbsent, expectPresent, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractParameterizedOutputTypeImports, extractQueryOperationTypeImports, failedPostcheckWhy, failedPrecheckWhy, fieldStatementText, findAuthoringTypeChoiceCall, findAuthoringTypeConstructorCall, flatPslCompositeTypes, flatPslModels, floatNumberLiteral, floatToJson, flushAuthoringWarnings, freezeNode, getAuthoringTypeChoice, getAuthoringTypeConstructor, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, hydrateNamespaceEntities, instantiateAuthoringEntityType, instantiateAuthoringTypeAlias, instantiateAuthoringTypeCall, instantiateAuthoringTypeConstructor, instantiateAuthoringTypeConstructorFromValues, instantiateExecutionStack, isAggregateDescriptor, isAnyInputAggregateDescriptor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeAliasDescriptor, isAuthoringTypeChoiceDescriptor, isAuthoringTypeChoiceOption, isAuthoringTypeConstructorDescriptor, isAuthoringTypeDescriptor, isIntegerIn, isNoInputAggregateDescriptor, isNonFiniteText, isNumeralText, isPlainRecord, isRenameStatement, isRuntimeError, isStorageHashHex, isoDateStringText, issueLabel, issueOutcome, keepInternalSpecifiers, knownTags, makePslNamespace, makePslNamespaceEntries, materializeCodec, mergeAuthoringNamespaces, mergeCapabilityMatrices, migrationRunnerFailure, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, namespacePslExtensionBlocks, numeralText, objectSchemaKeys, orderIssuesByDependencies, parseJsonText, planOriginOf, printJsonText, printTaggedLiteral, printedTaggedLiteralReadsBack, promoteBuiltinKinds, raceAgainstAbort, readContractValue, readEnumBlockMembers, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, readWrittenValue, readWrittenValueAs, readWrittenValueIntoCodec, refuseJsonValue, refuseWrongShape, renderTsLiteral, requireValueOf, requiredParamKeys, requiredSchemaKeys, resolveAuthoringTemplateValue, resolveAuthoringTypeChoice, resolveCodecDescriptorOrThrow, resolveEnumCodecId, resolvePslBacktickEscapes, resolveRequirementSpecifiers, resolveTemplateTagEscapes, resolveTypeAliasGenerators, runtimeAborted, runtimeError, sameMarkerHashes, schemaCheckWhy, schemaIssuesWhy, schemaKeysAllowing, settleAggregateOverloads, signedRange, singleGeneratorBinding, startClientActivity, startTransactionActivity, storageHashHex, storedNumeralText, streamStatement, tagForm, temporalTypeAliases, timestampNowControlDescriptor, tsTaggedTemplateSource, typeChoiceArgumentsFromObject, typeChoiceCombinationText, typeConstructorLookup, unknownTypeChoiceArgumentMessage, validateAuthoringHelperArguments, validateAuthoringTypeChoiceParams, validateAuthoringTypeParams, validateCodecTypeParams, valueObjectFieldStatementText, withDatabaseUnchanged, withFailingSpace, writeDataTypeValue, writeTypedLiteral, writtenTypeArguments, writtenTypeConstructorCall };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as validateAuthoringTypeChoiceParams, A as isAuthoringTypeAliasDescriptor, B as resolveAuthoringTypeChoice, C as instantiateAuthoringTypeCall, D as isAuthoringEntityTypeDescriptor, E as isAuthoringArgRef, G as temporalTypeAliases, I as mergeAuthoringNamespaces, J as typeChoiceArgumentsFromObject, L as printTaggedLiteral, M as isAuthoringTypeChoiceOption, N as isAuthoringTypeConstructorDescriptor, O as isAuthoringModelAttributeDescriptor, P as isAuthoringTypeDescriptor, Q as validateAuthoringHelperArguments, R as printedTaggedLiteralReadsBack, S as instantiateAuthoringTypeAlias, T as instantiateAuthoringTypeConstructorFromValues, U as resolveTemplateTagEscapes, V as resolveEnumCodecId, W as resolveTypeAliasGenerators, X as typeConstructorLookup, Y as typeChoiceCombinationText, Z as unknownTypeChoiceArgumentMessage, _ as describeTaggedLiteralFailure, a as assembleDataTypeSupport, b as getAuthoringTypeConstructor, c as assertResolvableTypeConstructorTemplates, et as validateAuthoringTypeParams, f as canonicalizeTaggedLiteralBody, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, j as isAuthoringTypeChoiceDescriptor, k as isAuthoringPslBlockDescriptor, l as assertTypeAliasesValid, o as assertNoAuthoringFieldNamespace, p as classifyEnumMemberType, q as tsTaggedTemplateSource, r as TIMESTAMP_NOW_GENERATOR_ID, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid, v as flushAuthoringWarnings, w as instantiateAuthoringTypeConstructor, x as instantiateAuthoringEntityType, y as getAuthoringTypeChoice, z as resolveAuthoringTemplateValue } from "./temporal-type-aliases-
|
|
2
|
-
import { C as readWrittenValueAs, D as writeTypedLiteral, E as writeDataTypeValue, O as writtenTypeArguments, S as readWrittenValue, T as tagForm, _ as exactRewrite, a as authoringTypeConstructors, b as knownTags, c as describeDiscriminatorRefusal, d as describeRefusedValueType, f as duplicateStoredMembers, g as enumMemberProblemDiagnostic, h as entryForTag, i as authoringTypeConstructorArguments, k as writtenTypeConstructorCall, l as describeExpected, m as entryForPlain, n as admittedTags, o as castTypedValue, p as encodeEnumMembers, r as applyDiscriminatorRule, s as describeAdmittedForms, t as admittedForms, u as describeRefusal, v as findAuthoringTypeChoiceCall, w as readWrittenValueIntoCodec, x as readEnumBlockMembers, y as findAuthoringTypeConstructorCall } from "./authoring-
|
|
1
|
+
import { $ as validateAuthoringTypeChoiceParams, A as isAuthoringTypeAliasDescriptor, B as resolveAuthoringTypeChoice, C as instantiateAuthoringTypeCall, D as isAuthoringEntityTypeDescriptor, E as isAuthoringArgRef, G as temporalTypeAliases, I as mergeAuthoringNamespaces, J as typeChoiceArgumentsFromObject, L as printTaggedLiteral, M as isAuthoringTypeChoiceOption, N as isAuthoringTypeConstructorDescriptor, O as isAuthoringModelAttributeDescriptor, P as isAuthoringTypeDescriptor, Q as validateAuthoringHelperArguments, R as printedTaggedLiteralReadsBack, S as instantiateAuthoringTypeAlias, T as instantiateAuthoringTypeConstructorFromValues, U as resolveTemplateTagEscapes, V as resolveEnumCodecId, W as resolveTypeAliasGenerators, X as typeConstructorLookup, Y as typeChoiceCombinationText, Z as unknownTypeChoiceArgumentMessage, _ as describeTaggedLiteralFailure, a as assembleDataTypeSupport, b as getAuthoringTypeConstructor, c as assertResolvableTypeConstructorTemplates, et as validateAuthoringTypeParams, f as canonicalizeTaggedLiteralBody, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, j as isAuthoringTypeChoiceDescriptor, k as isAuthoringPslBlockDescriptor, l as assertTypeAliasesValid, o as assertNoAuthoringFieldNamespace, p as classifyEnumMemberType, q as tsTaggedTemplateSource, r as TIMESTAMP_NOW_GENERATOR_ID, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid, v as flushAuthoringWarnings, w as instantiateAuthoringTypeConstructor, x as instantiateAuthoringEntityType, y as getAuthoringTypeChoice, z as resolveAuthoringTemplateValue } from "./temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs";
|
|
2
|
+
import { C as readWrittenValueAs, D as writeTypedLiteral, E as writeDataTypeValue, O as writtenTypeArguments, S as readWrittenValue, T as tagForm, _ as exactRewrite, a as authoringTypeConstructors, b as knownTags, c as describeDiscriminatorRefusal, d as describeRefusedValueType, f as duplicateStoredMembers, g as enumMemberProblemDiagnostic, h as entryForTag, i as authoringTypeConstructorArguments, k as writtenTypeConstructorCall, l as describeExpected, m as entryForPlain, n as admittedTags, o as castTypedValue, p as encodeEnumMembers, r as applyDiscriminatorRule, s as describeAdmittedForms, t as admittedForms, u as describeRefusal, v as findAuthoringTypeChoiceCall, w as readWrittenValueIntoCodec, x as readEnumBlockMembers, y as findAuthoringTypeConstructorCall } from "./authoring-DnYn5EZT.mjs";
|
|
3
3
|
export { AUTHORING_TYPE_DESCRIPTOR_KINDS, TIMESTAMP_NOW_GENERATOR_ID, admittedForms, admittedTags, applyDiscriminatorRule, assembleAuthoringDataTypes, assembleDataTypeSupport, assertNoAuthoringFieldNamespace, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertTypeAliasesValid, assertTypeChoicesValid, authoringTypeConstructorArguments, authoringTypeConstructors, canonicalizeTaggedLiteralBody, castTypedValue, classifyEnumMemberType, collectScalarTypeConstructors, describeAdmittedForms, describeDiscriminatorRefusal, describeExpected, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, duplicateStoredMembers, encodeEnumMembers, entryForPlain, entryForTag, enumMemberProblemDiagnostic, exactRewrite, findAuthoringTypeChoiceCall, findAuthoringTypeConstructorCall, flushAuthoringWarnings, getAuthoringTypeChoice, getAuthoringTypeConstructor, instantiateAuthoringEntityType, instantiateAuthoringTypeAlias, instantiateAuthoringTypeCall, instantiateAuthoringTypeConstructor, instantiateAuthoringTypeConstructorFromValues, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeAliasDescriptor, isAuthoringTypeChoiceDescriptor, isAuthoringTypeChoiceOption, isAuthoringTypeConstructorDescriptor, isAuthoringTypeDescriptor, knownTags, mergeAuthoringNamespaces, printTaggedLiteral, printedTaggedLiteralReadsBack, readEnumBlockMembers, readWrittenValue, readWrittenValueAs, readWrittenValueIntoCodec, resolveAuthoringTemplateValue, resolveAuthoringTypeChoice, resolveEnumCodecId, resolveTemplateTagEscapes, resolveTypeAliasGenerators, tagForm, temporalTypeAliases, tsTaggedTemplateSource, typeChoiceArgumentsFromObject, typeChoiceCombinationText, typeConstructorLookup, unknownTypeChoiceArgumentMessage, validateAuthoringHelperArguments, validateAuthoringTypeChoiceParams, validateAuthoringTypeParams, writeDataTypeValue, writeTypedLiteral, writtenTypeArguments, writtenTypeConstructorCall };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as readJsonString, D as requiredSchemaKeys, E as requiredParamKeys, O as schemaKeysAllowing, S as readJsonMatching, T as requireValueOf, _ as objectSchemaKeys, a as SAFE_INTEGER_RANGE, b as readJsonInteger, c as createDataTypeLookup, d as dataTypeParams, f as dataTypeParamsProblem, g as isNonFiniteText, h as isIntegerIn, i as SAFE_INTEGER_BIGINT_RANGE, l as dataType, m as floatToJson, n as INT32_RANGE, o as assembleDataTypes, p as dataTypeValuesEqual, r as INT64_RANGE, s as assertDataTypeParams, t as DATA_TYPE_ID_PATTERN, u as dataTypeId, v as readJsonBoolean, w as refuseJsonValue, x as readJsonIntegerText, y as readJsonFloat } from "./data-type-
|
|
1
|
+
import { C as readJsonString, D as requiredSchemaKeys, E as requiredParamKeys, O as schemaKeysAllowing, S as readJsonMatching, T as requireValueOf, _ as objectSchemaKeys, a as SAFE_INTEGER_RANGE, b as readJsonInteger, c as createDataTypeLookup, d as dataTypeParams, f as dataTypeParamsProblem, g as isNonFiniteText, h as isIntegerIn, i as SAFE_INTEGER_BIGINT_RANGE, l as dataType, m as floatToJson, n as INT32_RANGE, o as assembleDataTypes, p as dataTypeValuesEqual, r as INT64_RANGE, s as assertDataTypeParams, t as DATA_TYPE_ID_PATTERN, u as dataTypeId, v as readJsonBoolean, w as refuseJsonValue, x as readJsonIntegerText, y as readJsonFloat } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
2
2
|
import { a as resolveCodecDescriptorOrThrow, i as materializeCodec, o as validateCodecTypeParams, r as codecForRef, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from "./resolve-codec-qqMjZrmn-Cok8elAo.mjs";
|
|
3
3
|
import { t as emptyCodecLookup } from "./codec-types-BXLUbk-Y-DpGfKGK0.mjs";
|
|
4
|
-
import { a as numeralText, i as enumRefusalOf, n as CodecDescriptorTemplateImpl, o as readContractValue, r as CodecImpl, t as CodecDescriptorImpl } from "./codec-descriptor-
|
|
5
|
-
import { _ as signedRange, a as createNumberClassifier, c as decimalTextEqualityKey, d as isNumeralText, f as isoDateStringText, g as renderTsLiteral, h as refuseWrongShape, i as column, l as decimalTextNumberLiteral, m as printJsonText, n as asNumeralText, o as dateTimeStoredText, p as parseJsonText, r as castUnchanged, s as decimalTextBigintLiteral, t as asFloat, u as floatNumberLiteral, v as storedNumeralText } from "./codec-
|
|
4
|
+
import { a as numeralText, i as enumRefusalOf, n as CodecDescriptorTemplateImpl, o as readContractValue, r as CodecImpl, t as CodecDescriptorImpl } from "./codec-descriptor-CPSGZunM-DxrbRHX1.mjs";
|
|
5
|
+
import { _ as signedRange, a as createNumberClassifier, c as decimalTextEqualityKey, d as isNumeralText, f as isoDateStringText, g as renderTsLiteral, h as refuseWrongShape, i as column, l as decimalTextNumberLiteral, m as printJsonText, n as asNumeralText, o as dateTimeStoredText, p as parseJsonText, r as castUnchanged, s as decimalTextBigintLiteral, t as asFloat, u as floatNumberLiteral, v as storedNumeralText } from "./codec-yFwW7XRh.mjs";
|
|
6
6
|
export { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, asFloat, asNumeralText, assembleDataTypes, assertDataTypeParams, castUnchanged, codecForRef, column, createDataTypeLookup, createNumberClassifier, dataType, dataTypeId, dataTypeParams, dataTypeParamsProblem, dataTypeValuesEqual, dateTimeStoredText, decimalTextBigintLiteral, decimalTextEqualityKey, decimalTextNumberLiteral, emptyCodecLookup, enumRefusalOf, floatNumberLiteral, floatToJson, isIntegerIn, isNonFiniteText, isNumeralText, isoDateStringText, materializeCodec, numeralText, objectSchemaKeys, parseJsonText, printJsonText, readContractValue, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape, renderTsLiteral, requireValueOf, requiredParamKeys, requiredSchemaKeys, resolveCodecDescriptorOrThrow, schemaKeysAllowing, signedRange, storedNumeralText, validateCodecTypeParams };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as runtimeError, t as isRuntimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
2
2
|
import { a as isAggregateDescriptor, c as mergeCapabilityMatrices, l as singleGeneratorBinding, n as aggregateDescriptorKey, o as isAnyInputAggregateDescriptor, r as assembleGeneratorFunctions, s as isNoInputAggregateDescriptor, t as EMPTY_GENERATOR_FUNCTIONS } from "./generator-functions-CXbQfvYu-BIFU1Ryx.mjs";
|
|
3
3
|
import { t as checkContractComponentRequirements } from "./framework-components-D6j4Y5K7-RW9H184y.mjs";
|
|
4
|
-
import { n as settleAggregateOverloads, t as createGeneratorHelpers } from "./components-
|
|
4
|
+
import { n as settleAggregateOverloads, t as createGeneratorHelpers } from "./components-BaV9iCkq.mjs";
|
|
5
5
|
export { EMPTY_GENERATOR_FUNCTIONS, aggregateDescriptorKey, assembleGeneratorFunctions, checkContractComponentRequirements, createGeneratorHelpers, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, isRuntimeError, mergeCapabilityMatrices, runtimeError, settleAggregateOverloads, singleGeneratorBinding };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { H as resolvePslBacktickEscapes, K as timestampNowControlDescriptor, U as resolveTemplateTagEscapes, _ as describeTaggedLiteralFailure, n as TAGGED_LITERAL_MAX_BYTES } from "./temporal-type-aliases-
|
|
2
|
-
import { $ as schemaIssuesWhy, A as failedPostcheckWhy, B as isStorageHashHex, C as expectAbsent, D as extractComponentIds, E as extractCodecTypeImports, F as hasPslContractBuild, G as migrationSubjectJson, H as issueOutcome, I as hasPslContractInfer, J as modelStatementText, K as migrationSubjectKey, L as hasSchemaSubjectClassifier, M as fieldStatementText, N as hasMigrations, O as extractParameterizedOutputTypeImports, P as hasOperationPreview, Q as schemaCheckWhy, R as hasSchemaView, S as enumValueStatementText, T as extractCodecLookup, U as migrationRunnerFailure, V as issueLabel, W as migrationStatementJson, X as planOriginOf, Y as orderIssuesByDependencies, Z as sameMarkerHashes, _ as diffSchemas, a as VERIFY_CODE_HASH_MISMATCH, b as enumValueCoordinateFromJson, c as VERIFY_CODE_TARGET_MISMATCH, d as assertUniqueCodecOwner, et as storageHashHex, f as buildExtensionLoadOrder, g as describeMigrationStatement, h as createControlStack, i as SchemaTreeNode, j as failedPrecheckWhy, k as extractQueryOperationTypeImports, l as assembleAuthoringContributions, m as contractSnapshotTypesSpecifier, n as CONTRACT_SNAPSHOTS_DIRNAME, nt as withDatabaseUnchanged, o as VERIFY_CODE_MARKER_MISSING, p as contractSnapshotJsonSpecifier, q as modelDisplayName, r as SchemaDiff, rt as withFailingSpace, s as VERIFY_CODE_SCHEMA_FAILURE, t as APP_SPACE_ID, tt as valueObjectFieldStatementText, u as assembleControlMutationDefaults, v as dispositionForCategory, w as expectPresent, x as enumValueCoordinateJson, y as enforceHelperCodecInvariants, z as isRenameStatement } from "./control-
|
|
1
|
+
import { H as resolvePslBacktickEscapes, K as timestampNowControlDescriptor, U as resolveTemplateTagEscapes, _ as describeTaggedLiteralFailure, n as TAGGED_LITERAL_MAX_BYTES } from "./temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs";
|
|
2
|
+
import { $ as schemaIssuesWhy, A as failedPostcheckWhy, B as isStorageHashHex, C as expectAbsent, D as extractComponentIds, E as extractCodecTypeImports, F as hasPslContractBuild, G as migrationSubjectJson, H as issueOutcome, I as hasPslContractInfer, J as modelStatementText, K as migrationSubjectKey, L as hasSchemaSubjectClassifier, M as fieldStatementText, N as hasMigrations, O as extractParameterizedOutputTypeImports, P as hasOperationPreview, Q as schemaCheckWhy, R as hasSchemaView, S as enumValueStatementText, T as extractCodecLookup, U as migrationRunnerFailure, V as issueLabel, W as migrationStatementJson, X as planOriginOf, Y as orderIssuesByDependencies, Z as sameMarkerHashes, _ as diffSchemas, a as VERIFY_CODE_HASH_MISMATCH, b as enumValueCoordinateFromJson, c as VERIFY_CODE_TARGET_MISMATCH, d as assertUniqueCodecOwner, et as storageHashHex, f as buildExtensionLoadOrder, g as describeMigrationStatement, h as createControlStack, i as SchemaTreeNode, j as failedPrecheckWhy, k as extractQueryOperationTypeImports, l as assembleAuthoringContributions, m as contractSnapshotTypesSpecifier, n as CONTRACT_SNAPSHOTS_DIRNAME, nt as withDatabaseUnchanged, o as VERIFY_CODE_MARKER_MISSING, p as contractSnapshotJsonSpecifier, q as modelDisplayName, r as SchemaDiff, rt as withFailingSpace, s as VERIFY_CODE_SCHEMA_FAILURE, t as APP_SPACE_ID, tt as valueObjectFieldStatementText, u as assembleControlMutationDefaults, v as dispositionForCategory, w as expectPresent, x as enumValueCoordinateJson, y as enforceHelperCodecInvariants, z as isRenameStatement } from "./control-DzRwUDn-.mjs";
|
|
3
3
|
export { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME, SchemaDiff, SchemaTreeNode, TAGGED_LITERAL_MAX_BYTES, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assertUniqueCodecOwner, buildExtensionLoadOrder, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, createControlStack, describeMigrationStatement, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, enforceHelperCodecInvariants, enumValueCoordinateFromJson, enumValueCoordinateJson, enumValueStatementText, expectAbsent, expectPresent, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractParameterizedOutputTypeImports, extractQueryOperationTypeImports, failedPostcheckWhy, failedPrecheckWhy, fieldStatementText, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, isRenameStatement, isStorageHashHex, issueLabel, issueOutcome, migrationRunnerFailure, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, orderIssuesByDependencies, planOriginOf, resolvePslBacktickEscapes, resolveTemplateTagEscapes, sameMarkerHashes, schemaCheckWhy, schemaIssuesWhy, storageHashHex, timestampNowControlDescriptor, valueObjectFieldStatementText, withDatabaseUnchanged, withFailingSpace };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createExecutionStack, r as instantiateExecutionStack, t as assertRuntimeContractRequirementsSatisfied } from "./execution-
|
|
1
|
+
import { n as createExecutionStack, r as instantiateExecutionStack, t as assertRuntimeContractRequirementsSatisfied } from "./execution-DJDqCoRU.mjs";
|
|
2
2
|
export { assertRuntimeContractRequirementsSatisfied, createExecutionStack, instantiateExecutionStack };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
3
3
|
import { t as assertDefined } from "./assertions-Dw1lZz_Q.mjs";
|
|
4
|
-
import { I as mergeAuthoringNamespaces, o as assertNoAuthoringFieldNamespace, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, x as instantiateAuthoringEntityType } from "./temporal-type-aliases-
|
|
5
|
-
import { f as errorEnumCodecNotInPackStack } from "./control-MllEQmML-
|
|
6
|
-
import { p as encodeEnumMembers } from "./authoring-
|
|
4
|
+
import { I as mergeAuthoringNamespaces, o as assertNoAuthoringFieldNamespace, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, x as instantiateAuthoringEntityType } from "./temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs";
|
|
5
|
+
import { f as errorEnumCodecNotInPackStack } from "./control-MllEQmML-7F84gYuT.mjs";
|
|
6
|
+
import { p as encodeEnumMembers } from "./authoring-DnYn5EZT.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/contract/dist/index.mjs
|
|
8
8
|
/**
|
|
9
9
|
* Deep-merges any number of capability matrices into a single matrix.
|
|
@@ -4,11 +4,10 @@ import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
|
4
4
|
import { r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
5
5
|
import { t as asNamespaceId } from "./namespace-id-asbWpwMw-3yxn-tRe.mjs";
|
|
6
6
|
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { _ as objectSchemaKeys } from "./data-type-DPsP4_9m-BRPJX_-z.mjs";
|
|
7
|
+
import { _ as objectSchemaKeys } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
9
8
|
import { n as codecDescriptorMissing, r as codecForRef } from "./resolve-codec-qqMjZrmn-Cok8elAo.mjs";
|
|
10
9
|
import { a as isAggregateDescriptor, c as mergeCapabilityMatrices, i as assembleGeneratorRegistrations, n as aggregateDescriptorKey, r as assembleGeneratorFunctions } from "./generator-functions-CXbQfvYu-BIFU1Ryx.mjs";
|
|
11
|
-
import { E as isAuthoringArgRef, F as mergeAuthoringAttributeSpecs, I as mergeAuthoringNamespaces, a as assembleDataTypeSupport, c as assertResolvableTypeConstructorTemplates, g as contributedHelpers, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, l as assertTypeAliasesValid, m as collectContributedDescriptorPaths, o as assertNoAuthoringFieldNamespace, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid } from "./temporal-type-aliases-
|
|
10
|
+
import { E as isAuthoringArgRef, F as mergeAuthoringAttributeSpecs, I as mergeAuthoringNamespaces, a as assembleDataTypeSupport, c as assertResolvableTypeConstructorTemplates, g as contributedHelpers, h as collectScalarTypeConstructors, i as assembleAuthoringDataTypes, l as assertTypeAliasesValid, m as collectContributedDescriptorPaths, o as assertNoAuthoringFieldNamespace, s as assertNoCrossRegistryCollisions, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeChoicesValid } from "./temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs";
|
|
12
11
|
//#region ../../../1-framework/1-core/framework-components/dist/control.mjs
|
|
13
12
|
function expectAbsent(object) {
|
|
14
13
|
return {
|
|
@@ -475,7 +474,6 @@ function withSessionSettings(driver, sessionSettings) {
|
|
|
475
474
|
};
|
|
476
475
|
}
|
|
477
476
|
function createControlStack(input) {
|
|
478
|
-
assertOneFrameworkCopy();
|
|
479
477
|
const { family, target, adapter, driver, extensions = [] } = input;
|
|
480
478
|
const orderedIds = buildExtensionLoadOrder(extensions);
|
|
481
479
|
const extensionById = new Map(extensions.map((ext) => [ext.id, ext]));
|
|
@@ -1030,4 +1028,4 @@ function dispositionForCategory(controlPolicy, category) {
|
|
|
1030
1028
|
//#endregion
|
|
1031
1029
|
export { schemaIssuesWhy as $, failedPostcheckWhy as A, isStorageHashHex as B, expectAbsent as C, extractComponentIds as D, extractCodecTypeImports as E, hasPslContractBuild as F, migrationSubjectJson as G, issueOutcome as H, hasPslContractInfer as I, modelStatementText as J, migrationSubjectKey as K, hasSchemaSubjectClassifier as L, fieldStatementText as M, hasMigrations as N, extractParameterizedOutputTypeImports as O, hasOperationPreview as P, schemaCheckWhy as Q, hasSchemaView as R, enumValueStatementText as S, extractCodecLookup as T, migrationRunnerFailure as U, issueLabel as V, migrationStatementJson as W, planOriginOf as X, orderIssuesByDependencies as Y, sameMarkerHashes as Z, diffSchemas as _, VERIFY_CODE_HASH_MISMATCH as a, enumValueCoordinateFromJson as b, VERIFY_CODE_TARGET_MISMATCH as c, assertUniqueCodecOwner as d, storageHashHex as et, buildExtensionLoadOrder as f, describeMigrationStatement as g, createControlStack as h, SchemaTreeNode as i, failedPrecheckWhy as j, extractQueryOperationTypeImports as k, assembleAuthoringContributions as l, contractSnapshotTypesSpecifier as m, CONTRACT_SNAPSHOTS_DIRNAME as n, withDatabaseUnchanged as nt, VERIFY_CODE_MARKER_MISSING as o, contractSnapshotJsonSpecifier as p, modelDisplayName as q, SchemaDiff as r, withFailingSpace as rt, VERIFY_CODE_SCHEMA_FAILURE as s, APP_SPACE_ID as t, valueObjectFieldStatementText as tt, assembleControlMutationDefaults as u, dispositionForCategory as v, expectPresent as w, enumValueCoordinateJson as x, enforceHelperCodecInvariants as y, isRenameStatement as z };
|
|
1032
1030
|
|
|
1033
|
-
//# sourceMappingURL=control-
|
|
1031
|
+
//# sourceMappingURL=control-DzRwUDn-.mjs.map
|