gemi 0.52.0 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/{chunk-a0sy9f9x.js → chunk-07jtzbf0.js} +1 -1
  2. package/dist/{chunk-jdfe4dmh.js → chunk-1pqfmw5h.js} +2 -2
  3. package/dist/{chunk-jdfe4dmh.js.map → chunk-1pqfmw5h.js.map} +1 -1
  4. package/dist/chunk-3d3nmr5g.js +4 -0
  5. package/dist/{chunk-qj4mmner.js.map → chunk-3d3nmr5g.js.map} +2 -2
  6. package/dist/{chunk-et0j6jx8.js → chunk-7s1g3v1y.js} +3 -3
  7. package/dist/{chunk-et0j6jx8.js.map → chunk-7s1g3v1y.js.map} +1 -1
  8. package/dist/chunk-92793zh4.js +5 -0
  9. package/dist/{chunk-0tbwn6er.js.map → chunk-92793zh4.js.map} +3 -4
  10. package/dist/chunk-9279y4af.js +5 -0
  11. package/dist/{chunk-f29vd5mc.js.map → chunk-9279y4af.js.map} +2 -2
  12. package/dist/chunk-bq4w14a6.js +5 -0
  13. package/dist/chunk-bq4w14a6.js.map +10 -0
  14. package/dist/{chunk-4t6a82fh.js → chunk-cg53h5ht.js} +2 -2
  15. package/dist/{chunk-4t6a82fh.js.map → chunk-cg53h5ht.js.map} +1 -1
  16. package/dist/{chunk-km6x37ws.js → chunk-ear03axe.js} +24 -24
  17. package/dist/{chunk-km6x37ws.js.map → chunk-ear03axe.js.map} +3 -5
  18. package/dist/{chunk-38ma6gg3.js → chunk-fbp5vapa.js} +2 -2
  19. package/dist/{chunk-38ma6gg3.js.map → chunk-fbp5vapa.js.map} +2 -2
  20. package/dist/chunk-ffre1z8s.js +6 -0
  21. package/dist/{chunk-hbycemy5.js.map → chunk-ffre1z8s.js.map} +2 -2
  22. package/dist/{chunk-53e48ce8.js → chunk-qjnv2rkh.js} +2 -2
  23. package/dist/{chunk-53e48ce8.js.map → chunk-qjnv2rkh.js.map} +1 -1
  24. package/dist/{chunk-1ce7veh9.js → chunk-tkv6cw94.js} +3 -3
  25. package/dist/{chunk-1ce7veh9.js.map → chunk-tkv6cw94.js.map} +1 -1
  26. package/dist/chunk-y4djde42.js +5 -0
  27. package/dist/chunk-y4djde42.js.map +11 -0
  28. package/dist/chunks/ThemeProvider-CTX9LOFC.js +2718 -0
  29. package/dist/chunks/ThemeProvider-CTX9LOFC.js.map +1 -0
  30. package/dist/client/Mutation.d.ts +1 -1
  31. package/dist/client/Mutation.d.ts.map +1 -1
  32. package/dist/client/ThemeProvider.d.ts +7 -0
  33. package/dist/client/ThemeProvider.d.ts.map +1 -1
  34. package/dist/client/index.js +107 -2673
  35. package/dist/client/index.js.map +1 -1
  36. package/dist/client/useIsNavigationPending.d.ts.map +1 -1
  37. package/dist/client/useMutate.d.ts.map +1 -1
  38. package/dist/database/index.js +2 -2
  39. package/dist/database/index.js.map +1 -1
  40. package/dist/facades/index.js +2 -2
  41. package/dist/facades/index.js.map +1 -1
  42. package/dist/http/index.js +2 -2
  43. package/dist/http/index.js.map +1 -1
  44. package/dist/i18n/Dictionary.d.ts.map +1 -1
  45. package/dist/i18n/index.js +2 -2
  46. package/dist/i18n/index.js.map +3 -3
  47. package/dist/kernel/index.js +2 -2
  48. package/dist/kernel/index.js.map +2 -2
  49. package/dist/orm/index.js +2 -2
  50. package/dist/orm/index.js.map +2 -2
  51. package/dist/server/index.js +1 -1
  52. package/dist/services/index.js +2 -2
  53. package/dist/services/index.js.map +2 -2
  54. package/dist/testing/Page.d.ts +166 -0
  55. package/dist/testing/Page.d.ts.map +1 -0
  56. package/dist/testing/index.d.ts +3 -0
  57. package/dist/testing/index.d.ts.map +1 -0
  58. package/dist/testing/index.js +352 -0
  59. package/dist/testing/index.js.map +1 -0
  60. package/dist/utils/Subject.d.ts.map +1 -1
  61. package/dist/utils/variantKey.d.ts +19 -0
  62. package/dist/utils/variantKey.d.ts.map +1 -0
  63. package/package.json +2 -1
  64. package/dist/chunk-0tbwn6er.js +0 -5
  65. package/dist/chunk-f29vd5mc.js +0 -5
  66. package/dist/chunk-hbycemy5.js +0 -6
  67. package/dist/chunk-qj4mmner.js +0 -4
  68. /package/dist/{chunk-a0sy9f9x.js.map → chunk-07jtzbf0.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Jc as k,Mc as R,Rc as H,Tc as I,Uc as K,Vc as S,Wc as P,Xc as U,Yc as W,Zc as b,_c as w,ed as j}from"./chunk-1ce7veh9.js";import{ge as _,he as V}from"./chunk-4t6a82fh.js";import{AsyncLocalStorage as h}from"async_hooks";var J=new h;function l(){return J.getStore()?.tx}function N(){return J.getStore()?.connection??k}function i(q,z){let B=J.getStore();if(N()===q)return z();return y(q),J.run({...B,depth:B?.depth??0,connection:q===k?void 0:q},z)}function y(q){let z=J.getStore();if(z?.tx===void 0)return;let B=z.connection??k;if(B===q)return;throw new R(B,q)}function s(){let q=J.getStore();return q?.tx===void 0?null:q.depth}function o(){return J.getStore()?.system===!0}function n(q){let z=J.getStore();return J.run({...z,depth:z?.depth??0,system:!0},q)}function t(){return J.getStore()?.actor}function a(q,z){let B=J.getStore();return J.run({...B,depth:B?.depth??0,system:!1,actor:{user:q??null}},z)}function E(q){if(Bun.env.NODE_ENV!=="development")return null;if(q===!1)return null;if(q===void 0)return H;if(!Number.isFinite(q)||q<=0)return H;return q}function T(q){let z=E(q);if(z===null)return()=>{};let B=Error("transaction opened here"),X=setTimeout(()=>{let Z=B.stack?.split(`
2
+ import{Hc as k,Kc as R,Pc as H,Rc as I,Sc as K,Tc as S,Uc as P,Vc as U,Wc as W,Xc as b,Yc as w,cd as j}from"./chunk-tkv6cw94.js";import{fe as _,ge as V}from"./chunk-cg53h5ht.js";import{AsyncLocalStorage as h}from"async_hooks";var J=new h;function l(){return J.getStore()?.tx}function N(){return J.getStore()?.connection??k}function i(q,z){let B=J.getStore();if(N()===q)return z();return y(q),J.run({...B,depth:B?.depth??0,connection:q===k?void 0:q},z)}function y(q){let z=J.getStore();if(z?.tx===void 0)return;let B=z.connection??k;if(B===q)return;throw new R(B,q)}function s(){let q=J.getStore();return q?.tx===void 0?null:q.depth}function o(){return J.getStore()?.system===!0}function n(q){let z=J.getStore();return J.run({...z,depth:z?.depth??0,system:!0},q)}function t(){return J.getStore()?.actor}function a(q,z){let B=J.getStore();return J.run({...B,depth:B?.depth??0,system:!1,actor:{user:q??null}},z)}function E(q){if(Bun.env.NODE_ENV!=="development")return null;if(q===!1)return null;if(q===void 0)return H;if(!Number.isFinite(q)||q<=0)return H;return q}function T(q){let z=E(q);if(z===null)return()=>{};let B=Error("transaction opened here"),X=setTimeout(()=>{let Z=B.stack?.split(`
3
3
  `).slice(1).join(`
4
4
  `)??"";console.warn(`[gemi] A database transaction has not settled after ${z}ms. It `+"reserves a pooled connection until it does \u2014 check for network or "+`filesystem I/O inside the callback, and move it outside the transaction if you find any.
5
5
  ${Z}
6
6
  (development only; set database.slowTransactionThreshold to change the threshold, or false to switch this off)`)},z);return X.unref?.(),()=>clearTimeout(X)}function r(q,z,B){let X=J.getStore(),Z=B?.connection??k;if(y(Z),X?.tx)return X.tx.savepoint((Q)=>{let Y=Q;return J.run({...X,tx:Y,depth:X.depth+1},()=>z(Y))});let $=T(B?.slowTransactionThreshold);try{return q.begin((Q)=>J.run({...X,tx:Q,depth:0,connection:Z===k?void 0:Z},()=>z(Q))).finally($)}catch(Q){throw $(),Q}}var x=/^\s*::\s*(?:text\s*::\s*)?(jsonb|json)\b(?!\s*\[)/i,C=/^\s*as\s+(jsonb|json)\s*\)/i,f=/\bcast\s*\(\s*$/i,v=new Set;function L(q,z){if(!z.typesParametersFromStatement)return{fragment:q,jsonParameters:v};let B=P(q),X=new Set,Z;for(let $=0;$<B.length-1;$++){let Q=B[$+1],Y=x.exec(Q);if(Y){Z??=[...B],Z[$+1]=`::text::${Y[1]}${Q.slice(Y[0].length)}`,X.add($);continue}let G=C.exec(Q);if(G&&f.test((Z??B)[$]))Z??=[...B],Z[$+1]=` as text)::${G[1]}${Q.slice(G[0].length)}`,X.add($)}if(!Z)return{fragment:q,jsonParameters:X};return{fragment:U(Z,q.binders),jsonParameters:X}}function F(q,z){if(q===null||q===void 0)return null;let B=j(q);if(B==="db")return null;if(B==="json")return"null";if(B==="any")throw new V(z,"DB",z,"Prisma.AnyNull is a filter operand \u2014 it asks for a SQL NULL *or* a JSON "+"null \u2014 so it has no single value to bind. Write the one you mean: "+"Prisma.DbNull for the column being NULL, Prisma.JsonNull for the JSON value.");if(typeof q==="string")return q;let X;try{X=JSON.stringify(q)}catch(Z){throw new V(z,"DB",z,`A parameter cast to json could not be serialised: ${Z instanceof Error?Z.message:String(Z)}. `+"Bind text you have serialised yourself if the value is not JSON \u2014 a "+"bigint has no JSON form, and neither does a cycle.")}if(X===void 0)throw new V(z,"DB",z,`A ${typeof q} was bound to a parameter cast to json, and has no JSON form. Bind the value it stands for.`);return X}var O=new WeakSet;function M(q){return O.add(q),q}function D(q){return typeof q==="object"&&q!==null&&O.has(q)}function Qq(q,...z){if(!Array.isArray(q)||!("raw"in q))throw new _("sql","DB","sql","'sql' is a tagged template \u2014 write sql`select 1`, not sql(\"select 1\"). "+"To put text that is not a value into a statement, use 'unsafeSql', and read what it says first.");let B=[];for(let X=0;X<q.length;X++)if(B.push(K(q[X])),X<z.length)B.push(A(z[X]));return M(W(...B))}function Vq(q,z=", "){if(!Array.isArray(q))throw new V("join","DB","sql",`Expected an array of fragments or values, got ${typeof q}.`);if(q.length===0)return g;let B=q.map(A);if(D(z)){let X=[];for(let Z=0;Z<B.length;Z++){if(Z>0)X.push(z);X.push(B[Z])}return M(W(...X))}return d(z),M(b(B,z))}var c=/^[\s,]*$|^\s*(?:and|or)\s*$/i;function d(q){if(typeof q==="string"&&c.test(q))return;throw new V("join","DB","sql",typeof q==="string"?`A separator is written into the SQL text, so it may only be glue: whitespace, commas, or 'and' / 'or'. Got ${JSON.stringify(q)}. If that is deliberate, say so with `+"unsafeSql(...) \u2014 and never build one from anything that came from "+"outside the program.":`Expected a separator string or a fragment, got ${q===null?"null":typeof q}.`)}var g=M(Object.freeze({text:"",binders:Object.freeze([])}));function Yq(q){if(typeof q!=="string")throw new V("unsafeSql","DB","sql",`Expected a string literal, got ${Array.isArray(q)?"an array":typeof q}. 'unsafeSql' is a plain call, not a tagged template \u2014 a template would `+"interpolate values into the SQL text, which is the one thing it must never do.");return M(K(q))}function kq(q,z,B="query"){if(!D(q))throw new V(B,"DB",B,`Expected a fragment built with 'sql', got ${q===null?"null":typeof q}. A plain string is not accepted here on purpose \u2014 it would be the one `+"path into the SQL text that nobody had to think about.");let X=L(q,z),Z=w(X.fragment,z,{model:"DB",operation:B});return{text:Z.text,values:I(Z.binders)(void 0).map(($,Q)=>X.jsonParameters.has(Q)?F($,B):$===null||$===void 0?$??null:z.encodeUntyped($))}}function A(q){if(D(q))return q;return S(()=>q)}
7
- export{J as oc,l as pc,N as qc,i as rc,y as sc,s as tc,o as uc,n as vc,t as wc,a as xc,r as yc,Qq as zc,Vq as Ac,g as Bc,Yq as Cc,kq as Dc};
7
+ export{J as mc,l as nc,N as oc,i as pc,y as qc,s as rc,o as sc,n as tc,t as uc,a as vc,r as wc,Qq as xc,Vq as yc,g as zc,Yq as Ac,kq as Bc};
8
8
 
9
- //# debugId=34A0266685FB589164756E2164756E21
9
+ //# debugId=965ECDC06363D92464756E2164756E21
@@ -7,6 +7,6 @@
7
7
  "import type { SqlDialect } from \"./dialect\";\nimport {\n InvalidArgumentError,\n UnsupportedQueryError,\n} from \"./errors\";\nimport {\n type Fragment,\n bindValues,\n concat,\n joinFragments,\n param,\n render,\n sql as text,\n} from \"./compile/fragment\";\nimport { jsonTextParameter, retypeJsonParameters } from \"./json-param\";\n\n/**\n * SQL fragments as first-class values: `sql`, `join`, `empty`, and one door out.\n *\n * The ORM deliberately does not implement every SQL shape — `distinct`, cursor\n * pagination, window functions, recursive CTEs. That is the right call, but it\n * is only half a decision: the shapes it declines have to have somewhere to go,\n * and \"drop to raw SQL\" is not an answer if raw SQL cannot be *composed*.\n *\n * `DB.sql` — Bun's tagged template — covers a single self-contained statement,\n * and that is genuinely all it covers. The shape it cannot express is the common\n * one: a predicate list built conditionally, passed around as a value, and\n * interpolated into a larger statement.\n *\n * ```ts\n * const filters = []\n * if (q) filters.push(sql`name ilike ${`%${q}%`}`)\n * if (organizationId) filters.push(sql`\"organizationId\" = ${organizationId}`)\n *\n * const where = filters.length ? sql`where ${join(filters, \" and \")}` : empty\n * const rows = await DB.query(sql`select * from \"Product\" ${where} limit ${20}`)\n * ```\n *\n * ## This is the compiler's own `Fragment`, made public\n *\n * Not a parallel mechanism. `compile/fragment.ts` has held exactly this shape\n * since iteration 1 — text plus positional binders, composable, never\n * concatenating a value into the text — because that is what invariant 2 needs\n * internally. Reusing it means a public fragment binds by the same rule the\n * compiler's own SQL does, and it means the parameter ceiling, the placeholder\n * numbering and the dialect split are all already handled rather than\n * reimplemented one door down.\n *\n * **Placeholders are assigned at assembly, not at authoring.** SQLite writes\n * `?` and Postgres writes `$1`, `$2`, and a fragment does not know where in the\n * final statement it will land — so `sql` records a *position* and `render`\n * turns it into a placeholder once the whole statement exists. That is what lets\n * the same fragment be nested, reused twice in one statement, or built before\n * the dialect is even known.\n */\n\n/**\n * A composable piece of SQL. Its values are bound parameters, never text.\n *\n * Opaque on purpose: an application builds one with `sql`, combines it with\n * `join`, and hands it to `DB.query` / `DB.execute`. Reading `.text` off it is\n * not part of the contract — it holds parameter *markers* rather than the\n * dialect's placeholders, so it is not the statement that runs.\n */\nexport type SqlFragment = Fragment;\n\n/**\n * Every fragment this module has produced.\n *\n * **Identity, not shape, and the difference is a SQL injection.** `interpolate`\n * splices a fragment as text and binds everything else, so \"is this a fragment\"\n * decides whether a value reaches the statement or a parameter. Asking the\n * *shape* — a `text` string and a `binders` array — makes that decision\n * answerable by anything that can name two properties, and `{\"text\": \"…\",\n * \"binders\": []}` is two lines of JSON:\n *\n * ```ts\n * const body = await request.json()\n * await DB.query(sql`select \"email\" from \"User\" where \"email\" = ${body.email}`)\n * // body.email = { text: `'' union select \"password\" from \"User\"`, binders: [] }\n * // -> select \"email\" from \"User\" where \"email\" = '' union select \"password\" from \"User\"\n * ```\n *\n * That is the intended call site with the intended safe value, and it returned\n * the password column out of a statement selecting only `email`. The internal\n * `Fragment` never had the problem because nothing outside `compile/` could\n * construct one; making the type public is what turned \"text plus binders\" from\n * an implementation detail into a shape an attacker can name. `unsafeSql` is\n * built so that reaching for the escape hatch is a decision — a structural check\n * is a second, unmarked door beside it.\n *\n * A `WeakSet` the module owns cannot be forged: membership is granted only by\n * the constructors below. It registers the *returned* object rather than\n * stamping a property, because `concat` and `joinFragments` return fresh objects\n * — a marker property on the inputs would not survive them, and the version that\n * cannot drift is the one that brands what actually comes out.\n */\nconst FRAGMENTS = new WeakSet<object>();\n\nfunction brand(fragment: Fragment): SqlFragment {\n FRAGMENTS.add(fragment);\n return fragment;\n}\n\n/** Whether a value is a fragment *this module made*, so it splices rather than binds. */\nfunction isFragment(value: unknown): value is Fragment {\n return typeof value === \"object\" && value !== null && FRAGMENTS.has(value);\n}\n\n/**\n * A SQL fragment. Every `${value}` is bound as a parameter; a `${fragment}` is\n * spliced in, carrying its own parameters with it.\n *\n * ```ts\n * sql`where \"id\" = ${id}` // \"id\" = $1, with id bound\n * sql`where ${sql`\"a\" = ${1}`} and ${sql`\"b\" = ${2}`}` // nests to any depth\n * ```\n *\n * An interpolated **array** is bound as one value, not expanded — that is what\n * Postgres's `= any($1)` wants, and it is the only reading that does not depend\n * on the dialect. For a comma-separated list of placeholders, say so with\n * `join`.\n *\n * A value at a `::jsonb` cast the caller wrote is the one parameter with a type\n * behind it, and it is bound as **JSON text** so that the statement means what\n * the same statement meant under Prisma's `$executeRaw`:\n *\n * ```ts\n * sql`… set payload = payload || ${JSON.stringify(patch)}::jsonb` // merges\n * ```\n *\n * Without that the driver would JSON-encode the string and the column would\n * hold the document as a jsonb *string* — which `||` appends as an array\n * element rather than merging. `json-param.ts` has the measurements.\n */\nexport function sql(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): SqlFragment {\n // A defensive check rather than a type error, because the interesting misuse\n // is `sql(userInput)` — a plain call with a string, which would otherwise\n // reach `strings.raw` as `undefined` and produce a fragment of `undefined`\n // text rather than an error. It is also the shape somebody reaches for when\n // they want the escape hatch and have not found `unsafeSql`.\n if (!Array.isArray(strings) || !(\"raw\" in (strings as object))) {\n throw new UnsupportedQueryError(\n \"sql\",\n \"DB\",\n \"sql\",\n `'sql' is a tagged template — write sql\\`select 1\\`, not sql(\"select 1\"). ` +\n `To put text that is not a value into a statement, use 'unsafeSql', ` +\n `and read what it says first.`,\n );\n }\n\n const parts: Fragment[] = [];\n\n for (let i = 0; i < strings.length; i++) {\n parts.push(text(strings[i]));\n if (i < values.length) parts.push(interpolate(values[i]));\n }\n\n return brand(concat(...parts));\n}\n\n/**\n * Fragments — or values — joined by a separator, the way `Array.join` reads.\n *\n * ```ts\n * join(filters, \" and \") // a and b and c\n * join([sql`\"a\" asc`, sql`\"b\" desc`]) // \"a\" asc, \"b\" desc\n * join(ids) // $1, $2, $3 — each bound\n * ```\n *\n * An **empty list produces `empty`**, not a separator and not a syntax error, so\n * `join` composes with a list that turned out to have nothing in it. That is the\n * case a caller forgets, and it is the one that would otherwise emit `where ` and\n * fail at the database rather than here.\n *\n * ## The separator is text, so it is not a free string\n *\n * It goes between the fragments *in the statement*, which makes it the one other\n * place a string could reach the SQL — and this module's whole claim is that\n * `unsafeSql` is **the** door. So a plain-string separator has to be glue and\n * nothing else: whitespace, commas, or a boolean connective. Anything more\n * expressive is legitimate and has to say so:\n *\n * ```ts\n * join(filters, \" and \") // fine\n * join(parts, unsafeSql(\") and (\")) // fine, and visibly a decision\n * join(ids, request.query.sep) // refused\n * ```\n *\n * A **blocklist would not do**, which is why this is an allowlist. The obvious\n * one — reject quotes, semicolons and comment markers — lets this through:\n *\n * join([1, 2], \") or 1=1 union select password from Users where 1=(1\")\n *\n * No quote, no `--`, still an injection. There is no sound way to say \"this\n * arbitrary text is safe glue\", so the rule is that glue is a small closed set\n * and everything else is a fragment somebody built on purpose.\n */\nexport function join(\n values: readonly unknown[],\n separator: string | SqlFragment = \", \",\n): SqlFragment {\n if (!Array.isArray(values)) {\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n `Expected an array of fragments or values, got ${typeof values}.`,\n );\n }\n if (values.length === 0) return empty;\n\n const parts = values.map(interpolate);\n\n if (isFragment(separator)) {\n const woven: Fragment[] = [];\n for (let i = 0; i < parts.length; i++) {\n if (i > 0) woven.push(separator);\n woven.push(parts[i]);\n }\n return brand(concat(...woven));\n }\n\n assertGlue(separator);\n return brand(joinFragments(parts, separator));\n}\n\n/**\n * Whitespace and commas, or a boolean connective surrounded by whitespace.\n *\n * Deliberately small. Every separator a composed statement actually needs is in\n * here — `\", \"`, `\" and \"`, `\" or \"`, `\" \"` — and everything outside it is\n * expressive enough to change what the statement *does*, which is the property\n * that makes it a `unsafeSql` decision rather than a string argument.\n */\nconst GLUE = /^[\\s,]*$|^\\s*(?:and|or)\\s*$/i;\n\nfunction assertGlue(separator: unknown): void {\n if (typeof separator === \"string\" && GLUE.test(separator)) return;\n\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n typeof separator === \"string\"\n ? `A separator is written into the SQL text, so it may only be glue: ` +\n `whitespace, commas, or 'and' / 'or'. Got ` +\n `${JSON.stringify(separator)}. If that is deliberate, say so with ` +\n `unsafeSql(...) — and never build one from anything that came from ` +\n `outside the program.`\n : `Expected a separator string or a fragment, got ${\n separator === null ? \"null\" : typeof separator\n }.`,\n );\n}\n\n/**\n * The fragment that contributes nothing.\n *\n * The point of it is that `where ${empty}` and `where ${filter}` are the same\n * expression — a conditional predicate is a value, not a branch around the\n * statement. Frozen, because it is shared by every caller and a fragment is read\n * as immutable everywhere else.\n */\nexport const empty: SqlFragment = brand(\n Object.freeze({ text: \"\", binders: Object.freeze([]) as [] }),\n);\n\n/**\n * **Text straight into the SQL, with no parameter around it.** The one door in\n * this ORM through which a value reaches the statement text.\n *\n * Everything else in the compiler exists to make this impossible — identifiers\n * come from the generated schema, values are bound — so reaching for it should\n * feel like reaching for it. **Never give it a value that came from a request, a\n * form, a URL, a header, a queue payload or a database row.** There is no\n * escaping here and there will not be: escaping that is \"usually right\" is worse\n * than none, because it survives review.\n *\n * ## Why it exists at all, since that is the fair question\n *\n * Plan quality can depend on *not* parameterising. A partial index declared as\n *\n * ```sql\n * create index … on \"Job\" (…) where \"name\" is distinct from 'reaper'\n * ```\n *\n * is only usable if the planner can prove the query's predicate matches the\n * index's. A bound parameter is opaque at plan time, so `where \"name\" is\n * distinct from $1` does not match — and the query falls back to a sequential\n * scan over the whole table. The constant has to be *in the text*:\n *\n * ```ts\n * const REAPER = unsafeSql(`'reaper'`) // a literal in this file, never input\n * await DB.query(sql`\n * select … from \"Job\" where \"name\" is distinct from ${REAPER} …\n * `)\n * ```\n *\n * A builder with no escape hatch cannot express that at any price, and the\n * workaround — hand-writing the whole statement — loses composition for every\n * other part of it.\n *\n * The same applies to the other things that cannot be parameters in SQL:\n * identifiers, a sort direction, a table name chosen from a fixed set in code.\n * All of them share the rule above — the value is written in the source file, or\n * chosen from a set written in the source file, never passed in.\n */\nexport function unsafeSql(literal: string): SqlFragment {\n if (typeof literal !== \"string\") {\n throw new InvalidArgumentError(\n \"unsafeSql\",\n \"DB\",\n \"sql\",\n `Expected a string literal, got ${\n Array.isArray(literal) ? \"an array\" : typeof literal\n }. 'unsafeSql' is a plain call, not a tagged template — a template would ` +\n `interpolate values into the SQL text, which is the one thing it must ` +\n `never do.`,\n );\n }\n return brand(text(literal));\n}\n\n/**\n * A fragment as the statement a driver can run: the dialect's placeholders in\n * the text, and the values in the order they appear.\n *\n * Separate from the executing, and exported, because it is the half that is a\n * pure function of `(fragment, dialect)` — so a test can assert what a\n * composition emits on both dialects without a database anywhere near it, which\n * is exactly how the rest of the compiler is tested.\n *\n * `render` also applies the parameter ceiling here, which matters more for a\n * hand-built fragment than for a compiled plan: `join(ids)` over a\n * request-derived list is one placeholder per element on SQLite, and 40 000 of\n * them is a driver error rather than a clear one.\n */\nexport function renderFragment(\n fragment: SqlFragment,\n dialect: SqlDialect,\n operation = \"query\",\n): { text: string; values: unknown[] } {\n if (!isFragment(fragment)) {\n throw new InvalidArgumentError(\n operation,\n \"DB\",\n operation,\n `Expected a fragment built with 'sql', got ${\n fragment === null ? \"null\" : typeof fragment\n }. A plain string is not accepted here on purpose — it would be the one ` +\n `path into the SQL text that nobody had to think about.`,\n );\n }\n\n // The one thing a raw parameter can be *told* about its type: a `::jsonb` the\n // caller wrote onto their own placeholder. Where there is one, the parameter\n // is retyped through `text` and its value serialised, because Bun otherwise\n // JSON-encodes a string bound to a `jsonb` parameter and stores the document\n // as a jsonb *string* where Prisma stored the object. See `json-param.ts` —\n // the mechanism, the measurements, and why a string is not serialised here\n // while `fieldParam` serialises one.\n //\n // The dialect is passed because this is not universal, and the reason is\n // narrower than it looks: `::` is Postgres-only syntax, but `cast(? as json)`\n // *parses and runs* on SQLite, where it means NUMERIC affinity — so retyping\n // it would rewrite a working statement into `cast(? as text)::json`, which\n // SQLite cannot parse. `typesParametersFromStatement` is false there.\n const json = retypeJsonParameters(fragment, dialect);\n\n const rendered = render(json.fragment, dialect, { model: \"DB\", operation });\n return {\n text: rendered.text,\n // `encodeUntyped` and not `encode`: there is no field here to ask, which is\n // the whole difference between a fragment's parameters and a compiled\n // plan's. It normalises the two JavaScript types whose SQL form the ORM has\n // already decided — a `Date` and a boolean — so a raw statement compares\n // against ORM-written rows on both dialects rather than only on Postgres.\n values: bindValues(rendered.binders)(undefined).map((value, index) =>\n json.jsonParameters.has(index)\n ? jsonTextParameter(value, operation)\n : value === null || value === undefined\n ? (value ?? null)\n : dialect.encodeUntyped(value),\n ),\n };\n}\n\n/**\n * One interpolated slot: a fragment splices, anything else binds.\n *\n * The binder ignores both its arguments. A compiled plan's binders read the\n * *call's* argument tree, because one plan serves many calls; a fragment is\n * built per call and closes over the value it was given, which is the whole\n * difference between the compiler's fragments and these.\n */\nfunction interpolate(value: unknown): Fragment {\n if (isFragment(value)) return value;\n return param(() => value);\n}\n"
8
8
  ],
9
9
  "mappings": ";wLACA,sBAAS,oBAmFF,IAAM,EAAa,IAAI,EAavB,SAAS,CAAkB,EAA+B,CAC/D,OAAO,EAAW,SAAS,GAAG,GAUzB,SAAS,CAAqB,EAAW,CAC9C,OAAO,EAAW,SAAS,GAAG,YAAc,EAgBvC,SAAS,CAAkB,CAChC,EACA,EACY,CACZ,IAAM,EAAU,EAAW,SAAS,EACpC,GAAI,EAAsB,IAAM,EAAM,OAAO,EAAG,EAehD,OAFA,EAAuB,CAAI,EAEpB,EAAW,IAChB,IACK,EACH,MAAO,GAAS,OAAS,EACzB,WAAY,IAAS,EAAqB,OAAY,CACxD,EACA,CACF,EAiBK,SAAS,CAAsB,CAAC,EAAoB,CACzD,IAAM,EAAQ,EAAW,SAAS,EAClC,GAAI,GAAO,KAAO,OAAW,OAE7B,IAAM,EAAO,EAAM,YAAc,EACjC,GAAI,IAAS,EAAM,OAEnB,MAAM,IAAI,EAAgC,EAAM,CAAI,EAI/C,SAAS,CAAgB,EAAkB,CAChD,IAAM,EAAQ,EAAW,SAAS,EAClC,OAAO,GAAO,KAAO,OAAY,KAAO,EAAM,MAIzC,SAAS,CAAa,EAAY,CACvC,OAAO,EAAW,SAAS,GAAG,SAAW,GAgBpC,SAAS,CAAc,CAAC,EAAkC,CAC/D,IAAM,EAAU,EAAW,SAAS,EACpC,OAAO,EAAW,IAAI,IAAK,EAAS,MAAO,GAAS,OAAS,EAAG,OAAQ,EAAK,EAAG,CAAE,EAI7E,SAAS,CAAY,EAAkC,CAC5D,OAAO,EAAW,SAAS,GAAG,MA6BzB,SAAS,CAAY,CAAC,EAAe,EAAkC,CAC5E,IAAM,EAAU,EAAW,SAAS,EACpC,OAAO,EAAW,IAChB,IACK,EACH,MAAO,GAAS,OAAS,EACzB,OAAQ,GACR,MAAO,CAAE,K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,OAE3D,MAAM,IAAI,EACR,OACA,KACA,MACA,OAAO,IAAc,SACjB,8GAEG,KAAK,UAAU,CAAS,yCAC3B,0EACA,uBACA,kDACE,IAAc,KAAO,OAAS,OAAO,IAE7C,EAWK,IAAM,EAAqB,EAChC,OAAO,OAAO,CAAE,KAAM,GAAI,QAAS,OAAO,OAAO,CAAC,CAAC,CAAQ,CAAC,CAC9D,EA0CO,SAAS,EAAS,CAAC,EAA8B,CACtD,GAAI,OAAO,IAAY,SACrB,MAAM,IAAI,EACR,YACA,KACA,MACA,kCACE,MAAM,QAAQ,CAAO,EAAI,WAAa,OAAO,iFAE7C,gFAEJ,EAEF,OAAO,EAAM,EAAK,CAAO,CAAC,EAiBrB,SAAS,EAAc,CAC5B,EACA,EACA,EAAY,QACyB,CACrC,GAAI,CAAC,EAAW,CAAQ,EACtB,MAAM,IAAI,EACR,EACA,KACA,EACA,6CACE,IAAa,KAAO,OAAS,OAAO,gFAEpC,wDACJ,EAgBF,IAAM,EAAO,EAAqB,EAAU,CAAO,EAE7C,EAAW,EAAO,EAAK,SAAU,EAAS,CAAE,MAAO,KAAM,WAAU,CAAC,EAC1E,MAAO,CACL,KAAM,EAAS,KAMf,OAAQ,EAAW,EAAS,OAAO,EAAE,MAAS,EAAE,IAAI,CAAC,EAAO,IAC1D,EAAK,eAAe,IAAI,CAAK,EACzB,EAAkB,EAAO,CAAS,EAClC,IAAU,MAAQ,IAAU,OACzB,GAAS,KACV,EAAQ,cAAc,CAAK,CACnC,CACF,EAWF,SAAS,CAAW,CAAC,EAA0B,CAC7C,GAAI,EAAW,CAAK,EAAG,OAAO,EAC9B,OAAO,EAAM,IAAM,CAAK",
10
- "debugId": "34A0266685FB589164756E2164756E21",
10
+ "debugId": "965ECDC06363D92464756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{AsyncLocalStorage as L}from"async_hooks";class G{content={title:"Gemi App",description:null,openGraph:null};touched=!1;render(){return{title:this.content.title,description:this.content.description,openGraph:this.content.openGraph}}title(j){this.touched=!0,this.content.title=j}description(j){this.touched=!0,this.content.description=j}openGraph({title:j,description:B,type:z,url:F,image:D,imageAlt:J,imageWidth:K,imageHeight:N,twitterImage:O=D,twitterImageAlt:Y=J,twitterImageWidth:Z=K,twitterImageHeight:$=N}){this.touched=!0;let Q=D,U=O;if(D&&!D.startsWith("http"))Q=`${process.env.HOST_NAME}${D}`,U=`${process.env.HOST_NAME}${O}`;this.content.openGraph=Object.fromEntries(Object.entries({title:j,description:B,type:z,url:F,image:Q,imageAlt:J,imageWidth:K,imageHeight:N,twitterImage:U,twitterImageAlt:Y,twitterImageWidth:Z,twitterImageHeight:$}).filter(([T,P])=>P!==void 0))}}function V(j,B,z={}){return[`${j}=${B}`,z.maxAge?`Max-Age=${z.maxAge}`:"",z.httpOnly?"HttpOnly":"",z.secure?"Secure":"",z.sameSite?`SameSite=${z.sameSite}`:"SameSite=Strict",z.path?`Path=${z.path}`:"Path=/",z.domain?`Domain=${z.domain}`:"",z.expires?`Expires=${z.expires.toUTCString()}`:"",z.partitioned?"Partitioned":""].filter((F)=>F!=="").join("; ")}var E=new L;class X{req;cookies=new Set;headers=new Headers;serverQueries=null;user=null;csrfHmac=null;locale=null;metadata=new G;rangeRequest=null;constructor(j){this.req=j}setLocale(j){this.locale=j}renderMeta(){return this.metadata.render()}setCSRFHmac(j){this.csrfHmac=j}setCookie(j,B,z={}){this.cookies.add(V(j,B,z))}deleteCookie(j){this.cookies.add(V(j,"",{maxAge:-1}))}setHeaders(j,B){this.headers.set(j,B)}setUser(j){this.user=j}setRequest(j){this.req=j}destroy(){delete this.cookies,delete this.headers,this.serverQueries=null,delete this.user}}class M{static getStore(){return E.getStore()}static setRequest(j){E.getStore().req=j}static run(j,B){return E.run(new X(j),B)}static runWith(j,B){return E.run(j,B)}}
3
+ export{M as Be};
4
+
5
+ //# debugId=57AC01D638D832DE64756E2164756E21
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../orm/registry.ts", "../http/requestContext.ts", "../http/Metadata.ts"],
3
+ "sources": ["../http/requestContext.ts", "../http/Metadata.ts"],
4
4
  "sourcesContent": [
5
- "import { ModelNotRegisteredError } from \"./errors\";\n\n/**\n * Name-keyed, resolved at call time, never at module load.\n *\n * The generated schema refers to a relation's target by model *name*, not by\n * importing the class. Without that indirection `User.ts` imports `Post.ts`\n * imports `User.ts` and, under ESM, one of them is `undefined` while the other\n * is still evaluating. It is the classic ORM bootstrap failure and it shows up\n * the moment two models reference each other — which, in any real schema, is\n * immediately.\n *\n * It also keeps the generated files free of an import graph: they hold data and\n * strings only.\n */\nconst models = new Map<string, unknown>();\n\nexport function register(name: string, model: unknown): void {\n models.set(name, model);\n}\n\nexport function has(name: string): boolean {\n return models.has(name);\n}\n\nexport function get<T = unknown>(name: string): T {\n const model = models.get(name);\n if (model === undefined) {\n throw new ModelNotRegisteredError(name, [...models.keys()]);\n }\n return model as T;\n}\n\nexport function registeredNames(): string[] {\n return [...models.keys()];\n}\n\nexport function clearRegistry(): void {\n models.clear();\n}\n",
6
5
  "import { AsyncLocalStorage } from \"node:async_hooks\";\nimport type { HttpRequest } from \"./HttpRequest\";\nimport { Metadata } from \"./Metadata\";\nimport type { ByteRange } from \"./range\";\n// Type-only: `services/router` imports from `http`, so a runtime import here\n// would be circular.\nimport type { ServerQueryStore } from \"../services/router/ServerQueryStore\";\n\nexport interface CreateCookieOptions {\n maxAge?: number;\n expires?: Date;\n httpOnly?: boolean;\n secure?: boolean;\n sameSite?: \"Strict\" | \"Lax\";\n path?: string;\n domain?: string;\n partitioned?: boolean;\n}\n\nexport function createCookie(\n name: string,\n value: string,\n options: CreateCookieOptions = {},\n) {\n return [\n `${name}=${value}`,\n options.maxAge ? `Max-Age=${options.maxAge}` : \"\",\n options.httpOnly ? \"HttpOnly\" : \"\",\n options.secure ? \"Secure\" : \"\",\n options.sameSite ? `SameSite=${options.sameSite}` : \"SameSite=Strict\",\n options.path ? `Path=${options.path}` : \"Path=/\",\n options.domain ? `Domain=${options.domain}` : \"\",\n options.expires ? `Expires=${options.expires.toUTCString()}` : \"\",\n options.partitioned ? \"Partitioned\" : \"\",\n ]\n .filter((i) => i !== \"\")\n .join(\"; \");\n}\n\nconst requestContext = new AsyncLocalStorage<Store>();\n\nclass Store {\n cookies: Set<string> = new Set();\n headers: Headers = new Headers();\n /**\n * Every server-side query of this request — prefetched or discovered during\n * the streaming render. Assigned by the view router (or lazily by the\n * `Query` facade); `null` for api requests, which must not query themselves.\n */\n serverQueries: ServerQueryStore | null = null;\n user: any = null;\n csrfHmac: string | null = null;\n locale: string | null = null;\n metadata = new Metadata();\n /**\n * The parsed `Range` of the in-flight request, picked up by\n * `FileStorage.read()` so a range reaches the storage backend without every\n * handler having to thread it through by hand.\n *\n * Only populated inside a `this.stream()` route, and cleared once that route\n * returns: a `FileStorage.read()` in an ordinary handler must never start\n * silently returning partial bytes.\n */\n rangeRequest: ByteRange | null = null;\n\n constructor(public req: HttpRequest) {}\n\n setLocale(locale: string) {\n this.locale = locale;\n }\n\n renderMeta() {\n return this.metadata.render();\n }\n\n setCSRFHmac(hmac: string) {\n this.csrfHmac = hmac;\n }\n\n setCookie(name: string, value: string, options: CreateCookieOptions = {}) {\n this.cookies.add(createCookie(name, value, options));\n }\n\n deleteCookie(name: string) {\n this.cookies.add(createCookie(name, \"\", { maxAge: -1 }));\n }\n\n setHeaders(name: string, value: string) {\n this.headers.set(name, value);\n }\n\n setUser(user: any) {\n this.user = user;\n }\n\n setRequest(req: HttpRequest<any, any>) {\n this.req = req;\n }\n\n destroy() {\n delete this.cookies;\n delete this.headers;\n this.serverQueries = null;\n delete this.user;\n }\n}\n\nexport class RequestContext {\n static getStore() {\n return requestContext.getStore()!;\n }\n\n static setRequest(req: HttpRequest<any, any>) {\n requestContext.getStore().req = req;\n }\n\n static run<T>(httpRequest: HttpRequest, fn: () => T): T {\n return requestContext.run(new Store(httpRequest), fn);\n }\n\n /**\n * Re-enters an *existing* request scope. Stream lifecycle callbacks fire\n * after the HTTP server has taken over the response body — outside the\n * AsyncLocalStorage scope the request ran in — so the view router captures\n * the live store and re-enters it around user-facing hooks, keeping\n * `req.ctx()` (and everything context-backed) working inside them.\n */\n static runWith<T>(store: Store, fn: () => T): T {\n return requestContext.run(store, fn);\n }\n}\n",
7
6
  "export type OpenGraphParams = {\n title: string;\n description?: string;\n type: string;\n url: string;\n image: string;\n imageAlt?: string;\n imageWidth?: number;\n imageHeight?: number;\n twitterImage?: string;\n twitterImageAlt?: string;\n twitterImageWidth?: number;\n twitterImageHeight?: number;\n};\nexport class Metadata {\n content: any = {\n title: \"Gemi App\",\n description: null,\n openGraph: null,\n };\n\n /**\n * Whether a handler set anything, as opposed to `content` still being the\n * defaults. A partially rendered response that touched no metadata sends\n * none, so the client keeps what the skipped segments put there.\n */\n touched = false;\n\n render() {\n return {\n title: this.content.title,\n description: this.content.description,\n openGraph: this.content.openGraph,\n };\n }\n\n title(title: string) {\n this.touched = true;\n this.content.title = title;\n }\n\n description(description: string) {\n this.touched = true;\n this.content.description = description;\n }\n\n openGraph({\n title,\n description,\n type,\n url,\n image,\n imageAlt,\n imageWidth,\n imageHeight,\n twitterImage = image,\n twitterImageAlt = imageAlt,\n twitterImageWidth = imageWidth,\n twitterImageHeight = imageHeight,\n }: OpenGraphParams) {\n this.touched = true;\n let _image = image;\n let _twitterImage = twitterImage;\n if (image && !image.startsWith(\"http\")) {\n _image = `${process.env.HOST_NAME}${image}`;\n _twitterImage = `${process.env.HOST_NAME}${twitterImage}`;\n }\n this.content.openGraph = Object.fromEntries(\n Object.entries({\n title,\n description,\n type,\n url,\n image: _image,\n imageAlt,\n imageWidth,\n imageHeight,\n twitterImage: _twitterImage,\n twitterImageAlt,\n twitterImageWidth,\n twitterImageHeight,\n }).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"
8
7
  ],
9
- "mappings": ";qLAeA,FAAM,EAAS,IAAI,IAEZ,SAAS,CAAQ,CAAC,EAAc,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AE,IAAM,QAG3B,IAAM,CAAC,EAA0B,EAAgB,CACtD,OAAO,EAAe,IAAI,IAAI,EAAM,CAAW,EAAG,CAAE,QAU/C,QAAU,CAAC,EAAc,EAAgB,CAC9C,OAAO,EAAe,IAAI,EAAO,CAAE,EAEvC",
9
+ "debugId": "57AC01D638D832DE64756E2164756E21",
11
10
  "names": []
12
11
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{c as D,d as v}from"./chunk-ffre1z8s.js";import"./chunk-ppt296ye.js";import{Eb as q}from"./chunk-ha7n1c94.js";import{Zb as P,ac as V}from"./chunk-ear03axe.js";import"./chunk-7s1g3v1y.js";import"./chunk-tkv6cw94.js";import"./chunk-y4djde42.js";import"./chunk-3d3nmr5g.js";import"./chunk-bq4w14a6.js";import"./chunk-cg53h5ht.js";import"./chunk-92793zh4.js";import"./chunk-3y9nf09k.js";import"./chunk-88pq4gmf.js";import"./chunk-mt2755rs.js";import"./chunk-qyaqg07q.js";import"./chunk-0h3jr9d9.js";import{join as E}from"path";import{Duplex as o}from"stream";import{constants as T,createBrotliCompress as l,createGzip as n}from"zlib";var i=["br","gzip"],t=1024,a=5,s=19,r=6;function e($){if($===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test($.trim()))return 1;let J=Number($.trim());return Number.isFinite(J)?Math.min(J,1):1}function JJ($){if($===null||$===void 0)return null;let J=new Map;for(let H of $.split(",")){let[Z,...X]=H.split(";"),j=Z.trim().toLowerCase();if(j==="")continue;let x=1;for(let K of X){let O=K.indexOf("=");if(O===-1)continue;if(K.slice(0,O).trim().toLowerCase()==="q"){x=e(K.slice(O+1));break}}J.set(j,x)}return J}function $J($,J=i){let H=JJ($);if(!H)return null;let Z=H.get("*"),X=null,j=0;for(let x of J){let K=H.get(x)??Z??0;if(K>j)X=x,j=K}return X}function HJ($,J){if(!$)return!1;return $.split(",").some((H)=>H.trim().toLowerCase().split("=")[0].trim()===J)}function UJ($,J){if($==="HEAD")return!1;if(!J.body)return!1;if(J.status<200||J.status===204||J.status===206||J.status===304)return!1;if(J.headers.has("Content-Range"))return!1;let H=J.headers.get("Content-Type");if(!H||!/^\s*text\/html\s*(;|$)/i.test(H))return!1;let Z=J.headers.get("Content-Encoding");if(Z&&Z.trim().toLowerCase()!=="identity")return!1;if(HJ(J.headers.get("Cache-Control"),"no-transform"))return!1;let X=J.headers.get("Content-Length");if(X!==null&&Number(X)<t)return!1;return!0}function ZJ($){let J=$==="br"?l({params:{[T.BROTLI_PARAM_QUALITY]:a,[T.BROTLI_PARAM_LGWIN]:s},flush:T.BROTLI_OPERATION_FLUSH}):n({level:r,flush:T.Z_SYNC_FLUSH});return o.toWeb(J)}function zJ($){let J=$.get("Vary");if(!J){$.set("Vary","Accept-Encoding");return}let H=J.split(",").map((Z)=>Z.trim().toLowerCase());if(H.includes("*")||H.includes("accept-encoding"))return;$.append("Vary","Accept-Encoding")}function F($,J){if(!UJ($.method,J))return J;let H=new Headers(J.headers);zJ(H);let Z=$J($.headers.get("Accept-Encoding"));if(!Z)return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H});let X;try{X=ZJ(Z)}catch{return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H})}return H.set("Content-Encoding",Z),H.delete("Content-Length"),new Response(J.body.pipeThrough(X),{status:J.status,statusText:J.statusText,headers:H})}function y($){let J=$.toString(),H=new Bun.CryptoHasher("sha1");return H.update(J),H.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=P;import{exists as GJ}from"fs/promises";var g="app/client.tsx";function w($){let J=$["app/client.tsx"]?.file;if(!J)return;return{module:`/${J}`,preload:S($,"app/client.tsx")}}function S($,J){let H=[],Z=new Set,X=(j)=>{if(Z.has(j))return;Z.add(j);let x=$[j];if(!x?.file)return;H.push(`/${x.file}`);for(let K of x.imports??[])X(K)};return X(J),H}var I=q(),XJ=E(I,"app"),L=E(I,"dist");async function VJ($,J){let H=await import(`${L}/client/.vite/manifest.json`),Z=await import(`${L}/server/.vite/manifest.json`);process.env.ROOT_DIR=I,process.env.APP_DIR=XJ,process.env.DIST_DIR=L;let X={},j={},x={},K={},O={},f=(U,G)=>`"${U}": () => import("${G}")`,k=[];for(let U of["404",...$.getFlatComponentTree.call($)]){let G=Z[`app/views/${U}.tsx`];if(!G?.file){console.log(`Server file not found for ${U}`),console.log(G);let W=Object.keys(Z),A=`app/views/${U}.tsx`;console.log(`${A} not found in server manifest`),console.log(W)}let Q=await import(`${process.env.DIST_DIR}/server/${G?.file}`);X[U]=Q.default,j[U]=Q.OpenGraph,x[U]=Q;let z=H[`app/views/${U}.tsx`];if(z?.css&&z?.css.length>0)K[U]=z?.css;if(z)k.push(f(U,`/${z?.file}`)),O[U]=S(H,`app/views/${U}.tsx`)}let u=`{${k.join(",")}}`,N=w(H);if(!N)console.error(`Client manifest has no "${g}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let m=H["app/client.tsx"]?.css??[],h=(await Promise.all(m.map((U)=>Bun.file(`${L}/client/${U}`).text()))).join(`
3
+ `),c=new P({pathname:"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)"});async function p(U){let{pathname:G}=new URL(U.url),Q=G.startsWith("/.well-known"),z=c.test({pathname:G})||Q,W=G.startsWith("/api");if(z&&!W){let A=new URL(U.url),b=U.url.replace(A.origin,"").split("?")[0],B=`${L}/client${b.replace("/assets/assets","/assets")}`,C=await GJ(B);if(!C&&A.pathname.includes(".js"))return new Response(`if(caches){caches?.delete("${B}")}window.location.reload();export {}`,{headers:{"Content-Type":"application/javascript"}});if(!C){if(G===V||G.startsWith(`${V}/`))return new Response("Not found",{status:404});return await R(U,G)}try{let Y=Bun.file(B),_=y(Y.lastModified);return new Response(Y.stream(),{headers:{"Content-Type":Y.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(Y.size),ETag:_}})}catch(Y){return $.onException?.(Y),new Response("Not found",{status:404})}}return await R(U,G)}async function R(U,G){let Q=$.fetch.bind($);try{let z=await Q(U);if(z instanceof Response)return z;else{let W=[];return W.push({content:h}),await z({getStyles:async(b)=>{if(!b)return D([]);for(let B of b){let C=H[`app/views/${B}.tsx`];for(let Y of C?.css??[]){let _=Bun.file(`${process.env.DIST_DIR}/client/${Y}`);W.push({id:Y,content:await _.text()})}}return D(W)},clientEntry:N,modulePreloadManifest:O,loaders:u,viewImportMap:X,viewModules:x,ogMap:j,cssManifest:K})}}catch(z){if(console.error(z),G.startsWith("/api"))return new Response(JSON.stringify({error:z.message}),{status:500,headers:{"Content-Type":"application/json"}});return $.onException?.(z),new Response(z.stack,{status:500})}}let d=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",M=Bun.serve({maxRequestBodySize:10737418240,fetch:async(U,G)=>{if(!U.headers.get("x-forwarded-for")){let z=G.requestIP(U);if(z)U.headers.set("x-forwarded-for",z.address)}let Q=await J(U,p);return d?F(U,Q):Q},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return v({port:M.port,rootDir:I}),M}export{VJ as httpProd};
4
+
5
+ //# debugId=43E66911043D868164756E2164756E21
@@ -8,7 +8,7 @@
8
8
  "import { URLPattern } from \"./dist/urlpattern.js\";\n\nexport { URLPattern };\n\nif (!globalThis.URLPattern) {\n globalThis.URLPattern = URLPattern;\n}\n",
9
9
  "/** The subset of a Vite manifest entry this module reads. */\nexport interface ViteManifestChunk {\n file: string;\n imports?: string[];\n dynamicImports?: string[];\n}\n\nexport type ViteManifest = Record<string, ViteManifestChunk>;\n\n/** Vite's manifest key for the module that boots hydration. */\nexport const CLIENT_ENTRY_KEY = \"app/client.tsx\";\n\n/**\n * How the shell boots hydration in production: `module` is imported from the\n * bootstrap script, `preload` is every chunk that import pulls in — see\n * `clientEntry` in `ViewRouteDispatcher` for why the entry does not go through\n * React's `bootstrapModules`.\n *\n * `undefined` when the manifest has no client entry, which means a `dist/`\n * interrupted between the server and client build passes. Degrading beats\n * throwing here: this runs at boot, so a deref would take down API routes,\n * static assets and health checks over what is only a document concern, and\n * the dispatcher already renders a shell that simply does not hydrate.\n */\nexport function createClientEntry(\n manifest: ViteManifest,\n): { module: string; preload: string[] } | undefined {\n const file = manifest[CLIENT_ENTRY_KEY]?.file;\n if (!file) {\n return undefined;\n }\n return {\n module: `/${file}`,\n preload: collectModulePreloads(manifest, CLIENT_ENTRY_KEY),\n };\n}\n\n/**\n * Every chunk URL that importing `entryKey` pulls in, itself first.\n *\n * The browser can only discover these one parse at a time — it learns about a\n * chunk's static imports after the chunk has arrived and been parsed — so a\n * `layout -> view -> child component` graph costs one round trip per level.\n * Handing the whole list to the shell as `modulepreload` hints turns that\n * chain into one parallel fetch (#352).\n *\n * `dynamicImports` are deliberately left out: those are the pieces the app\n * asked to load lazily, and preloading them would download code the current\n * route may never render.\n */\nexport function collectModulePreloads(manifest: ViteManifest, entryKey: string): string[] {\n const urls: string[] = [];\n // Chunk graphs are cyclic often enough (two chunks importing each other\n // through a shared module) that walking them without a visited set hangs.\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk?.file) return;\n urls.push(`/${chunk.file}`);\n for (const imported of chunk.imports ?? []) {\n walk(imported);\n }\n };\n\n walk(entryKey);\n\n return urls;\n}\n"
10
10
  ],
11
- "mappings": ";2gBAAA,SAAS,OCkBT,WAAS,SACT,cAAS,oBAAW,UAAsB,OAW1C,FAAM,JAAuC,LAAC,DAAM,AAAM,EAQpD,EAAyB,KAYzB,EAAiB,EACjB,EAAqB,GAGrB,EAAa,EAEnB,SAAS,CAAW,CAAC,EAAiC,CACpD,GAAI,IAAQ,OACV,MAAO,GAKT,GAAI,CAAC,oBAAoB,KAAK,EAAI,KAAK,CAAC,EACtC,MAAO,GAET,IAAM,EAAQ,OAAO,EAAI,KAAK,CAAC,EAC/B,OAAO,OAAO,SAAS,CAAK,EAAI,KAAK,IAAI,EAAO,CAAC,EAAI,EAahD,SAAS,EAAmB,CAAC,EAA+D,CACjG,GAAI,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AAO,EAAK,CAEZ,GADA,QAAQ,MAAM,CAAG,EACb,EAAS,WAAW,MAAM,EAC5B,OAAO,IAAI,SAAS,KAAK,UAAU,CAAE,MAAO,EAAI,OAAQ,CAAC,EAAG,CAC1D,OAAQ,IACR,QAAS,CAAE,eAAgB,kBAAmB,CAChD,CAAC,EAGH,OADA,EAAI,cAAc,CAAG,EACd,IAAI,SAAS,EAAI,MAAO,CAAE,OAAQ,GAAI,CAAC,GAOlD,IAAM,GAAsB,QAAQ,IAAI,kBAAoB,QAAQ,YAAY,IAAM,MAEhF,EAAS,IAAI,MAAM,CACvB,mBAAoB,YACpB,MAAO,MAAO,EAAK,IAAW,CAC5B,GAAI,CAAC,EAAI,QAAQ,IAAI,iBAAiB,EAAG,CAGvC,IAAM,EAAK,EAAO,UAAU,CAAG,EAC/B,GAAI,EAAI,EAAI,QAAQ,IAAI,kBAAmB,EAAG,OAAO,EAEvD,IAAM,EAAM,MAAM,EAAgB,EAAK,CAAc,EAKrD,OAAO,EAAqB,EAAiB,EAAK,CAAG,EAAI,GAE3D,YAAa,OAAO,QAAQ,IAAI,qBAAuB,EAAE,EACzD,KAAM,QAAQ,IAAI,MAAQ,IAC5B,CAAC,EAID,OAFA,EAAmB,CAAE,KAAM,EAAO,KAAM,SAAQ,CAAC,EAE1C",
12
+ "debugId": "43E66911043D868164756E2164756E21",
13
13
  "names": []
14
14
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{ze as z}from"./chunk-cg53h5ht.js";import{Re as A}from"./chunk-0h3jr9d9.js";var H={};A(H,{registeredNames:()=>F,register:()=>B,has:()=>C,get:()=>D,clearRegistry:()=>G});var q=new Map;function B(j,x){q.set(j,x)}function C(j){return q.has(j)}function D(j){let x=q.get(j);if(x===void 0)throw new z(j,[...q.keys()]);return x}function F(){return[...q.keys()]}function G(){q.clear()}
3
+ export{B as ae,C as be,D as ce,F as de,H as ee};
4
+
5
+ //# debugId=B5BDD671F4D07ECB64756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../orm/registry.ts"],
4
+ "sourcesContent": [
5
+ "import { ModelNotRegisteredError } from \"./errors\";\n\n/**\n * Name-keyed, resolved at call time, never at module load.\n *\n * The generated schema refers to a relation's target by model *name*, not by\n * importing the class. Without that indirection `User.ts` imports `Post.ts`\n * imports `User.ts` and, under ESM, one of them is `undefined` while the other\n * is still evaluating. It is the classic ORM bootstrap failure and it shows up\n * the moment two models reference each other — which, in any real schema, is\n * immediately.\n *\n * It also keeps the generated files free of an import graph: they hold data and\n * strings only.\n */\nconst models = new Map<string, unknown>();\n\nexport function register(name: string, model: unknown): void {\n models.set(name, model);\n}\n\nexport function has(name: string): boolean {\n return models.has(name);\n}\n\nexport function get<T = unknown>(name: string): T {\n const model = models.get(name);\n if (model === undefined) {\n throw new ModelNotRegisteredError(name, [...models.keys()]);\n }\n return model as T;\n}\n\nexport function registeredNames(): string[] {\n return [...models.keys()];\n}\n\nexport function clearRegistry(): void {\n models.clear();\n}\n"
6
+ ],
7
+ "mappings": ";qLAeA,FAAM,EAAS,IAAI,IAEZ,SAAS,CAAQ,CAAC,EAAc,EAAsB,CAC3D,EAAO,IAAI,EAAM,CAAK,EAGjB,SAAS,CAAG,CAAC,EAAuB,CACzC,OAAO,EAAO,IAAI,CAAI,EAGjB,SAAS,CAAgB,CAAC,EAAiB,CAChD,IAAM,EAAQ,EAAO,IAAI,CAAI,EAC7B,GAAI,IAAU,OACZ,MAAM,IAAI,EAAwB,EAAM,CAAC,GAAG,EAAO,KAAK,CAAC,CAAC,EAE5D,OAAO,EAGF,SAAS,CAAe,EAAa,CAC1C,MAAO,CAAC,GAAG,EAAO,KAAK,CAAC,EAGnB,SAAS,CAAa,EAAS,CACpC,EAAO,MAAM",
8
+ "debugId": "B5BDD671F4D07ECB64756E2164756E21",
9
+ "names": []
10
+ }
@@ -45,6 +45,6 @@ Say which, and registerModels will leave it alone:
45
45
  register("${j}", ${z[0]})
46
46
 
47
47
  A class that is only a typed view over the same rows belongs in a module you do not hand to registerModels.`);this.model=j;this.candidates=z;this.name="AmbiguousModelRegistrationError"}}class _ extends Error{model;operation;required;limit;dialect;constructor(j,z,A,B,D,F){super(`${j}.${z} would bind ${A} parameters, and the '${D}' driver accepts at most ${B} in one statement. ${F}`+(z==="createMany"?" A createMany over the ceiling is normally split across statements inside one transaction, so reaching this means splitting cannot help: a single row binds more than the driver accepts.":" Splitting is not something this operation can do for you \u2014 one "+"statement has to carry one answer. Narrow the query."));this.model=j;this.operation=z;this.required=A;this.limit=B;this.dialect=D;this.name="ParameterLimitError"}}class $ extends Error{model;operation;field;constructor(j,z,A){super(`${j}.${z} is missing a value for '${A}', which is required and has no default.`);this.model=j;this.operation=z;this.field=A;this.name="MissingRequiredValueError"}}class b extends Error{relation;model;constructor(j,z,A){super(`'${j}' is not a relation on model ${z}. `+(A.length>0?`Known relations: ${A.join(", ")}.`:`${z} declares no relations.`));this.relation=j;this.model=z;this.name="UnknownRelationError"}}class T extends Error{model;limit;constructor(j,z){super(`The include tree nests more than ${z} relations deep (at model ${j}). Deeply nested includes are legal, so this is a guard against a generated or malformed argument tree rather than a limit on `+"modelling \u2014 every level costs at least one query.");this.model=j;this.limit=z;this.name="RelationDepthExceededError"}}class x extends Error{model;relation;target;constructor(j,z,A,B){super(`${j}.${z} points at model '${A}', which nothing has registered. The generated artifact and the registry disagree: re-run \`prisma generate\`, and check that app/models/generated/index.ts is imported. `+(B.length>0?`Registered models: ${B.join(", ")}.`:"Nothing is registered at all."));this.model=j;this.relation=z;this.target=A;this.name="UnregisteredRelationTargetError"}}class C extends Error{model;relation;constructor(j,z,A){super(`Cannot resolve how ${j}.${z} joins: ${A} This means `+"app/models/generated is stale or hand-edited \u2014 re-run "+"`prisma generate`.");this.model=j;this.relation=z;this.name="MalformedRelationError"}}class N extends Error{constructor(j,z){super(`No model is registered under the name '${j}'. `+(z.length>0?`Registered models: ${z.join(", ")}.`:"Nothing is registered \u2014 is app/models/generated/index.ts imported?"));this.name="ModelNotRegisteredError"}}class v extends Error{constructor(j){super(`${j} has no $schema. Model subclasses must extend a generated base class from app/models/generated/models.ts.`);this.name="MissingModelSchemaError"}}
