wiki-viewer 2.17.0 → 2.17.2
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/[slug]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js +5 -5
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/app/[slug]/[[...rest]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ovz0q._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04smpj8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09vw_yd._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0khd8u0._.js +5 -7
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pftyle._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qwikxp._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~q~4xc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_0xy09r4._.js → 0~w0_katex_dist_katex_mjs_0t6hfzy._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hs37r-._.js → [root-of-the-server]__0gg-.v~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0k6g8yo._.js +18 -18
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_07z6xgj._.js → node_modules__pnpm_0-71x-j._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hn06p6._.js → node_modules__pnpm_0.-rpgq._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0sz5dcp._.js → node_modules__pnpm_0.cctde._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0.0y8dg._.js → node_modules__pnpm_02zw~h_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_13hc3_.._.js → node_modules__pnpm_03qtb48._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0x-5nk_._.js → node_modules__pnpm_04.xj_.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_09g45.a._.js → node_modules__pnpm_0c414b2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0e09a-z._.js → node_modules__pnpm_0c8gg~8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0r.hmrh._.js → node_modules__pnpm_0fxz20v._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_10f188s._.js → node_modules__pnpm_0gqqzid._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_08qpul6._.js → node_modules__pnpm_0izzet6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_04nkgqx._.js → node_modules__pnpm_0lrwvt7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0sq.-3j._.js → node_modules__pnpm_0mgx7ud._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0o~aj4l._.js → node_modules__pnpm_0pdmyaz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_12sg_v9._.js → node_modules__pnpm_0pqf~nv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0k3~.84._.js → node_modules__pnpm_0rvh.bg._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0cgmua_._.js → node_modules__pnpm_0u97yk9._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0883dhq._.js → node_modules__pnpm_0wpvrc-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_09nd60w._.js → node_modules__pnpm_0ywf~mm._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_dnupf._.js → node_modules__pnpm_0~82dm0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_042hoyi._.js → node_modules__pnpm_0~_s5ha._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_03rdaxh._.js → node_modules__pnpm_10f4qpz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0fby.xx._.js → node_modules__pnpm_114x37.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0izpuu-._.js → node_modules__pnpm_12h2abk._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_133r6o8._.js → node_modules__pnpm_12tjs4x._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0asm~29._.js → node_modules__pnpm_12~1zv2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0sa2k.e._.js → node_modules__pnpm_13er52c._.js} +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{0v32snen~_e9n.css → 0-cls2jl5dv52.css} +1 -1
- package/.next/standalone/.next/static/chunks/{17bpqqaflajl~.js → 144gewald~_d3.js} +18 -18
- package/.next/standalone/.test-floor +1 -1
- package/.next/standalone/isometric-codebase-map.html +1 -1
- package/.next/standalone/isometric-codebase-map.json +1 -1
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wh2~l1._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yqf3ec._.js +0 -4
- /package/.next/standalone/.next/static/{KRKPuzz8vrMWZ0HNKmF4W → mgmXU8yiKNFpuBzAAefbK}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{KRKPuzz8vrMWZ0HNKmF4W → mgmXU8yiKNFpuBzAAefbK}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{KRKPuzz8vrMWZ0HNKmF4W → mgmXU8yiKNFpuBzAAefbK}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
704
|
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
{ id: "system-api", code: "SY", name: "System config API", group: "entry", loc: "902 LOC", gx: 3, gy: 7, w: 2, d: 2, h: 4, what: "Changes workspaces, users, administrators, pins, and local settings.", how: "14 route handlers use session and origin checks before mutating persisted configuration.", talks: ["auth", "workspace", "auth-store"] },
|
|
864
864
|
{ id: "share-api", code: "SH", name: "Shared documents", group: "entry", loc: "817 LOC", gx: 6, gy: 7, w: 3, d: 2, h: 4, what: "Publishes read-only document links with optional unlock and expiry controls.", how: "Share routes and shared-docs modules create opaque grants, validate unlocks, and render sanitized content.", talks: ["auth", "share-store", "markdown"] },
|
|
865
865
|
{ id: "mcp", code: "MC", name: "MCP adapter", group: "compute", loc: "2,911 LOC", gx: 10, gy: 7, w: 3, d: 2, h: 6, what: "Lets MCP clients use the agent contract through a separate npm package.", how: "packages/wiki-viewer-mcp defines 13 Zod-backed tools and a typed HTTP client with revision and scope errors.", talks: ["agent-api", "proof"] },
|
|
866
|
-
{ id: "app-runner", code: "AR", name: "Node app runner", group: "compute", loc: "738 LOC", gx: 14, gy: 7, w: 3, d: 2, h: 5, what: "Runs trusted node-app folders and proxies their local web surface.", how: "app-runner.ts manages child processes, readiness probes, ports, logs, access-checked forwarding, pinned boot restore, crash caps, and file-change supervision.", talks: ["wiki-api", "path", "web-shell"] },
|
|
866
|
+
{ id: "app-runner", code: "AR", name: "Node app runner", group: "compute", loc: "738 LOC", gx: 14, gy: 7, w: 3, d: 2, h: 5, what: "Runs trusted node-app folders and proxies their local web surface.", how: "app-runner.ts manages child processes, readiness probes, ports, logs, access-checked forwarding (a workspace-root app has relPath '' and is proxied via the reserved ~root sentinel), pinned boot restore, crash caps, and file-change supervision.", talks: ["wiki-api", "path", "web-shell"] },
|
|
867
867
|
{ id: "git", code: "GT", name: "Git integration", group: "domain", loc: "871 LOC", gx: 18, gy: 7, w: 2, d: 2, h: 5, what: "Shows repository history and supports safe branch-oriented workspace actions.", how: "git.ts wraps the system binary, scans for leaked credentials, and backs history, diff, branch, and clone routes.", talks: ["wiki-api", "path", "workspace"] },
|
|
868
868
|
{ id: "sshfs", code: "SF", name: "SSHFS remotes", group: "domain", loc: "464 LOC", gx: 21, gy: 7, w: 2, d: 2, h: 4, what: "Makes remote folders appear as workspaces through a local mount boundary.", how: "sshfs.ts and mount helpers manage remote lifecycle, reconnects, and mount hazards.", talks: ["workspace", "path", "cli"] },
|
|
869
869
|
{ id: "hosted-apps", code: "HA", name: "Hosted apps", group: "compute", loc: "560 LOC", gx: 24, gy: 7, w: 2, d: 2, h: 4, what: "Maps short user-chosen slugs to HTML directories or running node apps reachable at /app/<slug>.", how: "hosted-apps.ts persists the slug registry (~/.wiki-viewer/hosted-apps.json); /api/wiki/hosted-apps manages entries, pinning, and derived node status; the sidebar sorts pinned apps first and exposes status/error popovers with restart-now; app-proxy-core.ts forwards existing and slug-routed node traffic while the /app/<slug> route serves HTML dirs dir-aware or proxies each request to the live child port.", talks: ["wiki-api", "path", "workspace", "app-runner", "web-shell"] },
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
{ "id": "system-api", "code": "SY", "name": "System config API", "group": "entry", "loc": "902 LOC", "gx": 3, "gy": 7, "w": 2, "d": 2, "h": 4, "what": "Changes workspaces, users, administrators, pins, and local settings.", "how": "14 route handlers use session and origin checks before mutating persisted configuration.", "talks": ["auth", "workspace", "auth-store"] },
|
|
73
73
|
{ "id": "share-api", "code": "SH", "name": "Shared documents", "group": "entry", "loc": "817 LOC", "gx": 6, "gy": 7, "w": 3, "d": 2, "h": 4, "what": "Publishes read-only document links with optional unlock and expiry controls.", "how": "Share routes and shared-docs modules create opaque grants, validate unlocks, and render sanitized content.", "talks": ["auth", "share-store", "markdown"] },
|
|
74
74
|
{ "id": "mcp", "code": "MC", "name": "MCP adapter", "group": "compute", "loc": "2,911 LOC", "gx": 10, "gy": 7, "w": 3, "d": 2, "h": 6, "what": "Lets MCP clients use the agent contract through a separate npm package.", "how": "packages/wiki-viewer-mcp defines 13 Zod-backed tools and a typed HTTP client with revision and scope errors.", "talks": ["agent-api", "proof"] },
|
|
75
|
-
{ "id": "app-runner", "code": "AR", "name": "Node app runner", "group": "compute", "loc": "738 LOC", "gx": 14, "gy": 7, "w": 3, "d": 2, "h": 5, "what": "Runs trusted node-app folders and proxies their local web surface.", "how": "app-runner.ts manages child processes, readiness probes, ports, logs, access-checked forwarding, pinned boot restore, crash caps, and file-change supervision.", "talks": ["wiki-api", "path", "web-shell"] },
|
|
75
|
+
{ "id": "app-runner", "code": "AR", "name": "Node app runner", "group": "compute", "loc": "738 LOC", "gx": 14, "gy": 7, "w": 3, "d": 2, "h": 5, "what": "Runs trusted node-app folders and proxies their local web surface.", "how": "app-runner.ts manages child processes, readiness probes, ports, logs, access-checked forwarding (a workspace-root app has relPath '' and is proxied via the reserved ~root sentinel), pinned boot restore, crash caps, and file-change supervision.", "talks": ["wiki-api", "path", "web-shell"] },
|
|
76
76
|
{ "id": "git", "code": "GT", "name": "Git integration", "group": "domain", "loc": "871 LOC", "gx": 18, "gy": 7, "w": 2, "d": 2, "h": 5, "what": "Shows repository history and supports safe branch-oriented workspace actions.", "how": "git.ts wraps the system binary, scans for leaked credentials, and backs history, diff, branch, and clone routes.", "talks": ["wiki-api", "path", "workspace"] },
|
|
77
77
|
{ "id": "sshfs", "code": "SF", "name": "SSHFS remotes", "group": "domain", "loc": "464 LOC", "gx": 21, "gy": 7, "w": 2, "d": 2, "h": 4, "what": "Makes remote folders appear as workspaces through a local mount boundary.", "how": "sshfs.ts and mount helpers manage remote lifecycle, reconnects, and mount hazards.", "talks": ["workspace", "path", "cli"] },
|
|
78
78
|
{ "id": "hosted-apps", "code": "HA", "name": "Hosted apps", "group": "compute", "loc": "560 LOC", "gx": 24, "gy": 7, "w": 2, "d": 2, "h": 4, "what": "Maps short user-chosen slugs to HTML directories or running node apps reachable at /app/<slug>.", "how": "hosted-apps.ts persists the slug registry (~/.wiki-viewer/hosted-apps.json); /api/wiki/hosted-apps manages entries, pinning, and derived node status; the sidebar sorts pinned apps first and exposes status/error popovers with restart-now; app-proxy-core.ts forwards existing and slug-routed node traffic while the /app/<slug> route serves HTML dirs dir-aware or proxies each request to the live child port.", "talks": ["wiki-api", "path", "workspace", "app-runner", "web-shell"] },
|
|
@@ -15,7 +15,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
15
15
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
16
16
|
|
|
17
17
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
18
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"2.17.
|
|
18
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"2.17.2"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/wiki-viewer/wiki-viewer","allowedDevOrigins":["localhost"],"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","turbopack":{"root":"/home/runner/work/wiki-viewer/wiki-viewer"},"distDirRoot":".next"}
|
|
19
19
|
|
|
20
20
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[536654,e=>{"use strict";var t=e.i(912714),r=e.i(750227);function a(e){return!!(r.default.isAbsolute(e)||".."===e||e.startsWith(".."+r.default.sep)||e.startsWith("../"))}async function n(e,s,i={}){let l;if(!e)return null;let o=function(e){if(e.includes("\0")||r.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=r.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(s);if(null===o)return null;if(i.deniedSegments?.length){for(let e of o.split("/").filter(Boolean))if(i.deniedSegments.includes(e))return null}try{l=await (0,t.realpath)(e)}catch{return null}let u=o?r.default.join(l,o):l;try{let e=await (0,t.realpath)(u),n=r.default.relative(l,e);if(a(n))return null;return{relPath:o,absolutePath:e}}catch{if(!i.allowMissing)return null;let e=u;for(;;){let n=r.default.dirname(e);if(n===e)break;try{let e=await (0,t.realpath)(n),s=r.default.relative(l,e);if(a(s))return null;return{relPath:o,absolutePath:u}}catch{e=n}}return null}}e.s(["resolveWorkspacePath",0,n])},402662,e=>{"use strict";var t=e.i(351216);e.s(["checkOrigin",0,function(e){let r=e.method.toUpperCase();if("GET"===r||"HEAD"===r||"OPTIONS"===r)return null;let a=e.headers.get("origin"),n=e.headers.get("referer");if(!a&&!n)return null;let s=function(e){let t=Array.from(new Set(["localhost","127.0.0.1",e.split(":")[0],...(process.env.WIKI_OWNER_HOSTS??"").split(",").map(e=>e.trim()).filter(Boolean)])),r=["",":3000",":3003"];e.includes(":")&&r.push(":"+e.split(":")[1]);let a=new Set;for(let e of t)for(let t of["http","https"])for(let n of r)a.add(`${t}://${e}${n}`);return a}(e.headers.get("host")??"");if(a)return s.has(a)?null:t.NextResponse.json({error:"FORBIDDEN",message:"Bad origin"},{status:403});if(n){try{let{protocol:e,host:t}=new URL(n);if(s.has(`${e}//${t}`))return null}catch{}return t.NextResponse.json({error:"FORBIDDEN",message:"Bad referer"},{status:403})}return null}])},744636,e=>{"use strict";var t=e.i(985426),r=e.i(257574),a=e.i(507835),n=e.i(457789),s=e.i(119791),i=e.i(141062),l=e.i(957291),o=e.i(535899),u=e.i(610241),d=e.i(62749),p=e.i(624891),c=e.i(725836),h=e.i(532736),f=e.i(257858),v=e.i(487476),m=e.i(193695);e.i(484264);var R=e.i(315709),w=e.i(912714),g=e.i(750227),y=e.i(351216),_=e.i(402662),E=e.i(660038),N=e.i(536654);async function x(e,t){try{let r=g.default.join(e,t,"package.json");return(await (0,w.stat)(r)).isFile()}catch{return!1}}async function P(e,t){try{let r=g.default.join(e,t,"index.html");return(await (0,w.stat)(r)).isFile()}catch{return!1}}var j=e.i(787140),k=e.i(716234);async function C(e){let t=await (0,E.resolveWorkspaceForUser)(e);if(!t.ok)return y.NextResponse.json({error:t.code},{status:t.status});let{rootDir:r}=t,{searchParams:a}=new URL(e.url),n=a.get("dir")??"",s=await (0,N.resolveWorkspacePath)(r,n,{allowMissing:!0,deniedSegments:k.DENIED_SEGMENTS});if(!s)return y.NextResponse.json({error:"Invalid path"},{status:400});let i=s.absolutePath;try{let e;try{e=await (0,w.readdir)(i)}catch{return y.NextResponse.json({entries:[]})}let t=await Promise.all(e.map(async e=>{let t=g.default.join(i,e),a=await (0,w.stat)(t);if(!a.isDirectory())return{name:e,type:"file",size:a.size,modifiedAt:a.mtime.toISOString()};let s=n?`${n}/${e}`:e,l=await x(r,s),o=!l&&await P(r,s),u={name:e,type:l?"node-app":o?"app":"dir",modifiedAt:a.mtime.toISOString()},d=await (0,j.detectGitRepo)(t);return d&&(u.git=d),u}));return t.sort((e,t)=>{let r="dir"===e.type||"app"===e.type||"node-app"===e.type,a="dir"===t.type||"app"===t.type||"node-app"===t.type;return r!==a?r?-1:1:e.name.localeCompare(t.name)}),y.NextResponse.json({entries:t})}catch{return y.NextResponse.json({error:"Failed to list directory"},{status:500})}}async function S(e){let t=(0,_.checkOrigin)(e);if(t)return t;let r=await (0,E.resolveWorkspaceForUser)(e,"write");if(!r.ok)return y.NextResponse.json({error:r.code},{status:r.status});let{rootDir:a}=r,n=(await e.json()).path;if(!n||"string"!=typeof n)return y.NextResponse.json({error:"Invalid path"},{status:400});let s=await (0,N.resolveWorkspacePath)(a,n,{deniedSegments:k.DENIED_SEGMENTS});if(!s||s.absolutePath===a)return y.NextResponse.json({error:"Invalid path"},{status:400});let i=s.absolutePath;try{return(await (0,w.stat)(i)).isDirectory()?await (0,w.rmdir)(i):await (0,w.unlink)(i),y.NextResponse.json({ok:!0})}catch(t){let e=t.code;if("ENOENT"===e)return y.NextResponse.json({error:"Not found"},{status:404});if("ENOTEMPTY"===e)return y.NextResponse.json({error:"Folder is not empty"},{status:409});return y.NextResponse.json({error:"Delete failed"},{status:500})}}e.s(["DELETE",0,S,"GET",0,C],209429);var A=e.i(209429);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/wiki/route",pathname:"/api/wiki",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/wiki/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:O,serverHooks:I}=b;async function D(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/wiki/route";w=w.replace(/\/index$/,"")||"/";let g=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,params:_,nextConfig:E,parsedUrl:N,isDraftMode:x,prerenderManifest:P,routerServerContext:j,isOnDemandRevalidate:k,revalidateOnlyGenerated:C,resolvedPathname:S,clientReferenceManifest:A,serverActionsManifest:T}=g,O=(0,l.normalizeAppPath)(w),I=!!(P.dynamicRoutes[O]||P.routes[S]),D=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,N,!1):t.end("This page could not be found"),null);if(I&&!x){let e=!!P.routes[S],t=P.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await D();throw new m.NoFallbackError}}let q=null;!I||b.isDev||x||(q="/index"===(q=S)?"/":q);let U=!0===b.isDev||!I,M=I&&!U;T&&A&&(0,i.setManifestsSingleton)({page:w,clientReferenceManifest:A,serverActionsManifest:T});let H=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),W=!!(null==j?void 0:j.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,P,B);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let z={params:_,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:K,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,j)},sharedContext:{buildId:y}},G=new o.NodeNextRequest(e),L=new o.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>b.handle(V,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${H} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${H} ${w}`)}),l=async n=>{var s,l;let o=async({previousCacheEntry:r})=>{try{if(!B&&k&&C&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=z.renderOpts.fetchMetrics;let l=z.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let o=z.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(G,L,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);o&&(t[v.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:k})},!1,j),t}},u=await b.handleResponse({req:e,nextConfig:E,cacheKey:q,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:C,responseGenerator:o,waitUntil:a.waitUntil,isMinimalMode:B});if(!I)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return B&&I||d.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(G,L,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};W&&$?await l($):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${H} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},l),void 0,!W))}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:k})},!1,j),I)throw t;return await (0,c.sendResponse)(G,L,new Response(null,{status:500})),null}}e.s(["handler",0,D,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:O})},"routeModule",0,b,"serverHooks",0,I,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,O],744636)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},769787,e=>{e.v(t=>Promise.all(["server/chunks/01er_better-auth_dist_adapters_kysely-adapter_index_mjs_0s~-4gu._.js"].map(t=>e.l(t))).then(()=>t(717789)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},697743,e=>{e.v(t=>Promise.all(["server/chunks/0.u4_next_05jevxw._.js"].map(t=>e.l(t))).then(()=>t(428325)))},99243,e=>{e.v(e=>Promise.resolve().then(()=>e(313414)))},893412,e=>{e.v(e=>Promise.resolve().then(()=>e(499465)))},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0wh2~l1._.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
module.exports=[402662,e=>{"use strict";var t=e.i(351216);e.s(["checkOrigin",0,function(e){let r=e.method.toUpperCase();if("GET"===r||"HEAD"===r||"OPTIONS"===r)return null;let s=e.headers.get("origin"),n=e.headers.get("referer");if(!s&&!n)return null;let a=function(e){let t=Array.from(new Set(["localhost","127.0.0.1",e.split(":")[0],...(process.env.WIKI_OWNER_HOSTS??"").split(",").map(e=>e.trim()).filter(Boolean)])),r=["",":3000",":3003"];e.includes(":")&&r.push(":"+e.split(":")[1]);let s=new Set;for(let e of t)for(let t of["http","https"])for(let n of r)s.add(`${t}://${e}${n}`);return s}(e.headers.get("host")??"");if(s)return a.has(s)?null:t.NextResponse.json({error:"FORBIDDEN",message:"Bad origin"},{status:403});if(n){try{let{protocol:e,host:t}=new URL(n);if(a.has(`${e}//${t}`))return null}catch{}return t.NextResponse.json({error:"FORBIDDEN",message:"Bad referer"},{status:403})}return null}])},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},761095,(e,t,r)=>{t.exports=e.x("node:net",()=>require("node:net"))},345212,762512,e=>{"use strict";var t=e.i(874533),r=e.i(902157),s=e.i(427597),n=e.i(761095),a=e.i(750227);function i(e,t,r=5){switch(t.type){case"started":return{state:{...e,status:"running",crashCount:0,lastError:void 0},action:"none"};case"manual-restart":return{state:{...e,status:"restarting",crashCount:0,lastError:void 0},action:"restart"};case"file-change":if("error"===e.status)return{state:{...e,fileWatchRestartCount:e.fileWatchRestartCount+1},action:"none"};return{state:{...e,status:"restarting",fileWatchRestartCount:e.fileWatchRestartCount+1},action:"restart"};case"crash":{if("error"===e.status)return{state:e,action:"none"};let t=e.crashCount+1;if(t>r)return{state:{...e,crashCount:t,status:"error",lastError:`Auto-restart gave up after ${t} crash restarts (cap ${r}). Fix the app and restart manually.`},action:"none"};return{state:{...e,crashCount:t,status:"restarting"},action:"restart"}}case"stop":return{state:{...e,status:"stopped"},action:"none"}}}var o=e.i(912714),l=e.i(660526),u=e.i(832852);let p="__hosted_apps__",c=/^[a-z0-9][a-z0-9-]*$/,d=new Set(["api","app","apps","s","signin","signout","_next","assets","upload","owner","share","static","public","favicon.ico"]);function h(){let e=process.env.HOME??l.default.homedir();return a.default.join(e,".wiki-viewer")}function f(){return a.default.join(h(),"hosted-apps.json")}async function g(){try{let e=await (0,o.readFile)(f(),"utf8"),t=JSON.parse(e);return{version:1,apps:Array.isArray(t.apps)?t.apps:[]}}catch{return null}}async function v(e){await (0,o.mkdir)(h(),{recursive:!0});let t=f()+".tmp";await (0,o.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,o.chmod)(t,384)}catch{}await (0,o.rename)(t,f())}async function w(){let e=await g();if(e)return e;let t={version:1,apps:[]};return await v(t),t}async function m(){let e=await g();return e?.apps??[]}async function y(e){let t=await g();return t?t.apps.find(t=>t.slug===e)??null:null}async function R(e){var t;let r="string"!=typeof(t=e.slug)||0===t.length?{ok:!1,code:"SLUG_REQUIRED"}:c.test(t)?d.has(t)?{ok:!1,code:"SLUG_RESERVED"}:{ok:!0}:{ok:!1,code:"SLUG_INVALID"};return r.ok?(0,u.withFileMutex)(p,async()=>{let t=await w(),r=t.apps.find(t=>t.slug===e.slug);if(r)return{ok:!1,code:"SLUG_TAKEN",ownerWorkspaceId:r.workspaceId};let s={slug:e.slug,type:e.type,workspaceId:e.workspaceId,relPath:e.relPath,..."node"===e.type&&e.script?{script:e.script}:{},..."node"===e.type&&e.persist?{persist:!0}:{},createdAt:new Date().toISOString()};return t.apps.push(s),await v(t),{ok:!0,app:s}}):{ok:!1,code:r.code}}async function _(e,t){return(0,u.withFileMutex)(p,async()=>{let r=await g();if(!r)return null;let s=r.apps.find(t=>t.slug===e);return s&&"node"===s.type?(t?s.persist=!0:delete s.persist,await v(r),s):null})}async function x(e){return(0,u.withFileMutex)(p,async()=>{let t=await g();if(!t)return!1;let r=t.apps.length;return t.apps=t.apps.filter(t=>t.slug!==e),t.apps.length!==r&&(await v(t),!0)})}e.s(["createHostedApp",0,R,"deleteHostedApp",0,x,"getBySlug",0,y,"listHostedApps",0,m,"setHostedAppPersist",0,_],762512);var E=e.i(359211);let k=new Map,b=new Set,P=new Map;function S(e){return`${e.workspaceId}\0${e.relPath}`}function T(e){let t=e.watcher;e.watcher=null,t&&t.close()}function A(e){let t=e.process;if(e.process=null,!t)return;try{!t.killed&&t.pid&&t.kill("SIGTERM")}catch{}let r=setTimeout(()=>{try{!t.killed&&t.pid&&t.kill("SIGKILL")}catch{}},2e3);t.once("exit",()=>clearTimeout(r))}function I(e,t){return new Promise(r=>{let s=(0,n.createConnection)(e,t);s.setTimeout(800),s.on("connect",()=>{s.destroy(),r(!0)}),s.on("error",()=>{s.destroy(),r(!1)}),s.on("timeout",()=>{s.destroy(),r(!1)})})}async function N(e){let[t,r]=await Promise.all([I(e,"127.0.0.1"),I(e,"::1")]);return t||r}async function j(e,t=3e4){let r=Date.now()+t;for(;Date.now()<r&&!e.abort.signal.aborted;){if(await N(e.port))return e.port;await new Promise(e=>setTimeout(e,400))}return null}function C(e){let t=a.default.join(e,"package.json");if(!(0,r.existsSync)(t))return null;try{return JSON.parse((0,r.readFileSync)(t,"utf-8"))}catch{return null}}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t){return O(t,"start")?"start":O(t,"preview")&&(0,r.existsSync)(a.default.join(e,"dist"))?"preview":O(t,"dev")?"dev":null}function D(){let e=a.default.dirname(process.execPath),t=process.env.PATH??"";return t.split(a.default.delimiter).includes(e)?t:`${e}${a.default.delimiter}${t}`}function q(e,t){e.restartTimer||e.abort.signal.aborted||(P.set(t,e.supervision),e.restartTimer=setTimeout(()=>{e.restartTimer=null,k.get(t)!==e||e.abort.signal.aborted||"error"===e.supervision.status||$(e.workspaceId,e.relPath,e.absPath,e.script,{persist:!0}).catch(()=>{})},250))}function H(e,t){e.persist&&!e.watcher&&(e.watcher=(0,s.watch)(e.absPath,{ignoreInitial:!0,ignored:t=>a.default.relative(e.absPath,t).split(a.default.sep).some(e=>["node_modules",".git",".next"].includes(e)),awaitWriteFinish:{stabilityThreshold:250,pollInterval:100}}),e.watcher.on("all",()=>{if(k.get(t)!==e||e.abort.signal.aborted)return;let r=i(e.supervision,{type:"file-change"});e.supervision=r.state,"restart"===r.action&&(A(e),e.status="restarting",q(e,t))}))}async function $(e,s,o,l,u){var p;let c=S({workspaceId:e,relPath:s}),d=u?.persist===!0,h=k.get(c);if(h&&"stopped"!==h.status&&"error"!==h.status&&"missing"!==h.status&&h.process)return d&&(h.persist=!0),{port:h.port};h&&(h.abort.abort(),h.restartTimer&&clearTimeout(h.restartTimer),T(h),A(h),k.delete(c)),b.delete(c);let f=await new Promise((e,t)=>{let r=(0,n.createServer)();r.listen(0,"127.0.0.1",()=>{let t=r.address(),s="object"==typeof t&&t?t.port:0;r.close(()=>e(s))}),r.on("error",t)}),g=(0,r.existsSync)(a.default.join(o,"pnpm-lock.yaml"))?"pnpm":(0,r.existsSync)(a.default.join(o,"yarn.lock"))?"yarn":(0,r.existsSync)(a.default.join(o,"bun.lockb"))||(0,r.existsSync)(a.default.join(o,"bun.lock"))?"bun":"npm",v=function(e,t,r,s){let n=C(e);if(!n)return null;let a=n.scripts??{},i=Object.keys({...n.dependencies,...n.devDependencies}).some(e=>"vite"===e||e.includes("vite")),o=["--port",String(r)],l=e=>({bin:t,args:"npm"===t?["run",e,"--",...o]:["run",e,...o],isVite:i});if(s)return O(a,s)?l(s):null;let u=U(e,a);return u?l(u):n.main?{bin:"node",args:[n.main,...o],isVite:!1}:null}(o,g,f,l);if(!v)throw Error("No runnable script found in package.json (need start, preview, or dev)");let w=P.get(c);P.delete(c);let m={workspaceId:e,relPath:s,absPath:o,script:l,port:f,process:null,status:"installing",logs:[],generation:1,abort:new AbortController,persist:!1,supervision:w??{crashCount:0,fileWatchRestartCount:0,status:"stopped"},watcher:null,restartTimer:null};k.set(c,m);let y=e=>{m.logs.push(e),m.logs.length>200&&m.logs.shift()};try{(0,r.existsSync)(a.default.join(o,"node_modules"))||(y(`[wiki-viewer] Running ${g} install…`),await (p=m.abort.signal,new Promise((e,r)=>{if(p.aborted)return void r(Error("Install aborted"));let s=[],n=e=>{y(e),s.push(e)},a=(0,t.spawn)(g,["install"],{cwd:o,stdio:"pipe",env:{...process.env,PATH:D()}}),i=()=>{try{a.kill("SIGTERM")}catch{}};p.addEventListener("abort",i,{once:!0});let l=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&n(e)}};a.stdout?.on("data",l),a.stderr?.on("data",l),a.on("error",e=>{p.removeEventListener("abort",i),r(e)}),a.on("exit",t=>{if(p.removeEventListener("abort",i),0===t)e();else{let e=s.slice(-20).join("\n");r(Error(`${g} install failed (exit ${t}):
|
|
2
|
-
${e}`))}})}))),m.status="starting",y(`[wiki-viewer] Starting on port ${f}: ${v.bin} ${v.args.join(" ")}`);let e=(0,t.spawn)(v.bin,v.args,{cwd:o,stdio:"pipe",env:{...process.env,PATH:D(),PORT:String(f),VITE_PORT:String(f)}});m.process=e;let s=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&y(e)}};return e.stdout?.on("data",s),e.stderr?.on("data",s),e.on("exit",e=>{if(k.get(c)===m&&"stopped"!==m.status&&!m.abort.signal.aborted){if(m.process=null,m.persist&&0!==e&&null!==e){let t=i(m.supervision,{type:"crash",detail:`exit ${e}`});m.supervision=t.state,"restart"===t.action?(m.status="restarting",q(m,c)):(m.status="error",m.error=m.supervision.lastError);return}m.status=0===e||null===e?"stopped":"error",m.error=e?`Process exited with code ${e}`:void 0}}),j(m).then(t=>{if(k.get(c)===m&&!m.abort.signal.aborted)if(t)m.status="running",m.supervision={...m.supervision,status:"running"},H(m,c);else if(m.persist){let t=i(m.supervision,{type:"crash",detail:"readiness timeout"});m.supervision=t.state,"restart"===t.action?(m.status="restarting",q(m,c)):(m.status="error",m.error=m.supervision.lastError);try{e.kill("SIGTERM")}catch{}}else{m.status="error",m.error="Port never became reachable (30 s timeout)";try{e.kill("SIGTERM")}catch{}}}),{port:f}}catch(e){throw k.get(c)===m&&(m.status="error",m.error=e instanceof Error?e.message:String(e)),e}}async function W(e,t,r,s,n=!0){let a=S({workspaceId:e,relPath:t}),o=k.get(a);return o?(o.supervision=i(o.supervision,{type:"manual-restart"}).state,o.persist=n,o.absPath=r,o.script=s,o.restartTimer&&clearTimeout(o.restartTimer),o.restartTimer=null,A(o),o.status="restarting",q(o,a),{port:o.port}):$(e,t,r,s,{persist:n})}async function M(){if("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)for(let e of(await m()).filter(e=>"node"===e.type&&!0===e.persist)){let t=S({workspaceId:e.workspaceId,relPath:e.relPath}),s=await (0,E.getWorkspace)(e.workspaceId),n=s?(0,E.safeWorkspacePath)(s.rootDir,e.relPath):null;if(!n||!(0,r.existsSync)(n)){b.add(t);continue}try{await $(e.workspaceId,e.relPath,n,e.script,{persist:!0})}catch{}}}("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)&&M(),e.s(["getScripts",0,function(e){let t=C(e);if(!t)return{scripts:[],defaultScript:null};let r=t.scripts??{};return{scripts:Object.keys(r),defaultScript:U(e,r)}},"getStatus",0,function(e,t){let r=k.get(S({workspaceId:e,relPath:t}));return r?{status:r.status,port:r.port||void 0,error:r.error,lastError:r.supervision.lastError??r.error,restartCount:r.supervision.crashCount,fileWatchRestartCount:r.supervision.fileWatchRestartCount,logs:r.logs}:b.has(S({workspaceId:e,relPath:t}))?{status:"missing",error:"Hosted app source directory is missing",logs:[]}:{status:"stopped",logs:[]}},"resolveByPrefix",0,function(e,t){for(let r=t.length;r>0;r--){let s=t.slice(0,r).join("/"),n=k.get(S({workspaceId:e,relPath:s}));if(n&&"running"===n.status&&n.port){let e="/"+t.slice(r).join("/");return{relPath:s,port:n.port,rest:e}}}return null},"restartApp",0,W,"setAppPersistence",0,function(e,t,r,s){let n=S({workspaceId:e,relPath:t}),a=k.get(n);a&&(a.persist=s,a.absPath=r,s?H(a,n):T(a))},"startApp",0,$,"stopApp",0,function(e,t){let r=S({workspaceId:e,relPath:t}),s=k.get(r);s&&(s.abort.abort(),s.restartTimer&&clearTimeout(s.restartTimer),s.restartTimer=null,T(s),s.status="stopped",k.delete(r),A(s))}],345212)},711376,e=>{"use strict";var t=e.i(985426),r=e.i(257574),s=e.i(507835),n=e.i(457789),a=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),p=e.i(62749),c=e.i(624891),d=e.i(725836),h=e.i(532736),f=e.i(257858),g=e.i(487476),v=e.i(193695);e.i(484264);var w=e.i(315709),m=e.i(351216),y=e.i(402662),R=e.i(660038),_=e.i(359211),x=e.i(345212);function E(e){return"1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER||e.isAdmin}async function k(e){let t=await (0,R.resolveWorkspaceForUser)(e);if(!t.ok)return m.NextResponse.json({error:t.code},{status:t.status});let{searchParams:r}=new URL(e.url),s=r.get("path")??"",n=(0,x.getStatus)(t.ws.id,s),a=(0,_.safeWorkspacePath)(t.rootDir,s),i=a?(0,x.getScripts)(a):{scripts:[],defaultScript:null};return m.NextResponse.json({...n,...i})}async function b(e){let t=(0,y.checkOrigin)(e);if(t)return t;let r=await (0,R.resolveWorkspaceForUser)(e,"write");if(!r.ok)return m.NextResponse.json({error:r.code},{status:r.status});let{rootDir:s}=r;if(!E(r))return m.NextResponse.json({error:"ADMIN_REQUIRED"},{status:403});let n=await e.json(),a=n.path;if(!a||"string"!=typeof a)return m.NextResponse.json({error:"Missing path"},{status:400});let i=(0,_.safeWorkspacePath)(s,a);if(!i)return m.NextResponse.json({error:"Invalid path"},{status:400});let o="string"==typeof n.script?n.script:void 0;try{let e=await (0,x.startApp)(r.ws.id,a,i,o);return m.NextResponse.json(e)}catch(e){return m.NextResponse.json({error:String(e)},{status:500})}}async function P(e){let t=(0,y.checkOrigin)(e);if(t)return t;let r=await (0,R.resolveWorkspaceForUser)(e,"write");if(!r.ok)return m.NextResponse.json({error:r.code},{status:r.status});if(!E(r))return m.NextResponse.json({error:"ADMIN_REQUIRED"},{status:403});let s=(await e.json()).path;return s&&"string"==typeof s?((0,x.stopApp)(r.ws.id,s),m.NextResponse.json({ok:!0})):m.NextResponse.json({error:"Missing path"},{status:400})}e.s(["DELETE",0,P,"GET",0,k,"POST",0,b],41743);var S=e.i(41743);let T=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/wiki/app/route",pathname:"/api/wiki/app",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/wiki/app/route.ts",nextConfigOutput:"standalone",userland:S,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:I,serverHooks:N}=T;async function j(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),T.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/wiki/app/route";m=m.replace(/\/index$/,"")||"/";let y=await T.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:R,params:_,nextConfig:x,parsedUrl:E,isDraftMode:k,prerenderManifest:b,routerServerContext:P,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,resolvedPathname:I,clientReferenceManifest:N,serverActionsManifest:j}=y,C=(0,o.normalizeAppPath)(m),O=!!(b.dynamicRoutes[C]||b.routes[I]),U=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,E,!1):t.end("This page could not be found"),null);if(O&&!k){let e=!!b.routes[I],t=b.dynamicRoutes[C];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await U();throw new v.NoFallbackError}}let D=null;!O||T.isDev||k||(D="/index"===(D=I)?"/":D);let q=!0===T.isDev||!O,H=O&&!q;j&&N&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:N,serverActionsManifest:j});let $=e.method||"GET",W=(0,a.getTracer)(),M=W.getActiveScopeSpan(),L=!!(null==P?void 0:P.isWrappedByNextServer),F=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await T.getIncrementalCache(e,x,b,F);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let B={params:_,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:q,incrementalCache:K,cacheLifeProfiles:x.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>T.onRequestError(e,t,s,n,P)},sharedContext:{buildId:R}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>T.handle(z,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=W.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${$} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${$} ${m}`)}),o=async n=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!F&&S&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await i(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let l=B.renderOpts.collectedTags;if(!O)return await (0,d.sendResponse)(G,V,a,B.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,s=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:S})},!1,P),t}},u=await T.handleResponse({req:e,nextConfig:x,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:F});if(!O)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});F||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return F&&O||p.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,d.sendResponse)(G,V,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};L&&M?await o(M):(n=W.getActiveScopeSpan(),await W.withPropagatedContext(e.headers,()=>W.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${m}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof v.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:S})},!1,P),O)throw t;return await (0,d.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:I})},"routeModule",0,T,"serverHooks",0,N,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,I],711376)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},769787,e=>{e.v(t=>Promise.all(["server/chunks/01er_better-auth_dist_adapters_kysely-adapter_index_mjs_0s~-4gu._.js"].map(t=>e.l(t))).then(()=>t(717789)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},697743,e=>{e.v(t=>Promise.all(["server/chunks/0.u4_next_05jevxw._.js"].map(t=>e.l(t))).then(()=>t(428325)))},99243,e=>{e.v(e=>Promise.resolve().then(()=>e(313414)))},893412,e=>{e.v(e=>Promise.resolve().then(()=>e(499465)))},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))}];
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0yqf3ec._.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|