@prisma/orm-framework 8.0.0-rc.24-dev.11 → 8.0.0-rc.24-dev.13

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.
@@ -1,5 +1,9 @@
1
1
  //#region ../../../3-targets/0-shared/type-implementations/dist/date.d.mts
2
2
  //#region src/date.d.ts
3
+ /** Whether `value` is a `Date`, including one created in another realm such as a `vm` context or a Jest test file. */
4
+ declare function isDate(value: unknown): value is Date;
5
+ /** The same instant as a `Date` of this realm, which a driver that checks `instanceof Date` or the string tag recognises. */
6
+ declare function dateOfThisRealm(date: Date): Date;
3
7
  /** Whether `value` is a `Date` that holds an instant, not an Invalid Date. */
4
8
  declare function isValidDate(value: unknown): value is Date;
5
9
  /** Whether ISO text has nonzero fraction digits past the first `fractionDigits`. */
@@ -13,5 +17,5 @@ declare function withoutZerosBelowAMillisecond(text: string): string;
13
17
  /** The fraction of ISO text padded to exactly three digits, as `toISOString()` writes it. */
14
18
  declare function withThreeFractionDigits(text: string): string;
15
19
  //#endregion
16
- export { withThreeFractionDigits as a, utcIsoTextOf as i, hasDigitsBelowAMillisecond as n, withoutZerosBelowAMillisecond as o, isValidDate as r, hasDigitsBelow as t };
17
- //# sourceMappingURL=date-Ek2ojnY-.d.mts.map
20
+ export { isValidDate as a, withoutZerosBelowAMillisecond as c, isDate as i, hasDigitsBelow as n, utcIsoTextOf as o, hasDigitsBelowAMillisecond as r, withThreeFractionDigits as s, dateOfThisRealm as t };
21
+ //# sourceMappingURL=date-Cq0RCxit.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-Cq0RCxit.d.mts","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/date.d.mts"],"mappings":";;;iBAEiB,OAAO,iBAAiB,SAAS;;iBAEjC,gBAAgB,MAAM,OAAO;;iBAE7B,YAAY,iBAAiB,SAAS;;iBAEtC,eAAe,cAAc;;iBAE7B,2BAA2B;;iBAE3B,aAAa,OAAO,MAAM;;iBAE1B,8BAA8B;;iBAE9B,wBAAwB"}
@@ -1,7 +1,17 @@
1
- //#region ../../../3-targets/0-shared/type-implementations/dist/date.mjs
1
+ import { types } from "node:util";
2
+ //#region ../../../3-targets/0-shared/type-implementations/dist/date-dUDzrveD.mjs
3
+ /** Whether `value` is a `Date`, including one created in another realm such as a `vm` context or a Jest test file. */
4
+ function isDate(value) {
5
+ return types.isDate(value);
6
+ }
7
+ /** The same instant as a `Date` of this realm, which a driver that checks `instanceof Date` or the string tag recognises. */
8
+ function dateOfThisRealm(date) {
9
+ const instant = date.getTime();
10
+ return date instanceof Date ? date : new Date(instant);
11
+ }
2
12
  /** Whether `value` is a `Date` that holds an instant, not an Invalid Date. */
3
13
  function isValidDate(value) {
4
- return value instanceof Date && Number.isFinite(value.getTime());
14
+ return isDate(value) && Number.isFinite(value.getTime());
5
15
  }
6
16
  /** Whether ISO text has nonzero fraction digits past the first `fractionDigits`. */
