gomtm 0.0.207 → 0.0.220

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 (45) hide show
  1. package/dist/esm/cli/build.d.ts +2 -0
  2. package/dist/esm/cli/build.js +60 -0
  3. package/dist/esm/cli/deployMtWorker.d.ts +2 -0
  4. package/dist/esm/cli/deployMtWorker.js +19 -0
  5. package/dist/esm/cli/deploy_cf_worker.d.ts +2 -0
  6. package/dist/esm/cli/deploy_cf_worker.js +70 -0
  7. package/dist/esm/cli/deploy_mtxcli.d.ts +2 -0
  8. package/dist/esm/cli/deploy_mtxcli.js +55 -0
  9. package/dist/esm/cli/deploy_mtxedge.d.ts +2 -0
  10. package/dist/esm/cli/deploy_mtxedge.js +55 -0
  11. package/dist/esm/cli/deploy_mtxui.d.ts +2 -0
  12. package/dist/esm/cli/deploy_mtxui.js +45 -0
  13. package/dist/esm/cli/up_cf1.d.ts +2 -0
  14. package/dist/esm/cli/up_cf1.js +29 -0
  15. package/dist/esm/cli/vc_mtxedge.d.ts +2 -0
  16. package/dist/esm/cli/vc_mtxedge.js +44 -0
  17. package/dist/esm/curd/CommonListViewV2.js +15 -5
  18. package/dist/esm/curd/create/CurdCreatePanel.d.ts +6 -0
  19. package/dist/esm/curd/create/CurdCreatePanel.js +23 -0
  20. package/dist/esm/curd/dlg/DlgCurdDebugInfo.d.ts +1 -1
  21. package/dist/esm/curd/dlg/DlgCurdDebugInfo.js +5 -0
  22. package/dist/esm/curd/edit/CurdEditPanel.d.ts +6 -0
  23. package/dist/esm/curd/edit/CurdEditPanel.js +23 -0
  24. package/dist/esm/curd/list-item/ListLayout.d.ts +1 -2
  25. package/dist/esm/form/SchemaFormView.d.ts +4 -4
  26. package/dist/esm/main.d.ts +2 -0
  27. package/dist/esm/main.js +34 -0
  28. package/dist/esm/providers/GomtmProvider.js +1 -1
  29. package/dist/esm/providers/logger.context.d.ts +2 -0
  30. package/dist/esm/store/gomtm.atom.d.ts +4 -0
  31. package/dist/esm/store/gomtm.atom.js +12 -0
  32. package/dist/esm/utils.d.ts +1 -0
  33. package/dist/esm/utils.js +5 -0
  34. package/dist/esm/validations/auth.d.ts +2 -2
  35. package/dist/esm/validations/env.d.ts +2 -2
  36. package/dist/esm/validations/spContentModi.d.ts +8 -8
  37. package/dist/esm/validations/spRoute.d.ts +6 -6
  38. package/dist/esm/validations/user.d.ts +6 -6
  39. package/dist/tsconfig.type.tsbuildinfo +1 -1
  40. package/package.json +9 -4
  41. package/dist/esm/curd/CurdAtomsDebug.d.ts +0 -2
  42. package/dist/esm/curd/CurdAtomsDebug.js +0 -13
  43. package/dist/esm/curd/dlg/DlgDebugInfo.d.ts +0 -4
  44. package/dist/esm/curd/dlg/DlgDebugInfo.js +0 -21
  45. package/dist/gomtm +0 -0
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerCommandTurboBuild(program: Command): void;
@@ -0,0 +1,60 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { exec } from "mtxlib/exec";
22
+ import { isInVercel, sleep } from "mtxlib/utils";
23
+ import { resolve } from "path";
24
+ function registerCommandTurboBuild(program) {
25
+ program.command("build").action(() => {
26
+ (() => __async(this, null, function* () {
27
+ if (isInVercel()) {
28
+ console.log("\u63D0\u793A: \u6784\u5EFA\u73AF\u5883\u5904\u4E8E vercel");
29
+ }
30
+ yield exec(`npx turbo run build`);
31
+ const projectRoot = resolve("../..");
32
+ console.log("projectRoot", projectRoot);
33
+ yield exec(`npx turbo run build`);
34
+ const packagesVersionPatch = [
35
+ "packages/mtxlib",
36
+ "packages/mtxuilib",
37
+ "apps/gomtm",
38
+ // "packages/mtxdb",
39
+ // "packages/mtwebworker",
40
+ "apps/mtxui",
41
+ "apps/mtxedge"
42
+ // "apps/mtxcli",
43
+ ];
44
+ yield exec(`(git commit -a -m "release" || true)`);
45
+ for (const p of packagesVersionPatch) {
46
+ console.log("\u66F4\u65B0\u7248\u672C\u53F7", p);
47
+ yield exec(`pnpm version patch`, {
48
+ cwd: resolve(projectRoot, p)
49
+ });
50
+ }
51
+ yield sleep(4e3);
52
+ yield exec(`pnpm run release`, {
53
+ cwd: resolve(projectRoot)
54
+ });
55
+ }))();
56
+ });
57
+ }
58
+ export {
59
+ registerCommandTurboBuild
60
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdDeployMtworker(program: Command): void;
@@ -0,0 +1,19 @@
1
+ import { exec } from "mtxlib/exec";
2
+ import { resolve } from "path";
3
+ import { projectRoot } from "../utils";
4
+ function cmdDeployMtworker(program) {
5
+ program.command("deploy_mtworker").action(() => {
6
+ const vercelToken = process.env.VERCEL_TOKEN;
7
+ console.log("vercelToken", vercelToken);
8
+ const projectName = "mtworker";
9
+ exec(`npx vercel link --yes --project=${projectName} --token=${vercelToken}`, {
10
+ cwd: resolve(projectRoot, "apps/mtworker")
11
+ });
12
+ exec(`npx vercel deploy --yes --local-config vercel.json --prod --token="${vercelToken}"`, {
13
+ cwd: resolve(projectRoot, "apps/mtworker")
14
+ });
15
+ });
16
+ }
17
+ export {
18
+ cmdDeployMtworker
19
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdDpCfworker(program: Command): void;
@@ -0,0 +1,70 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { build } from "esbuild";
22
+ import { exec } from "mtxlib/exec";
23
+ import { join, resolve } from "path";
24
+ function cmdDpCfworker(program) {
25
+ program.command("dp_cfworker").action(() => {
26
+ (() => __async(this, null, function* () {
27
+ const projectRoot = resolve("../..");
28
+ const projectDir = join(projectRoot, "apps/mtxui");
29
+ const vercelToken = process.env.VERCEL_TOKEN;
30
+ const CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
31
+ const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
32
+ console.log("info", {
33
+ vercelToken,
34
+ CLOUDFLARE_ACCOUNT_ID,
35
+ CLOUDFLARE_API_TOKEN
36
+ });
37
+ yield build({
38
+ logLevel: "info",
39
+ entryPoints: [join(projectDir, "./src/mtxsp/cfworker.ts")],
40
+ bundle: true,
41
+ outfile: join(projectDir, "dist/cfworker.mjs"),
42
+ platform: "node",
43
+ //"neutral",//'node',
44
+ target: "esnext",
45
+ sourcemap: false,
46
+ format: "esm",
47
+ //排除所有第三方模块的打包捆绑。
48
+ // packages: 'external',
49
+ external: [
50
+ // "css-what",
51
+ // 'canvas',
52
+ // 'jsdom',
53
+ // 'jquery',
54
+ // 'puppeteer/package.json',
55
+ // 'header-generator',
56
+ // '@crawlee',
57
+ // 'crawlee',
58
+ // 'esbuild',
59
+ ]
60
+ });
61
+ yield exec(`npx wrangler deploy dist/cfworker.mjs`, {
62
+ shell: true,
63
+ cwd: projectDir
64
+ });
65
+ }))();
66
+ });
67
+ }
68
+ export {
69
+ cmdDpCfworker
70
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdDpMtxcli(program: Command): void;
@@ -0,0 +1,55 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { exec } from "mtxlib/exec";
22
+ import { join, resolve } from "path";
23
+ function cmdDpMtxcli(program) {
24
+ program.command("dp_mtxcli").action(() => {
25
+ (() => __async(this, null, function* () {
26
+ const projectName = "mtxcli";
27
+ const projectRoot = resolve("../..");
28
+ const projectDir = join(projectRoot, "apps/mtxcli");
29
+ const vercelToken = process.env.VERCEL_TOKEN;
30
+ const CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
31
+ const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
32
+ console.log("info", {
33
+ projectDir,
34
+ vercelToken,
35
+ CLOUDFLARE_ACCOUNT_ID,
36
+ CLOUDFLARE_API_TOKEN
37
+ });
38
+ yield exec(`npx vercel pull --yes --token=${vercelToken}`, { shell: true, cwd: projectDir });
39
+ yield exec(`npx vercel build --prod --token=${vercelToken} --local-config vercel.json`, { shell: true, cwd: projectDir });
40
+ yield exec(`npx @cloudflare/next-on-pages@1 -s`, { shell: true, cwd: projectDir, env: process.env });
41
+ yield exec(`npx wrangler pages deploy .vercel/output/static --project-name=${projectName} --commit-dirty=true`, {
42
+ shell: true,
43
+ cwd: projectDir,
44
+ env: process.env
45
+ });
46
+ yield exec(`npx wrangler pages deployment tail --project-name=${projectName}`, {
47
+ shell: true,
48
+ cwd: projectDir
49
+ });
50
+ }))();
51
+ });
52
+ }
53
+ export {
54
+ cmdDpMtxcli
55
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdDpMtxedge(program: Command): void;
@@ -0,0 +1,55 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { exec } from "mtxlib/exec";
22
+ import { join, resolve } from "path";
23
+ function cmdDpMtxedge(program) {
24
+ program.command("dp_mtxedge").action(() => {
25
+ (() => __async(this, null, function* () {
26
+ const projectRoot = resolve("../..");
27
+ console.log("projectRoot", projectRoot);
28
+ const projectDir = join(projectRoot, "apps/mtxedge");
29
+ const cfpageProjectName = "mtxedge";
30
+ const vercelToken = process.env.VERCEL_TOKEN;
31
+ console.log("vercelToken", vercelToken);
32
+ const CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
33
+ const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
34
+ console.log("info", {
35
+ vercelToken,
36
+ CLOUDFLARE_ACCOUNT_ID,
37
+ CLOUDFLARE_API_TOKEN
38
+ });
39
+ yield exec(`npx vercel pull --yes --token=${vercelToken}`, { shell: true, cwd: projectDir });
40
+ yield exec(`npx vercel build --prod --token=${vercelToken} --local-config vercel.json`, { shell: true, cwd: projectDir });
41
+ yield exec(`npx @cloudflare/next-on-pages@1 -s`, { shell: true, cwd: projectDir, env: process.env });
42
+ yield exec(`npx wrangler pages deploy .vercel/output/static --project-name=${cfpageProjectName} --commit-dirty=true`, {
43
+ shell: true,
44
+ cwd: projectDir
45
+ });
46
+ yield exec(`npx wrangler pages deployment tail --project-name=${cfpageProjectName}`, {
47
+ shell: true,
48
+ cwd: projectDir
49
+ });
50
+ }))();
51
+ });
52
+ }
53
+ export {
54
+ cmdDpMtxedge
55
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdDpMtxui(program: Command): void;
@@ -0,0 +1,45 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { exec } from "mtxlib/exec";
22
+ import { join, resolve } from "path";
23
+ function cmdDpMtxui(program) {
24
+ program.command("dp_mtxui").action(() => {
25
+ (() => __async(this, null, function* () {
26
+ const projectName = "mtxui";
27
+ const projectRoot = resolve("../..");
28
+ const projectDir = join(projectRoot, "apps/mtxui");
29
+ const vercelToken = process.env.VERCEL_TOKEN;
30
+ const CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
31
+ const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
32
+ console.log("info", {
33
+ projectDir,
34
+ vercelToken,
35
+ CLOUDFLARE_ACCOUNT_ID,
36
+ CLOUDFLARE_API_TOKEN
37
+ });
38
+ yield exec(`npx vercel pull --yes --token=${vercelToken}`, { shell: true, cwd: projectDir });
39
+ yield exec(`npx vercel deploy --prod --token=${vercelToken} --local-config vercel.json`, { shell: true, cwd: projectDir });
40
+ }))();
41
+ });
42
+ }
43
+ export {
44
+ cmdDpMtxui
45
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdUpMtxui(program: Command): void;
@@ -0,0 +1,29 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ function cmdUpMtxui(program) {
22
+ program.command("up_cf1").action(() => {
23
+ (() => __async(this, null, function* () {
24
+ }))();
25
+ });
26
+ }
27
+ export {
28
+ cmdUpMtxui
29
+ };
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function cmdVcMtxedge(program: Command): void;
@@ -0,0 +1,44 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve2, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { exec } from "mtxlib/exec";
22
+ import { join, resolve } from "path";
23
+ function cmdVcMtxedge(program) {
24
+ program.command("vc_mtxedge").action(() => {
25
+ (() => __async(this, null, function* () {
26
+ const projectRoot = resolve("../..");
27
+ console.log("projectRoot", projectRoot);
28
+ const projectDir = join(projectRoot, "apps/mtxedge");
29
+ const vercelToken = process.env.VERCEL_TOKEN;
30
+ const CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
31
+ const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
32
+ console.log("info", {
33
+ vercelToken,
34
+ CLOUDFLARE_ACCOUNT_ID,
35
+ CLOUDFLARE_API_TOKEN
36
+ });
37
+ yield exec(`npx vercel pull --yes --token=${vercelToken}`, { shell: true, cwd: projectDir });
38
+ yield exec(`npx vercel deploy --prod --token=${vercelToken} --local-config vercel.json`, { shell: true, cwd: projectDir });
39
+ }))();
40
+ });
41
+ }
42
+ export {
43
+ cmdVcMtxedge
44
+ };
@@ -27,10 +27,13 @@ import { cn } from "mtxuilib/lib/utils";
27
27
  import { Dialog, DialogContent, DialogTitle } from "mtxuilib/ui/dialog";
28
28
  import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "mtxuilib/ui/pagination";
29
29
  import { MtButton } from "mtxuilib/ui/ui-mt/Button";
30
+ import { Suspense } from "react";
30
31
  import { MtUnaryCallErrorView } from "../components/MtUnaryCallErrorView";
31
32
  import { useMutation, useSuspenseInfiniteQuery } from "../connectquery";
33
+ import CurdCreatePanel, { CurdCreatePanelTriggerButton, openCurdCreatePanelAtom } from "./create/CurdCreatePanel";
32
34
  import { activateItemAtom, createMethodSigAtom, openCreatePanelAtom, openRemovePanelAtom, removeMethodSigAtom } from "./curd.atoms";
33
35
  import { DlgCurdDebugInfo, DlgCurdDebugInfoTriggerButton, openDlgCurdDebugInfoAtom } from "./dlg/DlgCurdDebugInfo";
36
+ import { CurdEditPanelTriggerButton, openCurdEditPanelAtom } from "./edit/CurdEditPanel";
34
37
  import { ListItemView } from "./list-item/ListItem";
35
38
  import { ListLayout } from "./list-item/ListLayout";
36
39
  const listQueryAtom = atom(null);
@@ -73,7 +76,9 @@ function CommonListViewProvider(props) {
73
76
  [createMethodSigAtom, methodCreate],
74
77
  [openRemovePanelAtom, false],
75
78
  [openCreatePanelAtom, false],
76
- [openDlgCurdDebugInfoAtom, false]
79
+ [openDlgCurdDebugInfoAtom, false],
80
+ [openCurdEditPanelAtom, false],
81
+ [openCurdCreatePanelAtom, false]
77
82
  ], children });
78
83
  }
79
84
  function CommonListView() {
@@ -109,11 +114,16 @@ function CommonListView() {
109
114
  /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, { href: "#" }) })
110
115
  ] }) }),
