@kozou/svelte-ui 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/chunks/{BC5KLBLb.js → B-1XEc-6.js} +2 -2
- package/build/client/_app/immutable/chunks/B-1XEc-6.js.br +0 -0
- package/build/client/_app/immutable/chunks/B-1XEc-6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BVSHjVK6.js → C-GI63FQ.js} +1 -1
- package/build/client/_app/immutable/chunks/C-GI63FQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/C-GI63FQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CzVb7msC.js → DG1n8Qtt.js} +1 -1
- package/build/client/_app/immutable/chunks/DG1n8Qtt.js.br +0 -0
- package/build/client/_app/immutable/chunks/DG1n8Qtt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{yIxoVI_-.js → DJJ7sWz4.js} +1 -1
- package/build/client/_app/immutable/chunks/DJJ7sWz4.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJJ7sWz4.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DHKWTljt.js → app.D2ZPYrlx.js} +2 -2
- package/build/client/_app/immutable/entry/app.D2ZPYrlx.js.br +0 -0
- package/build/client/_app/immutable/entry/app.D2ZPYrlx.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.C0C4Swlf.js +1 -0
- package/build/client/_app/immutable/entry/start.C0C4Swlf.js.br +0 -0
- package/build/client/_app/immutable/entry/start.C0C4Swlf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.BkcGPtdF.js → 1.BOcpgjhs.js} +1 -1
- package/build/client/_app/immutable/nodes/1.BOcpgjhs.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BOcpgjhs.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.B4UoMGo7.js → 3.Bfb2pVnC.js} +1 -1
- package/build/client/_app/immutable/nodes/3.Bfb2pVnC.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Bfb2pVnC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.md6hU4xw.js → 5.CtLCXctU.js} +1 -1
- package/build/client/_app/immutable/nodes/5.CtLCXctU.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CtLCXctU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.BvmJdH03.js → 6.BWtK3JSj.js} +1 -1
- package/build/client/_app/immutable/nodes/6.BWtK3JSj.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BWtK3JSj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.BO_sQESH.js → 7.Bf0RAYe4.js} +1 -1
- package/build/client/_app/immutable/nodes/7.Bf0RAYe4.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.Bf0RAYe4.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-18QIr3Yc.js → 0-CW6CLhlp.js} +2 -2
- package/build/server/chunks/{0-18QIr3Yc.js.map → 0-CW6CLhlp.js.map} +1 -1
- package/build/server/chunks/{1-co7IU-ci.js → 1-Da8RNRGa.js} +3 -3
- package/build/server/chunks/{1-co7IU-ci.js.map → 1-Da8RNRGa.js.map} +1 -1
- package/build/server/chunks/{2-Bj2meHET.js → 2-BxKRDuEr.js} +2 -2
- package/build/server/chunks/{2-Bj2meHET.js.map → 2-BxKRDuEr.js.map} +1 -1
- package/build/server/chunks/{3-D86eJKW8.js → 3-DdQINTRw.js} +8 -8
- package/build/server/chunks/{3-D86eJKW8.js.map → 3-DdQINTRw.js.map} +1 -1
- package/build/server/chunks/{4-DAc4CAmL.js → 4-DoVhcDaV.js} +2 -2
- package/build/server/chunks/{4-DAc4CAmL.js.map → 4-DoVhcDaV.js.map} +1 -1
- package/build/server/chunks/{5-Bc0-5LMg.js → 5-BlV30r34.js} +3 -3
- package/build/server/chunks/{5-Bc0-5LMg.js.map → 5-BlV30r34.js.map} +1 -1
- package/build/server/chunks/{6-DaGLS_mw.js → 6-DWXf0gMH.js} +8 -8
- package/build/server/chunks/{6-DaGLS_mw.js.map → 6-DWXf0gMH.js.map} +1 -1
- package/build/server/chunks/{7-AttnsF7z.js → 7-DEcsnq5T.js} +8 -8
- package/build/server/chunks/{7-AttnsF7z.js.map → 7-DEcsnq5T.js.map} +1 -1
- package/build/server/chunks/{8-DJOb0bRA.js → 8-C5GP7CcL.js} +2 -2
- package/build/server/chunks/{8-DJOb0bRA.js.map → 8-C5GP7CcL.js.map} +1 -1
- package/build/server/chunks/{ListTable-D3wi3RvS.js → ListTable-DzHBYe8D.js} +2 -2
- package/build/server/chunks/{ListTable-D3wi3RvS.js.map → ListTable-DzHBYe8D.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-ClzaQTuQ.js → _layout.svelte-D_bhOcbf.js} +2 -2
- package/build/server/chunks/{_layout.svelte-ClzaQTuQ.js.map → _layout.svelte-D_bhOcbf.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Cup_HkLy.js → _page.svelte-58_PZxyj.js} +2 -2
- package/build/server/chunks/{_page.svelte-Cup_HkLy.js.map → _page.svelte-58_PZxyj.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Bf1Xvutq.js → _page.svelte-BhutFRWs.js} +4 -4
- package/build/server/chunks/{_page.svelte-Bf1Xvutq.js.map → _page.svelte-BhutFRWs.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DjvqV0mP.js → _page.svelte-BnMm7OgR.js} +3 -3
- package/build/server/chunks/{_page.svelte-DjvqV0mP.js.map → _page.svelte-BnMm7OgR.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-D1MlIcvD.js → _page.svelte-D3uAY11y.js} +3 -3
- package/build/server/chunks/{_page.svelte-D1MlIcvD.js.map → _page.svelte-D3uAY11y.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DzvgX_Fb.js → _page.svelte-D5kbEX4I.js} +7 -7
- package/build/server/chunks/{_page.svelte-DzvgX_Fb.js.map → _page.svelte-D5kbEX4I.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CJFKUETC.js → _page.svelte-DU-6iXu-.js} +8 -8
- package/build/server/chunks/{_page.svelte-CJFKUETC.js.map → _page.svelte-DU-6iXu-.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Bcneewwy.js → _page.svelte-OU-ibMSx.js} +8 -8
- package/build/server/chunks/{_page.svelte-Bcneewwy.js.map → _page.svelte-OU-ibMSx.js.map} +1 -1
- package/build/server/chunks/{app-MIcRQ3KA.js → app-Do0K3Mhs.js} +2 -2
- package/build/server/chunks/{app-MIcRQ3KA.js.map → app-Do0K3Mhs.js.map} +1 -1
- package/build/server/chunks/{client-B7_eTpxF.js → client-ByaEo6fP.js} +4 -4
- package/build/server/chunks/client-ByaEo6fP.js.map +1 -0
- package/build/server/chunks/{composite-form-BBdoMBnQ.js → composite-form-CxD73llv.js} +27 -27
- package/build/server/chunks/{composite-form-BBdoMBnQ.js.map → composite-form-CxD73llv.js.map} +1 -1
- package/build/server/chunks/{dev-yFiAtg5l.js → dev-aF1HGl8f.js} +5 -5
- package/build/server/chunks/dev-aF1HGl8f.js.map +1 -0
- package/build/server/chunks/{error.svelte-CdfDRBr_.js → error.svelte-DOQL2puw.js} +7 -7
- package/build/server/chunks/{error.svelte-CdfDRBr_.js.map → error.svelte-DOQL2puw.js.map} +1 -1
- package/build/server/chunks/{hooks.server-BE9c-_mv.js → hooks.server-B__8cDUd.js} +100 -12
- package/build/server/chunks/hooks.server-B__8cDUd.js.map +1 -0
- package/build/server/chunks/index-CVekYGHP.js.map +1 -1
- package/build/server/chunks/index-DBqjc0Yf.js.map +1 -1
- package/build/server/chunks/{internal-6-cAlFJo.js → internal-BxXGHZrr.js} +14 -14
- package/build/server/chunks/{internal-6-cAlFJo.js.map → internal-BxXGHZrr.js.map} +1 -1
- package/build/server/chunks/{relation-select-composite-field-C_95H1v5.js → relation-select-composite-field-D3Q-795k.js} +4 -4
- package/build/server/chunks/{relation-select-composite-field-C_95H1v5.js.map → relation-select-composite-field-D3Q-795k.js.map} +1 -1
- package/build/server/chunks/{widget-registry-CbrL96Di.js → widget-registry-BCxIAl3a.js} +2 -2
- package/build/server/chunks/{widget-registry-CbrL96Di.js.map → widget-registry-BCxIAl3a.js.map} +1 -1
- package/build/server/index.js +32 -32
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +10 -10
- package/build/server/manifest.js.map +1 -1
- package/package.json +5 -5
- package/build/client/_app/immutable/chunks/BC5KLBLb.js.br +0 -0
- package/build/client/_app/immutable/chunks/BC5KLBLb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BVSHjVK6.js.br +0 -0
- package/build/client/_app/immutable/chunks/BVSHjVK6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CzVb7msC.js.br +0 -0
- package/build/client/_app/immutable/chunks/CzVb7msC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/yIxoVI_-.js.br +0 -0
- package/build/client/_app/immutable/chunks/yIxoVI_-.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DHKWTljt.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DHKWTljt.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DNSPY2k9.js +0 -1
- package/build/client/_app/immutable/entry/start.DNSPY2k9.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DNSPY2k9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BkcGPtdF.js.br +0 -4
- package/build/client/_app/immutable/nodes/1.BkcGPtdF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.B4UoMGo7.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.B4UoMGo7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.md6hU4xw.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.md6hU4xw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BvmJdH03.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BvmJdH03.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.BO_sQESH.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.BO_sQESH.js.gz +0 -0
- package/build/server/chunks/client-B7_eTpxF.js.map +0 -1
- package/build/server/chunks/dev-yFiAtg5l.js.map +0 -1
- package/build/server/chunks/hooks.server-BE9c-_mv.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import 'node:module';
|
|
2
|
-
import { q as escape_html, x as getContext } from './dev-
|
|
3
|
-
import './client-
|
|
2
|
+
import { q as escape_html, x as getContext } from './dev-aF1HGl8f.js';
|
|
3
|
+
import './client-ByaEo6fP.js';
|
|
4
4
|
import 'clsx';
|
|
5
|
-
import './internal-
|
|
5
|
+
import './internal-BxXGHZrr.js';
|
|
6
6
|
import './index-DBqjc0Yf.js';
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-
|
|
9
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/app/state/server.js
|
|
10
10
|
function context() {
|
|
11
11
|
return getContext("__request__");
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-
|
|
14
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/app/state/index.js
|
|
15
15
|
/**
|
|
16
16
|
* A read-only reactive object with information about the current page, serving several use cases:
|
|
17
17
|
* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))
|
|
@@ -57,7 +57,7 @@ var page = {
|
|
|
57
57
|
return context().page.status;
|
|
58
58
|
}};
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-
|
|
60
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte
|
|
61
61
|
function Error$1($$renderer, $$props) {
|
|
62
62
|
$$renderer.component(($$renderer) => {
|
|
63
63
|
$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
|
@@ -65,4 +65,4 @@ function Error$1($$renderer, $$props) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export { Error$1 as default };
|
|
68
|
-
//# sourceMappingURL=error.svelte-
|
|
68
|
+
//# sourceMappingURL=error.svelte-DOQL2puw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.svelte-
|
|
1
|
+
{"version":3,"file":"error.svelte-DOQL2puw.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import \"../../chunks/environment.js\";\nimport { H as escape_html, tt as getContext } from \"../../chunks/dev.js\";\nimport { c as navigating$1, s as stores } from \"../../chunks/client.js\";\nObject.defineProperty({\n\tget from() {\n\t\treturn navigating$1.current ? navigating$1.current.from : null;\n\t},\n\tget to() {\n\t\treturn navigating$1.current ? navigating$1.current.to : null;\n\t},\n\tget type() {\n\t\treturn navigating$1.current ? navigating$1.current.type : null;\n\t},\n\tget willUnload() {\n\t\treturn navigating$1.current ? navigating$1.current.willUnload : null;\n\t},\n\tget delta() {\n\t\treturn navigating$1.current ? navigating$1.current.delta : null;\n\t},\n\tget complete() {\n\t\treturn navigating$1.current ? navigating$1.current.complete : null;\n\t}\n}, \"current\", { get() {\n\tthrow new Error(\"Replace navigating.current.<prop> with navigating.<prop>\");\n} });\nstores.updated.check;\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/app/state/server.js\nfunction context() {\n\treturn getContext(\"__request__\");\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/app/state/index.js\n/**\n* A read-only reactive object with information about the current page, serving several use cases:\n* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))\n* - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))\n* - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))\n* - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error\n*\n* ```svelte\n* <!--- file: +layout.svelte --->\n* <script>\n* \timport { page } from '$app/state';\n* <\\/script>\n*\n* <p>Currently at {page.url.pathname}</p>\n*\n* {#if page.error}\n* \t<span class=\"red\">Problem detected</span>\n* {:else}\n* \t<span class=\"small\">All systems operational</span>\n* {/if}\n* ```\n*\n* Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes)\n*\n* ```svelte\n* <!--- file: +page.svelte --->\n* <script>\n* \timport { page } from '$app/state';\n* \tconst id = $derived(page.params.id); // This will correctly update id for usage on this page\n* \t$: badId = page.params.id; // Do not use; will never update after initial load\n* <\\/script>\n* ```\n*\n* On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.\n*\n* @type {import('@sveltejs/kit').Page}\n*/\nvar page = {\n\tget data() {\n\t\treturn context().page.data;\n\t},\n\tget error() {\n\t\treturn context().page.error;\n\t},\n\tget form() {\n\t\treturn context().page.form;\n\t},\n\tget params() {\n\t\treturn context().page.params;\n\t},\n\tget route() {\n\t\treturn context().page.route;\n\t},\n\tget state() {\n\t\treturn context().page.state;\n\t},\n\tget status() {\n\t\treturn context().page.status;\n\t},\n\tget url() {\n\t\treturn context().page.url;\n\t}\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_b6cf287e4b8449a2ec52045a8a580061/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte\nfunction Error$1($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\t$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n\t});\n}\n//#endregion\nexport { Error$1 as default };\n"],"names":[],"mappings":";;;;;;;AA0BA;AACA;AACA,SAAS,OAAO,GAAG;AACnB,CAAC,OAAO,UAAU,CAAC,aAAa,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,GAAG;AACX,CAGC,IAAI,KAAK,GAAG;AACb,EAAE,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC7B,CAAC,CAAC;AACF,CAYC,IAAI,MAAM,GAAG;AACd,EAAE,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAC9B,CAAC,CAID,CAAC;AACD;AACA;AACA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,KAAK;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACpG,CAAC,CAAC,CAAC;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __commonJSMin, b as __require } from './internal-
|
|
1
|
+
import { _ as __commonJSMin, b as __require } from './internal-BxXGHZrr.js';
|
|
2
2
|
import { e as encodeResourceId } from './resource-id-CFSW_3aR.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import require$$0$3 from 'events';
|
|
@@ -13,7 +13,7 @@ import require$$0$6 from 'path';
|
|
|
13
13
|
import require$$0$5 from 'stream';
|
|
14
14
|
import require$$1$2 from 'string_decoder';
|
|
15
15
|
import 'node:module';
|
|
16
|
-
import './dev-
|
|
16
|
+
import './dev-aF1HGl8f.js';
|
|
17
17
|
import 'clsx';
|
|
18
18
|
import './index-DBqjc0Yf.js';
|
|
19
19
|
|
|
@@ -7075,25 +7075,113 @@ function inferDisplayField(input) {
|
|
|
7075
7075
|
}
|
|
7076
7076
|
//#endregion
|
|
7077
7077
|
//#region ../core/dist/checkEnum.js
|
|
7078
|
-
var IN_RE = /\(?\s*(?:\w+\.)?["']?(\w+)["']?\s*\)?(?:::\w+)?\s+IN\s*\(\s*([^)]+)\)/i;
|
|
7079
|
-
var ANY_ARRAY_RE = /\(?\s*(?:\w+\.)?["']?(\w+)["']?\s*\)?(?:::\w+)?\s*=\s*ANY\s*\(\s*ARRAY\s*\[([^\]]+)\]\s*\)/i;
|
|
7080
7078
|
var QUOTED_VALUE_RE = /'((?:[^']|'')*)'/g;
|
|
7081
7079
|
function extractQuotedValues(input) {
|
|
7082
7080
|
const out = [];
|
|
7083
7081
|
for (const match of input.matchAll(QUOTED_VALUE_RE)) out.push(match[1].replace(/''/g, "'"));
|
|
7084
7082
|
return out;
|
|
7085
7083
|
}
|
|
7084
|
+
function isWordChar(c) {
|
|
7085
|
+
return c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "_";
|
|
7086
|
+
}
|
|
7087
|
+
function isWs(c) {
|
|
7088
|
+
return c === " " || c === " " || c === "\n" || c === "\r" || c === "\f" || c === "\v";
|
|
7089
|
+
}
|
|
7090
|
+
/** The column identifier immediately to the left of `before` (exclusive),
|
|
7091
|
+
* across the shapes a CHECK constraint uses for the column reference:
|
|
7092
|
+
* `foo`, `"foo"`, `(foo)`, `(foo)::text`, `foo::text`, `t.foo`. Returns the
|
|
7093
|
+
* bare identifier (matching the original regex's `(\w+)` capture), or null
|
|
7094
|
+
* when none is there. A single left-walk — no regex. */
|
|
7095
|
+
function columnBefore(expr, before) {
|
|
7096
|
+
let i = before - 1;
|
|
7097
|
+
while (i >= 0 && isWs(expr[i])) i--;
|
|
7098
|
+
if (i >= 0 && isWordChar(expr[i])) {
|
|
7099
|
+
let j = i;
|
|
7100
|
+
while (j >= 0 && isWordChar(expr[j])) j--;
|
|
7101
|
+
if (j - 1 >= 0 && expr[j] === ":" && expr[j - 1] === ":") {
|
|
7102
|
+
i = j - 2;
|
|
7103
|
+
while (i >= 0 && isWs(expr[i])) i--;
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
if (i >= 0 && expr[i] === ")") {
|
|
7107
|
+
i--;
|
|
7108
|
+
while (i >= 0 && isWs(expr[i])) i--;
|
|
7109
|
+
}
|
|
7110
|
+
if (i >= 0 && (expr[i] === "\"" || expr[i] === "'")) i--;
|
|
7111
|
+
const end = i;
|
|
7112
|
+
while (i >= 0 && isWordChar(expr[i])) i--;
|
|
7113
|
+
if (i + 1 > end) return null;
|
|
7114
|
+
return expr.slice(i + 1, end + 1);
|
|
7115
|
+
}
|
|
7116
|
+
/** `<colref> = ANY (ARRAY[ <values> ])` — the form pg_get_constraintdef
|
|
7117
|
+
* normalises `col IN (...)` into on PostgreSQL 16. */
|
|
7118
|
+
function parseAnyArray(expr, lower) {
|
|
7119
|
+
let pos = 0;
|
|
7120
|
+
for (;;) {
|
|
7121
|
+
const any = lower.indexOf("any", pos);
|
|
7122
|
+
if (any === -1) return null;
|
|
7123
|
+
pos = any + 3;
|
|
7124
|
+
if (any > 0 && isWordChar(expr[any - 1])) continue;
|
|
7125
|
+
if (isWordChar(expr[any + 3] ?? "")) continue;
|
|
7126
|
+
let i = any - 1;
|
|
7127
|
+
while (i >= 0 && isWs(expr[i])) i--;
|
|
7128
|
+
if (i < 0 || expr[i] !== "=") continue;
|
|
7129
|
+
const eq = i;
|
|
7130
|
+
let k = any + 3;
|
|
7131
|
+
while (k < expr.length && isWs(expr[k])) k++;
|
|
7132
|
+
if (expr[k] !== "(") continue;
|
|
7133
|
+
k++;
|
|
7134
|
+
while (k < expr.length && isWs(expr[k])) k++;
|
|
7135
|
+
if (lower.slice(k, k + 5) !== "array") continue;
|
|
7136
|
+
k += 5;
|
|
7137
|
+
while (k < expr.length && isWs(expr[k])) k++;
|
|
7138
|
+
if (expr[k] !== "[") continue;
|
|
7139
|
+
const open = k;
|
|
7140
|
+
const close = expr.indexOf("]", open + 1);
|
|
7141
|
+
if (close === -1) continue;
|
|
7142
|
+
const column = columnBefore(expr, eq);
|
|
7143
|
+
if (column) return {
|
|
7144
|
+
column,
|
|
7145
|
+
valueList: expr.slice(open + 1, close)
|
|
7146
|
+
};
|
|
7147
|
+
}
|
|
7148
|
+
}
|
|
7149
|
+
/** `<colref> IN ( <values> )` — a hand-written CHECK. */
|
|
7150
|
+
function parseInList(expr, lower) {
|
|
7151
|
+
let pos = 0;
|
|
7152
|
+
for (;;) {
|
|
7153
|
+
const inIdx = lower.indexOf("in", pos);
|
|
7154
|
+
if (inIdx === -1) return null;
|
|
7155
|
+
pos = inIdx + 2;
|
|
7156
|
+
if (inIdx > 0 && isWordChar(expr[inIdx - 1])) continue;
|
|
7157
|
+
if (isWordChar(expr[inIdx + 2] ?? "")) continue;
|
|
7158
|
+
let k = inIdx + 2;
|
|
7159
|
+
while (k < expr.length && isWs(expr[k])) k++;
|
|
7160
|
+
if (expr[k] !== "(") continue;
|
|
7161
|
+
const open = k;
|
|
7162
|
+
const close = expr.indexOf(")", open + 1);
|
|
7163
|
+
if (close === -1) continue;
|
|
7164
|
+
const column = columnBefore(expr, inIdx);
|
|
7165
|
+
if (column) return {
|
|
7166
|
+
column,
|
|
7167
|
+
valueList: expr.slice(open + 1, close)
|
|
7168
|
+
};
|
|
7169
|
+
}
|
|
7170
|
+
}
|
|
7171
|
+
/** Locate the enum shape in a CHECK expression. The `= ANY (ARRAY[…])` form is
|
|
7172
|
+
* preferred over `IN (…)` (matching the original `anyMatch ?? inMatch`). */
|
|
7173
|
+
function parseEnumCheck(expr) {
|
|
7174
|
+
const lower = expr.toLowerCase();
|
|
7175
|
+
return parseAnyArray(expr, lower) ?? parseInList(expr, lower);
|
|
7176
|
+
}
|
|
7086
7177
|
function extractCheckEnums(checks) {
|
|
7087
7178
|
const result = /* @__PURE__ */ new Map();
|
|
7088
7179
|
for (const check of checks) {
|
|
7089
7180
|
const expr = check.expression;
|
|
7090
|
-
const
|
|
7091
|
-
|
|
7092
|
-
const
|
|
7093
|
-
|
|
7094
|
-
const column = match[1];
|
|
7095
|
-
const valueList = match[2];
|
|
7096
|
-
const values = extractQuotedValues(valueList);
|
|
7181
|
+
const parsed = parseEnumCheck(expr);
|
|
7182
|
+
if (!parsed) continue;
|
|
7183
|
+
const column = parsed.column;
|
|
7184
|
+
const values = extractQuotedValues(parsed.valueList);
|
|
7097
7185
|
if (values.length === 0) {
|
|
7098
7186
|
console.warn(`[@kozou/core] extractCheckEnums: failed to extract values from check "${check.name}" (expression: ${expr})`);
|
|
7099
7187
|
continue;
|
|
@@ -14898,4 +14986,4 @@ var handle = async ({ event, resolve }) => {
|
|
|
14898
14986
|
};
|
|
14899
14987
|
|
|
14900
14988
|
export { handle };
|
|
14901
|
-
//# sourceMappingURL=hooks.server-
|
|
14989
|
+
//# sourceMappingURL=hooks.server-B__8cDUd.js.map
|