zigrix 0.1.0-alpha.8 → 0.1.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/LICENSE +1 -1
- package/README.md +159 -120
- package/dist/agents/registry.js +19 -2
- package/dist/agents/roles.d.ts +10 -0
- package/dist/agents/roles.js +83 -0
- package/dist/config/defaults.d.ts +88 -6
- package/dist/config/defaults.js +82 -50
- package/dist/config/load.d.ts +5 -3
- package/dist/config/load.js +69 -30
- package/dist/config/schema.d.ts +46 -4
- package/dist/config/schema.js +49 -3
- package/dist/configure.d.ts +2 -0
- package/dist/configure.js +37 -14
- package/dist/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard/.next/app-build-manifest.json +13 -13
- package/dist/dashboard/.next/app-path-routes-manifest.json +3 -3
- package/dist/dashboard/.next/build-manifest.json +2 -2
- package/dist/dashboard/.next/prerender-manifest.json +6 -6
- package/dist/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard/.next/server/app/_not-found.rsc +1 -1
- package/dist/dashboard/.next/server/app/api/auth/login/route.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/logout/route.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/session/route.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/setup/route.js +1 -1
- package/dist/dashboard/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/overview/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/tasks/[taskId]/conversation/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/login.html +1 -1
- package/dist/dashboard/.next/server/app/login.rsc +1 -1
- package/dist/dashboard/.next/server/app/page.js +2 -2
- package/dist/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/dist/dashboard/.next/server/app/setup.html +1 -1
- package/dist/dashboard/.next/server/app/setup.rsc +1 -1
- package/dist/dashboard/.next/server/app-paths-manifest.json +3 -3
- package/dist/dashboard/.next/server/chunks/972.js +1 -1
- package/dist/dashboard/.next/server/functions-config-manifest.json +3 -3
- package/dist/dashboard/.next/server/middleware.js +1 -1
- package/dist/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard/.next/static/chunks/app/page-0314989c31e18b4b.js +1 -0
- package/dist/dashboard/.next/static/css/{94d75aff24d0c077.css → c3a7306cb2ba3f6c.css} +1 -1
- package/dist/dashboard.js +47 -0
- package/dist/doctor.js +28 -5
- package/dist/index.js +175 -171
- package/dist/onboard.d.ts +76 -2
- package/dist/onboard.js +529 -25
- package/dist/orchestration/dispatch.d.ts +3 -1
- package/dist/orchestration/dispatch.js +173 -45
- package/dist/orchestration/evidence.js +31 -4
- package/dist/orchestration/finalize.d.ts +1 -0
- package/dist/orchestration/finalize.js +5 -3
- package/dist/orchestration/report.js +9 -1
- package/dist/orchestration/worker.d.ts +1 -1
- package/dist/orchestration/worker.js +58 -8
- package/dist/rules/templates.js +3 -6
- package/dist/state/tasks.d.ts +12 -0
- package/dist/state/tasks.js +7 -0
- package/package.json +23 -2
- package/rules/defaults/README.md +9 -9
- package/rules/defaults/{back-zig.md → backend-agent.md} +4 -4
- package/rules/defaults/{front-zig.md → frontend-agent.md} +4 -4
- package/rules/defaults/orchestrator-agent.md +261 -0
- package/rules/defaults/{qa-zig.md → qa-agent.md} +11 -11
- package/rules/defaults/{sec-zig.md → security-agent.md} +4 -4
- package/rules/defaults/{sys-zig.md → system-agent.md} +8 -9
- package/rules/defaults/worker-common.md +25 -19
- package/skills/zigrix-doctor/SKILL.md +4 -2
- package/skills/zigrix-evidence/SKILL.md +7 -3
- package/skills/zigrix-main-agent-guide/SKILL.md +128 -0
- package/skills/zigrix-shared/SKILL.md +27 -3
- package/skills/zigrix-task-create/SKILL.md +8 -2
- package/skills/zigrix-task-status/SKILL.md +5 -2
- package/skills/zigrix-worker/SKILL.md +12 -4
- package/dist/dashboard/.next/static/chunks/app/page-25f54e54e74fb3af.js +0 -1
- package/rules/defaults/pro-zig.md +0 -238
- /package/dist/dashboard/.next/static/{2a4glWei05xr4Jg0Ly6cp → PT4hYxzrqxj-Zq4ZjtKNg}/_buildManifest.js +0 -0
- /package/dist/dashboard/.next/static/{2a4glWei05xr4Jg0Ly6cp → PT4hYxzrqxj-Zq4ZjtKNg}/_ssgManifest.js +0 -0
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
51
51
|
"static/chunks/app/api/overview/route-aaf047a494f0055f.js"
|
|
52
52
|
],
|
|
53
|
-
"/api/tasks/[taskId]/
|
|
53
|
+
"/api/tasks/[taskId]/cancel/route": [
|
|
54
54
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
55
55
|
"static/chunks/4bd1b696-c023c6e3521b1417.js",
|
|
56
56
|
"static/chunks/255-ebd51be49873d76c.js",
|
|
57
57
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
58
|
-
"static/chunks/app/api/tasks/[taskId]/
|
|
58
|
+
"static/chunks/app/api/tasks/[taskId]/cancel/route-aaf047a494f0055f.js"
|
|
59
59
|
],
|
|
60
|
-
"/api/tasks/[taskId]/
|
|
60
|
+
"/api/tasks/[taskId]/conversation/route": [
|
|
61
61
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
62
62
|
"static/chunks/4bd1b696-c023c6e3521b1417.js",
|
|
63
63
|
"static/chunks/255-ebd51be49873d76c.js",
|
|
64
64
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
65
|
-
"static/chunks/app/api/tasks/[taskId]/
|
|
65
|
+
"static/chunks/app/api/tasks/[taskId]/conversation/route-aaf047a494f0055f.js"
|
|
66
66
|
],
|
|
67
67
|
"/api/tasks/[taskId]/route": [
|
|
68
68
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
@@ -78,30 +78,30 @@
|
|
|
78
78
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
79
79
|
"static/chunks/app/api/stream/route-aaf047a494f0055f.js"
|
|
80
80
|
],
|
|
81
|
-
"/
|
|
81
|
+
"/login/page": [
|
|
82
82
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
83
83
|
"static/chunks/4bd1b696-c023c6e3521b1417.js",
|
|
84
84
|
"static/chunks/255-ebd51be49873d76c.js",
|
|
85
85
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
86
86
|
"static/css/1f406f685b1e941e.css",
|
|
87
|
-
"static/chunks/app/
|
|
87
|
+
"static/chunks/app/login/page-f627cfc7a91a6d34.js"
|
|
88
88
|
],
|
|
89
|
-
"/
|
|
89
|
+
"/page": [
|
|
90
90
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
91
91
|
"static/chunks/4bd1b696-c023c6e3521b1417.js",
|
|
92
92
|
"static/chunks/255-ebd51be49873d76c.js",
|
|
93
93
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
94
|
-
"static/css/
|
|
95
|
-
"static/chunks/
|
|
94
|
+
"static/css/c3a7306cb2ba3f6c.css",
|
|
95
|
+
"static/chunks/856-4671c40140d5540a.js",
|
|
96
|
+
"static/chunks/app/page-0314989c31e18b4b.js"
|
|
96
97
|
],
|
|
97
|
-
"/page": [
|
|
98
|
+
"/setup/page": [
|
|
98
99
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
99
100
|
"static/chunks/4bd1b696-c023c6e3521b1417.js",
|
|
100
101
|
"static/chunks/255-ebd51be49873d76c.js",
|
|
101
102
|
"static/chunks/main-app-458501fc143f8dcb.js",
|
|
102
|
-
"static/css/
|
|
103
|
-
"static/chunks/
|
|
104
|
-
"static/chunks/app/page-25f54e54e74fb3af.js"
|
|
103
|
+
"static/css/1f406f685b1e941e.css",
|
|
104
|
+
"static/chunks/app/setup/page-a01ab6e2460293c3.js"
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"/api/auth/setup/route": "/api/auth/setup",
|
|
6
6
|
"/api/auth/login/route": "/api/auth/login",
|
|
7
7
|
"/api/overview/route": "/api/overview",
|
|
8
|
-
"/api/tasks/[taskId]/conversation/route": "/api/tasks/[taskId]/conversation",
|
|
9
8
|
"/api/tasks/[taskId]/cancel/route": "/api/tasks/[taskId]/cancel",
|
|
9
|
+
"/api/tasks/[taskId]/conversation/route": "/api/tasks/[taskId]/conversation",
|
|
10
10
|
"/api/tasks/[taskId]/route": "/api/tasks/[taskId]",
|
|
11
11
|
"/api/stream/route": "/api/stream",
|
|
12
|
-
"/setup/page": "/setup",
|
|
13
12
|
"/login/page": "/login",
|
|
14
|
-
"/page": "/"
|
|
13
|
+
"/page": "/",
|
|
14
|
+
"/setup/page": "/setup"
|
|
15
15
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"ampDevFiles": [],
|
|
7
7
|
"lowPriorityFiles": [
|
|
8
|
-
"static/
|
|
9
|
-
"static/
|
|
8
|
+
"static/PT4hYxzrqxj-Zq4ZjtKNg/_buildManifest.js",
|
|
9
|
+
"static/PT4hYxzrqxj-Zq4ZjtKNg/_ssgManifest.js"
|
|
10
10
|
],
|
|
11
11
|
"rootMainFiles": [
|
|
12
12
|
"static/chunks/webpack-1c485544eee88ef7.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"x-next-revalidate-tag-token"
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
|
-
"/
|
|
29
|
+
"/login": {
|
|
30
30
|
"experimentalBypassFor": [
|
|
31
31
|
{
|
|
32
32
|
"type": "header",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
"initialRevalidateSeconds": false,
|
|
42
|
-
"srcRoute": "/
|
|
43
|
-
"dataRoute": "/
|
|
42
|
+
"srcRoute": "/login",
|
|
43
|
+
"dataRoute": "/login.rsc",
|
|
44
44
|
"allowHeader": [
|
|
45
45
|
"host",
|
|
46
46
|
"x-matched-path",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"x-next-revalidate-tag-token"
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
|
-
"/
|
|
53
|
+
"/setup": {
|
|
54
54
|
"experimentalBypassFor": [
|
|
55
55
|
{
|
|
56
56
|
"type": "header",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"initialRevalidateSeconds": false,
|
|
66
|
-
"srcRoute": "/
|
|
67
|
-
"dataRoute": "/
|
|
66
|
+
"srcRoute": "/setup",
|
|
67
|
+
"dataRoute": "/setup.rsc",
|
|
68
68
|
"allowHeader": [
|
|
69
69
|
"host",
|
|
70
70
|
"x-matched-path",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"71128","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/globals.css":{"id":3673,"name":"*","chunks":["177","static/chunks/app/layout-96206a34ff37a783.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/LoginForm.tsx":{"id":5554,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/DashboardClient.tsx":{"id":9843,"name":"*","chunks":["856","static/chunks/856-4671c40140d5540a.js","974","static/chunks/app/page-0314989c31e18b4b.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/SetupForm.tsx":{"id":470,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/":[],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/layout":[{"inlined":false,"path":"static/css/9f7ffdac282b0450.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/page":[{"inlined":false,"path":"static/css/c3a7306cb2ba3f6c.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/_not-found/page":[]},"rscModuleMapping":{"470":{"*":{"id":"90726","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"35894","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"45146","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--PT4hYxzrqxj_Zq4ZjtKNg--><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9f7ffdac282b0450.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1c485544eee88ef7.js"/><script src="/_next/static/chunks/4bd1b696-c023c6e3521b1417.js" async=""></script><script src="/_next/static/chunks/255-ebd51be49873d76c.js" async=""></script><script src="/_next/static/chunks/main-app-458501fc143f8dcb.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Zigrix Dashboard</title><meta name="description" content="Zigrix task orchestration dashboard"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-1c485544eee88ef7.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9766,[],\"\"]\n3:I[8924,[],\"\"]\n4:I[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[7150,[],\"\"]\n:HL[\"/_next/static/css/9f7ffdac282b0450.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"PT4hYxzrqxj-Zq4ZjtKNg\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9f7ffdac282b0450.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Zigrix Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Zigrix task orchestration dashboard\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
|
|
@@ -8,7 +8,7 @@ a:I[4431,[],"MetadataBoundary"]
|
|
|
8
8
|
b:"$Sreact.suspense"
|
|
9
9
|
d:I[7150,[],""]
|
|
10
10
|
:HL["/_next/static/css/9f7ffdac282b0450.css","style"]
|
|
11
|
-
0:{"P":null,"b":"
|
|
11
|
+
0:{"P":null,"b":"PT4hYxzrqxj-Zq4ZjtKNg","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9f7ffdac282b0450.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"ko","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$L5",["$","$L6",null,{"promise":"$@7"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],[["$","$L8",null,{"children":"$L9"}],null],["$","$La",null,{"children":["$","div",null,{"hidden":true,"children":["$","$b",null,{"fallback":null,"children":"$Lc"}]}]}]]}],false]],"m":"$undefined","G":["$d",[]],"s":false,"S":true}
|
|
12
12
|
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
13
13
|
5:null
|
|
14
14
|
7:{"metadata":[["$","title","0",{"children":"Zigrix Dashboard"}],["$","meta","1",{"name":"description","content":"Zigrix task orchestration dashboard"}]],"error":null,"digest":"$undefined"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=758,a.ids=[758],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3563:(a,b,c)=>{"use strict";c.d(b,{mN:()=>i,rp:()=>j,wx:()=>h});var d=c(10641),e=c(67360);function f(a){let b=a.headers.get("origin");if(!b)return{allowedOrigin:null,origin:null};let c=new Set;try{c.add(new URL(a.url).origin)}catch{}let d=a.headers.get("x-forwarded-host")?.split(",")[0]?.trim(),f=a.headers.get("x-forwarded-proto")?.split(",")[0]?.trim(),g=a.headers.get("host")?.trim();return(d&&f&&c.add(`${f}://${d}`),g&&(c.add(`https://${g}`),c.add(`http://${g}`)),c.has(b))?{allowedOrigin:b,origin:b}:{allowedOrigin:(function(){let a=(0,e.TI)(),b=new Set;for(let c of a.corsOrigins){if("string"!=typeof c)continue;let a=c.trim();a&&"*"!==a&&b.add(a)}return Array.from(b)})().find(a=>a===b)||null,origin:b}}function g(a){let b=a.get("Vary");if(!b)return void a.set("Vary","Origin");let c=b.split(",").map(a=>a.trim()).filter(Boolean);c.includes("Origin")||(c.push("Origin"),a.set("Vary",c.join(", ")))}function h(a){let{allowedOrigin:b,origin:c}=f(a);if(!c||b)return null;let e=d.NextResponse.json({error:"Forbidden"},{status:403});return g(e.headers),e}function i(a,b){let c=new Headers(b.headers);g(c);let{allowedOrigin:d}=f(a);return d&&(c.set("Access-Control-Allow-Origin",d),c.set("Access-Control-Allow-Credentials","true")),new Response(b.body,{status:b.status,statusText:b.statusText,headers:c})}function j(a,b){let{allowedOrigin:c,origin:e}=f(a);if(e&&!c){let a=d.NextResponse.json({error:"Forbidden"},{status:403});return g(a.headers),a}let h=new d.NextResponse(null,{status:204});if(g(h.headers),!c)return h;let i=a.headers.get("access-control-request-headers");return h.headers.set("Access-Control-Allow-Origin",c),h.headers.set("Access-Control-Allow-Credentials","true"),h.headers.set("Access-Control-Allow-Methods",b.join(", ")),h.headers.set("Access-Control-Allow-Headers",i||"Content-Type, Authorization"),h.headers.set("Access-Control-Max-Age",String(600)),h}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},57510:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>O,patchFetch:()=>N,routeModule:()=>J,serverHooks:()=>M,workAsyncStorage:()=>K,workUnitAsyncStorage:()=>L});var d={};c.r(d),c.d(d,{OPTIONS:()=>H,POST:()=>I,runtime:()=>G});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(67360);let w=new Map,x=new Map,y=0;function z(a){return(a||"unknown").trim().toLowerCase()}function A(a){return(a||"").trim().toLowerCase()}function B(a){if(!(a-y<6e4)){y=a;w.forEach((b,c)=>{a-b.lastSeenAtMs>36e4&&w.delete(c)}),x.forEach((b,c)=>{a-b.lastSeenAtMs>36e4&&x.delete(c)})}}function C(a,b,c){let d=a.get(b);if(!d)return null;let e=c-d.firstFailureAtMs>=6e4,f=d.lockedUntilMs<=c;return e&&f?(a.delete(b),null):d}function D(a,b){if(!(b-a.firstFailureAtMs<6e4))return a.lockedUntilMs>b?a.lockedUntilMs:null;let c=Math.max(a.failures>=5?a.firstFailureAtMs+6e4:0,a.lockedUntilMs>b?a.lockedUntilMs:0);return c>b?c:null}function E(a,b,c){let d=a.get(b),e=!d||c-d.firstFailureAtMs>=6e4?{failures:0,firstFailureAtMs:c,lockedUntilMs:0,lastSeenAtMs:c}:d;if(e.failures+=1,e.lastSeenAtMs=c,e.failures>=5){let a=e.failures-5,b=Math.min(3e5,15e3*2**a);e.lockedUntilMs=Math.max(e.lockedUntilMs,c+b)}return a.set(b,e),D(e,c)}var F=c(3563);let G="nodejs";function H(a){return(0,F.rp)(a,["POST","OPTIONS"])}async function I(a){let b,c=(0,F.wx)(a);if(c)return c;if((0,v.dV)())return(0,F.mN)(a,u.NextResponse.json({error:"Setup required"},{status:403}));let d=a.headers.get("x-forwarded-for")?.split(",")[0]?.trim()||a.headers.get("x-real-ip")||"unknown";try{b=await a.json()}catch{return(0,F.mN)(a,u.NextResponse.json({error:"Invalid JSON body"},{status:400}))}if(!b||"object"!=typeof b||Array.isArray(b))return(0,F.mN)(a,u.NextResponse.json({error:"Invalid request body"},{status:400}));let{username:e,password:f}=b;if("string"!=typeof e||!e.trim())return(0,F.mN)(a,u.NextResponse.json({error:"username is required"},{status:400}));if("string"!=typeof f)return(0,F.mN)(a,u.NextResponse.json({error:"password is required"},{status:400}));let g=e.trim(),h=function(a,b){let c=Date.now();B(c);let d=C(w,z(a),c),e=C(x,A(b),c),f=Math.max((d?D(d,c):null)??0,(e?D(e,c):null)??0);return f?{limited:!0,retryAfterSeconds:Math.max(1,Math.ceil((f-c)/1e3))}:{limited:!1,retryAfterSeconds:0}}(d,g);if(h.limited)return(0,F.mN)(a,u.NextResponse.json({error:"Too many attempts. Try again later."},{status:429,headers:{"Retry-After":String(h.retryAfterSeconds)}}));if(!await (0,v.BE)(g,f)){let b=Date.now();return B(b),E(w,z(d),b),E(x,A(g),b),(0,F.mN)(a,u.NextResponse.json({error:"Invalid credentials"},{status:401}))}w.delete(z(d)),x.delete(A(g));let i=await (0,v.jw)(g),j=u.NextResponse.json({ok:!0,username:g});return j.cookies.set(v.IX,i,{httpOnly:!0,secure:!0,sameSite:"lax",maxAge:v.gw,path:"/"}),(0,F.mN)(a,j)}let J=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/login/route.ts",nextConfigOutput:"standalone",userland:d}),{workAsyncStorage:K,workUnitAsyncStorage:L,serverHooks:M}=J;function N(){return(0,g.patchFetch)({workAsyncStorage:K,workUnitAsyncStorage:L})}async function O(a,b,c){var d;let e="/api/auth/login/route";"/index"===e&&(e="/");let g=await J.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:C}=g,D=(0,j.normalizeAppPath)(e),E=!!(y.dynamicRoutes[D]||y.routes[C]);if(E&&!x){let a=!!y.routes[C],b=y.dynamicRoutes[D];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let F=null;!E||J.isDev||x||(F="/index"===(F=C)?"/":F);let G=!0===J.isDev||!E,H=E&&!G,I=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:G,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:H,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>J.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>J.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${I} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${I} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!E)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await J.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})},z),b}},l=await J.handleResponse({req:a,nextConfig:w,cacheKey:F,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!E)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&E||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${I} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":I,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await J.onRequestError(a,b,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})}),E)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67360:(a,b,c)=>{"use strict";c.d(b,{BE:()=>w,IX:()=>n,TI:()=>t,dV:()=>u,gV:()=>A,gw:()=>o,jw:()=>z,xC:()=>v});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(48161),i=c.n(h),j=c(77598),k=c.n(j),l=c(74729),m=c.n(l);let n="zigrix_session",o=43200,p=new TextEncoder,q=new TextDecoder;function r(){return process.env.ZIGRIX_HOME||g().join(i().homedir(),".zigrix")}function s(){return g().join(r(),"dashboard.json")}function t(){let a=s();try{let b=e().readFileSync(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||Array.isArray(c))return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""};return{admins:Array.isArray(c.admins)?c.admins:[],sessionSecret:"string"==typeof c.sessionSecret?c.sessionSecret:"",corsOrigins:Array.isArray(c.corsOrigins)?c.corsOrigins:[],createdAt:"string"==typeof c.createdAt?c.createdAt:""}}catch{return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""}}}function u(){return 0===t().admins.length}async function v(a,b){let c={admins:[{username:a,passwordHash:await m().hash(b,12)}],sessionSecret:k().randomBytes(64).toString("hex"),corsOrigins:["http://localhost:3000"],createdAt:new Date().toISOString()},d=s(),f=r();e().existsSync(f)||e().mkdirSync(f,{recursive:!0}),e().writeFileSync(d,JSON.stringify(c,null,2),{encoding:"utf-8",mode:384});try{e().chmodSync(d,384)}catch{}}async function w(a,b){let c=t().admins.find(b=>b.username===a);if(!c)return await m().hash(b,12),!1;if(!await m().compare(b,c.passwordHash))return!1;let d=p.encode(a),e=p.encode(c.username);return d.length===e.length&&k().timingSafeEqual(d,e)}function x(a){return Buffer.from(a).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function y(a,b){let c=await k().subtle.importKey("raw",p.encode(b),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return x(new Uint8Array(await k().subtle.sign("HMAC",c,p.encode(a))))}async function z(a){let b=t().sessionSecret;if(!b)throw Error("Session secret not configured. Run setup first.");let c=Math.floor(Date.now()/1e3),d=x(p.encode(JSON.stringify({sub:a,iat:c,exp:c+o}))),e=await y(d,b);return`${d}.${e}`}async function A(a){let b;if(!a)return null;let c=a.split(".");if(2!==c.length)return null;let[d,e]=c;if(!d||!e)return null;let f=t().sessionSecret;if(!f||!function(a,b){if(a.length!==b.length)return!1;let c=p.encode(a),d=p.encode(b);return k().timingSafeEqual(c,d)}(await y(d,f),e))return null;try{let a=q.decode(function(a){let b=a.replace(/-/g,"+").replace(/_/g,"/"),c=b.padEnd(4*Math.ceil(b.length/4),"=");return new Uint8Array(Buffer.from(c,"base64"))}(d));b=JSON.parse(a)}catch{return null}if("number"!=typeof b.exp||"number"!=typeof b.iat)return null;let g=Math.floor(Date.now()/1e3);return b.exp<=g||b.iat>g+60?null:{username:"string"==typeof b.sub?b.sub:"",issuedAt:b.iat,expiresAt:b.exp}}},73024:a=>{"use strict";a.exports=require("node:fs")},74729:a=>{"use strict";a.exports=require("bcryptjs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[331,692],()=>b(b.s=57510));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=758,a.ids=[758],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3563:(a,b,c)=>{"use strict";c.d(b,{mN:()=>i,rp:()=>j,wx:()=>h});var d=c(10641),e=c(67360);function f(a){let b=a.headers.get("origin");if(!b)return{allowedOrigin:null,origin:null};let c=new Set;try{c.add(new URL(a.url).origin)}catch{}let d=a.headers.get("x-forwarded-host")?.split(",")[0]?.trim(),f=a.headers.get("x-forwarded-proto")?.split(",")[0]?.trim(),g=a.headers.get("host")?.trim();return(d&&f&&c.add(`${f}://${d}`),g&&(c.add(`https://${g}`),c.add(`http://${g}`)),c.has(b))?{allowedOrigin:b,origin:b}:{allowedOrigin:(function(){let a=(0,e.TI)(),b=new Set;for(let c of a.corsOrigins){if("string"!=typeof c)continue;let a=c.trim();a&&"*"!==a&&b.add(a)}return Array.from(b)})().find(a=>a===b)||null,origin:b}}function g(a){let b=a.get("Vary");if(!b)return void a.set("Vary","Origin");let c=b.split(",").map(a=>a.trim()).filter(Boolean);c.includes("Origin")||(c.push("Origin"),a.set("Vary",c.join(", ")))}function h(a){let{allowedOrigin:b,origin:c}=f(a);if(!c||b)return null;let e=d.NextResponse.json({error:"Forbidden"},{status:403});return g(e.headers),e}function i(a,b){let c=new Headers(b.headers);g(c);let{allowedOrigin:d}=f(a);return d&&(c.set("Access-Control-Allow-Origin",d),c.set("Access-Control-Allow-Credentials","true")),new Response(b.body,{status:b.status,statusText:b.statusText,headers:c})}function j(a,b){let{allowedOrigin:c,origin:e}=f(a);if(e&&!c){let a=d.NextResponse.json({error:"Forbidden"},{status:403});return g(a.headers),a}let h=new d.NextResponse(null,{status:204});if(g(h.headers),!c)return h;let i=a.headers.get("access-control-request-headers");return h.headers.set("Access-Control-Allow-Origin",c),h.headers.set("Access-Control-Allow-Credentials","true"),h.headers.set("Access-Control-Allow-Methods",b.join(", ")),h.headers.set("Access-Control-Allow-Headers",i||"Content-Type, Authorization"),h.headers.set("Access-Control-Max-Age",String(600)),h}},7310:(a,b,c)=>{"use strict";c.d(b,{I8:()=>k,Tp:()=>m,Tr:()=>j,jE:()=>l});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h);function j(a,b){let c=a?"~"===a?g().homedir():a.startsWith("~/")?i().join(g().homedir(),a.slice(2)):a:a;return i().isAbsolute(c)?i().resolve(c):i().resolve(b,c)}function k(){return i().join(g().homedir(),".zigrix")}function l(a=k()){let b=function(a=k()){return i().join(a,"zigrix.config.json")}(a);try{if(!e().existsSync(b))return null;let a=JSON.parse(e().readFileSync(b,"utf-8"));if(!a||"object"!=typeof a||Array.isArray(a))return null;return a}catch{return null}}function m(a){let b=k();return"string"==typeof a&&a.trim().length>0?j(a,b):b}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},57510:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>O,patchFetch:()=>N,routeModule:()=>J,serverHooks:()=>M,workAsyncStorage:()=>K,workUnitAsyncStorage:()=>L});var d={};c.r(d),c.d(d,{OPTIONS:()=>H,POST:()=>I,runtime:()=>G});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(67360);let w=new Map,x=new Map,y=0;function z(a){return(a||"unknown").trim().toLowerCase()}function A(a){return(a||"").trim().toLowerCase()}function B(a){if(!(a-y<6e4)){y=a;w.forEach((b,c)=>{a-b.lastSeenAtMs>36e4&&w.delete(c)}),x.forEach((b,c)=>{a-b.lastSeenAtMs>36e4&&x.delete(c)})}}function C(a,b,c){let d=a.get(b);if(!d)return null;let e=c-d.firstFailureAtMs>=6e4,f=d.lockedUntilMs<=c;return e&&f?(a.delete(b),null):d}function D(a,b){if(!(b-a.firstFailureAtMs<6e4))return a.lockedUntilMs>b?a.lockedUntilMs:null;let c=Math.max(a.failures>=5?a.firstFailureAtMs+6e4:0,a.lockedUntilMs>b?a.lockedUntilMs:0);return c>b?c:null}function E(a,b,c){let d=a.get(b),e=!d||c-d.firstFailureAtMs>=6e4?{failures:0,firstFailureAtMs:c,lockedUntilMs:0,lastSeenAtMs:c}:d;if(e.failures+=1,e.lastSeenAtMs=c,e.failures>=5){let a=e.failures-5,b=Math.min(3e5,15e3*2**a);e.lockedUntilMs=Math.max(e.lockedUntilMs,c+b)}return a.set(b,e),D(e,c)}var F=c(3563);let G="nodejs";function H(a){return(0,F.rp)(a,["POST","OPTIONS"])}async function I(a){let b,c=(0,F.wx)(a);if(c)return c;if((0,v.dV)())return(0,F.mN)(a,u.NextResponse.json({error:"Setup required"},{status:403}));let d=a.headers.get("x-forwarded-for")?.split(",")[0]?.trim()||a.headers.get("x-real-ip")||"unknown";try{b=await a.json()}catch{return(0,F.mN)(a,u.NextResponse.json({error:"Invalid JSON body"},{status:400}))}if(!b||"object"!=typeof b||Array.isArray(b))return(0,F.mN)(a,u.NextResponse.json({error:"Invalid request body"},{status:400}));let{username:e,password:f}=b;if("string"!=typeof e||!e.trim())return(0,F.mN)(a,u.NextResponse.json({error:"username is required"},{status:400}));if("string"!=typeof f)return(0,F.mN)(a,u.NextResponse.json({error:"password is required"},{status:400}));let g=e.trim(),h=function(a,b){let c=Date.now();B(c);let d=C(w,z(a),c),e=C(x,A(b),c),f=Math.max((d?D(d,c):null)??0,(e?D(e,c):null)??0);return f?{limited:!0,retryAfterSeconds:Math.max(1,Math.ceil((f-c)/1e3))}:{limited:!1,retryAfterSeconds:0}}(d,g);if(h.limited)return(0,F.mN)(a,u.NextResponse.json({error:"Too many attempts. Try again later."},{status:429,headers:{"Retry-After":String(h.retryAfterSeconds)}}));if(!await (0,v.BE)(g,f)){let b=Date.now();return B(b),E(w,z(d),b),E(x,A(g),b),(0,F.mN)(a,u.NextResponse.json({error:"Invalid credentials"},{status:401}))}w.delete(z(d)),x.delete(A(g));let i=await (0,v.jw)(g),j=u.NextResponse.json({ok:!0,username:g});return j.cookies.set(v.IX,i,{httpOnly:!0,secure:!0,sameSite:"lax",maxAge:v.gw,path:"/"}),(0,F.mN)(a,j)}let J=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/login/route.ts",nextConfigOutput:"standalone",userland:d}),{workAsyncStorage:K,workUnitAsyncStorage:L,serverHooks:M}=J;function N(){return(0,g.patchFetch)({workAsyncStorage:K,workUnitAsyncStorage:L})}async function O(a,b,c){var d;let e="/api/auth/login/route";"/index"===e&&(e="/");let g=await J.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,resolvedPathname:C}=g,D=(0,j.normalizeAppPath)(e),E=!!(y.dynamicRoutes[D]||y.routes[C]);if(E&&!x){let a=!!y.routes[C],b=y.dynamicRoutes[D];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let F=null;!E||J.isDev||x||(F="/index"===(F=C)?"/":F);let G=!0===J.isDev||!E,H=E&&!G,I=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:G,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:H,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>J.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>J.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${I} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${I} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&A&&B&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!E)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await J.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})},z),b}},l=await J.handleResponse({req:a,nextConfig:w,cacheKey:F,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:B,responseGenerator:k,waitUntil:c.waitUntil});if(!E)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&E||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${I} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":I,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await J.onRequestError(a,b,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:H,isOnDemandRevalidate:A})}),E)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67360:(a,b,c)=>{"use strict";c.d(b,{BE:()=>t,IX:()=>k,TI:()=>q,dV:()=>r,gV:()=>x,gw:()=>l,jw:()=>w,xC:()=>s});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(77598),i=c.n(h),j=c(7310);let k="zigrix_session",l=43200,m=new TextEncoder,n=new TextDecoder;async function o(){let a=await Promise.resolve().then(c.t.bind(c,74729,23)),b=a.default??a;if("function"!=typeof b.hash||"function"!=typeof b.compare)throw Error("bcryptjs adapter unavailable");return b}function p(){let a=(0,j.jE)();return g().join((0,j.Tp)(a?.paths?.baseDir),"dashboard.json")}function q(){let a=p();try{let b=e().readFileSync(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||Array.isArray(c))return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""};return{admins:Array.isArray(c.admins)?c.admins:[],sessionSecret:"string"==typeof c.sessionSecret?c.sessionSecret:"",corsOrigins:Array.isArray(c.corsOrigins)?c.corsOrigins:[],createdAt:"string"==typeof c.createdAt?c.createdAt:""}}catch{return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""}}}function r(){return 0===q().admins.length}async function s(a,b){let c=await o(),d={admins:[{username:a,passwordHash:await c.hash(b,12)}],sessionSecret:i().randomBytes(64).toString("hex"),corsOrigins:["http://localhost:3000"],createdAt:new Date().toISOString()},f=p(),h=g().dirname(f);e().existsSync(h)||e().mkdirSync(h,{recursive:!0}),e().writeFileSync(f,JSON.stringify(d,null,2),{encoding:"utf-8",mode:384});try{e().chmodSync(f,384)}catch{}}async function t(a,b){let c=await o(),d=q().admins.find(b=>b.username===a);if(!d)return await c.hash(b,12),!1;if(!await c.compare(b,d.passwordHash))return!1;let e=m.encode(a),f=m.encode(d.username);return e.length===f.length&&i().timingSafeEqual(e,f)}function u(a){return Buffer.from(a).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function v(a,b){let c=await i().subtle.importKey("raw",m.encode(b),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return u(new Uint8Array(await i().subtle.sign("HMAC",c,m.encode(a))))}async function w(a){let b=q().sessionSecret;if(!b)throw Error("Session secret not configured. Run setup first.");let c=Math.floor(Date.now()/1e3),d=u(m.encode(JSON.stringify({sub:a,iat:c,exp:c+l}))),e=await v(d,b);return`${d}.${e}`}async function x(a){let b;if(!a)return null;let c=a.split(".");if(2!==c.length)return null;let[d,e]=c;if(!d||!e)return null;let f=q().sessionSecret;if(!f||!function(a,b){if(a.length!==b.length)return!1;let c=m.encode(a),d=m.encode(b);return i().timingSafeEqual(c,d)}(await v(d,f),e))return null;try{let a=n.decode(function(a){let b=a.replace(/-/g,"+").replace(/_/g,"/"),c=b.padEnd(4*Math.ceil(b.length/4),"=");return new Uint8Array(Buffer.from(c,"base64"))}(d));b=JSON.parse(a)}catch{return null}if("number"!=typeof b.exp||"number"!=typeof b.iat)return null;let g=Math.floor(Date.now()/1e3);return b.exp<=g||b.iat>g+60?null:{username:"string"==typeof b.sub?b.sub:"",issuedAt:b.iat,expiresAt:b.exp}}},73024:a=>{"use strict";a.exports=require("node:fs")},74729:a=>{"use strict";a.exports=require("bcryptjs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[331,692],()=>b(b.s=57510));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/auth/login/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/auth/login/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"71128","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/globals.css":{"id":3673,"name":"*","chunks":["177","static/chunks/app/layout-96206a34ff37a783.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/LoginForm.tsx":{"id":5554,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/DashboardClient.tsx":{"id":9843,"name":"*","chunks":["856","static/chunks/856-4671c40140d5540a.js","974","static/chunks/app/page-0314989c31e18b4b.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/SetupForm.tsx":{"id":470,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/":[],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/layout":[{"inlined":false,"path":"static/css/9f7ffdac282b0450.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/page":[{"inlined":false,"path":"static/css/c3a7306cb2ba3f6c.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/login/route":[]},"rscModuleMapping":{"470":{"*":{"id":"90726","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"35894","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"45146","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=489,a.ids=[489],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3563:(a,b,c)=>{"use strict";c.d(b,{mN:()=>i,rp:()=>j,wx:()=>h});var d=c(10641),e=c(67360);function f(a){let b=a.headers.get("origin");if(!b)return{allowedOrigin:null,origin:null};let c=new Set;try{c.add(new URL(a.url).origin)}catch{}let d=a.headers.get("x-forwarded-host")?.split(",")[0]?.trim(),f=a.headers.get("x-forwarded-proto")?.split(",")[0]?.trim(),g=a.headers.get("host")?.trim();return(d&&f&&c.add(`${f}://${d}`),g&&(c.add(`https://${g}`),c.add(`http://${g}`)),c.has(b))?{allowedOrigin:b,origin:b}:{allowedOrigin:(function(){let a=(0,e.TI)(),b=new Set;for(let c of a.corsOrigins){if("string"!=typeof c)continue;let a=c.trim();a&&"*"!==a&&b.add(a)}return Array.from(b)})().find(a=>a===b)||null,origin:b}}function g(a){let b=a.get("Vary");if(!b)return void a.set("Vary","Origin");let c=b.split(",").map(a=>a.trim()).filter(Boolean);c.includes("Origin")||(c.push("Origin"),a.set("Vary",c.join(", ")))}function h(a){let{allowedOrigin:b,origin:c}=f(a);if(!c||b)return null;let e=d.NextResponse.json({error:"Forbidden"},{status:403});return g(e.headers),e}function i(a,b){let c=new Headers(b.headers);g(c);let{allowedOrigin:d}=f(a);return d&&(c.set("Access-Control-Allow-Origin",d),c.set("Access-Control-Allow-Credentials","true")),new Response(b.body,{status:b.status,statusText:b.statusText,headers:c})}function j(a,b){let{allowedOrigin:c,origin:e}=f(a);if(e&&!c){let a=d.NextResponse.json({error:"Forbidden"},{status:403});return g(a.headers),a}let h=new d.NextResponse(null,{status:204});if(g(h.headers),!c)return h;let i=a.headers.get("access-control-request-headers");return h.headers.set("Access-Control-Allow-Origin",c),h.headers.set("Access-Control-Allow-Credentials","true"),h.headers.set("Access-Control-Allow-Methods",b.join(", ")),h.headers.set("Access-Control-Allow-Headers",i||"Content-Type, Authorization"),h.headers.set("Access-Control-Max-Age",String(600)),h}},10086:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{OPTIONS:()=>y,POST:()=>z,runtime:()=>x});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(67360),w=c(3563);let x="nodejs";function y(a){return(0,w.rp)(a,["POST","OPTIONS"])}async function z(a){let b=(0,w.wx)(a);if(b)return b;let c=u.NextResponse.json({ok:!0});return c.cookies.set(v.IX,"",{httpOnly:!0,secure:!0,sameSite:"lax",maxAge:0,path:"/"}),(0,w.mN)(a,c)}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/logout/route.ts",nextConfigOutput:"standalone",userland:d}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){var d;let e="/api/auth/logout/route";"/index"===e&&(e="/");let g=await A.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||A.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===A.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>A.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>A.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})},z),b}},l=await A.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",B?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67360:(a,b,c)=>{"use strict";c.d(b,{BE:()=>w,IX:()=>n,TI:()=>t,dV:()=>u,gV:()=>A,gw:()=>o,jw:()=>z,xC:()=>v});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(48161),i=c.n(h),j=c(77598),k=c.n(j),l=c(74729),m=c.n(l);let n="zigrix_session",o=43200,p=new TextEncoder,q=new TextDecoder;function r(){return process.env.ZIGRIX_HOME||g().join(i().homedir(),".zigrix")}function s(){return g().join(r(),"dashboard.json")}function t(){let a=s();try{let b=e().readFileSync(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||Array.isArray(c))return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""};return{admins:Array.isArray(c.admins)?c.admins:[],sessionSecret:"string"==typeof c.sessionSecret?c.sessionSecret:"",corsOrigins:Array.isArray(c.corsOrigins)?c.corsOrigins:[],createdAt:"string"==typeof c.createdAt?c.createdAt:""}}catch{return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""}}}function u(){return 0===t().admins.length}async function v(a,b){let c={admins:[{username:a,passwordHash:await m().hash(b,12)}],sessionSecret:k().randomBytes(64).toString("hex"),corsOrigins:["http://localhost:3000"],createdAt:new Date().toISOString()},d=s(),f=r();e().existsSync(f)||e().mkdirSync(f,{recursive:!0}),e().writeFileSync(d,JSON.stringify(c,null,2),{encoding:"utf-8",mode:384});try{e().chmodSync(d,384)}catch{}}async function w(a,b){let c=t().admins.find(b=>b.username===a);if(!c)return await m().hash(b,12),!1;if(!await m().compare(b,c.passwordHash))return!1;let d=p.encode(a),e=p.encode(c.username);return d.length===e.length&&k().timingSafeEqual(d,e)}function x(a){return Buffer.from(a).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function y(a,b){let c=await k().subtle.importKey("raw",p.encode(b),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return x(new Uint8Array(await k().subtle.sign("HMAC",c,p.encode(a))))}async function z(a){let b=t().sessionSecret;if(!b)throw Error("Session secret not configured. Run setup first.");let c=Math.floor(Date.now()/1e3),d=x(p.encode(JSON.stringify({sub:a,iat:c,exp:c+o}))),e=await y(d,b);return`${d}.${e}`}async function A(a){let b;if(!a)return null;let c=a.split(".");if(2!==c.length)return null;let[d,e]=c;if(!d||!e)return null;let f=t().sessionSecret;if(!f||!function(a,b){if(a.length!==b.length)return!1;let c=p.encode(a),d=p.encode(b);return k().timingSafeEqual(c,d)}(await y(d,f),e))return null;try{let a=q.decode(function(a){let b=a.replace(/-/g,"+").replace(/_/g,"/"),c=b.padEnd(4*Math.ceil(b.length/4),"=");return new Uint8Array(Buffer.from(c,"base64"))}(d));b=JSON.parse(a)}catch{return null}if("number"!=typeof b.exp||"number"!=typeof b.iat)return null;let g=Math.floor(Date.now()/1e3);return b.exp<=g||b.iat>g+60?null:{username:"string"==typeof b.sub?b.sub:"",issuedAt:b.iat,expiresAt:b.exp}}},73024:a=>{"use strict";a.exports=require("node:fs")},74729:a=>{"use strict";a.exports=require("bcryptjs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[331,692],()=>b(b.s=10086));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=489,a.ids=[489],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3563:(a,b,c)=>{"use strict";c.d(b,{mN:()=>i,rp:()=>j,wx:()=>h});var d=c(10641),e=c(67360);function f(a){let b=a.headers.get("origin");if(!b)return{allowedOrigin:null,origin:null};let c=new Set;try{c.add(new URL(a.url).origin)}catch{}let d=a.headers.get("x-forwarded-host")?.split(",")[0]?.trim(),f=a.headers.get("x-forwarded-proto")?.split(",")[0]?.trim(),g=a.headers.get("host")?.trim();return(d&&f&&c.add(`${f}://${d}`),g&&(c.add(`https://${g}`),c.add(`http://${g}`)),c.has(b))?{allowedOrigin:b,origin:b}:{allowedOrigin:(function(){let a=(0,e.TI)(),b=new Set;for(let c of a.corsOrigins){if("string"!=typeof c)continue;let a=c.trim();a&&"*"!==a&&b.add(a)}return Array.from(b)})().find(a=>a===b)||null,origin:b}}function g(a){let b=a.get("Vary");if(!b)return void a.set("Vary","Origin");let c=b.split(",").map(a=>a.trim()).filter(Boolean);c.includes("Origin")||(c.push("Origin"),a.set("Vary",c.join(", ")))}function h(a){let{allowedOrigin:b,origin:c}=f(a);if(!c||b)return null;let e=d.NextResponse.json({error:"Forbidden"},{status:403});return g(e.headers),e}function i(a,b){let c=new Headers(b.headers);g(c);let{allowedOrigin:d}=f(a);return d&&(c.set("Access-Control-Allow-Origin",d),c.set("Access-Control-Allow-Credentials","true")),new Response(b.body,{status:b.status,statusText:b.statusText,headers:c})}function j(a,b){let{allowedOrigin:c,origin:e}=f(a);if(e&&!c){let a=d.NextResponse.json({error:"Forbidden"},{status:403});return g(a.headers),a}let h=new d.NextResponse(null,{status:204});if(g(h.headers),!c)return h;let i=a.headers.get("access-control-request-headers");return h.headers.set("Access-Control-Allow-Origin",c),h.headers.set("Access-Control-Allow-Credentials","true"),h.headers.set("Access-Control-Allow-Methods",b.join(", ")),h.headers.set("Access-Control-Allow-Headers",i||"Content-Type, Authorization"),h.headers.set("Access-Control-Max-Age",String(600)),h}},7310:(a,b,c)=>{"use strict";c.d(b,{I8:()=>k,Tp:()=>m,Tr:()=>j,jE:()=>l});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h);function j(a,b){let c=a?"~"===a?g().homedir():a.startsWith("~/")?i().join(g().homedir(),a.slice(2)):a:a;return i().isAbsolute(c)?i().resolve(c):i().resolve(b,c)}function k(){return i().join(g().homedir(),".zigrix")}function l(a=k()){let b=function(a=k()){return i().join(a,"zigrix.config.json")}(a);try{if(!e().existsSync(b))return null;let a=JSON.parse(e().readFileSync(b,"utf-8"));if(!a||"object"!=typeof a||Array.isArray(a))return null;return a}catch{return null}}function m(a){let b=k();return"string"==typeof a&&a.trim().length>0?j(a,b):b}},10086:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{OPTIONS:()=>y,POST:()=>z,runtime:()=>x});var e=c(95736),f=c(9117),g=c(4044),h=c(39326),i=c(32324),j=c(261),k=c(54290),l=c(85328),m=c(38928),n=c(46595),o=c(3421),p=c(17679),q=c(41681),r=c(63446),s=c(86439),t=c(51356),u=c(10641),v=c(67360),w=c(3563);let x="nodejs";function y(a){return(0,w.rp)(a,["POST","OPTIONS"])}async function z(a){let b=(0,w.wx)(a);if(b)return b;let c=u.NextResponse.json({ok:!0});return c.cookies.set(v.IX,"",{httpOnly:!0,secure:!0,sameSite:"lax",maxAge:0,path:"/"}),(0,w.mN)(a,c)}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/logout/route.ts",nextConfigOutput:"standalone",userland:d}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){var d;let e="/api/auth/logout/route";"/index"===e&&(e="/");let g=await A.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:z,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||A.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===A.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>A.onRequestError(a,b,d,z)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>A.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})},z),b}},l=await A.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",B?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67360:(a,b,c)=>{"use strict";c.d(b,{BE:()=>t,IX:()=>k,TI:()=>q,dV:()=>r,gV:()=>x,gw:()=>l,jw:()=>w,xC:()=>s});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(77598),i=c.n(h),j=c(7310);let k="zigrix_session",l=43200,m=new TextEncoder,n=new TextDecoder;async function o(){let a=await Promise.resolve().then(c.t.bind(c,74729,23)),b=a.default??a;if("function"!=typeof b.hash||"function"!=typeof b.compare)throw Error("bcryptjs adapter unavailable");return b}function p(){let a=(0,j.jE)();return g().join((0,j.Tp)(a?.paths?.baseDir),"dashboard.json")}function q(){let a=p();try{let b=e().readFileSync(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||Array.isArray(c))return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""};return{admins:Array.isArray(c.admins)?c.admins:[],sessionSecret:"string"==typeof c.sessionSecret?c.sessionSecret:"",corsOrigins:Array.isArray(c.corsOrigins)?c.corsOrigins:[],createdAt:"string"==typeof c.createdAt?c.createdAt:""}}catch{return{admins:[],sessionSecret:"",corsOrigins:[],createdAt:""}}}function r(){return 0===q().admins.length}async function s(a,b){let c=await o(),d={admins:[{username:a,passwordHash:await c.hash(b,12)}],sessionSecret:i().randomBytes(64).toString("hex"),corsOrigins:["http://localhost:3000"],createdAt:new Date().toISOString()},f=p(),h=g().dirname(f);e().existsSync(h)||e().mkdirSync(h,{recursive:!0}),e().writeFileSync(f,JSON.stringify(d,null,2),{encoding:"utf-8",mode:384});try{e().chmodSync(f,384)}catch{}}async function t(a,b){let c=await o(),d=q().admins.find(b=>b.username===a);if(!d)return await c.hash(b,12),!1;if(!await c.compare(b,d.passwordHash))return!1;let e=m.encode(a),f=m.encode(d.username);return e.length===f.length&&i().timingSafeEqual(e,f)}function u(a){return Buffer.from(a).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function v(a,b){let c=await i().subtle.importKey("raw",m.encode(b),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return u(new Uint8Array(await i().subtle.sign("HMAC",c,m.encode(a))))}async function w(a){let b=q().sessionSecret;if(!b)throw Error("Session secret not configured. Run setup first.");let c=Math.floor(Date.now()/1e3),d=u(m.encode(JSON.stringify({sub:a,iat:c,exp:c+l}))),e=await v(d,b);return`${d}.${e}`}async function x(a){let b;if(!a)return null;let c=a.split(".");if(2!==c.length)return null;let[d,e]=c;if(!d||!e)return null;let f=q().sessionSecret;if(!f||!function(a,b){if(a.length!==b.length)return!1;let c=m.encode(a),d=m.encode(b);return i().timingSafeEqual(c,d)}(await v(d,f),e))return null;try{let a=n.decode(function(a){let b=a.replace(/-/g,"+").replace(/_/g,"/"),c=b.padEnd(4*Math.ceil(b.length/4),"=");return new Uint8Array(Buffer.from(c,"base64"))}(d));b=JSON.parse(a)}catch{return null}if("number"!=typeof b.exp||"number"!=typeof b.iat)return null;let g=Math.floor(Date.now()/1e3);return b.exp<=g||b.iat>g+60?null:{username:"string"==typeof b.sub?b.sub:"",issuedAt:b.iat,expiresAt:b.exp}}},73024:a=>{"use strict";a.exports=require("node:fs")},74729:a=>{"use strict";a.exports=require("bcryptjs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[331,692],()=>b(b.s=10086));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/auth/logout/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/auth/logout/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"470":{"*":{"id":"39508","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"82146","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"31603","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"75170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"12263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"78922","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"13932","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"54160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"68495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"29234","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"77526","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"71128","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/globals.css":{"id":3673,"name":"*","chunks":["177","static/chunks/app/layout-96206a34ff37a783.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/LoginForm.tsx":{"id":5554,"name":"*","chunks":[],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/DashboardClient.tsx":{"id":9843,"name":"*","chunks":["856","static/chunks/856-4671c40140d5540a.js","974","static/chunks/app/page-0314989c31e18b4b.js"],"async":false},"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/components/SetupForm.tsx":{"id":470,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/":[],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/layout":[{"inlined":false,"path":"static/css/9f7ffdac282b0450.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/page":[{"inlined":false,"path":"static/css/c3a7306cb2ba3f6c.css"}],"/Users/janos/.openclaw/workspace/projects/zigrix/dashboard/src/app/api/auth/logout/route":[]},"rscModuleMapping":{"470":{"*":{"id":"90726","name":"*","chunks":[],"async":false}},"622":{"*":{"id":"51384","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"23597","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"89748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"73041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"5554":{"*":{"id":"35894","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"81170","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"36893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"69576","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}},"9843":{"*":{"id":"45146","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|