111
116
  /* @__PURE__ */ jsx("div", { className: "absolute right-1 top-1" }),
112
- /* @__PURE__ */ jsx(PanelRemove, {}),
113
- /* @__PURE__ */ jsx(PanelCreate, {}),
114
- /* @__PURE__ */ jsxs("div", { className: "bg-yellow-100 p-2", children: [
117
+ /* @__PURE__ */ jsxs(Suspense, { children: [
118
+ /* @__PURE__ */ jsx(PanelRemove, {}),
119
+ /* @__PURE__ */ jsx(PanelCreate, {}),
115
120
  /* @__PURE__ */ jsx(DlgCurdDebugInfo, {}),
116
- /* @__PURE__ */ jsx(DlgCurdDebugInfoTriggerButton, {})
121
+ /* @__PURE__ */ jsx(CurdCreatePanel, {}),
122
+ /* @__PURE__ */ jsxs("div", { className: "bg-yellow-100 p-2", children: [
123
+ /* @__PURE__ */ jsx(DlgCurdDebugInfoTriggerButton, {}),
124
+ /* @__PURE__ */ jsx(CurdEditPanelTriggerButton, {}),
125
+ /* @__PURE__ */ jsx(CurdCreatePanelTriggerButton, {})
126
+ ] })
117
127
  ] })
118
128
  ] });
