@cartanova/qgrid-cli 1.5.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bundle/dist/application/qgrid/oauth.js +1 -1
  2. package/bundle/dist/application/qgrid/qgrid.dispatcher.js +166 -0
  3. package/bundle/dist/application/qgrid/qgrid.frame.js +28 -36
  4. package/bundle/dist/application/qgrid/qgrid.types.js +5 -16
  5. package/bundle/dist/application/queries.generated.js +1 -1
  6. package/bundle/dist/application/sonamu.generated.js +1 -1
  7. package/bundle/dist/application/sonamu.generated.sso.js +1 -1
  8. package/bundle/dist/sonamu.config.js +6 -9
  9. package/bundle/src/application/qgrid/oauth.ts +1 -1
  10. package/bundle/src/application/qgrid/qgrid.dispatcher.ts +184 -0
  11. package/bundle/src/application/qgrid/qgrid.frame.ts +28 -50
  12. package/bundle/src/application/qgrid/qgrid.types.ts +2 -14
  13. package/bundle/src/application/queries.generated.ts +1 -0
  14. package/bundle/src/application/sonamu.generated.http +2 -1
  15. package/bundle/src/application/sonamu.generated.sso.ts +6 -5
  16. package/bundle/src/application/sonamu.generated.ts +1 -0
  17. package/bundle/src/sonamu.config.ts +4 -7
  18. package/bundle/web-dist/client/assets/index-BRZCFaFz.css +1 -0
  19. package/bundle/web-dist/client/assets/index-D8eEjsZj.js +78 -0
  20. package/bundle/web-dist/client/assets/{logs-CQDBOCud.js → logs-CKnJzuH6.js} +1 -1
  21. package/bundle/web-dist/client/assets/{routes-MR1DKizN.js → routes-DQKecVGa.js} +1 -1
  22. package/bundle/web-dist/client/assets/sd.generated-NHYHS_-0.js +47 -0
  23. package/bundle/web-dist/client/assets/services.generated-DDVXMid7.js +1 -0
  24. package/bundle/web-dist/client/assets/{show--z3WxDb0.js → show-D2z1qxJ5.js} +1 -1
  25. package/bundle/web-dist/client/assets/tokens-BaywaQkm.js +1 -0
  26. package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +1 -0
  27. package/bundle/web-dist/client/index.html +4 -4
  28. package/bundle/web-dist/server/assets/{copy-GKsNP-2_.js → copy-BVWDOV2T.js} +1 -1
  29. package/bundle/web-dist/server/assets/{lazyRouteComponent-B78WDGgM.js → lazyRouteComponent-BJmwxFyJ.js} +2 -128
  30. package/bundle/web-dist/server/assets/{logs-BV6gEe15.js → logs-DgIbufNf.js} +4 -4
  31. package/bundle/web-dist/server/assets/{routes-B5FkWLUe.js → routes-x7-hqUm0.js} +3 -3
  32. package/bundle/web-dist/server/assets/{sd.generated-Mnbmi4YR.js → sd.generated-BZPIp4uL.js} +122 -1
  33. package/bundle/web-dist/server/assets/{services.generated-DjdxFvCg.js → services.generated-BA0gbdmd.js} +134 -20
  34. package/bundle/web-dist/server/assets/shim-DGrmZkac.js +129 -0
  35. package/bundle/web-dist/server/assets/{show-BqSxVXai.js → show-Bk3NayMH.js} +4 -4
  36. package/bundle/web-dist/server/assets/{tokens-BGaTdsEb.js → tokens-CVSwt0x0.js} +13 -24
  37. package/bundle/web-dist/server/entry-server.generated.js +19679 -17705
  38. package/package.json +2 -2
  39. package/bundle/dist/application/qgrid/pool.js +0 -128
  40. package/bundle/dist/application/qgrid/worker.js +0 -189
  41. package/bundle/src/application/qgrid/pool.ts +0 -165
  42. package/bundle/src/application/qgrid/worker.ts +0 -240
  43. package/bundle/web-dist/client/assets/index-DLrkHIo2.js +0 -116
  44. package/bundle/web-dist/client/assets/index-kQRqXaWM.css +0 -1
  45. package/bundle/web-dist/client/assets/sd.generated-DXtkTTGn.js +0 -47
  46. package/bundle/web-dist/client/assets/services.generated-C0OpNm5q.js +0 -1
  47. package/bundle/web-dist/client/assets/tokens-Bch6XO9K.js +0 -1
  48. package/bundle/web-dist/client/assets/vendor-tanstack-CUxlo6YN.js +0 -1
  49. /package/bundle/web-dist/server/assets/{cost-D0Ta7MJa.js → cost-DdHTzQDR.js} +0 -0