48
- export{H as ge,L as he,M as ie,O as je,P as ke,R as le,I as me,y as ne,S as oe,V as pe,W as qe,X as re,Y as se,Z as te,_ as ue,$ as ve,b as we,T as xe,x as ye,C as ze,N as Ae,v as Be};
48
+ export{H as fe,L as ge,M as he,O as ie,P as je,R as ke,I as le,y as me,S as ne,V as oe,W as pe,X as qe,Y as re,Z as se,_ as te,$ as ue,b as ve,T as we,x as xe,C as ye,N as ze,v as Ae};
49
49
 
50
- //# debugId=11BA7EC537BEFE6E64756E2164756E21
50
+ //# debugId=AD3ED4BEB46B76C164756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "/**\n * Thrown when the compiler is handed an argument it does not implement yet.\n *\n * Every public operation accepts the full Prisma argument type from iteration 1\n * — signatures are final, capability grows underneath them. The price of that is\n * that anything unimplemented has to fail loudly: silently dropping a `take: 10`\n * and returning the whole table is the worst failure mode this ORM has.\n */\nexport class UnsupportedQueryError extends Error {\n constructor(\n public readonly argument: string,\n public readonly model: string,\n public readonly operation: string,\n /**\n * What cannot work, and what to do instead.\n *\n * **Required**, which is the second half of #61 — the first being the\n * `UnsupportedByDesignError` split beside this. It was optional, and the\n * refusals that omitted it were the highest-traffic ones: an argument the\n * operation does not accept, on the path a typo takes. Those said only\n * *that* something was refused, to the reader least likely to know why.\n *\n * Required rather than conventionally-supplied for the reason five other\n * parameters here are — `render`'s `origin`, `changedFields`' `schema`,\n * `RelationExecutor.exec`'s `preScoped`, `resolveLink`'s `operation`,\n * `assertPageArgument`'s reported name: where omitting an argument produces\n * a *worse* result rather than an error, `tsc` is the only thing that keeps\n * a convention. Ninety-five of a hundred call sites already passed one; the\n * five that did not are exactly the ones nobody revisited.\n *\n * `UnknownFieldError` and `UnknownRelationError` set the standard this\n * meets: both enumerate the valid names rather than only rejecting the\n * invalid one.\n */\n detail: string,\n ) {\n super(\n `gemi ORM does not support '${argument}' yet (${model}.${operation}). ` +\n detail,\n );\n this.name = \"UnsupportedQueryError\";\n }\n}\n\n/**\n * An argument the ORM has **decided not to implement**, as opposed to one it has\n * not implemented yet.\n *\n * The distinction is the whole point, and it is a distinction a caller can act\n * on: \"yet\" means wait for a release, \"will not\" means change the code. Sharing\n * one error for both meant `docs/orm.md` could list `omit` under *Not in scope*\n * while the runtime said \"yet\" — a contradiction a reader has no way to\n * resolve, and the one #68 exists to end.\n *\n * A subclass rather than a sibling, so `catch (e) { if (e instanceof\n * UnsupportedQueryError) … }` keeps working for callers that do not care which\n * kind it is.\n */\n/**\n * An argument the ORM **does** implement, given a value it cannot mean.\n *\n * The third category, and the one that made \"yet\" wrong four separate times —\n * #82, #88, #100 and #101 each corrected it at their own call site before #61\n * was found to own the problem. The taxonomy the three classes now draw:\n *\n * not implemented yet UnsupportedQueryError wait for a release\n * decided against UnsupportedByDesignError change the call (#78)\n * implemented, bad value InvalidArgumentError fix the value\n *\n * `take: \"-2\"` is the clearest case. `take` is implemented; `\"-2\"` is not a\n * take. Telling that caller the ORM \"does not support 'take' yet\" is wrong on\n * both halves — it does, and there is nothing to wait for — and it sends them\n * to a changelog when the fix is one character in their own code.\n *\n * **Extends `UnsupportedQueryError`**, so every existing `catch` and every test\n * asserting the base class keeps working. That is the same choice\n * `UnsupportedByDesignError` made, and it is what lets a taxonomy be added to a\n * shipped ORM without a breaking change: the specific classes are for the\n * reader, the base class is for the handler.\n *\n * **Where the taxonomy stops, and why it stops there.** An argument that is not\n * in the grammar at all keeps the base class and its \"yet\" — `{ nope: 1 }`\n * reports \"does not support 'nope' yet\". That is right for half of what reaches\n * that path and wrong for the other half: the same check refuses a typo and a\n * real Prisma argument this ORM has genuinely not implemented, and nothing at\n * that point can tell them apart. Splitting it would mean carrying Prisma's\n * full argument grammar per operation, which is a large amount of duplicated\n * schema for a small gain.\n *\n * What makes it tolerable is the sentence after it. Since #61's other half made\n * `detail` mandatory, that refusal always continues *\"findMany takes include,\n * omit, orderBy, select, skip, take, where\"* — so a caller who typed `nope`\n * learns it is not coming from the very next clause, without the class having\n * to know. Recorded here rather than left to be re-derived, because \"the third\n * class did not cover this one\" is the obvious first reading and it is not the\n * interesting part.\n */\nexport class InvalidArgumentError extends UnsupportedQueryError {\n constructor(\n argument: string,\n model: string,\n operation: string,\n /** What is wrong with the value, and what a good one looks like. */\n reason: string,\n ) {\n super(argument, model, operation, reason);\n this.name = \"InvalidArgumentError\";\n this.message = `Invalid '${argument}' (${model}.${operation}). ${reason}`;\n }\n}\n\nexport class UnsupportedByDesignError extends UnsupportedQueryError {\n constructor(\n argument: string,\n model: string,\n operation: string,\n /** What to use instead. Required — see #61: a refusal owes the caller a next step. */\n reason: string,\n ) {\n super(argument, model, operation, reason);\n this.name = \"UnsupportedByDesignError\";\n this.message =\n `gemi ORM does not implement '${argument}' (${model}.${operation}), ` +\n `and this is a decision rather than a gap. ${reason}`;\n }\n}\n\n/**\n * Thrown when an argument names something that is not a field on the model. A\n * `where` key with no matching field is an error, never a passthrough — that is\n * the rule that keeps user input out of the identifier positions in the SQL.\n */\nexport class UnknownFieldError extends Error {\n constructor(\n public readonly field: string,\n public readonly model: string,\n known: string[],\n ) {\n super(\n `'${field}' is not a field on model ${model}. ` +\n `Known fields: ${known.join(\", \")}.`,\n );\n this.name = \"UnknownFieldError\";\n }\n}\n\n/**\n * Thrown when a column holds something the generated schema says it cannot —\n * an unparseable timestamp, a fractional value in a `BigInt` column, malformed\n * JSON. Every dialect needs it, which is why it lives here rather than beside\n * one of them.\n *\n * It exists so those cases fail rather than decode into a plausible wrong\n * value: `new Date(\"nonsense\")` is an `Invalid Date`, not an error, and it\n * would travel a long way before anyone noticed.\n */\nexport class DecodeError extends Error {\n constructor(\n public readonly field: { column: string; type: string },\n public readonly value: unknown,\n ) {\n super(\n `Could not decode the value ${JSON.stringify(String(value))} from column ` +\n `'${field.column}' as ${field.type}. The column's contents do not match ` +\n `the Prisma schema — was it written by something other than Prisma or ` +\n `the gemi ORM?`,\n );\n this.name = \"DecodeError\";\n }\n}\n\n/**\n * Thrown by the `*OrThrow` operations when the query matched nothing. Prisma\n * raises `NotFoundError` / `P2025` for the same case; the differential harness\n * compares the fact of throwing, not the error type.\n */\nexport class RecordNotFoundError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n ) {\n super(`No ${model} found (${model}.${operation}).`);\n this.name = \"RecordNotFoundError\";\n }\n}\n\n/**\n * Thrown when a write violates a unique constraint.\n *\n * DECISION — gemi defines its own error rather than mirroring Prisma's codes.\n *\n * Prisma raises `PrismaClientKnownRequestError` with code `P2002` and\n * `meta.target` holding the field names. Mirroring that would ease a migration\n * for code already branching on `P2002`.\n *\n * **The premise this note used to rest on was wrong, and the conclusion is\n * unchanged.** It said \"nothing in this repository does (checked)\", which was\n * true of *this* repository and was never the question — the code that branches\n * on `P2002` lives in the applications the ORM is for. The first real port\n * measured four such guards, every one of them in concurrency-recovery code\n * (catch the collision, re-read, retry), and every one of them silently dead the\n * moment the write moved onto gemi: the `catch` still ran, the condition was\n * false, the recovery did not happen. Nor was the repository itself clean —\n * `templates/saas-starter/app/models/differential.ts:621` branches on `P2002`\n * today, and did when this was written.\n *\n * What the premise was doing was answering \"would anyone notice?\", and the\n * answer is that four people noticed at once. The decision never depended on it.\n * Carrying a `P` code implies the rest of the taxonomy is implemented too:\n * `P2003`, `P2025`, and the fifty others an application might reasonably then\n * expect to catch. Claiming a compatibility surface we have not built is worse\n * than asking the call sites that need it to catch a gemi error instead —\n * *especially* when the code in question is a retry loop, because a\n * compatibility surface that covers `P2002` and not `P2034` fails in exactly\n * the same silent way, one layer further in.\n *\n * A porter reaches for `isUniqueConstraintError` below. `UPGRADE.md` carries\n * the temporary `|| error.code === \"P2002\"` bridge, for a codebase halfway\n * through the move, with the marker that says when to delete it; it is\n * deliberately not exported, because a Prisma code in gemi's permanent surface\n * is the thing this note declined.\n *\n * What the contract does promise is the part that matters: the error is typed,\n * catchable, and names the fields — as *field* names, the way Prisma's\n * `meta.target` does, not as the database columns the driver reported.\n */\nexport class UniqueConstraintError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n /** Field names, mapped back through the schema from the driver's columns. */\n public readonly fields: string[],\n /** The constraint's own name, when the dialect reports one. */\n public readonly constraint?: string,\n options?: { cause?: unknown },\n ) {\n super(\n `Unique constraint violated on ${model}.${operation}` +\n (fields.length > 0 ? ` for ${fields.join(\", \")}` : \"\") +\n (constraint ? ` (constraint '${constraint}')` : \"\") +\n `. A ${model} with those values already exists.`,\n options,\n );\n this.name = \"UniqueConstraintError\";\n }\n}\n\n/**\n * The guard to write in a retry-on-collision `catch`, which is where a\n * `code === \"P2002\"` test almost always was:\n *\n * try {\n * return await Invite.create({ data: { token } })\n * } catch (error) {\n * if (!isUniqueConstraintError(error)) throw error\n * return await Invite.findUniqueOrThrow({ where: { token } })\n * }\n *\n * **Why this is worth shipping rather than telling people to write\n * `instanceof`**, which is the obvious objection and the reason it nearly was\n * not shipped. The second half of the test is the whole of it:\n *\n * error instanceof UniqueConstraintError || error.name === \"UniqueConstraintError\"\n *\n * `instanceof` compares against *this module instance's* class object, so it is\n * false across a duplicate copy of `gemi/orm` — two versions in one dependency\n * tree, a bundled build alongside a linked one, a monorepo package resolving\n * its own. The error is the right error, thrown by the right code, and the\n * guard silently does not fire. That is not a hypothetical: duck-typing rather\n * than importing the class is precisely what the ported application had already\n * done for Prisma's error, for precisely this reason, and shipping a predicate\n * that only does `instanceof` would hand it back the same trap under a new\n * name.\n *\n * So the name is load-bearing rather than a convenience: it is the identity\n * that survives module duplication, which is why every error in this file sets\n * `this.name` explicitly instead of relying on the class name surviving\n * minification.\n *\n * **The narrowing is a claim, and this is what it rests on.** The name branch\n * asserts `UniqueConstraintError` on the strength of a string — a second copy\n * of this module really does carry `model`, `operation` and `fields`, so the\n * claim holds for the case it exists for. An unrelated object named\n * `\"UniqueConstraintError\"` would defeat it, and that is not something that\n * happens by accident.\n *\n * **It deliberately does not match `code === \"P2002\"`.** See the DECISION\n * above: the temporary bridge for a half-ported codebase is in `UPGRADE.md`,\n * where it can carry a delete-me marker, rather than in gemi's permanent\n * surface, where it would have neither.\n */\nexport function isUniqueConstraintError(\n error: unknown,\n): error is UniqueConstraintError {\n if (error instanceof UniqueConstraintError) return true;\n\n return (\n typeof error === \"object\" &&\n error !== null &&\n (error as { name?: unknown }).name === \"UniqueConstraintError\"\n );\n}\n\n/**\n * Thrown when a write needs `RETURNING` and the dialect has none.\n *\n * Unreachable on SQLite and Postgres, which both support it. It exists so that\n * the MySQL / MariaDB path is a named gap rather than a wrong answer: the\n * fallback there is `lastInsertRowid` plus a re-select, which is a different\n * statement shape and is not implemented.\n */\nexport class ReturningUnsupportedError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n public readonly dialect: string,\n ) {\n super(\n `${model}.${operation} needs RETURNING to report its result, and the ` +\n `'${dialect}' dialect does not support it. The fallback — ` +\n `lastInsertRowid plus a re-select — is not implemented.`,\n );\n this.name = \"ReturningUnsupportedError\";\n }\n}\n\n/**\n * Thrown when a policy denies an operation.\n *\n * Two ways to get here, and the message distinguishes them because the fixes\n * are different: a policy's `before` returned false, or the model is policied\n * and there is no user in scope at all.\n *\n * The second is the deny-by-default rule, and it is the reason this error is\n * loud. A cron tick or a queue worker reading a policied model has no user, and\n * the alternative — treating \"no user\" as \"no policy\" — means the dangerous\n * case is the silent one: a request whose auth middleware was misconfigured\n * would read every tenant's rows rather than failing. So unscoped access is\n * always a decision written at the call site, through `Model.asSystem`.\n */\nexport class PolicyDeniedError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n public readonly reason: \"denied\" | \"no-user\" = \"denied\",\n ) {\n super(\n reason === \"no-user\"\n ? `${model}.${operation} is governed by a policy and there is no user ` +\n `in scope. If this is a cron tick, a queue worker or a script, say ` +\n `so at the call site: Model.asSystem(() => ...). Policies are ` +\n `never skipped just because a user failed to turn up.`\n : `${model}.${operation} was denied by ${model}'s policy.`,\n );\n this.name = \"PolicyDeniedError\";\n }\n}\n\n/**\n * Thrown when an `update` writes to a column its own policy's `scope` selects on,\n * and the policy has no `onUpdate` saying what that should mean.\n *\n * The shape it catches:\n *\n * scope: (ctx) => ({ organizationId: ctx.user.organizationId })\n * // ...and then\n * User.update({ where: { id }, data: { organizationId: 999 } })\n *\n * The scope did its job — only rows in the caller's own tenant could be selected\n * — and the statement still hands one of them to another tenant. Afterwards the\n * row is outside the scope, so it cannot be read back and cannot be put right by\n * the same caller: a one-way door rather than a visible failure. The usual way in\n * is not malice but mass assignment, a handler forwarding request fields into\n * `data`.\n *\n * This is `assertCreateCovered`'s question asked of the other write. There it is\n * \"you scoped reads but never said what an insert means\"; here it is \"you scoped\n * reads but never said whether an update may move a row out\". Both are answered\n * by writing the hook, including when the answer is \"allow it\" —\n * `onUpdate: (_ctx, data) => data` is a complete and legitimate answer, and\n * saying it out loud is the point.\n *\n * **What it cannot see.** The scope-owned columns are read off the top level of\n * the fragment the policy returned, so `{ organizationId: 7 }` is understood and\n * `{ OR: [...] }` is not — a scope built from combinators is not attributed to\n * any column and an update through it is not checked. Narrowing that would mean\n * either interpreting arbitrary `where` grammar or refusing every update on such\n * a model, and neither is worth it: the guard is a rail on the common shape, not\n * a proof.\n */\nexport class ScopeEscapeError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n public readonly fields: readonly string[],\n ) {\n const named = fields.map((field) => `'${field}'`).join(\", \");\n super(\n `${model}.${operation} writes ${named}, which ${model}'s policy also ` +\n `scopes on — so this update can move a row outside the scope that ` +\n `selected it, where the caller can no longer read or repair it.\\n\\n` +\n `Add an onUpdate to that policy. It may reassert the column ` +\n `(data => ({ ...data, ${fields[0]}: ctx.user.${fields[0]} })), reject ` +\n `the write, or allow it explicitly with (_ctx, data) => data — all ` +\n `three are fine, and the point is that the policy says which.`,\n );\n this.name = \"ScopeEscapeError\";\n }\n}\n\n/**\n * Thrown when a model class carries policies but is not the class the registry\n * resolves its name to.\n *\n * This exists because of a cross-tenant leak that shipped past review. The\n * generated `index.ts` registers the *generated* base — `register(\"Account\",\n * AccountModel)` — while an application authors its policy on a subclass:\n *\n * export class Account extends AccountModel {\n * static $policies = [{ scope: (ctx) => ({ organizationId: … }) }]\n * }\n *\n * A root query goes through `Account`, so `policiesFor(this)` finds the policy\n * and the scope applies. A **nested** relation read resolves through the\n * registry, gets `AccountModel`, and walks a prototype chain the policy is not\n * on — so `User.findMany({ include: { accounts: true } })` returned every\n * tenant's accounts. Root queries scoped, nested reads unscoped: exactly the\n * Prisma behaviour policies exist to fix, and silent.\n *\n * Raised at the first query through the unregistered class, naming the one-line\n * fix, because the alternative is data crossing a tenant boundary with nothing\n * to notice it.\n *\n * It fires on a divergence in the resolved policy *chain*, not merely on the two\n * classes differing. A plain subclass that adds no policy of its own inherits\n * the same policy objects in the same order, so a nested read resolving to its\n * parent applies exactly what the root query applied — no divergence, nothing\n * to refuse. An earlier version compared class identity and rejected\n * `class AdminUser extends User {}` for policies it had not written.\n */\nexport class UnregisteredPolicyClassError extends Error {\n constructor(\n public readonly model: string,\n /**\n * Under `carries: \"narrowing\"` this is the *ancestor* — the class the model\n * belongs to — rather than whatever the registry currently holds. The two\n * classes are on one prototype chain there, and which of them is registered\n * is the thing in question, so naming them by their relationship is what\n * makes the message readable.\n */\n public readonly registered: string,\n /** Under `carries: \"narrowing\"`, the descendant: the view that narrows. */\n public readonly queried: string,\n /**\n * Which side carries the policies that would be skipped, and therefore what\n * the author should do about it. Three, because they need three different\n * answers: a missing registration, a query through the wrong class, and a\n * view that should not be competing for the name at all.\n */\n public readonly carries: \"queried\" | \"registered\" | \"narrowing\" = \"queried\",\n ) {\n super(\n carries === \"narrowing\"\n ? `${queried} extends ${registered}, which owns the model '${model}', ` +\n `and carries policies of its own on top of it. A class that ` +\n `narrows an existing model is a view, and the registry holds one ` +\n `class per name — so registering ${queried} would apply its ` +\n `narrowing to every nested read of ${model}, and leaving ` +\n `${registered} registered would skip ${queried}'s policies ` +\n `entirely. Neither is a thing to choose for you.\\n\\n` +\n `Keep the view out of the modules you hand to Kernel.models, and ` +\n `query it directly where you want it:\\n\\n` +\n ` ${queried}.findMany(…) // narrowed, at the call site\\n\\n` +\n `If it is not a view but the model itself, move the policies onto ` +\n `${registered} — the class the model's name resolves to — and ` +\n `${queried} inherits them everywhere.\\n`\n : carries === \"queried\"\n ? `${queried} carries policies but the registry resolves '${model}' to ` +\n `${registered}. Nested relation reads go through the registry, so ` +\n `they would run on ${registered} and skip every policy on ` +\n `${queried} — scoped at the root, unscoped inside an include. ` +\n `Register the class that carries the policy:\\n\\n` +\n ` import { register } from \"gemi/orm\"\\n` +\n ` export class ${queried} extends ${registered} { … }\\n` +\n ` register(\"${model}\", ${queried})\\n`\n : `This query goes through ${queried}, but the registry resolves ` +\n `'${model}' to ${registered}, which carries policies ${queried} ` +\n `does not. Nested relation reads would be scoped and this query is ` +\n `not — the same policy applying to some queries and not others. ` +\n `Query ${registered} instead:\\n\\n` +\n ` ${registered}.findMany(…)\\n\\n` +\n `If skipping policies is intended, say so at the call site — that ` +\n `is what Model.asSystem() is for, and it is the only way to do it ` +\n `that a reader can see.\\n`,\n );\n this.name = \"UnregisteredPolicyClassError\";\n }\n}\n\n/**\n * Thrown when a `$policies` array holds something that is not a usable policy.\n *\n * Every case it covers is refused today — by `tsc`, at the class declaration,\n * with `TS2417`, because `Model` declares `static $policies?: readonly\n * PolicyEntry[]` and `ModelPolicy`'s members are all optional, so a typo'd key\n * trips weak-type detection. This is therefore a guard on the paths that import\n * user code *without* having type-checked it: `registerModels` at boot, and\n * `gemi check models`, whose whole job is to find mistakes in a file somebody is\n * still writing.\n *\n * Two failures, and the second is the one that matters.\n *\n * **A function the ORM cannot get a policy out of.** `resolveEntry` instantiates\n * every function entry with no arguments, and there are two ways that goes\n * wrong. A factory nobody called — `softDeletes` rather than\n * `softDeletes({ field })` — is not constructable at all and reached `new entry`\n * to produce `TypeError: function is not a constructor`. A class that *is*\n * constructable and whose constructor wants an argument gets through that check\n * and dies inside its own body instead, with\n * `TypeError: undefined is not an object (evaluating 'opts.field')`. Both are\n * loud and neither named the model, the index or the file, which on a 79-model\n * app leaves the first question unanswered; the second is the case that survived\n * a first pass at this error, because \"constructable\" is a fact about\n * `[[Construct]]` and says nothing about what the constructor then does.\n *\n * **An entry with no recognised hook.** `{ scopes: … }` and\n * `{ default: { scope: … } }` were accepted in silence: `applyPolicies`\n * dispatches on `before` / `scope` / `onCreate` / `onUpdate` and\n * `applyRedaction` on `redact`, so an entry spelling none of them contributes\n * nothing. The model then carries a visible `$policies` array, passes\n * `gemi check models` as correctly registered, and **reads unscoped** — the same\n * written-believed-not-in-effect shape `UnregisteredPolicyClassError` exists\n * for, arriving through a typo instead of through the registry.\n *\n * The line between *empty but valid* and *malformed* is drawn at \"would this\n * ever run\": an entry with at least one recognised hook that is callable is\n * accepted whatever else it carries, because a factory's return value and a\n * policy class routinely hold configuration and helpers beside the hooks, and\n * refusing unknown *extra* keys would reject code that works. An entry with no\n * callable hook at all is refused, `{}` included — it is indistinguishable from\n * a policy that was meant to do something, and a conditional policy belongs in\n * the array rather than in the entry.\n */\nexport class InvalidPolicyEntryError extends Error {\n constructor(\n /**\n * The class whose **own** `$policies` array holds the entry — the class the\n * author wrote the array on, which is not necessarily the model being\n * queried when the array is on a base.\n */\n public readonly model: string,\n /** The entry's index in that array. */\n public readonly index: number,\n public readonly reason:\n | \"not-a-policy\"\n | \"not-constructable\"\n | \"constructor-threw\"\n | \"no-hooks\"\n | \"hook-not-callable\",\n /** What was found in the entry's place, rendered for a human. */\n public readonly found: string,\n /**\n * The hook names the runtime dispatches on, supplied by `policy.ts` so the\n * list lives beside the code that reads it rather than being restated here.\n */\n hooks: readonly string[],\n /**\n * A key the entry actually spells and the hook it is within one edit of.\n *\n * **The pair, not the hook alone.** An unattributed \"Did you mean `scope`?\"\n * after a list of five keys does not say which of them was read as a\n * misspelling, so a reader who can see that none of them are has no way to\n * dismiss it — and this error is about an authorization rule that is not in\n * effect, where a suggestion followed wrongly costs a rename of something\n * that was never the problem.\n */\n public readonly suggestion?: { key: string; hook: string },\n options?: { cause?: unknown },\n ) {\n const where = `${model}.$policies[${index}]`;\n const named =\n hooks.length > 1\n ? `${hooks.slice(0, -1).join(\", \")} or ${hooks[hooks.length - 1]}`\n : (hooks[0] ?? \"\");\n\n super(\n reason === \"not-a-policy\"\n ? `${where} is ${found}, which is not a policy. An entry is either a ` +\n `policy object — { scope, onCreate, … } — or a class the ORM ` +\n `constructs with no arguments.\\n\\n` +\n `A policy that only sometimes applies belongs in the array rather ` +\n `than in the entry:\\n\\n` +\n ` static $policies = [...(multiTenant ? [tenantScope] : [])]\\n`\n : reason === \"not-constructable\"\n ? `${where} is ${found}, and a function entry is instantiated with ` +\n `no arguments — so an arrow function, a plain function, or a ` +\n `factory that was never called cannot be one.\\n\\n` +\n `If it is a factory, call it:\\n\\n` +\n ` static $policies = [softDeletes({ field: \"deletedAt\" })]\\n`\n : reason === \"constructor-threw\"\n ? `${where} is ${found}\\n\\n` +\n `A class entry is constructed with no arguments. If this one ` +\n `needs some, construct it yourself and put the instance in the ` +\n `array:\\n\\n` +\n ` static $policies = [new TenantPolicy({ field: \"orgId\" })]\\n\\n` +\n `If the constructor reaches for something that is not ready yet, ` +\n `note that it runs on the first query through this model, not at ` +\n `boot.\\n`\n : reason === \"hook-not-callable\"\n ? `${where} has a ${found}, and every hook is called — so this ` +\n `would throw on the first query that reached it rather than ` +\n `doing whatever it was meant to do. Give it a function, or ` +\n `leave the key out.\\n`\n : `${where} has none of ${named}, so it would never run. The ` +\n `model carries a visible $policies array and nothing in it ` +\n `applies to any query — which for a scope means the model ` +\n `reads unscoped. ${found}` +\n (suggestion\n ? ` Is '${suggestion.key}' meant to be \\`${suggestion.hook}\\`?`\n : \"\") +\n `\\n`,\n options,\n );\n this.name = \"InvalidPolicyEntryError\";\n }\n}\n\n/**\n * Thrown when `registerModels` finds two unrelated classes in one module both\n * claiming the same model name.\n *\n * Deriving registration from a module namespace works because the candidates\n * are normally a chain — a generated base, the application's subclass, perhaps\n * a typed view over it — and a chain has a least element to elect. Two classes\n * that extend the same base without extending each other do not: both were\n * written for this model, and only the author knows which one nested reads\n * should run.\n *\n * Refused rather than guessed at, because both guesses are silent. Picking\n * either would scope every `include` of the model by one class's policies while\n * the other's code keeps reading as though its own applied.\n *\n * **\"In one module\" is the exact scope, and the asymmetry is deliberate.**\n * Election happens per module, so two unrelated claims split across *different*\n * modules never meet inside one — the later import simply wins. What catches\n * that is the audit at the end of `registerModels` rather than this error, and\n * only when the two diverge in policies. Two unrelated *unpolicied* claims on\n * one name resolve by import order and nothing reports it, which is tolerable\n * for the same reason it is invisible: with no policies on either, the choice\n * changes no query's scope.\n */\nexport class AmbiguousModelRegistrationError extends Error {\n constructor(\n public readonly model: string,\n public readonly candidates: readonly string[],\n ) {\n const named = candidates.map((candidate) => `'${candidate}'`).join(\", \");\n super(\n `Two classes in one module claim the model '${model}' — ${named} — and ` +\n `neither extends the other, so there is no way to tell which one ` +\n `nested relation reads should run.\\n\\n` +\n `Say which, and registerModels will leave it alone:\\n\\n` +\n ` import { register } from \"gemi/orm\"\\n` +\n ` register(\"${model}\", ${candidates[0]})\\n\\n` +\n `A class that is only a typed view over the same rows belongs in a ` +\n `module you do not hand to registerModels.`,\n );\n this.name = \"AmbiguousModelRegistrationError\";\n }\n}\n\n/**\n * Thrown when a statement would bind more parameters than the driver's wire\n * protocol can carry.\n *\n * Three shapes reach it, all of them scaling with the caller's *data* rather\n * than with the query's shape: `createMany` at `rows × columns`, an `in` list on\n * SQLite (one placeholder per element, and such a list is routinely\n * request-derived), and a to-many `include` on SQLite, which batches an `in`\n * over the parent keys. Both limits are hard and low enough to hit with an\n * ordinary import — Postgres counts parameters in an int16 (65535), SQLite\n * defaults `SQLITE_MAX_VARIABLE_NUMBER` to 32766. Postgres escapes the last two\n * either way: `= any($1)` is one parameter however long the array.\n *\n * Prisma chunks the insert automatically. Doing that here means several\n * statements, which without a transaction is a partially-applied `createMany`\n * on failure — so it waits for iteration 5, and until then this is a named gap\n * rather than a driver error naming neither the model nor the cause. Same\n * treatment as `ReturningUnsupportedError`, for the same reason.\n */\nexport class ParameterLimitError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n public readonly required: number,\n public readonly limit: number,\n public readonly dialect: string,\n detail: string,\n ) {\n super(\n `${model}.${operation} would bind ${required} parameters, and the ` +\n `'${dialect}' driver accepts at most ${limit} in one statement. ` +\n `${detail}` +\n (operation === \"createMany\"\n ? ` A createMany over the ceiling is normally split across statements ` +\n `inside one transaction, so reaching this means splitting cannot ` +\n `help: a single row binds more than the driver accepts.`\n : ` Splitting is not something this operation can do for you — one ` +\n `statement has to carry one answer. Narrow the query.`),\n );\n this.name = \"ParameterLimitError\";\n }\n}\n\n/**\n * Thrown when a write omits a column that has no value to fall back on: not\n * supplied, no client-side default, no database default, and not nullable.\n *\n * Raised in the compiler rather than left to the database so the message names\n * the field and the model, instead of surfacing as `NOT NULL constraint failed`\n * with a column name and no context.\n */\nexport class MissingRequiredValueError extends Error {\n constructor(\n public readonly model: string,\n public readonly operation: string,\n public readonly field: string,\n ) {\n super(\n `${model}.${operation} is missing a value for '${field}', which is ` +\n `required and has no default.`,\n );\n this.name = \"MissingRequiredValueError\";\n }\n}\n\n/**\n * Thrown when an `include` — or a relation-shaped key inside a `select` — names\n * something the model does not declare as a relation.\n */\nexport class UnknownRelationError extends Error {\n constructor(\n public readonly relation: string,\n public readonly model: string,\n known: string[],\n ) {\n super(\n `'${relation}' is not a relation on model ${model}. ` +\n (known.length > 0\n ? `Known relations: ${known.join(\", \")}.`\n : `${model} declares no relations.`),\n );\n this.name = \"UnknownRelationError\";\n }\n}\n\n/**\n * Thrown when an include tree nests deeper than the guard allows.\n *\n * A cyclic include is legal and finite — `user -> accounts -> user` terminates\n * because the caller wrote a finite tree. What this catches is an *unbounded*\n * one: an argument tree built by a loop, or forwarded from a request body, that\n * describes a thousand levels. Under the batched planner every level is at least\n * one query, so the guard is what stops a malformed argument from becoming a\n * self-inflicted denial of service.\n */\nexport class RelationDepthExceededError extends Error {\n constructor(\n public readonly model: string,\n public readonly limit: number,\n ) {\n super(\n `The include tree nests more than ${limit} relations deep (at model ` +\n `${model}). Deeply nested includes are legal, so this is a guard ` +\n `against a generated or malformed argument tree rather than a limit on ` +\n `modelling — every level costs at least one query.`,\n );\n this.name = \"RelationDepthExceededError\";\n }\n}\n\n/**\n * Thrown when a relation names a model the registry does not hold. Every\n * relation in a generated artifact was emitted from a model in the same\n * `schema.prisma`, so this can only mean the artifact and the registry disagree.\n */\nexport class UnregisteredRelationTargetError extends Error {\n constructor(\n public readonly model: string,\n public readonly relation: string,\n public readonly target: string,\n known: string[],\n ) {\n super(\n `${model}.${relation} points at model '${target}', which nothing has ` +\n `registered. The generated artifact and the registry disagree: re-run ` +\n `\\`prisma generate\\`, and check that app/models/generated/index.ts is ` +\n `imported. ` +\n (known.length > 0\n ? `Registered models: ${known.join(\", \")}.`\n : `Nothing is registered at all.`),\n );\n this.name = \"UnregisteredRelationTargetError\";\n }\n}\n\n/**\n * Thrown when a relation is registered on both sides but the two sides do not\n * describe a link the planner can follow: no matching `relationName` on the\n * other model, or a `from` / `to` naming a field that is not there. Like\n * `UnregisteredRelationTargetError`, it means a stale generated artifact — a\n * consistent one cannot produce it.\n */\nexport class MalformedRelationError extends Error {\n constructor(\n public readonly model: string,\n public readonly relation: string,\n detail: string,\n ) {\n super(\n `Cannot resolve how ${model}.${relation} joins: ${detail} This means ` +\n `app/models/generated is stale or hand-edited — re-run ` +\n `\\`prisma generate\\`.`,\n );\n this.name = \"MalformedRelationError\";\n }\n}\n\n/** Thrown when a relation resolves to a model name nothing registered. */\nexport class ModelNotRegisteredError extends Error {\n constructor(name: string, known: string[]) {\n super(\n `No model is registered under the name '${name}'. ` +\n (known.length > 0\n ? `Registered models: ${known.join(\", \")}.`\n : `Nothing is registered — is app/models/generated/index.ts imported?`),\n );\n this.name = \"ModelNotRegisteredError\";\n }\n}\n\n/** Thrown when a model class is used before the generator has given it a schema. */\nexport class MissingModelSchemaError extends Error {\n constructor(className: string) {\n super(\n `${className} has no $schema. Model subclasses must extend a generated ` +\n `base class from app/models/generated/models.ts.`,\n );\n this.name = \"MissingModelSchemaError\";\n }\n}\n"
6
6
  ],