119
129
  }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const openCurdCreatePanelAtom: import("jotai").PrimitiveAtom<boolean> & {
3
+ init: boolean;
4
+ };
5
+ export default function CurdCreatePanel(): import("react").JSX.Element;
6
+ export declare const CurdCreatePanelTriggerButton: () => import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { Fragment, jsx } from "react/jsx-runtime";
3
+ import { atom, useAtom } from "jotai";
4
+ import { useMtRouter } from "mtxuilib/hooks/use-router";
5
+ import { Dialog, DialogContent, DialogTitle } from "mtxuilib/ui/dialog";
6
+ import { MtButton } from "mtxuilib/ui/ui-mt/Button";
7
+ const openCurdCreatePanelAtom = atom(false);
8
+ function CurdCreatePanel() {
9
+ const router = useMtRouter();
10
+ const [openCurdCreatePanel, setOpenCurdCreatePanel] = useAtom(openCurdCreatePanelAtom);
11
+ return /* @__PURE__ */ jsx(Dialog, { open: openCurdCreatePanel, onOpenChange: setOpenCurdCreatePanel, children: /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogTitle, { children: " Create " }) }) });
12
+ }
13
+ const CurdCreatePanelTriggerButton = () => {
14
+ const [openCurdCreatePanel, setOpenCurdCreatePanel] = useAtom(openCurdCreatePanelAtom);
15
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
16
+ setOpenCurdCreatePanel(true);
17
+ }, children: "OpenCreatePanel" }) });
18
+ };
19
+ export {
20
+ CurdCreatePanelTriggerButton,
21
+ CurdCreatePanel as default,
22
+ openCurdCreatePanelAtom
23
+ };
@@ -3,4 +3,4 @@ export declare const openDlgCurdDebugInfoAtom: import("jotai").PrimitiveAtom<boo
3
3
  init: boolean;