@@ -0,0 +1,129 @@
1
+ import { D as require_react, rt as __commonJSMin } from "./sd.generated-BZPIp4uL.js";
2
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
13
+ var React = require_react();
14
+ function is(x, y) {
15
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
16
+ }
17
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
18
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
19
+ var value = getSnapshot(), _useState = useState({ inst: {
20
+ value,
21
+ getSnapshot
22
+ } }), inst = _useState[0].inst, forceUpdate = _useState[1];
23
+ useLayoutEffect(function() {
24
+ inst.value = value;
25
+ inst.getSnapshot = getSnapshot;
26
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
27
+ }, [
28
+ subscribe,
29
+ value,
30
+ getSnapshot
31
+ ]);
32
+ useEffect(function() {
33
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
34
+ return subscribe(function() {
35
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
36
+ });
37
+ }, [subscribe]);
38
+ useDebugValue(value);
39
+ return value;
40
+ }
41
+ function checkIfSnapshotChanged(inst) {
42
+ var latestGetSnapshot = inst.getSnapshot;
43
+ inst = inst.value;
44
+ try {
45
+ var nextValue = latestGetSnapshot();
46
+ return !objectIs(inst, nextValue);
47
+ } catch (error) {
48
+ return !0;
49
+ }
50
+ }
51
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
52
+ return getSnapshot();
53
+ }
54
+ var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
55
+ exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
56
+ }));
57
+ //#endregion
58
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
59
+ /**
60
+ * @license React
61
+ * use-sync-external-store-shim.development.js
62
+ *
63
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
64
+ *
65
+ * This source code is licensed under the MIT license found in the
66
+ * LICENSE file in the root directory of this source tree.
67
+ */
68
+ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
69
+ "production" !== process.env.NODE_ENV && (function() {
70
+ function is(x, y) {
71
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
72
+ }
73
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
74
+ didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
75
+ var value = getSnapshot();
76
+ if (!didWarnUncachedGetSnapshot) {
77
+ var cachedValue = getSnapshot();
78
+ objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
79
+ }
80
+ cachedValue = useState({ inst: {
81
+ value,
82
+ getSnapshot
83
+ } });
84
+ var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
85
+ useLayoutEffect(function() {
86
+ inst.value = value;
87
+ inst.getSnapshot = getSnapshot;
88
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
89
+ }, [
90
+ subscribe,
91
+ value,
92
+ getSnapshot
93
+ ]);
94
+ useEffect(function() {
95
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
96
+ return subscribe(function() {
97
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
98
+ });
99
+ }, [subscribe]);
100
+ useDebugValue(value);
101
+ return value;
102
+ }
103
+ function checkIfSnapshotChanged(inst) {
104
+ var latestGetSnapshot = inst.getSnapshot;
105
+ inst = inst.value;
106
+ try {
107
+ var nextValue = latestGetSnapshot();
108
+ return !objectIs(inst, nextValue);
109
+ } catch (error) {
110
+ return !0;
111
+ }
112
+ }
113
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
114
+ return getSnapshot();
115
+ }
116
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
117
+ var React = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
118
+ exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
119
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
120
+ })();
121
+ }));
122
+ //#endregion
123
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/shim/index.js
124
+ var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
125
+ if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production();
126
+ else module.exports = require_use_sync_external_store_shim_development();
127
+ }));
128
+ //#endregion
129
+ export { require_shim as t };
@@ -1,8 +1,8 @@
1
- import { $ as __commonJSMin, S as require_react, et as __exportAll, nt as __toESM, x as require_jsx_runtime } from "./sd.generated-Mnbmi4YR.js";
2
- import { n as RequestLogService } from "./services.generated-DjdxFvCg.js";
3
- import { a as Link } from "./lazyRouteComponent-B78WDGgM.js";
1
+ import { D as require_react, E as require_jsx_runtime, it as __exportAll, ot as __toESM, rt as __commonJSMin } from "./sd.generated-BZPIp4uL.js";
2
+ import { n as RequestLogService } from "./services.generated-BA0gbdmd.js";
3
+ import { a as Link } from "./lazyRouteComponent-BJmwxFyJ.js";
4
4
  import { t as Route } from "../entry-server.generated.js";
5
- import { n as lucideCheck, t as lucideCopy } from "./copy-GKsNP-2_.js";
5
+ import { n as lucideCheck, t as lucideCopy } from "./copy-BVWDOV2T.js";
6
6
  import minpath from "node:path";
7
7
  import minproc from "node:process";
8
8
  import { fileURLToPath as urlToPath } from "node:url";
