gemi 0.200.0 → 0.202.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.
- package/dist/ai/Agent.d.ts +48 -1
- package/dist/ai/Agent.d.ts.map +1 -1
- package/dist/ai/AgentProvider.d.ts +12 -0
- package/dist/ai/AgentProvider.d.ts.map +1 -1
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +3 -3
- package/dist/ai/index.js.map +4 -4
- package/dist/ai/providers/request.d.ts +4 -0
- package/dist/ai/providers/request.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-6xa5yqrw.js → chunk-07qjfj2c.js} +2 -2
- package/dist/{chunk-6xa5yqrw.js.map → chunk-07qjfj2c.js.map} +1 -1
- package/dist/{chunk-zpqcawmq.js → chunk-0a5png2z.js} +2 -2
- package/dist/{chunk-xb0k1br9.js.map → chunk-0a5png2z.js.map} +1 -1
- package/dist/{chunk-s9z0xxth.js → chunk-2816nz5e.js} +2 -2
- package/dist/{chunk-s9z0xxth.js.map → chunk-2816nz5e.js.map} +1 -1
- package/dist/{chunk-e7bb26fb.js → chunk-2n98hczh.js} +2 -2
- package/dist/{chunk-e7bb26fb.js.map → chunk-2n98hczh.js.map} +1 -1
- package/dist/{chunk-yw9mn5w7.js → chunk-3cd30c7k.js} +2 -2
- package/dist/{chunk-yw9mn5w7.js.map → chunk-3cd30c7k.js.map} +1 -1
- package/dist/{chunk-v2pt8h42.js → chunk-4jbrazr4.js} +2 -2
- package/dist/{chunk-v2pt8h42.js.map → chunk-4jbrazr4.js.map} +1 -1
- package/dist/{chunk-qf4fhwc9.js → chunk-5msb5ev6.js} +2 -2
- package/dist/{chunk-qf4fhwc9.js.map → chunk-5msb5ev6.js.map} +1 -1
- package/dist/{chunk-ahss6dcp.js → chunk-65r1ne8r.js} +2 -2
- package/dist/{chunk-ahss6dcp.js.map → chunk-65r1ne8r.js.map} +1 -1
- package/dist/{chunk-w84ke0bp.js → chunk-6a7kp98d.js} +2 -2
- package/dist/{chunk-w84ke0bp.js.map → chunk-6a7kp98d.js.map} +1 -1
- package/dist/{chunk-rh84xq17.js → chunk-6eywgbfz.js} +2 -2
- package/dist/{chunk-rh84xq17.js.map → chunk-6eywgbfz.js.map} +1 -1
- package/dist/{chunk-97g2qc7j.js → chunk-781k79x8.js} +1 -1
- package/dist/{chunk-rcnpjwp4.js → chunk-7881fdej.js} +2 -2
- package/dist/{chunk-rcnpjwp4.js.map → chunk-7881fdej.js.map} +1 -1
- package/dist/{chunk-2cyd3h4h.js → chunk-7gmkcgq0.js} +2 -2
- package/dist/{chunk-2cyd3h4h.js.map → chunk-7gmkcgq0.js.map} +1 -1
- package/dist/{chunk-n9k29mrs.js → chunk-7xwr52d8.js} +2 -2
- package/dist/{chunk-n9k29mrs.js.map → chunk-7xwr52d8.js.map} +1 -1
- package/dist/{chunk-wxb2pqqz.js → chunk-87f4gan9.js} +2 -2
- package/dist/{chunk-wxb2pqqz.js.map → chunk-87f4gan9.js.map} +1 -1
- package/dist/{chunk-206n0q1f.js → chunk-9k3axdsb.js} +2 -2
- package/dist/{chunk-206n0q1f.js.map → chunk-9k3axdsb.js.map} +1 -1
- package/dist/{chunk-tyvc46ns.js → chunk-9kmh038f.js} +2 -2
- package/dist/{chunk-tyvc46ns.js.map → chunk-9kmh038f.js.map} +1 -1
- package/dist/{chunk-zwbpcch0.js → chunk-a2ybf4jf.js} +1 -1
- package/dist/{chunk-42b6zzg2.js → chunk-a5fvqc4k.js} +2 -2
- package/dist/{chunk-42b6zzg2.js.map → chunk-a5fvqc4k.js.map} +1 -1
- package/dist/{chunk-xxep62yg.js → chunk-a6hac7pd.js} +1 -1
- package/dist/{chunk-w09wtxr6.js → chunk-a9cztxee.js} +3 -3
- package/dist/{chunk-w09wtxr6.js.map → chunk-a9cztxee.js.map} +1 -1
- package/dist/{chunk-ct1vh28z.js → chunk-bs6nxaqa.js} +2 -2
- package/dist/{chunk-ct1vh28z.js.map → chunk-bs6nxaqa.js.map} +1 -1
- package/dist/{chunk-tjsv6e3a.js → chunk-bz3527wx.js} +2 -2
- package/dist/{chunk-tjsv6e3a.js.map → chunk-bz3527wx.js.map} +1 -1
- package/dist/{chunk-6ftdsrkq.js → chunk-c8041bgj.js} +2 -2
- package/dist/{chunk-6ftdsrkq.js.map → chunk-c8041bgj.js.map} +1 -1
- package/dist/{chunk-xb0k1br9.js → chunk-cwxjqfkx.js} +2 -2
- package/dist/{chunk-zpqcawmq.js.map → chunk-cwxjqfkx.js.map} +1 -1
- package/dist/{chunk-8nmcyavt.js → chunk-dh8jqx0k.js} +2 -2
- package/dist/{chunk-8nmcyavt.js.map → chunk-dh8jqx0k.js.map} +1 -1
- package/dist/{chunk-ff22412e.js → chunk-e3bwytc2.js} +4 -4
- package/dist/{chunk-ff22412e.js.map → chunk-e3bwytc2.js.map} +1 -1
- package/dist/{chunk-mxt88hhp.js → chunk-e9w2yzd2.js} +2 -2
- package/dist/{chunk-mxt88hhp.js.map → chunk-e9w2yzd2.js.map} +1 -1
- package/dist/{chunk-50nex9wg.js → chunk-evaeb75q.js} +3 -3
- package/dist/{chunk-50nex9wg.js.map → chunk-evaeb75q.js.map} +1 -1
- package/dist/{chunk-nnaz5djg.js → chunk-fdcay8np.js} +2 -2
- package/dist/{chunk-nnaz5djg.js.map → chunk-fdcay8np.js.map} +1 -1
- package/dist/{chunk-gx2fhmnx.js → chunk-h1fqgz82.js} +3 -3
- package/dist/{chunk-gx2fhmnx.js.map → chunk-h1fqgz82.js.map} +1 -1
- package/dist/{chunk-93j09zw7.js → chunk-h2ysbsax.js} +1 -1
- package/dist/{chunk-drb6gpgv.js → chunk-h7h8ra65.js} +1 -1
- package/dist/{chunk-c9259a9e.js → chunk-hd8gymeg.js} +2 -2
- package/dist/{chunk-c9259a9e.js.map → chunk-hd8gymeg.js.map} +1 -1
- package/dist/{chunk-n3p16jpb.js → chunk-hra8evrw.js} +3 -3
- package/dist/{chunk-n3p16jpb.js.map → chunk-hra8evrw.js.map} +1 -1
- package/dist/{chunk-dqgn4wgf.js → chunk-j43hftgw.js} +2 -2
- package/dist/{chunk-dqgn4wgf.js.map → chunk-j43hftgw.js.map} +1 -1
- package/dist/{chunk-txbram9h.js → chunk-m3nhdg9v.js} +2 -2
- package/dist/{chunk-txbram9h.js.map → chunk-m3nhdg9v.js.map} +1 -1
- package/dist/{chunk-bdbg2dt6.js → chunk-mq82r0qp.js} +2 -2
- package/dist/{chunk-bdbg2dt6.js.map → chunk-mq82r0qp.js.map} +1 -1
- package/dist/{chunk-pab6ye4d.js → chunk-n7bz2283.js} +2 -2
- package/dist/{chunk-pab6ye4d.js.map → chunk-n7bz2283.js.map} +1 -1
- package/dist/{chunk-e603nm1c.js → chunk-p96z3yb6.js} +2 -2
- package/dist/{chunk-e603nm1c.js.map → chunk-p96z3yb6.js.map} +1 -1
- package/dist/{chunk-0kfrwbhg.js → chunk-phszs9ea.js} +4 -4
- package/dist/{chunk-0kfrwbhg.js.map → chunk-phszs9ea.js.map} +1 -1
- package/dist/{chunk-503ce1t9.js → chunk-ptbrbp80.js} +2 -2
- package/dist/{chunk-503ce1t9.js.map → chunk-ptbrbp80.js.map} +1 -1
- package/dist/{chunk-8fzcs8dv.js → chunk-qz7v6271.js} +2 -2
- package/dist/{chunk-8fzcs8dv.js.map → chunk-qz7v6271.js.map} +1 -1
- package/dist/{chunk-kz15j07h.js → chunk-sw7c95nh.js} +2 -2
- package/dist/{chunk-kz15j07h.js.map → chunk-sw7c95nh.js.map} +1 -1
- package/dist/{chunk-61mcmhjp.js → chunk-tbt2j0rf.js} +1 -1
- package/dist/{chunk-6nr97atn.js → chunk-wn9e8bjn.js} +2 -2
- package/dist/{chunk-6nr97atn.js.map → chunk-wn9e8bjn.js.map} +1 -1
- package/dist/chunk-wxcbfqkd.js +5 -0
- package/dist/chunk-wxcbfqkd.js.map +13 -0
- package/dist/{chunk-2kkv8515.js → chunk-x2zw82xg.js} +26 -26
- package/dist/{chunk-2kkv8515.js.map → chunk-x2zw82xg.js.map} +3 -3
- package/dist/{chunk-q1zj3a0e.js → chunk-x41vw44z.js} +2 -2
- package/dist/{chunk-q1zj3a0e.js.map → chunk-x41vw44z.js.map} +1 -1
- package/dist/chunk-xhky6kyf.js +5 -0
- package/dist/chunk-xhky6kyf.js.map +10 -0
- package/dist/{chunk-y167pt0p.js → chunk-y0gaw9ez.js} +2 -2
- package/dist/{chunk-y167pt0p.js.map → chunk-y0gaw9ez.js.map} +1 -1
- package/dist/{chunk-84stff4t.js → chunk-y9ktwyrx.js} +1 -1
- package/dist/{chunk-6brwvyrz.js → chunk-zgg2xsxp.js} +2 -2
- package/dist/{chunk-6brwvyrz.js.map → chunk-zgg2xsxp.js.map} +1 -1
- package/dist/{chunk-4reyxar1.js → chunk-zhmc2jm4.js} +1 -1
- package/dist/{chunk-xhc16pv1.js → chunk-zmj4fj4n.js} +1 -1
- package/dist/chunks/{RealtimeClient-DmBC8zxt.js → RealtimeClient-BnNSz8AK.js} +2 -2
- package/dist/chunks/{RealtimeClient-DmBC8zxt.js.map → RealtimeClient-BnNSz8AK.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-BTVQYl5O.js → ThemeProvider-CoQ-vnvy.js} +9 -6
- package/dist/chunks/{ThemeProvider-BTVQYl5O.js.map → ThemeProvider-CoQ-vnvy.js.map} +1 -1
- package/dist/chunks/{fetchFileRequest-BHCSZqKL.js → fetchFileRequest-Bhp0oJ0T.js} +2 -2
- package/dist/chunks/{fetchFileRequest-BHCSZqKL.js.map → fetchFileRequest-Bhp0oJ0T.js.map} +1 -1
- package/dist/chunks/{live-DIj7rF0t.js → live-Dt8sq9W4.js} +3 -3
- package/dist/chunks/{live-DIj7rF0t.js.map → live-Dt8sq9W4.js.map} +1 -1
- package/dist/chunks/{mutationExtras-BRFfb6-L.js → mutationExtras-ChOGPZlY.js} +2 -2
- package/dist/chunks/{mutationExtras-BRFfb6-L.js.map → mutationExtras-ChOGPZlY.js.map} +1 -1
- package/dist/chunks/{subscriptionStream-CRRgUXJp.js → subscriptionStream-DDl_H-QM.js} +2 -2
- package/dist/chunks/{subscriptionStream-CRRgUXJp.js.map → subscriptionStream-DDl_H-QM.js.map} +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/scrollRestoration.d.ts +5 -2
- package/dist/client/scrollRestoration.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +1 -1
- package/dist/database/index.js +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/foundation/Application.d.ts +23 -3
- package/dist/foundation/Application.d.ts.map +1 -1
- package/dist/foundation/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/dictionaryRuntime.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/orm/index.js +1 -1
- package/dist/probe/index.js +2 -2
- package/dist/probe/index.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +2 -2
- package/dist/server/shutdown.d.ts +35 -0
- package/dist/server/shutdown.d.ts.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/services/index.js.map +1 -1
- package/dist/services/queue/WorkerProcess.d.ts.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +3 -3
- package/dist/stats/route-table.js +1 -1
- package/dist/support/Service.d.ts +21 -0
- package/dist/support/Service.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +3 -3
- package/dist/testing/index.js +2 -2
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-1yq2b55s.js +0 -5
- package/dist/chunk-1yq2b55s.js.map +0 -10
- package/dist/chunk-jkf5kjaz.js +0 -5
- package/dist/chunk-jkf5kjaz.js.map +0 -13
- /package/dist/{chunk-97g2qc7j.js.map → chunk-781k79x8.js.map} +0 -0
- /package/dist/{chunk-zwbpcch0.js.map → chunk-a2ybf4jf.js.map} +0 -0
- /package/dist/{chunk-xxep62yg.js.map → chunk-a6hac7pd.js.map} +0 -0
- /package/dist/{chunk-93j09zw7.js.map → chunk-h2ysbsax.js.map} +0 -0
- /package/dist/{chunk-drb6gpgv.js.map → chunk-h7h8ra65.js.map} +0 -0
- /package/dist/{chunk-61mcmhjp.js.map → chunk-tbt2j0rf.js.map} +0 -0
- /package/dist/{chunk-84stff4t.js.map → chunk-y9ktwyrx.js.map} +0 -0
- /package/dist/{chunk-4reyxar1.js.map → chunk-zhmc2jm4.js.map} +0 -0
- /package/dist/{chunk-xhc16pv1.js.map → chunk-zmj4fj4n.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _t as parseRetryAfter, bt as QueryError, et as applyParams } from "./ThemeProvider-
|
|
1
|
+
import { _t as parseRetryAfter, bt as QueryError, et as applyParams } from "./ThemeProvider-CoQ-vnvy.js";
|
|
2
2
|
//#region client/fetchFileRequest.ts
|
|
3
3
|
/**
|
|
4
4
|
* `fetchBlob` / `fetchText` once loaded: the `GET`, a `QueryError` for a
|
|
@@ -54,4 +54,4 @@ function filenameOf(response) {
|
|
|
54
54
|
//#endregion
|
|
55
55
|
export { fetchFile, filenameOf };
|
|
56
56
|
|
|
57
|
-
//# sourceMappingURL=fetchFileRequest-
|
|
57
|
+
//# sourceMappingURL=fetchFileRequest-Bhp0oJ0T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFileRequest-
|
|
1
|
+
{"version":3,"file":"fetchFileRequest-Bhp0oJ0T.js","names":[],"sources":["../../client/fetchFileRequest.ts"],"sourcesContent":["import { applyParams } from \"../utils/applyParams\";\nimport type { FetchedBlob, FetchedText, FetchFileOptions } from \"./fetchFile\";\nimport { QueryError } from \"./QueryError\";\nimport { parseRetryAfter } from \"./retryPolicy\";\n\n// What `fetchBlob` and `fetchText` in `./fetchFile` load on their first call\n// (#915).\n\ntype RequestOptions = Omit<FetchFileOptions<string>, \"params\"> & {\n params?: Record<string, string | number | undefined>;\n};\n\n/**\n * `fetchBlob` / `fetchText` once loaded: the `GET`, a `QueryError` for a\n * non-2xx, and the body read `as` a blob or text.\n */\nexport async function fetchFile(\n path: string,\n // The caller's `FetchFileOptions<P>`, checked against its path there.\n options: object | undefined,\n as: \"blob\" | \"text\",\n): Promise<FetchedBlob | FetchedText> {\n const response = await request(path, options as RequestOptions);\n const body = as === \"blob\" ? { blob: await response.blob() } : { text: await response.text() };\n return { ...body, filename: filenameOf(response), response } as FetchedBlob | FetchedText;\n}\n\nasync function request(path: string, options: RequestOptions = {}) {\n const { params = {}, search, signal, init } = options;\n const url = applyParams(path, params);\n const query = searchString(search);\n const response = await fetch(`/api${url}${query ? `?${query}` : \"\"}`, {\n ...init,\n method: \"GET\",\n signal,\n });\n if (!response.ok) {\n // An error body that is not JSON (a proxy's HTML 502) is still that status.\n const body = await response.json().catch(() => null);\n throw new QueryError(\n url,\n query,\n response.status,\n body,\n parseRetryAfter(response.headers.get(\"retry-after\")),\n );\n }\n return response;\n}\n\nfunction searchString(search: FetchFileOptions<string>[\"search\"]) {\n if (!search) return \"\";\n if (search instanceof URLSearchParams) return search.toString();\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(search)) {\n if (value !== null && value !== undefined) params.append(key, String(value));\n }\n return params.toString();\n}\n\n/**\n * The file name in a `Content-Disposition` header: the RFC 5987\n * `filename*=UTF-8''...` form when present and decodable, else `filename`.\n *\n * @internal Exported for tests.\n */\nexport function filenameOf(response: Response): string | null {\n const header = response.headers.get(\"content-disposition\");\n if (!header) return null;\n const extended = /filename\\*\\s*=\\s*([^']*)'[^']*'([^;]+)/i.exec(header);\n if (extended) {\n try {\n return decodeURIComponent(extended[2].trim());\n } catch {\n // A malformed escape: fall back to the plain form.\n }\n }\n const plain = /filename\\s*=\\s*(?:\"((?:[^\"\\\\]|\\\\.)*)\"|([^;]+))/i.exec(header);\n if (!plain) return null;\n const name = plain[1] !== undefined ? plain[1].replace(/\\\\(.)/g, \"$1\") : plain[2].trim();\n return name || null;\n}\n"],"mappings":";;;;;;AAgBA,eAAsB,UACpB,MAEA,SACA,IACoC;CACpC,MAAM,WAAW,MAAM,QAAQ,MAAM,OAAyB;CAE9D,OAAO;EAAE,GADI,OAAO,SAAS,EAAE,MAAM,MAAM,SAAS,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,SAAS,KAAK,EAAE;EAC3E,UAAU,WAAW,QAAQ;EAAG;CAAS;AAC7D;AAEA,eAAe,QAAQ,MAAc,UAA0B,CAAC,GAAG;CACjE,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,QAAQ,SAAS;CAC9C,MAAM,MAAM,YAAY,MAAM,MAAM;CACpC,MAAM,QAAQ,aAAa,MAAM;CACjC,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,QAAQ,IAAI,UAAU,MAAM;EACpE,GAAG;EACH,QAAQ;EACR;CACF,CAAC;CACD,IAAI,CAAC,SAAS,IAAI;EAEhB,MAAM,OAAO,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,IAAI;EACnD,MAAM,IAAI,WACR,KACA,OACA,SAAS,QACT,MACA,gBAAgB,SAAS,QAAQ,IAAI,aAAa,CAAC,CACrD;CACF;CACA,OAAO;AACT;AAEA,SAAS,aAAa,QAA4C;CAChE,IAAI,CAAC,QAAQ,OAAO;CACpB,IAAI,kBAAkB,iBAAiB,OAAO,OAAO,SAAS;CAC9D,MAAM,SAAS,IAAI,gBAAgB;CACnC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAC9C,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO,OAAO,KAAK,OAAO,KAAK,CAAC;CAE7E,OAAO,OAAO,SAAS;AACzB;;;;;;;AAQA,SAAgB,WAAW,UAAmC;CAC5D,MAAM,SAAS,SAAS,QAAQ,IAAI,qBAAqB;CACzD,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,WAAW,0CAA0C,KAAK,MAAM;CACtE,IAAI,UACF,IAAI;EACF,OAAO,mBAAmB,SAAS,EAAE,CAAC,KAAK,CAAC;CAC9C,QAAQ,CAER;CAEF,MAAM,QAAQ,kDAAkD,KAAK,MAAM;CAC3E,IAAI,CAAC,OAAO,OAAO;CAEnB,QADa,MAAM,OAAO,KAAA,IAAY,MAAM,EAAE,CAAC,QAAQ,UAAU,IAAI,IAAI,MAAM,EAAE,CAAC,KAAK,MACxE;AACjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Q as loadedModule, Y as realtime } from "./ThemeProvider-
|
|
1
|
+
import { Q as loadedModule, Y as realtime } from "./ThemeProvider-CoQ-vnvy.js";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -76,7 +76,7 @@ function followLive(provided, live, resource, setOpen) {
|
|
|
76
76
|
};
|
|
77
77
|
const socket = provided ?? realtime.client;
|
|
78
78
|
if (socket) start(socket);
|
|
79
|
-
else import("./RealtimeClient-
|
|
79
|
+
else import("./RealtimeClient-BnNSz8AK.js").then((module) => start(loadedModule(module).tabClient())).catch(() => {});
|
|
80
80
|
return () => {
|
|
81
81
|
stop?.();
|
|
82
82
|
stop = null;
|
|
@@ -85,4 +85,4 @@ function followLive(provided, live, resource, setOpen) {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
export { live_exports as n, followLive as t };
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=live-
|
|
88
|
+
//# sourceMappingURL=live-Dt8sq9W4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-
|
|
1
|
+
{"version":3,"file":"live-Dt8sq9W4.js","names":[],"sources":["../../client/realtime/live.ts"],"sourcesContent":["import type { QueryResource } from \"../QueryResource\";\nimport type { ChannelPattern } from \"../useChannel\";\nimport { EVENT_COALESCE_MS } from \"./useChannelSubscription\";\nimport type { ChannelParamValues, RealtimeSocket } from \"./RealtimeClient\";\nimport { loadedModule } from \"../lazyModule\";\nimport { realtime } from \"./loader\";\n\n/**\n * `useQuery`'s `live` option: the channel whose events and resyncs refetch\n * the query. A pattern without params (`\"user\"`), `[pattern, params]`, or\n * `{ channel, params }`.\n */\nexport type LiveChannel =\n | ChannelPattern\n | readonly [ChannelPattern, ChannelParamValues]\n | { channel: ChannelPattern; params?: ChannelParamValues };\n\nexport function resolveLiveChannel(\n live: LiveChannel | null | undefined | false,\n): { pattern: string; params: ChannelParamValues } | null {\n if (!live) return null;\n if (typeof live === \"string\") return { pattern: live, params: {} };\n if (Array.isArray(live)) return { pattern: live[0], params: live[1] ?? {} };\n const object = live as { channel: string; params?: ChannelParamValues };\n return { pattern: object.channel, params: object.params ?? {} };\n}\n\n/**\n * `useQuery`'s `live` subscription, loaded on first use by `followLive` in\n * `./loader` (#891). The channel's events refetch every cached variant of the\n * query (the rendered ones now), a burst of them once per\n * `EVENT_COALESCE_MS`; a resync refetches at once. `setOpen` follows whether\n * the channel is open, which pauses the query's polling.\n */\nexport function subscribeLive(\n socket: RealtimeSocket,\n live: LiveChannel,\n resource: () => QueryResource,\n setOpen: (open: boolean) => void,\n): () => void {\n const channel = resolveLiveChannel(live);\n if (!channel) return () => {};\n const refresh = () => {\n const target = resource();\n for (const key of target.variantKeys()) target.invalidate(key);\n };\n let timer: ReturnType<typeof setTimeout> | null = null;\n const release = socket.subscribe(channel.pattern, channel.params, {\n onEvent: () => {\n if (timer) return;\n timer = setTimeout(() => {\n timer = null;\n refresh();\n }, EVENT_COALESCE_MS);\n },\n onResync: refresh,\n onStatus: (status) => setOpen(status === \"open\"),\n });\n return () => {\n if (timer) clearTimeout(timer);\n release();\n };\n}\n\n/**\n * What `followLive` in `./loader` hands over to once this module is loaded:\n * subscribes on the provided socket, or the tab's client, loading that first\n * when it is not there yet. Returns the function that stops it.\n */\nexport function followLive(\n provided: RealtimeSocket | null,\n live: LiveChannel,\n resource: () => QueryResource,\n setOpen: (open: boolean) => void,\n): () => void {\n // `undefined` until it subscribes, `null` once stopped.\n let stop: (() => void) | null | undefined;\n const start = (socket: RealtimeSocket) => {\n if (stop === undefined) stop = subscribeLive(socket, live, resource, setOpen);\n };\n const socket = provided ?? realtime.client;\n if (socket) start(socket);\n // Its own `import()` of the client rather than `loadRealtimeClient`, which\n // would keep that in the entry chunk of every app with a `useQuery`. A\n // failed load leaves the channel closed, so the query keeps polling.\n else\n import(\"./RealtimeClient.js\")\n .then((module) => start(loadedModule(module).tabClient()))\n .catch(() => {});\n return () => {\n stop?.();\n stop = null;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,SAAgB,mBACd,MACwD;CACxD,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,SAAS;EAAM,QAAQ,CAAC;CAAE;CACjE,IAAI,MAAM,QAAQ,IAAI,GAAG,OAAO;EAAE,SAAS,KAAK;EAAI,QAAQ,KAAK,MAAM,CAAC;CAAE;CAC1E,MAAM,SAAS;CACf,OAAO;EAAE,SAAS,OAAO;EAAS,QAAQ,OAAO,UAAU,CAAC;CAAE;AAChE;;;;;;;;AASA,SAAgB,cACd,QACA,MACA,UACA,SACY;CACZ,MAAM,UAAU,mBAAmB,IAAI;CACvC,IAAI,CAAC,SAAS,aAAa,CAAC;CAC5B,MAAM,gBAAgB;EACpB,MAAM,SAAS,SAAS;EACxB,KAAK,MAAM,OAAO,OAAO,YAAY,GAAG,OAAO,WAAW,GAAG;CAC/D;CACA,IAAI,QAA8C;CAClD,MAAM,UAAU,OAAO,UAAU,QAAQ,SAAS,QAAQ,QAAQ;EAChE,eAAe;GACb,IAAI,OAAO;GACX,QAAQ,iBAAiB;IACvB,QAAQ;IACR,QAAQ;GACV,GAAA,GAAoB;EACtB;EACA,UAAU;EACV,WAAW,WAAW,QAAQ,WAAW,MAAM;CACjD,CAAC;CACD,aAAa;EACX,IAAI,OAAO,aAAa,KAAK;EAC7B,QAAQ;CACV;AACF;;;;;;AAOA,SAAgB,WACd,UACA,MACA,UACA,SACY;CAEZ,IAAI;CACJ,MAAM,SAAS,WAA2B;EACxC,IAAI,SAAS,KAAA,GAAW,OAAO,cAAc,QAAQ,MAAM,UAAU,OAAO;CAC9E;CACA,MAAM,SAAS,YAAY,SAAS;CACpC,IAAI,QAAQ,MAAM,MAAM;MAKtB,OAAO,+BAAsB,CAC1B,MAAM,WAAW,MAAM,aAAa,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CACzD,YAAY,CAAC,CAAC;CACnB,aAAa;EACX,OAAO;EACP,OAAO;CACT;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as toVariantKey, et as applyParams } from "./ThemeProvider-
|
|
1
|
+
import { $ as toVariantKey, et as applyParams } from "./ThemeProvider-CoQ-vnvy.js";
|
|
2
2
|
import { p as mutationErrorFromBody, s as isObject } from "./MutationError-DuKqBW8o.js";
|
|
3
3
|
//#region client/mutationErrorHelpers.ts
|
|
4
4
|
var FALLBACK_MESSAGE = "Something went wrong. Try again.";
|
|
@@ -112,4 +112,4 @@ function applyQueryUpdates(getResource, routeParams, updates, answer) {
|
|
|
112
112
|
//#endregion
|
|
113
113
|
export { applyQueryUpdates, withMutationErrorHelpers, writeQueryData };
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=mutationExtras-
|
|
115
|
+
//# sourceMappingURL=mutationExtras-ChOGPZlY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationExtras-
|
|
1
|
+
{"version":3,"file":"mutationExtras-ChOGPZlY.js","names":[],"sources":["../../client/mutationErrorHelpers.ts","../../client/queryUpdates.ts"],"sourcesContent":["import {\n isObject,\n mutationErrorFromBody,\n type MutationErrorHelpers,\n type MutationValidationError,\n type WithMutationErrorHelpers,\n} from \"./MutationError\";\n\n// `error.list()` and `error.field(name)` on what the mutation hooks hand over.\n// Loaded with the hooks' other extras when one mounts (see\n// `./mutationModules`), so no route's entry chunk carries it (#915).\n//\n// `list` and `field` repeat `mutationErrorList` and `mutationErrorField` from\n// `./MutationError` on purpose. Those are public and synchronous, so they sit\n// in whatever chunk calls them; importing them here would put them, and so\n// this code, back in every entry chunk. `MutationError.helpers.test` runs the\n// same cases through both.\n\nconst FALLBACK_MESSAGE = \"Something went wrong. Try again.\";\n\n// `isValidationError`, which an import would keep in the entry chunk.\nfunction isValidationError(error: unknown): error is MutationValidationError {\n return isObject(error) && error.kind === \"validation_error\";\n}\n\n// A `QueryError`'s refusal, read as the mutation hooks read a body. Read by\n// shape, not `instanceof`, so a copy of the class from another bundle works.\nfunction unwrapQueryError(error: unknown): unknown {\n if (error instanceof Error && error.name === \"QueryError\" && \"body\" in error) {\n const { body, status } = error as Error & { body: unknown; status: number };\n return body == null ? error : mutationErrorFromBody(body, status);\n }\n return error;\n}\n\n// `error.list(fallback)`: see `mutationErrorList`.\nfunction list(\n error: unknown,\n fallback: string = FALLBACK_MESSAGE,\n): string[] {\n const value = unwrapQueryError(error);\n if (isValidationError(value)) {\n const messages = Object.values(value.messages ?? {})\n .flat()\n .filter((message) => typeof message === \"string\" && message !== \"\");\n return messages.length > 0 ? messages : [fallback];\n }\n if (\n isObject(value) &&\n !(value instanceof Error) &&\n value.kind !== \"server_error\" &&\n typeof value.message === \"string\" &&\n value.message !== \"\"\n ) {\n return [value.message];\n }\n return [fallback];\n}\n\n// `error.field(name)`: see `mutationErrorField`.\nfunction field(error: unknown, name: string): string[] {\n const value = unwrapQueryError(error);\n if (!isValidationError(value)) return [];\n const messages = value.messages?.[name];\n return Array.isArray(messages) ? [...messages] : [];\n}\n\n/**\n * Puts `list` and `field` on an error the hooks hand over, as non-enumerable\n * properties, so `toEqual`, a spread and `JSON.stringify` see the same object\n * as before. A key the error already has is left alone; a primitive or a\n * frozen value is returned as it is.\n *\n * @internal\n */\nexport function withMutationErrorHelpers<T>(error: T): WithMutationErrorHelpers<T> {\n if (!isObject(error) || !Object.isExtensible(error)) {\n return error as WithMutationErrorHelpers<T>;\n }\n const helpers: MutationErrorHelpers = {\n list: (fallback) => list(error, fallback),\n field: (name) => field(error, name),\n };\n for (const key of [\"list\", \"field\"] as const) {\n if (key in error) continue;\n Object.defineProperty(error, key, {\n value: helpers[key],\n configurable: true,\n writable: true,\n enumerable: false,\n });\n }\n return error as WithMutationErrorHelpers<T>;\n}\n","import type { QueryResource } from \"./QueryResource\";\nimport type { QueryTarget, QueryUpdate } from \"./useSetQueryData\";\nimport { applyParams } from \"../utils/applyParams\";\nimport { toVariantKey } from \"../utils/variantKey\";\n\n// The cache writes behind a mutation's `updates` and `useSetQueryData()`\n// (#897). Loaded with the hooks' other extras when one mounts (see\n// `./mutationModules`), so no route's entry chunk carries it (#915).\n\ntype Resolve = (key: string) => QueryResource;\n\n/**\n * Write data the server just produced (a mutation's answer) into a variant,\n * with no refetch: unlike `mutate`, the value is not a guess to reconcile.\n * The variant counts as freshly fetched, so its `staleTime` starts again, and\n * a GET already on the wire for it is dropped when it lands, since it may\n * carry the data from before the write. A reader suspended on the variant\n * wakes up with it (#897). Here rather than on `QueryResource`, which every\n * entry chunk carries (#915).\n */\nfunction setVariant(resource: QueryResource, variantKey: string, data: unknown) {\n resource.dropHttpCache(variantKey);\n resource.markApplied(variantKey);\n const store = resource.store.getValue();\n resource.fill(store, variantKey, data, Date.now());\n resource.store.next(store);\n}\n\n/** The value to write, or a function of the cached one. */\nexport type WriteQueryNext = { value: unknown } | { update: (current: any) => unknown };\n\n/**\n * Write into every variant `target` names. `next` is the value to write, or\n * a function of the cached value; a function skips a variant with nothing\n * cached. A value seeds a single variant that is not cached yet; a predicate\n * only ever reaches variants that are.\n */\nexport function writeQueryData(\n getResource: Resolve,\n routeParams: Record<string, any>,\n target: QueryTarget<any>,\n next: WriteQueryNext,\n) {\n const { path, params = {}, search = {} } = target;\n const resource = getResource(applyParams(String(path), { ...routeParams, ...params }));\n const write = (variantKey: string) => {\n if (\"value\" in next) {\n setVariant(resource, variantKey, next.value);\n return;\n }\n const state = resource.peek(variantKey);\n if (!state?.hasData) return;\n setVariant(resource, variantKey, next.update(state.data));\n };\n\n if (typeof search === \"function\") {\n for (const variantKey of resource.variantKeys()) {\n if (!resource.peek(variantKey)?.hasData) continue;\n if (search(new URLSearchParams(variantKey))) write(variantKey);\n }\n return;\n }\n write(toVariantKey(search));\n}\n\n/**\n * Write a mutation's `updates` with its answer.\n */\nexport function applyQueryUpdates(\n getResource: Resolve,\n routeParams: Record<string, any>,\n updates: ReadonlyArray<QueryUpdate<any>> | undefined,\n answer: unknown,\n) {\n for (const update of updates ?? []) {\n const { data } = update as { data?: (answer: any, current: any) => any };\n writeQueryData(\n getResource,\n routeParams,\n update,\n data ? { update: (current) => data(answer, current) } : { value: answer },\n );\n }\n}\n"],"mappings":";;;AAkBA,IAAM,mBAAmB;AAGzB,SAAS,kBAAkB,OAAkD;CAC3E,OAAO,SAAS,KAAK,KAAK,MAAM,SAAS;AAC3C;AAIA,SAAS,iBAAiB,OAAyB;CACjD,IAAI,iBAAiB,SAAS,MAAM,SAAS,gBAAgB,UAAU,OAAO;EAC5E,MAAM,EAAE,MAAM,WAAW;EACzB,OAAO,QAAQ,OAAO,QAAQ,sBAAsB,MAAM,MAAM;CAClE;CACA,OAAO;AACT;AAGA,SAAS,KACP,OACA,WAAmB,kBACT;CACV,MAAM,QAAQ,iBAAiB,KAAK;CACpC,IAAI,kBAAkB,KAAK,GAAG;EAC5B,MAAM,WAAW,OAAO,OAAO,MAAM,YAAY,CAAC,CAAC,CAAC,CACjD,KAAK,CAAC,CACN,QAAQ,YAAY,OAAO,YAAY,YAAY,YAAY,EAAE;EACpE,OAAO,SAAS,SAAS,IAAI,WAAW,CAAC,Q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,SAAS,eAAuB;EACpC,IAAI,WAAW,MAAM;GACnB,WAAW,UAAU,YAAY,KAAK,KAAK;GAC3C;EACF;EACA,MAAM,QAAQ,SAAS,KAAK,UAAU;EACtC,IAAI,CAAC,OAAO,SAAS;EACrB,WAAW,UAAU,YAAY,KAAK,OAAO,MAAM,IAAI,CAAC;CAC1D;CAEA,IAAI,OAAO,WAAW,YAAY;EAChC,KAAK,MAAM,cAAc,SAAS,YAAY,GAAG;GAC/C,IAAI,CAAC,SAAS,KAAK,UAAU,CAAC,EAAE,SAAS;GACzC,IAAI,OAAO,IAAI,gBAAgB,UAAU,CAAC,GAAG,MAAM,UAAU;EAC/D;EACA;CACF;CACA,MAAM,aAAa,MAAM,CAAC;AAC5B;;;;AAKA,SAAgB,kBACd,aACA,aACA,SACA,QACA;CACA,KAAK,MAAM,UAAU,WAAW,CAAC,GAAG;EAClC,MAAM,EAAE,SAAS;EACjB,eACE,aACA,aACA,QACA,OAAO,EAAE,SAAS,YAAY,KAAK,QAAQ,OAAO,EAAE,IAAI,EAAE,OAAO,OAAO,CAC1E;CACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ht as equalJitter } from "./ThemeProvider-
|
|
1
|
+
import { ht as equalJitter } from "./ThemeProvider-CoQ-vnvy.js";
|
|
2
2
|
//#region client/subscriptionStream.ts
|
|
3
3
|
var MIN_RETRY_MS = 1e3;
|
|
4
4
|
var MAX_RETRY_MS = 3e4;
|
|
@@ -175,4 +175,4 @@ async function* readEvents(body) {
|
|
|
175
175
|
//#endregion
|
|
176
176
|
export { follow, readEvents };
|
|
177
177
|
|
|
178
|
-
//# sourceMappingURL=subscriptionStream-
|
|
178
|
+
//# sourceMappingURL=subscriptionStream-DDl_H-QM.js.map
|
package/dist/chunks/{subscriptionStream-CRRgUXJp.js.map → subscriptionStream-DDl_H-QM.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionStream-CRRgUXJp.js","names":[],"sources":["../../client/subscriptionStream.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\n\nimport type { ChangeFeedMessage } from \"../services/change-feed/wire\";\nimport { equalJitter } from \"./retryPolicy\";\nimport type { SubscriptionConfig, SubscriptionStatus } from \"./useSubscription\";\n\n// `useSubscription`'s connection: the SSE request, its reader and the\n// reconnect loop. Loaded by the hook with a dynamic `import()` when it first\n// connects, so it lands in a chunk of its own rather than in the entry chunk\n// every route loads (#891). Import it as a type only from anywhere else.\n\nconst MIN_RETRY_MS = 1_000;\nconst MAX_RETRY_MS = 30_000;\n\n/** The server answered in a way retrying will not change (401, 403, 404). */\nclass FatalStatus extends Error {\n constructor(readonly status: number) {\n super(`The subscription was refused with ${status}.`);\n }\n}\n\nexport interface SubscriptionState {\n status: SubscriptionStatus;\n cursor: string | null;\n error: Error | null;\n}\n\nexport interface FollowOptions {\n endpoint: string;\n pauseWhenHidden: boolean;\n /** Where to resume; advanced as events arrive. */\n cursor: { current: string | null };\n callbacks: { current: SubscriptionConfig<unknown> };\n setState: Dispatch<SetStateAction<SubscriptionState>>;\n /** The jitter's random source; `Math.random` unless a test passes its own. */\n random?: () => number;\n}\n\n/**\n * Follows `endpoint` until the returned function is called: connects,\n * reconnects with backoff, pauses while the tab is hidden, and reports\n * through `setState` and `callbacks`.\n *\n * The backoff step is 1s, doubling per failed attempt up to 30s, and back to\n * 1s once a stream reaches `ready`. Each wait is jittered (\"equal jitter\", a\n * random point between half the step and all of it): a server restart ends\n * every open tab's stream in the same instant, and an exact schedule would\n * bring them all back in the same instant too. A `Retry-After` the server\n * sent is waited out exactly.\n */\nexport function follow({\n endpoint,\n pauseWhenHidden,\n cursor,\n callbacks,\n setState,\n random = Math.random,\n}: FollowOptions): () => void {\n let stopped = false;\n let request: AbortController | null = null;\n let resume: (() => void) | null = null;\n let retryMs = MIN_RETRY_MS;\n const hidden = () =>\n pauseWhenHidden && typeof document !== \"undefined\" && document.visibilityState === \"hidden\";\n const onVisibilityChange = () => {\n if (hidden()) request?.abort();\n else resume?.();\n };\n if (typeof document !== \"undefined\") {\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\n }\n const wait = (ms: number) =>\n new Promise<void>((resolve) => {\n const timer = setTimeout(done, ms);\n function done() {\n clearTimeout(timer);\n resume = null;\n resolve();\n }\n // Shown again, or unmounted: stop waiting.\n resume = done;\n });\n\n void (async () => {\n while (!stopped) {\n if (hidden()) {\n setState((s) => ({ ...s, status: \"paused\" }));\n await new Promise<void>((resolve) => (resume = resolve));\n resume = null;\n continue;\n }\n setState((s) => ({ ...s, status: \"connecting\" }));\n const controller = (request = new AbortController());\n let delay = retryMs;\n let exact = false;\n try {\n const headers: Record<string, string> = { Accept: \"text/event-stream\" };\n if (cursor.current) headers[\"Last-Event-ID\"] = cursor.current;\n const response = await fetch(endpoint, { headers, signal: controller.signal });\n if (!response.ok || !response.body) {\n const status = response.status;\n if (status >= 400 && status < 500 && status !== 408 && status !== 429) {\n throw new FatalStatus(status);\n }\n const retryAfter = Number(response.headers.get(\"Retry-After\"));\n if (Number.isFinite(retryAfter) && retryAfter > 0) {\n delay = retryAfter * 1000;\n exact = true;\n }\n throw new Error(`The subscription answered ${status}.`);\n }\n for await (const { id, message } of readEvents(response.body)) {\n if (stopped) return;\n if (id !== undefined) cursor.current = id;\n if (message.type === \"ready\") {\n retryMs = MIN_RETRY_MS;\n delay = MIN_RETRY_MS;\n setState({ status: \"open\", cursor: cursor.current, error: null });\n } else {\n setState((s) => ({ ...s, cursor: cursor.current }));\n if (message.type === \"change\") callbacks.current.onChange?.(message as never);\n else if (message.type === \"reset\") callbacks.current.onReset?.(message as never);\n }\n }\n } catch (error) {\n if (stopped) return;\n if (error instanceof FatalStatus) {\n setState((s) => ({ ...s, status: \"closed\", error }));\n return;\n }\n // Aborted because the tab was hidden: the loop pauses instead.\n if (controller.signal.aborted) continue;\n setState((s) => ({ ...s, error: error as Error }));\n }\n if (stopped || controller.signal.aborted) continue;\n // The stream ended or failed: try again, a little later each time.\n setState((s) => ({ ...s, status: \"connecting\" }));\n await wait(exact ? delay : equalJitter(delay, random));\n retryMs = Math.min(retryMs * 2, MAX_RETRY_MS);\n }\n })();\n\n return () => {\n stopped = true;\n request?.abort();\n resume?.();\n if (typeof document !== \"undefined\") {\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\n }\n };\n}\n\n/**\n * The events of an SSE body: `id` and the JSON `data`. Comments (keepalives)\n * and events without data are skipped; an event whose data is not JSON is\n * dropped rather than ending the stream.\n */\nexport async function* readEvents(\n body: ReadableStream<Uint8Array>,\n): AsyncGenerator<{ id?: string; message: ChangeFeedMessage }> {\n const reader = body.getReader();\n const decoder = new TextDecoder();\n let buffer = \"\";\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) return;\n // `ChangeFeed.stream` writes `\\n` only; a proxy's `\\r\\n` is folded here.\n buffer = (buffer + decoder.decode(value, { stream: true })).replace(/\\r\\n?/g, \"\\n\");\n let boundary = buffer.indexOf(\"\\n\\n\");\n while (boundary !== -1) {\n const block = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 2);\n boundary = buffer.indexOf(\"\\n\\n\");\n let id: string | undefined;\n const data: string[] = [];\n for (const line of block.split(\"\\n\")) {\n if (line === \"\" || line.startsWith(\":\")) continue;\n const colon = line.indexOf(\":\");\n const field = colon === -1 ? line : line.slice(0, colon);\n let text = colon === -1 ? \"\" : line.slice(colon + 1);\n if (text.startsWith(\" \")) text = text.slice(1);\n if (field === \"id\") id = text;\n else if (field === \"data\") data.push(text);\n }\n if (data.length === 0) continue;\n try {\n yield { id, message: JSON.parse(data.join(\"\\n\")) };\n } catch {\n // Not JSON: not ours to apply.\n }\n }\n }\n } finally {\n await reader.cancel().catch(() => {});\n }\n}\n"],"mappings":";;AAWA,IAAM,eAAe;AACrB,IAAM,eAAe;;AAGrB,IAAM,cAAN,cAA0B,MAAM;CACT;CAArB,YAAY,QAAyB;EACnC,MAAM,qCAAqC,OAAO,EAAE;EADjC,KAAA,S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AY;CAChC,IAAI,SAAS;CACb,IAAI;EACF,SAAS;GACP,MAAM,EAAE,MAAM,UAAU,MAAM,OAAO,KAAK;GAC1C,IAAI,MAAM;GAEV,UAAU,SAAS,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,EAAA,CAAG,QAAQ,UAAU,IAAI;GAClF,IAAI,WAAW,OAAO,QAAQ,MAAM;GACpC,OAAO,aAAa,IAAI;IACtB,MAAM,QAAQ,OAAO,MAAM,GAAG,QAAQ;IACtC,SAAS,OAAO,MAAM,WAAW,CAAC;IAClC,WAAW,OAAO,QAAQ,MAAM;IAChC,IAAI;IACJ,MAAM,OAAiB,CAAC;IACxB,KAAK,MAAM,QAAQ,MAAM,MAAM,IAAI,GAAG;KACpC,IAAI,SAAS,MAAM,KAAK,WAAW,GAAG,GAAG;KACzC,MAAM,QAAQ,KAAK,QAAQ,GAAG;KAC9B,MAAM,QAAQ,UAAU,KAAK,OAAO,KAAK,MAAM,GAAG,KAAK;KACvD,IAAI,OAAO,UAAU,KAAK,KAAK,KAAK,MAAM,QAAQ,CAAC;KACnD,IAAI,KAAK,WAAW,GAAG,GAAG,OAAO,KAAK,MAAM,CAAC;KAC7C,IAAI,UAAU,MAAM,KAAK;UACpB,IAAI,UAAU,QAAQ,KAAK,KAAK,IAAI;IAC3C;IACA,IAAI,KAAK,WAAW,GAAG;IACvB,IAAI;KACF,MAAM;MAAE;MAAI,SAAS,KAAK,MAAM,KAAK,KAAK,IAAI,CAAC;KAAE;IACnD,QAAQ,CAER;GACF;EACF;CACF,UAAU;EACR,MAAM,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;CACtC;AACF"}
|
|
1
|
+
{"version":3,"file":"subscriptionStream-DDl_H-QM.js","names":[],"sources":["../../client/subscriptionStream.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\n\nimport type { ChangeFeedMessage } from \"../services/change-feed/wire\";\nimport { equalJitter } from \"./retryPolicy\";\nimport type { SubscriptionConfig, SubscriptionStatus } from \"./useSubscription\";\n\n// `useSubscription`'s connection: the SSE request, its reader and the\n// reconnect loop. Loaded by the hook with a dynamic `import()` when it first\n// connects, so it lands in a chunk of its own rather than in the entry chunk\n// every route loads (#891). Import it as a type only from anywhere else.\n\nconst MIN_RETRY_MS = 1_000;\nconst MAX_RETRY_MS = 30_000;\n\n/** The server answered in a way retrying will not change (401, 403, 404). */\nclass FatalStatus extends Error {\n constructor(readonly status: number) {\n super(`The subscription was refused with ${status}.`);\n }\n}\n\nexport interface SubscriptionState {\n status: SubscriptionStatus;\n cursor: string | null;\n error: Error | null;\n}\n\nexport interface FollowOptions {\n endpoint: string;\n pauseWhenHidden: boolean;\n /** Where to resume; advanced as events arrive. */\n cursor: { current: string | null };\n callbacks: { current: SubscriptionConfig<unknown> };\n setState: Dispatch<SetStateAction<SubscriptionState>>;\n /** The jitter's random source; `Math.random` unless a test passes its own. */\n random?: () => number;\n}\n\n/**\n * Follows `endpoint` until the returned function is called: connects,\n * reconnects with backoff, pauses while the tab is hidden, and reports\n * through `setState` and `callbacks`.\n *\n * The backoff step is 1s, doubling per failed attempt up to 30s, and back to\n * 1s once a stream reaches `ready`. Each wait is jittered (\"equal jitter\", a\n * random point between half the step and all of it): a server restart ends\n * every open tab's stream in the same instant, and an exact schedule would\n * bring them all back in the same instant too. A `Retry-After` the server\n * sent is waited out exactly.\n */\nexport function follow({\n endpoint,\n pauseWhenHidden,\n cursor,\n callbacks,\n setState,\n random = Math.random,\n}: FollowOptions): () => void {\n let stopped = false;\n let request: AbortController | null = null;\n let resume: (() => void) | null = null;\n let retryMs = MIN_RETRY_MS;\n const hidden = () =>\n pauseWhenHidden && typeof document !== \"undefined\" && document.visibilityState === \"hidden\";\n const onVisibilityChange = () => {\n if (hidden()) request?.abort();\n else resume?.();\n };\n if (typeof document !== \"undefined\") {\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\n }\n const wait = (ms: number) =>\n new Promise<void>((resolve) => {\n const timer = setTimeout(done, ms);\n function done() {\n clearTimeout(timer);\n resume = null;\n resolve();\n }\n // Shown again, or unmounted: stop waiting.\n resume = done;\n });\n\n void (async () => {\n while (!stopped) {\n if (hidden()) {\n setState((s) => ({ ...s, status: \"paused\" }));\n await new Promise<void>((resolve) => (resume = resolve));\n resume = null;\n continue;\n }\n setState((s) => ({ ...s, status: \"connecting\" }));\n const controller = (request = new AbortController());\n let delay = retryMs;\n let exact = false;\n try {\n const headers: Record<string, string> = { Accept: \"text/event-stream\" };\n if (cursor.current) headers[\"Last-Event-ID\"] = cursor.current;\n const response = await fetch(endpoint, { headers, signal: controller.signal });\n if (!response.ok || !response.body) {\n const status = response.status;\n if (status >= 400 && status < 500 && status !== 408 && status !== 429) {\n throw new FatalStatus(status);\n }\n const retryAfter = Number(response.headers.get(\"Retry-After\"));\n if (Number.isFinite(retryAfter) && retryAfter > 0) {\n delay = retryAfter * 1000;\n exact = true;\n }\n throw new Error(`The subscription answered ${status}.`);\n }\n for await (const { id, message } of readEvents(response.body)) {\n if (stopped) return;\n if (id !== undefined) cursor.current = id;\n if (message.type === \"ready\") {\n retryMs = MIN_RETRY_MS;\n delay = MIN_RETRY_MS;\n setState({ status: \"open\", cursor: cursor.current, error: null });\n } else {\n setState((s) => ({ ...s, cursor: cursor.current }));\n if (message.type === \"change\") callbacks.current.onChange?.(message as never);\n else if (message.type === \"reset\") callbacks.current.onReset?.(message as never);\n }\n }\n } catch (error) {\n if (stopped) return;\n if (error instanceof FatalStatus) {\n setState((s) => ({ ...s, status: \"closed\", error }));\n return;\n }\n // Aborted because the tab was hidden: the loop pauses instead.\n if (controller.signal.aborted) continue;\n setState((s) => ({ ...s, error: error as Error }));\n }\n if (stopped || controller.signal.aborted) continue;\n // The stream ended or failed: try again, a little later each time.\n setState((s) => ({ ...s, status: \"connecting\" }));\n await wait(exact ? delay : equalJitter(delay, random));\n retryMs = Math.min(retryMs * 2, MAX_RETRY_MS);\n }\n })();\n\n return () => {\n stopped = true;\n request?.abort();\n resume?.();\n if (typeof document !== \"undefined\") {\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\n }\n };\n}\n\n/**\n * The events of an SSE body: `id` and the JSON `data`. Comments (keepalives)\n * and events without data are skipped; an event whose data is not JSON is\n * dropped rather than ending the stream.\n */\nexport async function* readEvents(\n body: ReadableStream<Uint8Array>,\n): AsyncGenerator<{ id?: string; message: ChangeFeedMessage }> {\n const reader = body.getReader();\n const decoder = new TextDecoder();\n let buffer = \"\";\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) return;\n // `ChangeFeed.stream` writes `\\n` only; a proxy's `\\r\\n` is folded here.\n buffer = (buffer + decoder.decode(value, { stream: true })).replace(/\\r\\n?/g, \"\\n\");\n let boundary = buffer.indexOf(\"\\n\\n\");\n while (boundary !== -1) {\n const block = buffer.slice(0, boundary);\n buffer = buffer.slice(boundary + 2);\n boundary = buffer.indexOf(\"\\n\\n\");\n let id: string | undefined;\n const data: string[] = [];\n for (const line of block.split(\"\\n\")) {\n if (line === \"\" || line.startsWith(\":\")) continue;\n const colon = line.indexOf(\":\");\n const field = colon === -1 ? line : line.slice(0, colon);\n let text = colon === -1 ? \"\" : line.slice(colon + 1);\n if (text.startsWith(\" \")) text = text.slice(1);\n if (field === \"id\") id = text;\n else if (field === \"data\") data.push(text);\n }\n if (data.length === 0) continue;\n try {\n yield { id, message: JSON.parse(data.join(\"\\n\")) };\n } catch {\n // Not JSON: not ours to apply.\n }\n }\n }\n } finally {\n await reader.cancel().catch(() => {});\n }\n}\n"],"mappings":";;AAWA,IAAM,eAAe;AACrB,IAAM,eAAe;;AAGrB,IAAM,cAAN,cAA0B,MAAM;CACT;CAArB,YAAY,QAAyB;EACnC,MAAM,qCAAqC,OAAO,EAAE;EADjC,KAAA,SAAA;CAErB;AACF;;;;;;;;;;;;;AA+BA,SAAgB,OAAO,EACrB,UACA,iBACA,QACA,WACA,UACA,SAAS,KAAK,UACc;CAC5B,IAAI,UAAU;CACd,IAAI,UAAkC;CACtC,IAAI,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AAE,QAAQ,KAAK,CAAC,EAAA,CAAG,QAAQ,UAAU,IAAI;GAClF,IAAI,WAAW,OAAO,QAAQ,MAAM;GACpC,OAAO,aAAa,IAAI;IACtB,MAAM,QAAQ,OAAO,MAAM,GAAG,QAAQ;IACtC,SAAS,OAAO,MAAM,WAAW,CAAC;IAClC,WAAW,OAAO,QAAQ,MAAM;IAChC,IAAI;IACJ,MAAM,OAAiB,CAAC;IACxB,KAAK,MAAM,QAAQ,MAAM,MAAM,IAAI,GAAG;KACpC,IAAI,SAAS,MAAM,KAAK,WAAW,GAAG,GAAG;KACzC,MAAM,QAAQ,KAAK,QAAQ,GAAG;KAC9B,MAAM,QAAQ,UAAU,KAAK,OAAO,KAAK,MAAM,GAAG,KAAK;KACvD,IAAI,OAAO,UAAU,KAAK,KAAK,KAAK,MAAM,QAAQ,CAAC;KACnD,IAAI,KAAK,WAAW,GAAG,GAAG,OAAO,KAAK,MAAM,CAAC;KAC7C,IAAI,UAAU,MAAM,KAAK;UACpB,IAAI,UAAU,QAAQ,KAAK,KAAK,IAAI;IAC3C;IACA,IAAI,KAAK,WAAW,GAAG;IACvB,IAAI;KACF,MAAM;MAAE;MAAI,SAAS,KAAK,MAAM,KAAK,KAAK,IAAI,CAAC;KAAE;IACnD,QAAQ,CAER;GACF;EACF;CACF,UAAU;EACR,MAAM,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;CACtC;AACF"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as toVariantKey, A as useSearchParams, C as loadDictionary, D as readRoutePayload, E as setActiveLocale, F as ServerDataProvider, G as RealtimeContext, H as CspNonceContext, I as useLocation, K as configureRealtime, L as domainUrl, M as I18nContext, N as I18nProvider, O as routeDataUrl, P as ServerDataContext, Q as loadedModule, R as isAbsoluteUrl, S as recoverFromChunkLoadError, T as registerDictionary, U as applyDocumentNonce, W as useCspNonce, X as reconnectRealtime, Y as realtime, Z as loadLazy, _ as configureChunkLoadRecovery, a as useRouteTransition, at as pickDefined, b as otherBuild, bt as QueryError, c as ClientRouterContext, ct as reportAuthenticationRefusal, d as ComponentsContext, dt as INTENDED_URL_PARAM, et as applyParams$1, f as ComponentsProvider, ft as isExternalRedirect, g as CHUNK_RELOAD_MARKER, gt as isRetryableQueryError, h as subscribeViewModules, i as RouteTransitionProvider, it as USER_QUERY_CONFIG_KEYS, j as useNavigate, k as useRoute, l as ClientRouterProvider, lt as resetAuthenticationIncident, m as loadViewModule, mt as readResponseBody, n as useTheme, nt as QueryManagerContext, o as useChannelSubscription, ot as DEFAULT_STALE_TIME, p as initialViewModulesReady, pt as safeRedirectPath, q as followLive, r as m, rt as QueryManagerProvider, s as useCoalesced, st as configureAuthenticationErrors, t as ThemeProvider, tt as QueryConfigContext, u as restoreScroll, ut as setAuthenticationNavigator, v as isChunkLoadError, vt as retryDelayFor, w as loadDictionaryForRender, x as recoverFromBuildMismatch, xt as Subject, y as navigationStarted, yt as shouldRetryQuery } from "../chunks/ThemeProvider-
|
|
1
|
+
import { $ as toVariantKey, A as useSearchParams, C as loadDictionary, D as readRoutePayload, E as setActiveLocale, F as ServerDataProvider, G as RealtimeContext, H as CspNonceContext, I as useLocation, K as configureRealtime, L as domainUrl, M as I18nContext, N as I18nProvider, O as routeDataUrl, P as ServerDataContext, Q as loadedModule, R as isAbsoluteUrl, S as recoverFromChunkLoadError, T as registerDictionary, U as applyDocumentNonce, W as useCspNonce, X as reconnectRealtime, Y as realtime, Z as loadLazy, _ as configureChunkLoadRecovery, a as useRouteTransition, at as pickDefined, b as otherBuild, bt as QueryError, c as ClientRouterContext, ct as reportAuthenticationRefusal, d as ComponentsContext, dt as INTENDED_URL_PARAM, et as applyParams$1, f as ComponentsProvider, ft as isExternalRedirect, g as CHUNK_RELOAD_MARKER, gt as isRetryableQueryError, h as subscribeViewModules, i as RouteTransitionProvider, it as USER_QUERY_CONFIG_KEYS, j as useNavigate, k as useRoute, l as ClientRouterProvider, lt as resetAuthenticationIncident, m as loadViewModule, mt as readResponseBody, n as useTheme, nt as QueryManagerContext, o as useChannelSubscription, ot as DEFAULT_STALE_TIME, p as initialViewModulesReady, pt as safeRedirectPath, q as followLive, r as m, rt as QueryManagerProvider, s as useCoalesced, st as configureAuthenticationErrors, t as ThemeProvider, tt as QueryConfigContext, u as restoreScroll, ut as setAuthenticationNavigator, v as isChunkLoadError, vt as retryDelayFor, w as loadDictionaryForRender, x as recoverFromBuildMismatch, xt as Subject, y as navigationStarted, yt as shouldRetryQuery } from "../chunks/ThemeProvider-CoQ-vnvy.js";
|
|
2
2
|
import { n as RouteStateContext, r as RouteStateProvider, t as useParams } from "../chunks/useParams-BN3XXfmG.js";
|
|
3
3
|
import { a as isNetworkError, c as isPermissionError, d as isValidationError, f as mutationErrorField, h as mutationErrorList, i as isHttpError, l as isRateLimitError, m as mutationErrorKind, n as isCsrfError, o as isNotFoundError, p as mutationErrorFromBody, r as isFormError, s as isObject, t as isAuthenticationError, u as isServerError } from "../chunks/MutationError-DuKqBW8o.js";
|
|
4
4
|
import { Fragment, StrictMode, Suspense, createContext, createElement, isValidElement, lazy, memo, use, useCallback, useContext, useDeferredValue, useEffect, useInsertionEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
@@ -562,7 +562,7 @@ var SOCKET_ID_HEADER = "x-gemi-socket";
|
|
|
562
562
|
*/
|
|
563
563
|
var mutationExtras = {
|
|
564
564
|
current: null,
|
|
565
|
-
load: () => import("../chunks/mutationExtras-
|
|
565
|
+
load: () => import("../chunks/mutationExtras-ChOGPZlY.js")
|
|
566
566
|
};
|
|
567
567
|
/** Starts loading `./mutationExtras`: the hooks' mount effect. */
|
|
568
568
|
function preloadMutationExtras() {
|
|
@@ -920,7 +920,7 @@ function useMutate() {
|
|
|
920
920
|
//#region client/fetchFile.ts
|
|
921
921
|
var request = {
|
|
922
922
|
current: null,
|
|
923
|
-
load: () => import("../chunks/fetchFileRequest-
|
|
923
|
+
load: () => import("../chunks/fetchFileRequest-Bhp0oJ0T.js")
|
|
924
924
|
};
|
|
925
925
|
/**
|
|
926
926
|
* Downloads a file route's body as a `Blob`.
|
|
@@ -986,7 +986,7 @@ function useSetQueryData() {
|
|
|
986
986
|
//#endregion
|
|
987
987
|
//#region client/useSubscription.ts
|
|
988
988
|
/** `./subscriptionStream`, loaded on first use. Replaceable in tests. */
|
|
989
|
-
var streamModule = { load: () => import("../chunks/subscriptionStream-
|
|
989
|
+
var streamModule = { load: () => import("../chunks/subscriptionStream-DDl_H-QM.js") };
|
|
990
990
|
/**
|
|
991
991
|
* Follows a route that answers with `ChangeFeed.stream`, as long as the
|
|
992
992
|
* component is mounted: each change reaches `onChange`, in order, exactly
|
|
@@ -23,8 +23,11 @@ export declare function manageScroll(): () => void;
|
|
|
23
23
|
* Scrolls for a navigation that has just committed, once per navigation:
|
|
24
24
|
* - a push or replace goes to the top, or to the `#hash` element when there is one;
|
|
25
25
|
* - back/forward goes back to where the entry was left (the hash, or the top,
|
|
26
|
-
* for an entry without a position)
|
|
27
|
-
*
|
|
26
|
+
* for an entry without a position), whether or not a shallow navigation made
|
|
27
|
+
* it: a filtered list (`searchParams.push()`) is returned to from a detail
|
|
28
|
+
* page with a full navigation, and the browser no longer restores it;
|
|
29
|
+
* - a shallow push or replace stays where it is: the page on screen did not
|
|
30
|
+
* change (nor does a back/forward to a shallow entry nothing was saved for);
|
|
28
31
|
* - the page a document loaded on is restored only on a reload or a
|
|
29
32
|
* back/forward to it; otherwise the browser has placed it (at its `#hash`).
|
|
30
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollRestoration.d.ts","sourceRoot":"","sources":["../../client/scrollRestoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAoCjC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,UAIA;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,WAO9B;AAED,sFAAsF;AACtF,wBAAgB,UAAU,SAMzB;AAED;;;GAGG;AACH,wBAAgB,YAAY,eAY3B;AAQD
|
|
1
|
+
{"version":3,"file":"scrollRestoration.d.ts","sourceRoot":"","sources":["../../client/scrollRestoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAoCjC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,UAIA;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,WAO9B;AAED,sFAAsF;AACtF,wBAAgB,UAAU,SAMzB;AAED;;;GAGG;AACH,wBAAgB,YAAY,eAY3B;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB,QA6BA"}
|
package/dist/config/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-0a5png2z.js";function k(b){return b}function q(b){if((process.env.GEMI_REACT_COMPILER??"auto").toLowerCase()==="off")return!1;return b??!0}export{q as reactCompiler,k as defineConfig};
|
|
3
3
|
|
|
4
4
|
//# debugId=2F7F86887FCF6F1A64756E2164756E21
|
package/dist/console/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ca as c}from"../chunk-
|
|
2
|
+
import{ca as c}from"../chunk-h7h8ra65.js";import{cb as f,db as o}from"../chunk-8m9kgynj.js";import{Cd as n,Dd as u,Nd as r,zd as A}from"../chunk-n7bz2283.js";import"../chunk-mndcq5z1.js";import"../chunk-a2ybf4jf.js";import{Cj as v,yj as g}from"../chunk-zmj4fj4n.js";import{Nj as h}from"../chunk-sw7c95nh.js";import"../chunk-sg78cmd1.js";import"../chunk-mddazdpt.js";import{xk as t}from"../chunk-bcfcwbp4.js";import"../chunk-64hxqsqx.js";import"../chunk-t0qs2q9j.js";import{Bl as k}from"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-xhky6kyf.js";import{Wl as a}from"../chunk-65r1ne8r.js";import"../chunk-0a5png2z.js";function E(){let z=Promise.resolve(),J=Promise.resolve(),Y=(Q,G)=>new Promise(($)=>{Q.write(G,()=>$())});return{stdout:(Q)=>{z=Y(process.stdout,Q)},stderr:(Q)=>{J=Y(process.stderr,Q)},flush:async()=>{await Promise.all([z,J])}}}function x(z){let J=z.writers??E();return{args:z.args,options:z.options,argv:z.argv,line:(Y="")=>J.stdout(`${Y}
|
|
3
3
|
`),error:(Y)=>J.stderr(`${Y}
|
|
4
4
|
`),fail:(Y,Q=1)=>{throw new A(Y,Q)}}}import b from"path";var Gz=u("encryption:rotate").describe("Re-encrypt encrypted columns that are still under an older key").arg("model",{description:"The model to rotate. Omit to rotate every model with encrypted columns"}).option("batchSize",{type:"number",default:500,description:"Rows read and rewritten per batch"}).option("dryRun",{type:"boolean",description:"Count what would be re-encrypted, and write nothing"}).option("encryptPlaintext",{type:"boolean",description:"Also encrypt values that are not encrypted yet (a column just marked @gemi.encrypted)"}).handle(async({args:z,options:J,line:Y,fail:Q})=>{let G=z.model?[z.model]:[...new Set(h().map((B)=>B.split(".")[0]))],$=z.model?null:Jz();if(G.length===0&&!$){Y("No model has encrypted columns.");return}if($){let B=await $.rotateEncryption({dryRun:J.dryRun});Y(`OAuth connections: ${B.scanned} rows, ${B.rotated} ${J.dryRun?"to re-encrypt":"re-encrypted"}`)}let _=0;for(let B of G){let V=await c(B,{batchSize:J.batchSize,dryRun:J.dryRun,encryptPlaintext:J.encryptPlaintext});_+=V.plaintext,Y(`${V.model} (${V.fields.join(", ")}): ${V.scanned} rows, ${V.rotated} ${J.dryRun?"to re-encrypt":"re-encrypted"}`+(V.skipped>0?`, ${V.skipped} changed meanwhile (already current)`:"")+(V.plaintext>0?`, ${V.plaintext} not encrypted yet`:""))}if(_>0)Q(`${_} value${_===1?" is":"s are"} not encrypted. If the column was just marked @gemi.encrypted, run again with --encrypt-plaintext.`)});function Jz(){let z=k();if(!z.bound(v))return null;let J=z.make(v);if(Object.keys(J.providers).length===0)return null;let Y=J.store;return Y instanceof g?Y:null}var m=[Gz];function R(z){return z.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Qz(z){let J=new Map,Y=new Map;for(let Q of z){J.set(R(Q.name),Q),J.set(Q.name,Q);let G="alias"in Q?Q.alias:void 0;if(G)Y.set(G,Q)}return{byName:J,byAlias:Y}}function l(z){if(z==="--")return!0;if(!z.startsWith("-"))return!1;if(z==="-")return!1;if(/^-(\d|\.\d)/.test(z))return!1;return!0}function p(z,J){let{byName:Y,byAlias:Q}=Qz(z.options),G=[],$=[],_=new Map,B=!Y.has("help"),V=!Q.has("h"),F=!1,N=!1,W=(X)=>G.push(`Unknown option ${X} for command "${z.commandName}".`),T=(X,Z)=>{if(Z==="--help"||Z==="-h")N=!0;G.push(Z===void 0?`Option ${X} needs a value.`:`Option ${X} needs a value, but the next token is ${JSON.stringify(Z)}, which is another option. If that really is the value, write ${X}=${Z}.`)},j=0;while(j<J.length){let X=J[j];if(X==="--"){$.push(...J.slice(j+1));break}if(X.startsWith("--")){let Z=X.slice(2),K=Z.indexOf("="),M=K===-1?Z:Z.slice(0,K),O=K===-1?void 0:Z.slice(K+1),P=Y.get(M),D=!1;if(!P&&M.startsWith("no-")){let S=Y.get(M.slice(3));if(S&&S.type==="boolean")P=S,D=!0}if(!P&&M==="help"&&B){F=!0,j+=1;continue}if(!P){W(`--${M}`),j+=1;continue}if(P.type==="boolean"){if(O!==void 0&&O!=="true"&&O!=="false")G.push(`Option --${R(P.name)} is a flag and takes no value, but got ${JSON.stringify(O)}.`);else{let S=O===void 0?!0:O==="true";_.set(P.name,D?!S:S)}j+=1;continue}if(O!==void 0){_.set(P.name,O),j+=1;continue}let L=J[j+1];if(L===void 0||l(L)){T(`--${R(P.name)}`,L),j+=1;continue}_.set(P.name,L),j+=2;continue}if(X.startsWith("-")&&X.length>1){let Z=X.slice(1),K=!1;for(let M=0;M<Z.length;M+=1){let O=Q.get(Z[M]);if(!O){if(Z[M]==="h"&&V){F=!0;continue}W(`-${Z[M]}`);break}if(O.type==="boolean"){_.set(O.name,!0);continue}let P=Z.slice(M+1),D=P.startsWith("=")?P.slice(1):P;if(D!==""){_.set(O.name,D);break}let L=J[j+1];if(L===void 0||l(L)){T(`-${O.alias}`,L);break}_.set(O.name,L),K=!0;break}j+=K?2:1;continue}$.push(X),j+=1}let H={},I=0;for(let X of z.args){if(X.variadic){let K=$.slice(I);if(I=$.length,H[X.name]=K,X.required&&K.length===0)G.push(`Missing required argument <${X.name}...>. Command "${z.commandName}" needs at least one.`);continue}let Z=$[I];if(I+=1,Z!==void 0){H[X.name]=Z;continue}if(X.default!==void 0){H[X.name]=X.default;continue}if(X.required)G.push(`Missing required argument <${X.name}>.`);H[X.name]=void 0}if(I<$.length){let X=$.slice(I);G.push(`Unexpected argument${X.length===1?"":"s"} ${X.map((Z)=>JSON.stringify(Z)).join(", ")}. Command "${z.commandName}" takes ${z.args.length} argument${z.args.length===1?"":"s"}.`)}let U={};for(let X of z.options){let Z=_.get(X.name);if(X.type==="boolean"){U[X.name]=Z===void 0?X.default??!1:Boolean(Z);continue}if(Z===void 0){if(X.default!==void 0)U[X.name]=X.default;else if(X.required)G.push(`Missing required option --${R(X.name)}.`),U[X.name]=void 0;else U[X.name]=void 0;continue}let K=String(Z);if(X.type==="number"){let M=Number(K);if(K.trim()===""||!Number.isFinite(M))G.push(`Option --${R(X.name)} expects a number, but got ${JSON.stringify(K)}.`),U[X.name]=void 0;else U[X.name]=M;continue}U[X.name]=K}let q=F&&!N;if(G.length>0)return{ok:!1,help:q,errors:G};return{ok:!0,help:q,args:H,options:U}}function C(z,J=" "){let Y=z.reduce((Q,[G])=>Math.max(Q,G.length),0);return z.map(([Q,G])=>G===""?`${J}${Q}`:`${J}${Q.padEnd(Y)} ${G}`)}function d(z){let J=z.variadic?`${z.name}...`:z.name;return z.required?`<${J}>`:`[${J}]`}function Xz(z){let J=(G)=>z.options.some(G),Y=J((G)=>G.name==="help"||R(G.name)==="help"),Q=J((G)=>("alias"in G)&&G.alias==="h");if(Y&&Q)return[];if(Y)return[["-h","Show this message"]];return[[`${Q?"":"-h, "}--help`,"Show this message"]]}function w(z){let J=[],Y=z.args.map(d).join(" "),Q=["gemi run",z.commandName,z.options.length>0?"[options]":"",Y].filter(Boolean).join(" ");if(J.push(`Usage: ${Q}`),z.description)J.push("",z.description);if(z.args.length>0)J.push("","Arguments:"),J.push(...C(z.args.map((G)=>{let $=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:""].filter(Boolean).join(" ");return[d(G),$]})));return J.push("","Options:"),J.push(...C([...z.options.map((G)=>{let $="alias"in G&&G.alias?`-${G.alias}, `:"",_=G.type==="boolean"?"":` <${G.type}>`,B=[G.description??"",G.default!==void 0?`(default: ${JSON.stringify(G.default)})`:"","required"in G&&G.required?"(required)":""].filter(Boolean).join(" ");return[`${$}--${R(G.name)}${_}`,B]}),...Xz(z)])),J.join(`
|
|
5
5
|
`)}function i(z){return["Provided by gemi:","",...C(z.map((J)=>[J.commandName,J.description]))].join(`
|
|
@@ -15,4 +15,4 @@ ${i(j)}`);return 0}let H=W.get(z.name)??j.find((Z)=>Z.commandName===z.name);if($
|
|
|
15
15
|
${Q.message}
|
|
16
16
|
\`gemi run\` boots your application the way the server does, so it needs the Kernel. Run it from the root of a gemi project.`,{cause:Q})}if(typeof Y.default!=="function")throw new f(`${J} has no default export. gemi expects the Kernel subclass to be the default export of that file.`);return new Y.default}function s(z,J,Y,Q="returned"){if(z===void 0||z===null)return 0;if(typeof z==="number"&&Number.isInteger(z)&&z>=0&&z<=255)return z;let G=J?`Command "${J.commandName}"`:"The command";return Y(`${G} ${Q} ${JSON.stringify(z)}, which is not an exit `+"code \u2014 an exit code is an integer from 0 to 255. Treating this as a "+"failure."),1}var[Zz,..._z]=process.argv.slice(2),zz=E();e({rootDir:process.cwd(),name:Zz,argv:_z,writers:zz}).then(async(z)=>{await zz.flush(),process.exit(z)});
|
|
17
17
|
|
|
18
|
-
//# debugId=
|
|
18
|
+
//# debugId=791A3F82810A59CE64756E2164756E21
|
package/dist/console/run.js.map
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"/**\n * The entry point `gemi run` spawns.\n *\n * Exposed through the exports map as `gemi/console/run` and resolved by the CLI\n * out of the *application's* `node_modules`, the same way `dev` and `start`\n * resolve `gemi/bun/preload`. That indirection is the point: the runner has to\n * be the application's copy of gemi, not the one bundled into `dist/bin/gemi.js`\n * — see the note at the top of `runner.ts`.\n *\n * Nothing but argv handling lives here, so that everything worth testing lives\n * in `runConsole`, which returns an exit code instead of taking one.\n */\nimport { processWriters } from \"./context\";\nimport { runConsole } from \"./runner\";\n\n// The tail is forwarded exactly as commander handed it over, `--` and all.\n// commander passes a `--` through as a literal operand (verified: `gemi run x --\n// --weird` arrives as `[\"--\", \"--weird\"]`), and `parse.ts` already treats a `--`\n// as \"everything after this is positional\". Stripping it here — which an earlier\n// draft did — consumed the escape hatch before the only thing that reads it,\n// leaving `-- --weird` reported as an unknown option and `-- --` the only way to\n// pass a flag-shaped value.\nconst [name, ...argv] = process.argv.slice(2);\n\nconst writers = processWriters();\n\n// `.then` rather than a top-level `await`, so this file typechecks under the\n// package's inherited `module: NodeNext` — the same TS1309 that keeps `bun/` out\n// of tsconfig.json's `include`. Bun runs it as ESM either way; this just avoids\n// buying a nested tsconfig for two lines.\nrunConsole({ rootDir: process.cwd(), name, argv, writers }).then(\n async (code) => {\n // Everything written has to reach the OS before the exit below discards it —\n // see `processWriters` for what that costs when it is skipped.\n await writers.flush();\n\n // Explicit, and not belt-and-braces. `kernel.destroy()` stops the scheduler,\n // but an open database pool, a Redis client or an unref'd timer will happily\n // hold the loop open after the work is done — a command that finishes and then\n // sits there, which is the failure `kernel/exit.test.ts` exists for and the\n // one `orm/context.test.ts` names by example.\n process.exit(code);\n },\n);\n"
|
|
11
11
|
],
|
|
12
12
|
"mappings": ";6sBA+FO,IAAS,JAAc,HAAmB,JAG/C,DAAI,HAAwB,GAAQ,GAAQ,HACxC,HAAwB,GAAQ,GAAQ,HAEtC,HAAQ,JAAC,HAA4B,IACzC,IAAI,QAAQ,CAAC,IAAY,CAIvB,EAAO,MAAM,EAAO,IAAM,EAAQ,CAAC,EACpC,EAEH,MAAO,CACL,OAAQ,CAAC,IAAU,CACjB,EAAS,EAAM,QAAQ,OAAQ,CAAK,GAEtC,OAAQ,CAAC,IAAU,CACjB,EAAS,EAAM,QAAQ,OAAQ,CAAK,GAEtC,MAAO,SAAY,CACjB,MAAM,QAAQ,IAAI,CAAC,EAAQ,CAAM,CAAC,EAEtC,EAGK,SAAS,CAAmB,CAAC,EAKX,CACvB,IAAM,EAAU,EAAO,SAAW,EAAe,EAEjD,MAAO,CACL,KAAM,EAAO,KACb,QAAS,EAAO,QAChB,KAAM,EAAO,KACb,KAAM,CAAC,EAAU,KAAO,EAAQ,OAAO,GAAG;AAAA,CAAW,EACrD,MAAO,CAAC,IAAoB,EAAQ,OAAO,GAAG;AAAA,CAAW,EACzD,KAAM,CAAC,EAAiB,EAAO,IAAM,CACnC,MAAM,IAAI,EAAc,EAAS,CAAI,EAEzC,EC3IF,oBCaO,IAAM,GAA0B,EAAc,mBAAmB,EACrE,SAAS,gEAAgE,EACzE,IAA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Y,WAC5B,MAAM,IAAI,EACR,GAAG,kGAEL,EAGF,OAAO,IAAI,EAAO,QAgBpB,SAAS,CAAW,CAClB,EACA,EACA,EACA,EAAS,WACD,CACR,GAAI,IAAW,QAAa,IAAW,KAAM,MAAO,GAEpD,GACE,OAAO,IAAW,UAClB,OAAO,UAAU,CAAM,GACvB,GAAU,GACV,GAAU,IAEV,OAAO,EAGT,IAAM,EAAU,EAAU,YAAY,EAAQ,eAAiB,cAO/D,OALA,EACE,GAAG,KAAW,KAAU,KAAK,UAAU,CAAM,2BAC3C,4EACA,UACJ,EACO,EI7PT,IAAO,MAAS,IAAQ,QAAQ,KAAK,MAAM,CAAC,EAEtC,GAAU,EAAe,EAM/B,EAAW,CAAE,QAAS,QAAQ,IAAI,EAAG,QAAM,QAAM,UAAQ,CAAC,EAAE,KAC1D,MAAO,IAAS,CAGd,MAAM,GAAQ,MAAM,EAOpB,QAAQ,KAAK,CAAI,EAErB",
|
|
13
|
-
"debugId": "
|
|
13
|
+
"debugId": "791A3F82810A59CE64756E2164756E21",
|
|
14
14
|
"names": []
|
|
15
15
|
}
|
package/dist/container/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cl as e,Dl as o}from"../chunk-ha4er085.js";import"../chunk-
|
|
2
|
+
import{Cl as e,Dl as o}from"../chunk-ha4er085.js";import"../chunk-0a5png2z.js";export{o as Container,e as BindingResolutionError};
|
|
3
3
|
|
|
4
4
|
//# debugId=9D07A1E00FD888B364756E2164756E21
|
package/dist/database/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fa as N}from"../chunk-81m95se9.js";import"../chunk-vqq0z746.js";import"../chunk-bxxd1awv.js";import"../chunk-sg78cmd1.js";import"../chunk-bcfcwbp4.js";import{$k as J,Pk as j,Qk as k,Sk as w,Tk as x,Uk as z,Vk as A,Wk as E,Xk as F,Yk as G,Zk as H,_k as I,al as K,bl as L}from"../chunk-t0qs2q9j.js";import"../chunk-
|
|
2
|
+
import{Fa as N}from"../chunk-81m95se9.js";import"../chunk-vqq0z746.js";import"../chunk-bxxd1awv.js";import"../chunk-sg78cmd1.js";import"../chunk-bcfcwbp4.js";import{$k as J,Pk as j,Qk as k,Sk as w,Tk as x,Uk as z,Vk as A,Wk as E,Xk as F,Yk as G,Zk as H,_k as I,al as K,bl as L}from"../chunk-t0qs2q9j.js";import"../chunk-0a5png2z.js";export{A as isSqlite,E as isMysqlFamily,z as inferDialect,j as defineDatabaseConfig,k as databaseConfigDefaults,w as UnknownDatabaseUrlError,H as UnknownConnectionError,I as ReservedConnectionNameError,x as MissingDatabaseUrlError,N as DatabaseServiceProvider,L as DatabaseManager,G as DEFAULT_CONNECTION,J as CrossConnectionTransactionError,K as Connection,F as AmbiguousSqlitePathError};
|
|
3
3
|
|
|
4
4
|
//# debugId=79C45BC9E389060864756E2164756E21
|
package/dist/email/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ql as QS,rl as VS}from"../chunk-
|
|
2
|
+
import{ql as QS,rl as VS}from"../chunk-3cd30c7k.js";import{xl as KS}from"../chunk-t4z6rkvw.js";import{Bl as y}from"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-0a5png2z.js";import{render as qS}from"jsx-email";import A from"process";import{Buffer as a}from"buffer";import e from"path";import{fileURLToPath as fS}from"url";import{promisify as bS}from"util";import s from"child_process";import uS,{constants as gS}from"fs/promises";import c from"process";import d,{constants as _S}from"fs/promises";import m from"process";import MS from"os";import T from"fs";import ES from"fs";import h from"fs";var O;function US(){try{return h.statSync("/.dockerenv"),!0}catch{return!1}}function zS(){try{return h.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function W(){if(O===void 0)O=US()||zS();return O}var D,NS=()=>{try{return ES.statSync("/run/.containerenv"),!0}catch{return!1}};function R(){if(D===void 0)D=NS()||W();return D}var l=()=>{if(m.platform!=="linux")return!1;if(MS.release().toLowerCase().includes("microsoft")){if(R())return!1;return!0}try{if(T.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!R()}catch{}if(T.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||T.existsSync("/run/WSL"))return!R();return!1},H=m.env.__IS_WSL_TEST__?l:l();var kS=(()=>{let S;return async function(){if(S)return S;let q="/etc/wsl.conf",J=!1;try{await d.access(q,_S.F_OK),J=!0}catch{}if(!J)return"/mnt/";let K=await d.readFile(q,{encoding:"utf8"}),Q=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(K);if(!Q)return"/mnt/";return S=Q.groups.mountPoint.trim(),S=S.endsWith("/")?S:`${S}/`,S}})(),FS=async()=>{return`${await kS()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},C=async()=>{if(H)return FS();return`${c.env.SYSTEMROOT||c.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`};function X($,S,q){let J=(K)=>Object.defineProperty($,S,{value:K,enumerable:!0,writable:!0});return Object.defineProperty($,S,{configurable:!0,enumerable:!0,get(){let K=q();return J(K),K},set(K){J(K)}}),$}import{promisify as AS}from"util";import x from"process";import{execFile as PS}from"child_process";import{promisify as LS}from"util";import OS from"process";import{execFile as WS}from"child_process";var DS=LS(WS);async function I(){if(OS.platform!=="darwin")throw Error("macOS only");let{stdout:$}=await DS("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),q=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec($)?.groups.id??"com.apple.Safari";if(q==="com.apple.safari")return"com.apple.Safari";return q}import TS from"process";import{promisify as CS}from"util";import{execFile as IS,execFileSync as z0}from"child_process";var jS=CS(IS);async function p($,{humanReadableOutput:S=!0,signal:q}={}){if(TS.platform!=="darwin")throw Error("macOS only");let J=S?[]:["-ss"],K={};if(q)K.signal=q;let{stdout:Q}=await jS("osascript",["-e",$,J],K);return Q.trim()}async function j($){return p(`tell application "Finder" to set app_path to application file id "${$}" as string
|
|
3
3
|
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as vS}from"util";import{execFile as xS}from"child_process";var BS=vS(xS),_={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},F0=new Map(Object.entries(_));class t extends Error{}async function v($=BS){let{stdout:S}=await $("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),q=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(S);if(!q)throw new t(`Cannot find Windows browser in stdout: ${JSON.stringify(S)}`);let{id:J}=q.groups,K=J.lastIndexOf("."),Q=J.lastIndexOf("-"),Z=K===-1?void 0:J.slice(0,K),V=Q===-1?void 0:J.slice(0,Q);return _[J]??_[Z]??_[V]??{name:J,id:J}}var yS=AS(PS),wS=($)=>$.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(S)=>S.toUpperCase());async function B(){if(x.platform==="darwin"){let $=await I();return{name:await j($),id:$}}if(x.platform==="linux"){let{stdout:$}=await yS("xdg-mime",["query","default","x-scheme-handler/http"]),S=$.trim();return{name:wS(S.replace(/.desktop$/,"").replace("-"," ")),id:S}}if(x.platform==="win32")return v();throw Error("Only macOS, Linux, and Windows are supported")}var hS=bS(s.execFile),P=e.dirname(fS(import.meta.url)),i=e.join(P,"xdg-open"),{platform:z,arch:n}=A;async function lS(){let $=await C(),S=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,q=a.from(S,"utf16le").toString("base64"),{stdout:J}=await hS($,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",q],{encoding:"utf8"}),K=J.trim(),Q={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return Q[K]?{id:Q[K]}:{}}var o=async($,S)=>{let q;for(let J of $)try{return await S(J)}catch(K){q=K}throw q},k=async($)=>{if($={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...$},Array.isArray($.app))return o($.app,(V)=>k({...$,app:V}));let{name:S,arguments:q=[]}=$.app??{};if(q=[...q],Array.isArray(S))return o(S,(V)=>k({...$,app:{name:V,arguments:q}}));if(S==="browser"||S==="browserPrivate"){let V={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},Y={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},G=H?await lS():await B();if(G.id in V){let E=V[G.id];if(S==="browserPrivate")q.push(Y[E]);return k({...$,app:{name:U[E],arguments:q}})}throw Error(`${G.name} is not supported as a default browser`)}let J,K=[],Q={};if(z==="darwin"){if(J="open",$.wait)K.push("--wait-apps");if($.background)K.push("--background");if($.newInstance)K.push("--new");if(S)K.push("-a",S)}else if(z==="win32"||H&&!R()&&!S){if(J=await C(),K.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),!H)Q.windowsVerbatimArguments=!0;let V=["Start"];if($.wait)V.push("-Wait");if(S){if(V.push(`"\`"${S}\`""`),$.target)q.push($.target)}else if($.target)V.push(`"${$.target}"`);if(q.length>0)q=q.map((Y)=>`"\`"${Y}\`""`),V.push("-ArgumentList",q.join(","));$.target=a.from(V.join(" "),"utf16le").toString("base64")}else{if(S)J=S;else{let V=!P||P==="/",Y=!1;try{await uS.access(i,gS.X_OK),Y=!0}catch{}J=A.versions.electron??(z==="android"||V||!Y)?"xdg-open":i}if(q.length>0)K.push(...q);if(!$.wait)Q.stdio="ignore",Q.detached=!0}if(z==="darwin"&&q.length>0)K.push("--args",...q);if($.target)K.push($.target);let Z=s.spawn(J,K,Q);if($.wait)return new Promise((V,Y)=>{Z.once("error",Y),Z.once("close",(G)=>{if(!$.allowNonzeroExitCode&&G>0){Y(Error(`Exited with code ${G}`));return}V(Z)})});return Z.unref(),Z},mS=($,S)=>{if(typeof $!=="string")throw TypeError("Expected a `target`");return k({...S,target:$})};function r($){if(typeof $==="string"||Array.isArray($))return $;let{[n]:S}=$;if(!S)throw Error(`${n} is not supported`);return S}function F({[z]:$},{wsl:S}){if(S&&H)return r(S);if(!$)throw Error(`${z} is not supported`);return r($)}var U={};X(U,"chrome",()=>F({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));X(U,"brave",()=>F({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));X(U,"firefox",()=>F({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));X(U,"edge",()=>F({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));X(U,"browser",()=>"browser");X(U,"browserPrivate",()=>"browserPrivate");var SS=mS;function cS($){return Array.from($,(S)=>{let q=S.charCodeAt(0);return S==="/"||S==="\\"||q<32||q===127?"_":S}).join("")}async function $S($,S,q={}){let J=`${$}/${new Date().toISOString()}${cS(S.subject)}`,K={to:S.to,cc:S.cc,bcc:S.bcc,replyTo:S.replyTo??[],from:S.from,subject:S.subject,headers:S.headers??{},attachments:S.attachments.map((Q)=>({filename:Q.filename,bytes:Buffer.byteLength(Q.content)})),scheduledAt:S.scheduledAt??null,idempotencyKey:S.idempotencyKey??null,locale:q.locale??null,driver:q.driver??null,text:S.text??null};return await Bun.write(`${J}.json`,`${JSON.stringify(K,null,2)}
|
|
4
4
|
`),await Bun.write(`${J}.html`,S.html),`${J}.html`}import{jsx as JS}from"react/jsx-runtime";function dS($,S){if(typeof $.driverFor!=="function")throw Error(`Can't send through mail driver "${S}": the bound MailManager has no \`driverFor\`.`);return $.driverFor(S)}class YS{from="";to=[];subject="No Subject";cc=[];bcc=[];attachments=[];template;headers={};replyTo;driver;static async send($){let S=new this,q=y(KS).defaultLocale,J=y(VS),{to:K=S.to,from:Q=S.from,subject:Z=typeof S.subject==="string"?S.subject:S.subject[$.locale||q],cc:V=S.cc,bcc:Y=S.bcc,attachments:G=S.attachments,replyTo:E=S.replyTo,data:w,headers:ZS={}}=$,L=$.driver??S.driver,f=L===void 0?void 0:dS(J,L),GS={...J.headers??{},...S.headers??{},...ZS??{}},b=process.env.EMAIL_DEBUG==="true",N=b?"debug":(f??J.driver)?.provider??"custom",u=await J.filterRecipients(K);if(!u.length)return{id:null,provider:N,status:"skipped"};let[HS,XS]=await Promise.all([S.render({...w,locale:$.locale}),S.renderText({...w,locale:$.locale})]),g={bcc:Y,cc:V,from:Q,subject:Z,to:u,...E?.length?{replyTo:E}:{},attachments:G,html:HS,headers:GS,text:XS,scheduledAt:$.scheduledAt,idempotencyKey:$.idempotencyKey};if(b){let RS=await $S(`${process.env.ROOT_DIR}/.debug/emails`,g,{locale:$.locale,driver:L});if(process.env.CI!=="true"&&process.env.EMAIL_DEBUG_OPEN!=="false")await SS(RS);return{id:`debug_${crypto.randomUUID()}`,provider:N,status:"debug"}}let M=await QS(f??J,g);return M.ok?{id:M.id,provider:N,status:"sent"}:{id:M.id,provider:N,status:"failed",error:M.error}}static async preview($){return await new this().render({...$.data,locale:$.locale})}async render($){let S=this.template;return await qS(JS(S,{...$}))}async renderText($){let S=this.template;return await qS(JS(S,{...$}),{plainText:!0})}}export{YS as Email};
|
|
5
5
|
|
package/dist/facades/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Hf as p,Tg as v,Xf as q,ef as a,gg as r,hf as c,hg as s,if as e,ig as t,jf as f,jg as u,kf as h,lf as i,mf as j,tf as k,uf as l,vf as m,wf as n,xf as o}from"../chunk-
|
|
2
|
+
import{Hf as p,Tg as v,Xf as q,ef as a,gg as r,hf as c,hg as s,if as e,ig as t,jf as f,jg as u,kf as h,lf as i,mf as j,tf as k,uf as l,vf as m,wf as n,xf as o}from"../chunk-e3bwytc2.js";import"../chunk-ewknbs3b.js";import"../chunk-bxxd1awv.js";import{$i as d,Ai as b,dj as g}from"../chunk-j43hftgw.js";import"../chunk-vpqzzrkn.js";import"../chunk-b2n74m40.js";import"../chunk-zmj4fj4n.js";import"../chunk-sw7c95nh.js";import"../chunk-sg78cmd1.js";import"../chunk-yxge0cem.js";import"../chunk-mddazdpt.js";import"../chunk-bcfcwbp4.js";import"../chunk-64hxqsqx.js";import"../chunk-t0qs2q9j.js";import"../chunk-agc5bqdt.js";import"../chunk-t4z6rkvw.js";import"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-by0afyps.js";import"../chunk-xhky6kyf.js";import"../chunk-65r1ne8r.js";import"../chunk-y0gaw9ez.js";import"../chunk-0a5png2z.js";export{f as Url,d as Storage,r as Runs,j as Redis,a as Redirect,l as RateLimiter,e as Query,h as Meta,g as Log,m as Lock,c as Lang,s as Features,b as Facade,u as DB,n as Crypt,i as Cookie,o as Connections,t as ConnectionQueries,p as ChangeFeed,k as Cache,q as Broadcast,v as Auth};
|
|
3
3
|
|
|
4
4
|
//# debugId=BC6A5789C98D648264756E2164756E21
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { Container } from "../container/Container";
|
|
2
2
|
import { Repository } from "../support/Repository";
|
|
3
|
-
import type { ServiceProvider } from "../support/ServiceProvider";
|
|
3
|
+
import type { ProviderShutdownResult, ServiceProvider } from "../support/ServiceProvider";
|
|
4
|
+
/**
|
|
5
|
+
* Something besides a provider that `Application.shutdown()` runs: the app's
|
|
6
|
+
* `Service`s (#1210), which the Kernel hands over with `setShutdownHooks`.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type ShutdownHook = {
|
|
10
|
+
/** How the logs name it: `Search.onShutdown`, `QueueServiceProvider.shutdown`. */
|
|
11
|
+
name: string;
|
|
12
|
+
shutdown(options: {
|
|
13
|
+
timeoutMs: number;
|
|
14
|
+
}): ProviderShutdownResult | Promise<ProviderShutdownResult>;
|
|
15
|
+
};
|
|
4
16
|
export type ServiceProviderConstructor = new (app: Application) => ServiceProvider;
|
|
5
17
|
/**
|
|
6
18
|
* What `Application.shutdown()` could not finish, by provider class name. Both
|
|
@@ -29,6 +41,7 @@ export declare class Application extends Container {
|
|
|
29
41
|
*/
|
|
30
42
|
readonly config: Repository;
|
|
31
43
|
private providers;
|
|
44
|
+
private services;
|
|
32
45
|
private booted;
|
|
33
46
|
constructor(config?: Repository);
|
|
34
47
|
private static currentInstance;
|
|
@@ -41,6 +54,11 @@ export declare class Application extends Container {
|
|
|
41
54
|
*/
|
|
42
55
|
register(Provider: ServiceProviderConstructor): ServiceProvider;
|
|
43
56
|
registerMany(providers: ServiceProviderConstructor[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* The app's services, in `services` order, whose `shutdown()` runs before
|
|
59
|
+
* the providers'. Set by the Kernel. @internal
|
|
60
|
+
*/
|
|
61
|
+
setShutdownHooks(services: ShutdownHook[]): void;
|
|
44
62
|
getProviders(): ServiceProvider[];
|
|
45
63
|
isBooted(): boolean;
|
|
46
64
|
/**
|
|
@@ -49,8 +67,10 @@ export declare class Application extends Container {
|
|
|
49
67
|
*/
|
|
50
68
|
boot(): Promise<void>;
|
|
51
69
|
/**
|
|
52
|
-
* Runs every
|
|
53
|
-
*
|
|
70
|
+
* Runs every app service's `onShutdown()` (reverse `services` order), then
|
|
71
|
+
* every provider's, in reverse registration order, and
|
|
72
|
+
* resolves with what did not finish cleanly. Services go first because they
|
|
73
|
+
* boot last and may use any provider. Never rejects: this runs on the
|
|
54
74
|
* way out of a process, and a throw here would skip the providers after the
|
|
55
75
|
* one that threw — the database pool closing is exactly the kind of thing
|
|
56
76
|
* that must not depend on the mail provider behaving.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../../foundation/Application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BA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AS;IAK/C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,GAAG,eAAe;IAY/D,YAAY,CAAC,SAAS,EAAE,0BAA0B,EAAE;IAMpD;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE;IAIzC,YAAY,IAAI,eAAe,EAAE;IAIjC,QAAQ,IAAI,OAAO;IAInB;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAU3B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,QAAQ,CAAC,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,cAAc,CAAC;IAKvE,OAAO,CAAC,eAAe,CAAsC;YAE/C,iBAAiB;IAgF/B,KAAK;CAQN"}
|
package/dist/foundation/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Al as o,Bl as r}from"../chunk-
|
|
2
|
+
import{Al as o,Bl as r}from"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-0a5png2z.js";export{r as app,o as Application};
|
|
3
3
|
|
|
4
4
|
//# debugId=A0F5F9AC5C81092164756E2164756E21
|
package/dist/http/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$g as fa,Ae as H,Be as I,Ug as aa,Vg as ba,Wg as ca,Zg as da,_g as ea,ah as ga,bh as ha,cf as J,ch as ia,df as K,dh as ja,eh as ka,ff as L,fh as la,gf as M,gh as ma,hh as na,ih as oa,jh as pa,kh as qa,lh as ra,me as t,mh as sa,ne as u,nh as ta,oe as v,oh as ua,pe as w,qe as x,re as E,rg as $,we as F,ze as G}from"../chunk-
|
|
2
|
+
import{$g as fa,Ae as H,Be as I,Ug as aa,Vg as ba,Wg as ca,Zg as da,_g as ea,ah as ga,bh as ha,cf as J,ch as ia,df as K,dh as ja,eh as ka,ff as L,fh as la,gf as M,gh as ma,hh as na,ih as oa,jh as pa,kh as qa,lh as ra,me as t,mh as sa,ne as u,nh as ta,oe as v,oh as ua,pe as w,qe as x,re as E,rg as $,we as F,ze as G}from"../chunk-e3bwytc2.js";import"../chunk-ewknbs3b.js";import"../chunk-bxxd1awv.js";import{Ki as N,Li as O,Mi as P,Ni as Q,Oh as a,Oi as R,Ph as b,Pi as S,Qh as d,Qi as T,Ri as U,Si as V,Ti as W,Ui as X,Vh as e,Wh as f,Wi as Y,Xh as g,Xi as Z,Yh as h,Yi as _,Zh as i,_h as j,bi as n,gi as o,hi as p,ii as q,ji as r,si as s,ui as y,vi as z,wi as A,xi as B,yi as C,zi as D}from"../chunk-j43hftgw.js";import{mj as c}from"../chunk-vpqzzrkn.js";import{rj as k,sj as l,tj as m}from"../chunk-b2n74m40.js";import"../chunk-zmj4fj4n.js";import"../chunk-sw7c95nh.js";import"../chunk-sg78cmd1.js";import"../chunk-yxge0cem.js";import"../chunk-mddazdpt.js";import"../chunk-bcfcwbp4.js";import"../chunk-64hxqsqx.js";import"../chunk-t0qs2q9j.js";import"../chunk-agc5bqdt.js";import"../chunk-t4z6rkvw.js";import"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-by0afyps.js";import"../chunk-xhky6kyf.js";import"../chunk-65r1ne8r.js";import"../chunk-y0gaw9ez.js";import"../chunk-0a5png2z.js";export{g as toRangeHeaderValue,v as toMiddlewareList,k as stateKey,_ as safeFetch,f as resolveRange,e as parseRangeHeader,h as parseContentRange,r as parseByteSize,ia as middlewareConfigDefaults,u as httpError,d as getCookies,j as formatUnsatisfiedContentRange,i as formatContentRange,qa as defineResourcePolicy,ha as defineMiddlewareConfig,n as cspNonce,w as createUnsatisfiableResponse,x as createStreamResponse,L as createFileResponse,I as clientIp,Y as classifyAddress,ca as authorizeChannel,M as ViewRouter,o as ValidationError,V as TooManyRedirectsError,T as TooLargeError,S as TimeoutError,ra as SitemapError,sa as Sitemap,K as SameSiteBounceMiddleware,Z as SafeResponse,N as SafeFetchError,J as SAME_SITE_BOUNCE_PARAM,ta as RobotsTxt,ua as Robots,pa as ResourcePolicy,b as ResourceController,m as RequestState,c as RequestBreakerError,H as RateLimitMiddleware,F as RateLimitExceededError,A as RangeNotSatisfiableError,na as PoliciesServiceProvider,oa as Policies,q as PayloadTooLargeError,B as NotFoundError,W as NetworkError,l as MissingRequestStateError,G as Middleware,fa as McpToolDeclaration,ga as McpRouter,ea as McpRouteDeclaration,da as McpModelParam,p as InvalidValidationRuleError,O as InvalidUrlError,z as InsufficientPermissionsError,X as HttpStatusError,t as HttpResponse,s as HttpRequest,C as FileNotFoundError,R as DnsError,la as CorsMiddleware,a as Controller,U as ContentTypeError,ba as ChannelRouter,aa as ChannelDeclaration,ka as CacheMiddleware,ma as CSRFMiddleware,$ as BodyLimitMiddleware,P as BlockedHostError,Q as BlockedAddressError,y as AuthorizationError,ja as AuthenticationMiddleware,D as AuthenticationError,E as ApiRouter};
|
|
3
3
|
|
|
4
4
|
//# debugId=5345877D38C9FBAD64756E2164756E21
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{da as y,ea as p}from"../chunk-drqv10sv.js";import{va as c,wa as d,ya as l}from"../chunk-mvd4mc8p.js";import{dl as e,el as i,gl as t,hl as r,il as o,jl as n,kl as a,ll as s}from"../chunk-agc5bqdt.js";import"../chunk-
|
|
2
|
+
import{da as y,ea as p}from"../chunk-drqv10sv.js";import{va as c,wa as d,ya as l}from"../chunk-mvd4mc8p.js";import{dl as e,el as i,gl as t,hl as r,il as o,jl as n,kl as a,ll as s}from"../chunk-agc5bqdt.js";import"../chunk-0a5png2z.js";export{o as setActiveLocale,r as seedDictionaries,t as preloadDictionaries,d as localeStrings,i as loadDictionary,n as getActiveLocale,e as dictionaryRegistrationMark,c as dictionaryLocales,l as dictionaryId,y as defineDictionary,s as createDictionarySink,a as __resetDictionaryRegistry,p as __gemi_dict__};
|
|
3
3
|
|
|
4
4
|
//# debugId=9646CD4BADDD0E3764756E2164756E21
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{da as T}from"../chunk-drqv10sv.js";import"../chunk-mvd4mc8p.js";import{bb as D}from"../chunk-ccpp45dm.js";import{je as b,ke as w}from"../chunk-mzqhn72h.js";import"../chunk-vqq0z746.js";import{hf as j}from"../chunk-
|
|
2
|
+
import{da as T}from"../chunk-drqv10sv.js";import"../chunk-mvd4mc8p.js";import{bb as D}from"../chunk-ccpp45dm.js";import{je as b,ke as w}from"../chunk-mzqhn72h.js";import"../chunk-vqq0z746.js";import{hf as j}from"../chunk-e3bwytc2.js";import"../chunk-ewknbs3b.js";import"../chunk-bxxd1awv.js";import"../chunk-j43hftgw.js";import"../chunk-vpqzzrkn.js";import"../chunk-b2n74m40.js";import"../chunk-zmj4fj4n.js";import"../chunk-sw7c95nh.js";import"../chunk-sg78cmd1.js";import"../chunk-yxge0cem.js";import"../chunk-mddazdpt.js";import"../chunk-bcfcwbp4.js";import"../chunk-64hxqsqx.js";import"../chunk-t0qs2q9j.js";import"../chunk-agc5bqdt.js";import{sl as V,tl as X,ul as E,vl as L,wl as R,xl as S}from"../chunk-t4z6rkvw.js";import"../chunk-wxcbfqkd.js";import"../chunk-ha4er085.js";import"../chunk-by0afyps.js";import"../chunk-xhky6kyf.js";import"../chunk-65r1ne8r.js";import"../chunk-y0gaw9ez.js";import"../chunk-0a5png2z.js";import{createElement as J,Fragment as M,isValidElement as U}from"react";function $(q,B){let G=Object.values(B).some((z)=>typeof z==="function"&&U(z(""))),Q=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!G)return q.replace(Q,(W,O,_,Z)=>{let C=O.includes(":")?O.split(":")[0]:O,H=B[C];if(H===void 0)return W;if(typeof H==="function"){let K=H(Z!==void 0?Z:"");if(U(K))throw Error("JSX returned in string context");return String(K)}if(_)switch(_.toLowerCase()){case"number":return Number(H).toString();case"string":return String(H);case"boolean":return Boolean(H).toString();default:return String(H)}return String(H)});else{let z=[],W=0,O=null;while((O=Q.exec(q))!==null){let[_,Z,C,H]=O,F=O.index,K=Z.includes(":")?Z.split(":")[0]:Z;if(F>W)z.push(q.substring(W,F));let Y=B[K];if(Y===void 0)z.push(_);else if(typeof Y==="function"){let A=Y(H!==void 0?H:"");z.push(A)}else if(C)switch(C.toLowerCase()){case"number":z.push(Number(Y).toString());break;case"string":z.push(String(Y));break;case"boolean":z.push(Boolean(Y).toString());break;default:z.push(String(Y))}else z.push(String(Y));W=F+_.length}if(W<q.length)z.push(q.substring(W));return J(M,{},...z)}}class P{name;dictionary;constructor(q,B){this.name=q;this.dictionary=B}reference(q){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[q])throw Error(`Translation not found for ${String(q)}`);return this.dictionary[q]}render(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[q]?.[G])throw Error(`Translation not found for ${String(q)} in ${String(G)}`);return $(this.dictionary[q][G],Q??{})}static create(q,B){return new P(q,B)}static text(q,...B){let{locale:G=j.locale(),params:Q}={params:{},...B?.[0]};if(!q?.[G])throw Error(`Translation not found for ${String(G)}`);return $(q[G],Q??{})}}async function N(q,B,...G){let{locale:Q=j.locale(),params:z}={params:{},...G[0]},O=(await q.load(String(Q)))[B];if(typeof O!=="string")throw Error(`Translation not found for "${B}" in "${String(Q)}" (dictionary ${q.id})`);return $(O,z??{})}export{w as translationConfigDefaults,N as translate,V as resolveLocale,X as negotiateLocale,L as isValidTimeZone,b as defineTranslationConfig,T as defineDictionary,R as createFormatter,S as Translator,D as TranslationServiceProvider,P as Dictionary,E as DEFAULT_TIME_ZONE};
|
|
3
3
|
|
|
4
4
|
//# debugId=1B1318582694240064756E2164756E21
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kernel.d.ts","sourceRoot":"","sources":["../../kernel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