4
4
  };
5
5
  export declare function DlgCurdDebugInfo(): import("react").JSX.Element;
6
- export declare const DlgCurdDebugInfoTriggerButton: () => import("react").JSX.Element;
6
+ export declare const DlgCurdDebugInfoTriggerButton: () => import("react").JSX.Element | null;
@@ -5,6 +5,7 @@ import { DebugAtomValue } from "mtxuilib/common/devtools/DebugAtomValue";
5
5
  import { flexRender } from "mtxuilib/lib/render";
6
6
  import { Dialog, DialogContent, DialogTitle } from "mtxuilib/ui/dialog";
7
7
  import { MtButton } from "mtxuilib/ui/ui-mt/Button";
8
+ import { isDebugAtom } from "../../store/gomtm.atom";
8
9
  import { exampleListItemComponent } from "../CommonListViewV2";
9
10
  import { createMethodSigAtom, curdActivateIdAtom, removeMethodSigAtom } from "../curd.atoms";
10
11
  const openDlgCurdDebugInfoAtom = atom(false);
@@ -22,7 +23,11 @@ function DlgCurdDebugInfo() {
22
23
  ] }) }) });
23
24
  }
24
25
  const DlgCurdDebugInfoTriggerButton = () => {
26
+ const [isDebug] = useAtom(isDebugAtom);
25
27
  const [openDlgCurdDebugInfo, setOpenDlgCurdDebugInfo] = useAtom(openDlgCurdDebugInfoAtom);
28
+ if (!isDebug) {
29
+ return null;
30
+ }
26
31
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
27
32
  setOpenDlgCurdDebugInfo(true);
28
33
  }, children: "DlgCurdDebugInfoTriggerButton" }) });
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const openCurdEditPanelAtom: import("jotai").PrimitiveAtom<boolean> & {
3
+ init: boolean;
4
+ };
5
+ export default function CurdEditPanel(): import("react").JSX.Element;
6
+ export declare const CurdEditPanelTriggerButton: () => import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { Fragment, jsx } from "react/jsx-runtime";
3
+ import { atom, useAtom } from "jotai";
4
+ import { useMtRouter } from "mtxuilib/hooks/use-router";
5
+ import { Dialog, DialogContent, DialogTitle } from "mtxuilib/ui/dialog";
6
+ import { MtButton } from "mtxuilib/ui/ui-mt/Button";
7
+ const openCurdEditPanelAtom = atom(false);
8
+ function CurdEditPanel() {
9
+ const router = useMtRouter();
10
+ const [openCurdEditPanel, setOpenCurdEditPanel] = useAtom(openCurdEditPanelAtom);
11
+ return /* @__PURE__ */ jsx(Dialog, { open: openCurdEditPanel, onOpenChange: setOpenCurdEditPanel, children: /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogTitle, { children: " Edit " }) }) });
12
+ }
13
+ const CurdEditPanelTriggerButton = () => {
14
+ const [openDlgCurdDebugInfo, setOpenDlgCurdDebugInfo] = useAtom(openCurdEditPanelAtom);
15
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
16
+ setOpenDlgCurdDebugInfo(true);
17
+ }, children: "CurdEditPanelTriggerButton" }) });
18
+ };
19
+ export {
20
+ CurdEditPanelTriggerButton,
21
+ CurdEditPanel as default,
22
+ openCurdEditPanelAtom
23
+ };
@@ -1,6 +1,5 @@
1
- /// <reference types="react/experimental" />
2
1
  import { PropsWithChildren } from "react";