@@ -1,7 +1,7 @@
1
- import { S as require_react, b as useQueryClient, c as array, d as custom, f as date, g as string, h as object, i as SonamuQueryMode, l as bigint, m as number, nt as __toESM, o as zArrayable, p as int, s as _enum, u as boolean, x as require_jsx_runtime } from "./sd.generated-Mnbmi4YR.js";
2
- import { r as TokenService, t as QgridService } from "./services.generated-DjdxFvCg.js";
3
- import { a as lucideKeyRound, i as mn, r as m5 } from "../entry-server.generated.js";
4
- import { n as lucideCheck, t as lucideCopy } from "./copy-GKsNP-2_.js";
1
+ import { D as require_react, E as require_jsx_runtime, T as useQueryClient, _ as date, b as object, c as zArrayable, g as custom, h as boolean, i as SonamuQueryMode, m as bigint, ot as __toESM, p as _enum, v as int, x as string, y as number } from "./sd.generated-BZPIp4uL.js";
2
+ import { r as TokenService, t as QgridService } from "./services.generated-BA0gbdmd.js";
3
+ import { a as lucideKeyRound, i as ro, r as Q } from "../entry-server.generated.js";
4
+ import { n as lucideCheck, t as lucideCopy } from "./copy-BVWDOV2T.js";
5
5
  //#region ~icons/lucide/eye.jsx
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react());
7
7
  var import_jsx_runtime = require_jsx_runtime();
@@ -164,7 +164,7 @@ function AddTokenModal() {
164
164
  const [open, setOpen] = (0, import_react.useState)(false);
165
165
  const [showToken, setShowToken] = (0, import_react.useState)(false);
166
166
  const [oauthLoading, setOauthLoading] = (0, import_react.useState)(false);
167
- const { form, register, reset } = m5(TokenSaveParams, {
167
+ const { form, register, reset } = ro(TokenSaveParams, {
168
168
  name: "",
169
169
  token: "",
170
170
  refresh_token: ""
@@ -226,7 +226,7 @@ function AddTokenModal() {
226
226
  htmlFor: "token-name",
227
227
  className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
228
228
  children: "Name *"
229
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(mn, {
229
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
230
230
  ...register("name"),
231
231
  placeholder: "e.g. your-token-name",
232
232
  className: "mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300"
@@ -258,7 +258,7 @@ function AddTokenModal() {
258
258
  children: "Access Token"
259
259
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
260
260
  className: "relative mt-1",
261
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(mn, {
261
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
262
262
  type: showToken ? "text" : "password",
263
263
  ...register("token"),
264
264
  placeholder: "sk-ant-oat01-...",
@@ -283,7 +283,7 @@ function AddTokenModal() {
283
283
  })
284
284
  ]
285
285
  }),
286
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(mn, {
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
287
287
  type: "password",
288
288
  ...register("refresh_token"),
289
289
  placeholder: "sk-ant-ort01-...",
@@ -350,10 +350,12 @@ var lucideTrash2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg",
350
350
  object({
351
351
  system: string().optional(),
352
352
  prompt: string(),
353
+ model: string().optional(),
353
354
  timeout: number().optional()
354
355
  });
355
356
  object({
356
357
  text: string(),
358
+ tokenName: string().optional(),
357
359
  usage: object({
358
360
  input_tokens: number(),
359
361
  output_tokens: number(),
@@ -363,17 +365,6 @@ object({
363
365
  durationMs: number(),
364
366
  costUsd: number()
365
367
  });
366
- object({
367
- tokens: array(object({
368
- token: string(),
369
- name: string()
370
- })),
371
- size: number().optional(),
372
- model: string().optional(),
373
- timeout: number().optional(),
374
- cwd: string().optional(),
375
- maxCalls: number().optional()
376
- });
377
368
  object({
378
369
  token: string(),
379
370
  name: string()
@@ -382,8 +373,7 @@ object({ token: string() });
382
373
  object({
383
374
  token: string(),
384
375
  name: string(),
385
- requests: number(),
386
- active: boolean()
376
+ requests: number()
387
377
  });
388
378
  object({ authUrl: string() });
389
379
  var RateLimit = object({
@@ -407,7 +397,6 @@ object({
407
397
  });
408
398
  object({
409
399
  status: string(),
410
- workers: number(),
411
400
  activeTokens: number()
412
401
  });
413
402
  function maskToken(token) {
@@ -444,7 +433,7 @@ function TokenTable({ data, isLoading }) {
444
433
  const [showRefreshToken, setShowRefreshToken] = (0, import_react.useState)(false);
445
434
  const [copiedToken, setCopiedToken] = (0, import_react.useState)(false);
446
435
  const [copiedRefreshToken, setCopiedRefreshToken] = (0, import_react.useState)(false);
447
- const { form, setForm, register } = m5(TokenSaveParams, {
436
+ const { form, setForm, register } = ro(TokenSaveParams, {
448
437
  name: "",
449
438
  token: "",
450
439
  active: true
@@ -632,7 +621,7 @@ function TokenTable({ data, isLoading }) {
632
621
  htmlFor: "token-name",
633
622
  className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
634
623
  children: "Name"
635
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(mn, {
624
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Q, {
636
625
  ...register("name"),
637
626
  placeholder: "e.g. prod, dev, team-a",
638
627
  className: "mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300"