7
17
  function hasDigitsBelow(text, fractionDigits) {
@@ -26,6 +36,6 @@ function withThreeFractionDigits(text) {
26
36
  return text.replace(/(\d{2}:\d{2}:\d{2})(?:\.(\d{1,3}))?(?=Z?$)/, (_whole, clock, fraction) => `${clock}.${(fraction ?? "").padEnd(3, "0")}`);
27
37
  }
28
38
  //#endregion
29
- export { withThreeFractionDigits as a, utcIsoTextOf as i, hasDigitsBelowAMillisecond as n, withoutZerosBelowAMillisecond as o, isValidDate as r, hasDigitsBelow as t };
39
+ export { isValidDate as a, withoutZerosBelowAMillisecond as c, isDate as i, hasDigitsBelow as n, utcIsoTextOf as o, hasDigitsBelowAMillisecond as r, withThreeFractionDigits as s, dateOfThisRealm as t };
30
40
 
31
- //# sourceMappingURL=date-CXI6LCYR.mjs.map
41
+ //# sourceMappingURL=date-dUDzrveD-dXiNEmPK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-dUDzrveD-dXiNEmPK.mjs","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/date-dUDzrveD.mjs"],"sourcesContent":["import { types } from \"node:util\";\n//#region src/date.ts\n/** Whether `value` is a `Date`, including one created in another realm such as a `vm` context or a Jest test file. */\nfunction isDate(value) {\n\treturn types.isDate(value);\n}\n/** The same instant as a `Date` of this realm, which a driver that checks `instanceof Date` or the string tag recognises. */\nfunction dateOfThisRealm(date) {\n\tconst instant = date.getTime();\n\treturn date instanceof Date ? date : new Date(instant);\n}\n/** Whether `value` is a `Date` that holds an instant, not an Invalid Date. */\nfunction isValidDate(value) {\n\treturn isDate(value) && Number.isFinite(value.getTime());\n}\n/** Whether ISO text has nonzero fraction digits past the first `fractionDigits`. */\nfunction hasDigitsBelow(text, fractionDigits) {\n\treturn /[1-9]/.test(/\\.(\\d+)/.exec(text)?.[1]?.slice(fractionDigits) ?? \"\");\n}\n/** Whether ISO text has nonzero digits below a millisecond, which a `Date` drops. */\nfunction hasDigitsBelowAMillisecond(text) {\n\treturn hasDigitsBelow(text, 3);\n}\n/** `value` in UTC as `Date.toISOString` writes it, or `undefined` for an Invalid Date or one before `earliestMilliseconds`. */\nfunction utcIsoTextOf(value, earliestMilliseconds) {\n\tconst milliseconds = value.getTime();\n\tif (!Number.isFinite(milliseconds) || milliseconds < earliestMilliseconds) return void 0;\n\treturn value.toISOString();\n}\n/** The fraction of ISO text with any zeros past its third digit removed, so `09:30:00.500000` is the millisecond it names. */\nfunction withoutZerosBelowAMillisecond(text) {\n\treturn text.replace(/(\\.\\d{3})0+(?!\\d)/, \"$1\");\n}\n/** The fraction of ISO text padded to exactly three digits, as `toISOString()` writes it. */\nfunction withThreeFractionDigits(text) {\n\treturn text.replace(/(\\d{2}:\\d{2}:\\d{2})(?:\\.(\\d{1,3}))?(?=Z?$)/, (_whole, clock, fraction) => `${clock}.${(fraction ?? \"\").padEnd(3, \"0\")}`);\n}\n//#endregion\nexport { isValidDate as a, withoutZerosBelowAMillisecond as c, isDate as i, hasDigitsBelow as n, utcIsoTextOf as o, hasDigitsBelowAMillisecond as r, withThreeFractionDigits as s, dateOfThisRealm as t };\n\n//# sourceMappingURL=date-dUDzrveD.mjs.map"],"mappings":";;;AAGA,SAAS,OAAO,OAAO;CACtB,OAAO,MAAM,OAAO,KAAK;AAC1B;;AAEA,SAAS,gBAAgB,MAAM;CAC9B,MAAM,UAAU,KAAK,QAAQ;CAC7B,OAAO,gBAAgB,OAAO,OAAO,IAAI,KAAK,OAAO;AACtD;;AAEA,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,KAAK,KAAK,OAAO,SAAS,MAAM,QAAQ,CAAC;AACxD;;AAEA,SAAS,eAAe,MAAM,gBAAgB;CAC7C,OAAO,QAAQ,KAAK,UAAU,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,cAAc,KAAK,EAAE;AAC3E;;AAEA,SAAS,2BAA2B,MAAM;CACzC,OAAO,eAAe,MAAM,CAAC;AAC9B;;AAEA,SAAS,aAAa,OAAO,sBAAsB;CAClD,MAAM,eAAe,MAAM,QAAQ;CACnC,IAAI,CAAC,OAAO,SAAS,YAAY,KAAK,eAAe,sBAAsB,OAAO,KAAK;CACvF,OAAO,MAAM,YAAY;AAC1B;;AAEA,SAAS,8BAA8B,MAAM;CAC5C,OAAO,KAAK,QAAQ,qBAAqB,IAAI;AAC9C;;AAEA,SAAS,wBAAwB,MAAM;CACtC,OAAO,KAAK,QAAQ,+CAA+C,QAAQ,OAAO,aAAa,GAAG,MAAM,IAAI,YAAY,GAAA,CAAI,OAAO,GAAG,GAAG,GAAG;AAC7I"}
@@ -1,3 +1,4 @@
1
+ import { i as isDate } from "./date-dUDzrveD-dXiNEmPK.mjs";
1
2
  //#region ../../../3-targets/0-shared/type-implementations/dist/temporal-text.mjs
2
3
  /** Reads `text` as a Temporal value with `parse`, or says why `parse` refused it. */
3
4
  function temporalFromText(temporal, text, parse) {
@@ -38,7 +39,7 @@ function describeEncodeInput(value, tag) {
38
39
  /** A value of the wrong type, as an error message names it: `null`, `a Date`, or `a` and its `typeof`. */
39
40
  function describeValue(value) {
40
41
  if (value === null) return "null";
41
- if (value instanceof Date) return "a Date";
42
+ if (isDate(value)) return "a Date";
42
43
  return `a ${typeof value}`;
43
44
  }
44
45
  /** ISO text in UTC without its trailing `Z`. */
@@ -48,4 +49,4 @@ function withoutUtcDesignator(isoText) {
48
49
  //#endregion
49
50
  export { withoutUtcDesignator as i, temporalFromText as n, temporalToText as r, describeValue as t };
50
51
 
51
- //# sourceMappingURL=temporal-text-DTDPzvc_.mjs.map
52
+ //# sourceMappingURL=temporal-text-7FpwYovY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temporal-text-7FpwYovY.mjs","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/temporal-text.mjs"],"sourcesContent":["import { i as isDate } from \"./date-dUDzrveD.mjs\";\n//#region src/temporal-text.ts\n/** Reads `text` as a Temporal value with `parse`, or says why `parse` refused it. */\nfunction temporalFromText(temporal, text, parse) {\n\ttry {\n\t\treturn {\n\t\t\tkind: \"value\",\n\t\t\tvalue: parse(temporal, text)\n\t\t};\n\t} catch (cause) {\n\t\treturn {\n\t\t\tkind: \"unreadable\",\n\t\t\tdetail: cause instanceof Error ? cause.message : String(cause),\n\t\t\tcause\n\t\t};\n\t}\n}\n/**\n* The ISO text of a Temporal value of the kind `temporalTag` names, as `isoText` writes it, by default its own `toString()`. A value of another kind, or in a calendar other than ISO 8601, is refused. The kind is read from `Symbol.toStringTag`, so a value made by any Temporal implementation is accepted.\n*/\nfunction temporalToText(value, temporalTag, isoText = (temporalValue) => temporalValue.toString()) {\n\tconst tag = typeof value === \"object\" && value !== null ? Reflect.get(value, Symbol.toStringTag) : void 0;\n\tif (tag !== temporalTag) return {\n\t\tkind: \"wrong-type\",\n\t\treceived: describeEncodeInput(value, tag)\n\t};\n\tif (value.calendarId !== void 0 && value.calendarId !== \"iso8601\") return {\n\t\tkind: \"non-iso-calendar\",\n\t\tcalendarId: value.calendarId\n\t};\n\treturn {\n\t\tkind: \"text\",\n\t\ttext: isoText(value)\n\t};\n}\nfunction describeEncodeInput(value, tag) {\n\treturn typeof tag === \"string\" ? `a ${tag}` : describeValue(value);\n}\n/** A value of the wrong type, as an error message names it: `null`, `a Date`, or `a` and its `typeof`. */\nfunction describeValue(value) {\n\tif (value === null) return \"null\";\n\tif (isDate(value)) return \"a Date\";\n\treturn `a ${typeof value}`;\n}\n/** ISO text in UTC without its trailing `Z`. */\nfunction withoutUtcDesignator(isoText) {\n\treturn isoText.endsWith(\"Z\") ? isoText.slice(0, -1) : isoText;\n}\n//#endregion\nexport { describeValue, temporalFromText, temporalToText, withoutUtcDesignator };\n\n//# sourceMappingURL=temporal-text.mjs.map"],"mappings":";;;AAGA,SAAS,iBAAiB,UAAU,MAAM,OAAO;CAChD,IAAI;EACH,OAAO;GACN,MAAM;GACN,OAAO,MAAM,UAAU,IAAI;EAC5B;CACD,SAAS,OAAO;EACf,OAAO;GACN,MAAM;GACN,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC7D;EACD;CACD;AACD;;;;AAIA,SAAS,eAAe,OAAO,aAAa,WAAW,kBAAkB,cAAc,SAAS,GAAG;CAClG,MAAM,MAAM,OAAO,UAAU,YAAY,UAAU,OAAO,QAAQ,IAAI,OAAO,OAAO,WAAW,IAAI,KAAK;CACxG,IAAI,QAAQ,aAAa,OAAO;EAC/B,MAAM;EACN,UAAU,oBAAoB,OAAO,GAAG;CACzC;CACA,IAAI,MAAM,eAAe,KAAK,KAAK,MAAM,eAAe,WAAW,OAAO;EACzE,MAAM;EACN,YAAY,MAAM;CACnB;CACA,OAAO;EACN,MAAM;EACN,MAAM,QAAQ,KAAK;CACpB;AACD;AACA,SAAS,oBAAoB,OAAO,KAAK;CACxC,OAAO,OAAO,QAAQ,WAAW,KAAK,QAAQ,cAAc,KAAK;AAClE;;AAEA,SAAS,cAAc,OAAO;CAC7B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,OAAO,KAAK,GAAG,OAAO;CAC1B,OAAO,KAAK,OAAO;AACpB;;AAEA,SAAS,qBAAqB,SAAS;CACtC,OAAO,QAAQ,SAAS,GAAG,IAAI,QAAQ,MAAM,GAAG,EAAE,IAAI;AACvD"}
@@ -1,7 +1,7 @@
1
- import { a as withThreeFractionDigits, i as utcIsoTextOf, n as hasDigitsBelowAMillisecond, o as withoutZerosBelowAMillisecond, r as isValidDate, t as hasDigitsBelow } from "./date-Ek2ojnY-.mjs";
1
+ import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-Cq0RCxit.mjs";
2
2
  import { n as ISO_DURATION_AS_WRITTEN, t as ISO_DURATION } from "./duration-cFUtCY2y.mjs";
3
3
  import { n as findTemporal, r as setFallbackTemporal, t as TemporalImplementation } from "./temporal-ByipDkUQ-BSRSKsqk.mjs";
4
4
  import { _ as timeStringNow, a as PLAIN_DATE_NOW_GENERATOR_ID, c as TIME_STRING_NOW_GENERATOR_ID, d as fractionDigitsOf, f as instantNow, g as plainTimeNow, h as plainDateTimeNow, i as INSTANT_STRING_NOW_GENERATOR_ID, l as dateStringNow, m as plainDateNow, n as GeneratorParams, o as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantStringNow, r as INSTANT_NOW_GENERATOR_ID, s as PLAIN_TIME_NOW_GENERATOR_ID, t as DATE_STRING_NOW_GENERATOR_ID, u as dateTimeStringNow } from "./now-BAgn1BJy.mjs";
5
5
  import "./temporal-DIeQx56W.mjs";
6
6
  import { a as temporalToText, i as temporalFromText, n as TemporalValue, o as withoutUtcDesignator, r as describeValue, t as TemporalTag } from "./temporal-text-CRbkPKoz.mjs";
7
- export { DATE_STRING_NOW_GENERATOR_ID, type GeneratorParams, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, type TemporalImplementation, type TemporalTag, type TemporalValue, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
7
+ export { DATE_STRING_NOW_GENERATOR_ID, type GeneratorParams, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, type TemporalImplementation, type TemporalTag, type TemporalValue, dateOfThisRealm, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isDate, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
@@ -1,6 +1,6 @@
1
- import { a as withThreeFractionDigits, i as utcIsoTextOf, n as hasDigitsBelowAMillisecond, o as withoutZerosBelowAMillisecond, r as isValidDate, t as hasDigitsBelow } from "./date-CXI6LCYR.mjs";
1
+ import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-dUDzrveD-dXiNEmPK.mjs";
2
2
  import { n as ISO_DURATION_AS_WRITTEN, t as ISO_DURATION } from "./duration-BqxS5qWq.mjs";
3
3
  import { a as PLAIN_DATE_TIME_NOW_GENERATOR_ID, c as dateStringNow, d as instantNow, f as instantStringNow, g as timeStringNow, h as plainTimeNow, i as PLAIN_DATE_NOW_GENERATOR_ID, l as dateTimeStringNow, m as plainDateTimeNow, n as INSTANT_NOW_GENERATOR_ID, o as PLAIN_TIME_NOW_GENERATOR_ID, p as plainDateNow, r as INSTANT_STRING_NOW_GENERATOR_ID, s as TIME_STRING_NOW_GENERATOR_ID, t as DATE_STRING_NOW_GENERATOR_ID, u as fractionDigitsOf } from "./now-rRujKrwj.mjs";
4
4
  import { n as setFallbackTemporal, t as findTemporal } from "./temporal-BlPzxzji.mjs";
5
- import { i as withoutUtcDesignator, n as temporalFromText, r as temporalToText, t as describeValue } from "./temporal-text-DTDPzvc_.mjs";
6
- export { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
5
+ import { i as withoutUtcDesignator, n as temporalFromText, r as temporalToText, t as describeValue } from "./temporal-text-7FpwYovY.mjs";
6
+ export { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, dateOfThisRealm, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isDate, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
@@ -1,2 +1,2 @@
1
- import { a as withThreeFractionDigits, i as utcIsoTextOf, n as hasDigitsBelowAMillisecond, o as withoutZerosBelowAMillisecond, r as isValidDate, t as hasDigitsBelow } from "./date-Ek2ojnY-.mjs";
2
- export { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate, utcIsoTextOf, withThreeFractionDigits, withoutZerosBelowAMillisecond };
1
+ import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-Cq0RCxit.mjs";
2
+ export { dateOfThisRealm, hasDigitsBelow, hasDigitsBelowAMillisecond, isDate, isValidDate, utcIsoTextOf, withThreeFractionDigits, withoutZerosBelowAMillisecond };
@@ -1,2 +1,2 @@
1
- import { a as withThreeFractionDigits, i as utcIsoTextOf, n as hasDigitsBelowAMillisecond, o as withoutZerosBelowAMillisecond, r as isValidDate, t as hasDigitsBelow } from "./date-CXI6LCYR.mjs";
2
- export { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate, utcIsoTextOf, withThreeFractionDigits, withoutZerosBelowAMillisecond };
1
+ import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-dUDzrveD-dXiNEmPK.mjs";
2
+ export { dateOfThisRealm, hasDigitsBelow, hasDigitsBelowAMillisecond, isDate, isValidDate, utcIsoTextOf, withThreeFractionDigits, withoutZerosBelowAMillisecond };
@@ -1,2 +1,2 @@
1
- import { i as withoutUtcDesignator, n as temporalFromText, r as temporalToText, t as describeValue } from "./temporal-text-DTDPzvc_.mjs";
1
+ import { i as withoutUtcDesignator, n as temporalFromText, r as temporalToText, t as describeValue } from "./temporal-text-7FpwYovY.mjs";
2
2
  export { describeValue, temporalFromText, temporalToText, withoutUtcDesignator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-framework",
3
- "version": "8.0.0-rc.24-dev.11",
3
+ "version": "8.0.0-rc.24-dev.13",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -17,21 +17,21 @@
17
17
  "uniku": "^0.5.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@internal/config": "8.0.0-rc.24-dev.11",
21
- "@internal/contract": "8.0.0-rc.24-dev.11",
22
- "@internal/contract-authoring": "8.0.0-rc.24-dev.11",
23
- "@internal/errors": "8.0.0-rc.24-dev.11",
24
- "@internal/framework-components": "8.0.0-rc.24-dev.11",
25
- "@internal/ids": "8.0.0-rc.24-dev.11",
26
- "@internal/operations": "8.0.0-rc.24-dev.11",
27
- "@internal/psl-parser": "8.0.0-rc.24-dev.11",
28
- "@internal/psl-printer": "8.0.0-rc.24-dev.11",
29
- "@internal/ts-render": "8.0.0-rc.24-dev.11",
30
- "@internal/type-implementations": "8.0.0-rc.24-dev.11",
31
- "@repo/tsconfig": "8.0.0-rc.24-dev.11",
32
- "@internal/publish-surface": "8.0.0-rc.24-dev.11",
33
- "@repo/tsdown": "8.0.0-rc.24-dev.11",
34
- "@internal/utils": "8.0.0-rc.24-dev.11",
20
+ "@internal/config": "8.0.0-rc.24-dev.13",
21
+ "@internal/contract": "8.0.0-rc.24-dev.13",
22
+ "@internal/contract-authoring": "8.0.0-rc.24-dev.13",
23
+ "@internal/errors": "8.0.0-rc.24-dev.13",
24
+ "@internal/framework-components": "8.0.0-rc.24-dev.13",
25
+ "@internal/ids": "8.0.0-rc.24-dev.13",
26
+ "@internal/operations": "8.0.0-rc.24-dev.13",
27
+ "@internal/psl-parser": "8.0.0-rc.24-dev.13",
28
+ "@internal/psl-printer": "8.0.0-rc.24-dev.13",
29
+ "@internal/ts-render": "8.0.0-rc.24-dev.13",
30
+ "@internal/type-implementations": "8.0.0-rc.24-dev.13",
31
+ "@repo/tsconfig": "8.0.0-rc.24-dev.13",
32
+ "@internal/publish-surface": "8.0.0-rc.24-dev.13",
33
+ "@repo/tsdown": "8.0.0-rc.24-dev.13",
34
+ "@internal/utils": "8.0.0-rc.24-dev.13",
35
35
  "tsdown": "0.22.14",
36
36
  "typescript": "5.9.3",
37
37
  "vitest": "5.0.0-rc.2"
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-CXI6LCYR.mjs","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/date.mjs"],"sourcesContent":["//#region src/date.ts\n/** Whether `value` is a `Date` that holds an instant, not an Invalid Date. */\nfunction isValidDate(value) {\n\treturn value instanceof Date && Number.isFinite(value.getTime());\n}\n/** Whether ISO text has nonzero fraction digits past the first `fractionDigits`. */\nfunction hasDigitsBelow(text, fractionDigits) {\n\treturn /[1-9]/.test(/\\.(\\d+)/.exec(text)?.[1]?.slice(fractionDigits) ?? \"\");\n}\n/** Whether ISO text has nonzero digits below a millisecond, which a `Date` drops. */\nfunction hasDigitsBelowAMillisecond(text) {\n\treturn hasDigitsBelow(text, 3);\n}\n/** `value` in UTC as `Date.toISOString` writes it, or `undefined` for an Invalid Date or one before `earliestMilliseconds`. */\nfunction utcIsoTextOf(value, earliestMilliseconds) {\n\tconst milliseconds = value.getTime();\n\tif (!Number.isFinite(milliseconds) || milliseconds < earliestMilliseconds) return void 0;\n\treturn value.toISOString();\n}\n/** The fraction of ISO text with any zeros past its third digit removed, so `09:30:00.500000` is the millisecond it names. */\nfunction withoutZerosBelowAMillisecond(text) {\n\treturn text.replace(/(\\.\\d{3})0+(?!\\d)/, \"$1\");\n}\n/** The fraction of ISO text padded to exactly three digits, as `toISOString()` writes it. */\nfunction withThreeFractionDigits(text) {\n\treturn text.replace(/(\\d{2}:\\d{2}:\\d{2})(?:\\.(\\d{1,3}))?(?=Z?$)/, (_whole, clock, fraction) => `${clock}.${(fraction ?? \"\").padEnd(3, \"0\")}`);\n}\n//#endregion\nexport { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate, utcIsoTextOf, withThreeFractionDigits, withoutZerosBelowAMillisecond };\n\n//# sourceMappingURL=date.mjs.map"],"mappings":";;AAEA,SAAS,YAAY,OAAO;CAC3B,OAAO,iBAAiB,QAAQ,OAAO,SAAS,MAAM,QAAQ,CAAC;AAChE;;AAEA,SAAS,eAAe,MAAM,gBAAgB;CAC7C,OAAO,QAAQ,KAAK,UAAU,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,cAAc,KAAK,EAAE;AAC3E;;AAEA,SAAS,2BAA2B,MAAM;CACzC,OAAO,eAAe,MAAM,CAAC;AAC9B;;AAEA,SAAS,aAAa,OAAO,sBAAsB;CAClD,MAAM,eAAe,MAAM,QAAQ;CACnC,IAAI,CAAC,OAAO,SAAS,YAAY,KAAK,eAAe,sBAAsB,OAAO,KAAK;CACvF,OAAO,MAAM,YAAY;AAC1B;;AAEA,SAAS,8BAA8B,MAAM;CAC5C,OAAO,KAAK,QAAQ,qBAAqB,IAAI;AAC9C;;AAEA,SAAS,wBAAwB,MAAM;CACtC,OAAO,KAAK,QAAQ,+CAA+C,QAAQ,OAAO,aAAa,GAAG,MAAM,IAAI,YAAY,GAAA,CAAI,OAAO,GAAG,GAAG,GAAG;AAC7I"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-Ek2ojnY-.d.mts","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/date.d.mts"],"mappings":";;;iBAEiB,YAAY,iBAAiB,SAAS;;iBAEtC,eAAe,cAAc;;iBAE7B,2BAA2B;;iBAE3B,aAAa,OAAO,MAAM;;iBAE1B,8BAA8B;;iBAE9B,wBAAwB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"temporal-text-DTDPzvc_.mjs","names":[],"sources":["../../../../3-targets/0-shared/type-implementations/dist/temporal-text.mjs"],"sourcesContent":["//#region src/temporal-text.ts\n/** Reads `text` as a Temporal value with `parse`, or says why `parse` refused it. */\nfunction temporalFromText(temporal, text, parse) {\n\ttry {\n\t\treturn {\n\t\t\tkind: \"value\",\n\t\t\tvalue: parse(temporal, text)\n\t\t};\n\t} catch (cause) {\n\t\treturn {\n\t\t\tkind: \"unreadable\",\n\t\t\tdetail: cause instanceof Error ? cause.message : String(cause),\n\t\t\tcause\n\t\t};\n\t}\n}\n/**\n* The ISO text of a Temporal value of the kind `temporalTag` names, as `isoText` writes it, by default its own `toString()`. A value of another kind, or in a calendar other than ISO 8601, is refused. The kind is read from `Symbol.toStringTag`, so a value made by any Temporal implementation is accepted.\n*/\nfunction temporalToText(value, temporalTag, isoText = (temporalValue) => temporalValue.toString()) {\n\tconst tag = typeof value === \"object\" && value !== null ? Reflect.get(value, Symbol.toStringTag) : void 0;\n\tif (tag !== temporalTag) return {\n\t\tkind: \"wrong-type\",\n\t\treceived: describeEncodeInput(value, tag)\n\t};\n\tif (value.calendarId !== void 0 && value.calendarId !== \"iso8601\") return {\n\t\tkind: \"non-iso-calendar\",\n\t\tcalendarId: value.calendarId\n\t};\n\treturn {\n\t\tkind: \"text\",\n\t\ttext: isoText(value)\n\t};\n}\nfunction describeEncodeInput(value, tag) {\n\treturn typeof tag === \"string\" ? `a ${tag}` : describeValue(value);\n}\n/** A value of the wrong type, as an error message names it: `null`, `a Date`, or `a` and its `typeof`. */\nfunction describeValue(value) {\n\tif (value === null) return \"null\";\n\tif (value instanceof Date) return \"a Date\";\n\treturn `a ${typeof value}`;\n}\n/** ISO text in UTC without its trailing `Z`. */\nfunction withoutUtcDesignator(isoText) {\n\treturn isoText.endsWith(\"Z\") ? isoText.slice(0, -1) : isoText;\n}\n//#endregion\nexport { describeValue, temporalFromText, temporalToText, withoutUtcDesignator };\n\n//# sourceMappingURL=temporal-text.mjs.map"],"mappings":";;AAEA,SAAS,iBAAiB,UAAU,MAAM,OAAO;CAChD,IAAI;EACH,OAAO;GACN,MAAM;GACN,OAAO,MAAM,UAAU,IAAI;EAC5B;CACD,SAAS,OAAO;EACf,OAAO;GACN,MAAM;GACN,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC7D;EACD;CACD;AACD;;;;AAIA,SAAS,eAAe,OAAO,aAAa,WAAW,kBAAkB,cAAc,SAAS,GAAG;CAClG,MAAM,MAAM,OAAO,UAAU,YAAY,UAAU,OAAO,QAAQ,IAAI,OAAO,OAAO,WAAW,IAAI,KAAK;CACxG,IAAI,QAAQ,aAAa,OAAO;EAC/B,MAAM;EACN,UAAU,oBAAoB,OAAO,GAAG;CACzC;CACA,IAAI,MAAM,eAAe,KAAK,KAAK,MAAM,eAAe,WAAW,OAAO;EACzE,MAAM;EACN,YAAY,MAAM;CACnB;CACA,OAAO;EACN,MAAM;EACN,MAAM,QAAQ,KAAK;CACpB;AACD;AACA,SAAS,oBAAoB,OAAO,KAAK;CACxC,OAAO,OAAO,QAAQ,WAAW,KAAK,QAAQ,cAAc,KAAK;AAClE;;AAEA,SAAS,cAAc,OAAO;CAC7B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,iBAAiB,MAAM,OAAO;CAClC,OAAO,KAAK,OAAO;AACpB;;AAEA,SAAS,qBAAqB,SAAS;CACtC,OAAO,QAAQ,SAAS,GAAG,IAAI,QAAQ,MAAM,GAAG,EAAE,IAAI;AACvD"}