3
2
  import { ListViewLayout } from "../../gomtmpb/mtm/sppb/mtm_pb";
4
3
  export declare const ListLayout: (props: {
5
4
  layout: ListViewLayout;
6
- } & PropsWithChildren) => string | number | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | null | undefined;
5
+ } & PropsWithChildren) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | null | undefined;
@@ -4,11 +4,11 @@ import { MaybePromise } from "mtxlib";
4
4
  import { FormSchema } from "../gomtmpb/mtm/sppb/mtm_pb";
5
5
  type SchemaFormViewVaranit = "auto" | "modal" | "card";
6
6
  export declare const SchemaFormView: (props: {
7
- formSchema?: PlainMessage<FormSchema> | undefined;
7
+ formSchema?: PlainMessage<FormSchema>;
8
8
  defaultValues?: any;
9
9
  onSubmit: (values: any) => MaybePromise<void>;
10
- onCancel?: (() => void) | undefined;
11
- isLoading?: boolean | undefined;
12
- variants?: SchemaFormViewVaranit | undefined;
10
+ onCancel?: () => void;
11
+ isLoading?: boolean;
12
+ variants?: SchemaFormViewVaranit;
13
13
  }) => import("react").JSX.Element;
14
14
  export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ const import_meta = {};
3
+ import { program } from "commander";
4
+ import dotenv from "dotenv";
5
+ import path from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ import { registerCommandTurboBuild } from "./cli/build";
8
+ import { cmdDeployMtworker } from "./cli/deployMtWorker";
9
+ import { cmdDpCfworker } from "./cli/deploy_cf_worker";
10
+ import { cmdDpMtxcli } from "./cli/deploy_mtxcli";
11
+ import { cmdDpMtxedge } from "./cli/deploy_mtxedge";
12
+ import { cmdDpMtxui } from "./cli/deploy_mtxui";
13
+ import { cmdUpMtxui } from "./cli/up_cf1";
14
+ import { cmdVcMtxedge } from "./cli/vc_mtxedge";
15
+ const __filename = fileURLToPath(import_meta.url);
16
+ const __dirname = path.dirname(__filename);
17
+ const packageResolve = import_meta.resolve;
18
+ const envPath = path.resolve("../../../env/dev.env");
19
+ console.log("envPath", envPath);
20
+ const dotenvConfig = dotenv.config({
21
+ path: envPath
22
+ });
23
+ if (dotenvConfig.error) {
24
+ throw new Error("parse env error", dotenvConfig.error);
25
+ }
26
+ registerCommandTurboBuild(program);
27
+ cmdDeployMtworker(program);
28
+ cmdDpMtxedge(program);
29
+ cmdVcMtxedge(program);
30
+ cmdDpMtxcli(program);
31
+ cmdDpMtxui(program);
32
+ cmdDpCfworker(program);
33
+ cmdUpMtxui(program);
34
+ program.parse();
@@ -4,10 +4,10 @@ import { createContext, useContext } from "react";
4
4
  import { createConnectTransport } from "@connectrpc/connect-web";