7
7
  "mappings": ";AAQO,MAAM,UAA8B,KAAM,CAE7B,SACA,MACA,UAHlB,WAAW,CACO,EACA,EACA,EAsBhB,EACA,CACA,MACE,8BAA8B,WAAkB,KAAS,OACvD,CACJ,EA7BgB,gBACA,aACA,iBA4BhB,KAAK,KAAO,wBAEhB,CAuDO,MAAM,UAA6B,CAAsB,CAC9D,WAAW,CACT,EACA,EACA,EAEA,EACA,CACA,MAAM,EAAU,EAAO,EAAW,CAAM,EACxC,KAAK,KAAO,uBACZ,KAAK,QAAU,YAAY,OAAc,KAAS,OAAe,IAErE,CAEO,MAAM,UAAiC,CAAsB,CAClE,WAAW,CACT,EACA,EACA,EAEA,EACA,CACA,MAAM,EAAU,EAAO,EAAW,CAAM,EACxC,KAAK,KAAO,2BACZ,KAAK,QACH,gCAAgC,OAAc,KAAS,iDACV,IAEnD,CAOO,MAAM,UAA0B,KAAM,CAEzB,MACA,MAFlB,WAAW,CACO,EACA,EAChB,EACA,CACA,MACE,IAAI,8BAAkC,oBACnB,EAAM,KAAK,IAAI,IACpC,EAPgB,aACA,aAOhB,KAAK,KAAO,oBAEhB,CAYO,MAAM,UAAoB,KAAM,CAEnB,MACA,MAFlB,WAAW,CACO,EACA,EAChB,CACA,MACE,8BAA8B,KAAK,UAAU,OAAO,CAAK,CAAC,kBACpD,EAAM,cAAc,EAAM,4CAC9B,6EACA,eACJ,EARgB,aACA,aAQhB,KAAK,KAAO,cAEhB,CAOO,MAAM,UAA4B,KAAM,CAE3B,MACA,UAFlB,WAAW,CACO,EACA,EAChB,CACA,MAAM,MAAM,YAAgB,KAAS,KAAa,EAHlC,aACA,iBAGhB,KAAK,KAAO,sBAEhB,CA0CO,MAAM,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BAQhB,KAAK,KAAO,yBAEhB,CAGO,MAAM,UAAgC,KAAM,CACjD,WAAW,CAAC,EAAc,EAAiB,CACzC,MACE,0CAA0C,QACvC,EAAM,OAAS,EACZ,sBAAsB,EAAM,KAAK,IAAI,KACrC,0EACR,EACA,KAAK,KAAO,0BAEhB,CAGO,MAAM,UAAgC,KAAM,CACjD,WAAW,CAAC,EAAmB,CAC7B,MACE,GAAG,4GAEL,EACA,KAAK,KAAO,0BAEhB",
8
- "debugId": "11BA7EC537BEFE6E64756E2164756E21",
8
+ "debugId": "AD3ED4BEB46B76C164756E2164756E21",
9
9
  "names": []
10
10
  }