5
5
  import { atom, createStore, useAtom } from "jotai";
6
6
  import { AtomsHydrator } from "mtxlib/jotai/jotai-helper";
7
- import { isDebugAtom } from "mtxuilib/store/app.atoms";
8
7
  import { useHotkeys } from "react-hotkeys-hook";
9
8
  import { TransportProvider } from "../connectquery";
10
9
  import { gomtmFetcher } from "../mtmFetcher";
10
+ import { isDebugAtom } from "../store/gomtm.atom";
11
11
  import { MtReactQueryProvider } from "./ReactQueryProvider";
12
12
  const mtmAppStore = createStore();
13
13
  const gomtmBaseUrlAtom = atom("");
@@ -2,6 +2,8 @@ import { PropsWithChildren } from 'react';
2
2
  export declare function LoggerProvider(props: {} & PropsWithChildren): import("react").JSX.Element;
3
3
  export declare function useLogger(): {
4
4
  info: {
5
+ (...data: any[]): void;
6
+ (...data: any[]): void;
5
7
  (...data: any[]): void;
6
8
  (message?: any, ...optionalParams: any[]): void;
7
9
  };
@@ -0,0 +1,4 @@
1
+ export declare const isDebugValueAtom: import("jotai").PrimitiveAtom<boolean> & {
2
+ init: boolean;
3
+ };
4
+ export declare const isDebugAtom: import("jotai").WritableAtom<boolean, [value: boolean], void>;