wiki-viewer 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/index.html +1 -1
  24. package/.next/standalone/.next/server/app/index.rsc +1 -1
  25. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  26. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  28. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  30. package/.next/standalone/.next/server/app/signin.html +1 -1
  31. package/.next/standalone/.next/server/app/signin.rsc +1 -1
  32. package/.next/standalone/.next/server/app/signin.segments/_full.segment.rsc +1 -1
  33. package/.next/standalone/.next/server/app/signin.segments/_head.segment.rsc +1 -1
  34. package/.next/standalone/.next/server/app/signin.segments/_index.segment.rsc +1 -1
  35. package/.next/standalone/.next/server/app/signin.segments/_tree.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/signin.segments/signin/__PAGE__.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/signin.segments/signin.segment.rsc +1 -1
  38. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d89o98._.js +1 -1
  39. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  40. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  41. package/.next/standalone/.next/server/pages/404.html +1 -1
  42. package/.next/standalone/.next/server/pages/500.html +1 -1
  43. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  45. package/.next/standalone/README.md +36 -1
  46. package/.next/standalone/bin/postbuild.js +78 -0
  47. package/.next/standalone/bin/wiki-viewer.js +177 -4
  48. package/.next/standalone/package.json +3 -2
  49. package/README.md +36 -1
  50. package/bin/postbuild.js +78 -0
  51. package/bin/wiki-viewer.js +177 -4
  52. package/package.json +3 -2
  53. package/.next/standalone/public/public/logo.svg +0 -11
  54. /package/.next/standalone/.next/static/{Wmh3fc7aZWayMFJ54KS6E → Rg1RfvRWNzfcK3n1DDIQs}/_buildManifest.js +0 -0
  55. /package/.next/standalone/.next/static/{Wmh3fc7aZWayMFJ54KS6E → Rg1RfvRWNzfcK3n1DDIQs}/_clientMiddlewareManifest.js +0 -0
  56. /package/.next/standalone/.next/static/{Wmh3fc7aZWayMFJ54KS6E → Rg1RfvRWNzfcK3n1DDIQs}/_ssgManifest.js +0 -0
@@ -19,11 +19,11 @@
19
19
  "wasm": [],
20
20
  "assets": [],
21
21
  "env": {
22
- "__NEXT_BUILD_ID": "Wmh3fc7aZWayMFJ54KS6E",
23
- "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "N7yetCi6xuqojlKXcHaGivH+YR4wi/MR1Dk0phfpc5c=",
24
- "__NEXT_PREVIEW_MODE_ID": "f5e2c7c1ff46d6ac727ac001800a47cd",
25
- "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "c5dedc6ce00c56fdfe146bb48f65b75ce608ebea90e22aed6d42576aae6d46c1",
26
- "__NEXT_PREVIEW_MODE_SIGNING_KEY": "e6c06fc70aaba2b9d051fc6058d4a6bab84083d530d35b6a22db0dafb90c0341"
22
+ "__NEXT_BUILD_ID": "Rg1RfvRWNzfcK3n1DDIQs",
23
+ "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "CtKa7s0qjoq5qYh2smyNciM6b4wKY0jwE+q8+Qgt0Y8=",
24
+ "__NEXT_PREVIEW_MODE_ID": "c05a84112b393cce78ab88bfd98a9b9f",
25
+ "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "2a82a0680cdb3a051c8d454cce8972be8070c5b1d7e64f8ce67aa21b1eb33478",
26
+ "__NEXT_PREVIEW_MODE_SIGNING_KEY": "c4165c421f618616b0aeda58713cb132406f2dc6f74d8cec426f5f4113468f69"
27
27
  }
28
28
  }
29
29
  },
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0zay6349~v_wc.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ocp.6r7w_saw.js"/><script src="/_next/static/chunks/0quh-cfcrp2ib.js" async=""></script><script src="/_next/static/chunks/0vp-ahhagxptc.js" async=""></script><script src="/_next/static/chunks/turbopack-12~z-mr7b9b50.js" async=""></script><script src="/_next/static/chunks/0umlolnxs~j3r.js" async=""></script><script src="/_next/static/chunks/057umwogp53v_.js" async=""></script><script src="/_next/static/chunks/0ky8fha87kp0_.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Wiki Viewer</title><meta name="description" content="Local file browser, viewer, and editor"/><link rel="icon" href="/icon.svg?icon.0_efx.p39qv7r.svg" sizes="any" type="image/svg+xml"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="inter_5901b7c6-module__ec5Qua__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/0ocp.6r7w_saw.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[427423,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ThemeProvider\"]\n3:I[902063,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n4:I[259666,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n5:I[187014,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"Toaster\"]\n6:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ViewportBoundary\"]\nc:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"MetadataBoundary\"]\ne:I[514743,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0zay6349~v_wc.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0umlolnxs~j3r.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/057umwogp53v_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0ky8fha87kp0_.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"theme\":\"system\",\"position\":\"bottom-right\",\"toastOptions\":{\"className\":\"border-border bg-card text-card-foreground\"}}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Wmh3fc7aZWayMFJ54KS6E\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[319772,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Wiki Viewer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local file browser, viewer, and editor\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.0_efx.p39qv7r.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0zay6349~v_wc.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ocp.6r7w_saw.js"/><script src="/_next/static/chunks/0quh-cfcrp2ib.js" async=""></script><script src="/_next/static/chunks/0vp-ahhagxptc.js" async=""></script><script src="/_next/static/chunks/turbopack-12~z-mr7b9b50.js" async=""></script><script src="/_next/static/chunks/0umlolnxs~j3r.js" async=""></script><script src="/_next/static/chunks/057umwogp53v_.js" async=""></script><script src="/_next/static/chunks/0ky8fha87kp0_.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Wiki Viewer</title><meta name="description" content="Local file browser, viewer, and editor"/><link rel="icon" href="/icon.svg?icon.0_efx.p39qv7r.svg" sizes="any" type="image/svg+xml"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="inter_5901b7c6-module__ec5Qua__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;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><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/0ocp.6r7w_saw.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[427423,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ThemeProvider\"]\n3:I[902063,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n4:I[259666,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n5:I[187014,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"Toaster\"]\n6:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ViewportBoundary\"]\nc:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"MetadataBoundary\"]\ne:I[514743,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0zay6349~v_wc.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0umlolnxs~j3r.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/057umwogp53v_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0ky8fha87kp0_.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"theme\":\"system\",\"position\":\"bottom-right\",\"toastOptions\":{\"className\":\"border-border bg-card text-card-foreground\"}}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Rg1RfvRWNzfcK3n1DDIQs\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[319772,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Wiki Viewer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local file browser, viewer, and editor\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.0_efx.p39qv7r.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ocp.6r7w_saw.js"/><script src="/_next/static/chunks/0quh-cfcrp2ib.js" async=""></script><script src="/_next/static/chunks/0vp-ahhagxptc.js" async=""></script><script src="/_next/static/chunks/turbopack-12~z-mr7b9b50.js" async=""></script><script src="/_next/static/chunks/057umwogp53v_.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ocp.6r7w_saw.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[902063,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\"]\n3:I[259666,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\"]\n4:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"ViewportBoundary\"]\na:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"MetadataBoundary\"]\nc:I[514743,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$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\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Wmh3fc7aZWayMFJ54KS6E\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\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\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ocp.6r7w_saw.js"/><script src="/_next/static/chunks/0quh-cfcrp2ib.js" async=""></script><script src="/_next/static/chunks/0vp-ahhagxptc.js" async=""></script><script src="/_next/static/chunks/turbopack-12~z-mr7b9b50.js" async=""></script><script src="/_next/static/chunks/057umwogp53v_.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ocp.6r7w_saw.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[902063,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\"]\n3:I[259666,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\"]\n4:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"ViewportBoundary\"]\na:I[62711,[\"/_next/static/chunks/057umwogp53v_.js\"],\"MetadataBoundary\"]\nc:I[514743,[\"/_next/static/chunks/057umwogp53v_.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$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\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Rg1RfvRWNzfcK3n1DDIQs\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\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\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"N7yetCi6xuqojlKXcHaGivH+YR4wi/MR1Dk0phfpc5c=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"CtKa7s0qjoq5qYh2smyNciM6b4wKY0jwE+q8+Qgt0Y8=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "N7yetCi6xuqojlKXcHaGivH+YR4wi/MR1Dk0phfpc5c="
4
+ "encryptionKey": "CtKa7s0qjoq5qYh2smyNciM6b4wKY0jwE+q8+Qgt0Y8="
5
5
  }
@@ -119,7 +119,42 @@ The run config is saved to `~/.wiki-viewer/config.json`. Edit that file and run
119
119
 
120
120
  On Linux, install enables lingering (`loginctl enable-linger`) so the service runs without an active login session and survives reboot. If that step needs privileges, the installer prints the command to run manually.
121
121
 
122
- > Ad-hoc runs like `wiki-viewer ~/docs` ignore the saved config. Only the service (and `wiki-viewer service run`) reads `config.json`.
122
+ > Ad-hoc runs like `wiki-viewer ~/docs` ignore the saved bind (dir/host/port), but still read app env from `config.json`. Only the service (and `wiki-viewer service run`) reads the full config.
123
+
124
+ ### App configuration (env)
125
+
126
+ App settings (OAuth keys, allowlists, rate limits) are env vars. You can keep them in the config file instead of exporting them, and the service will load them on every start.
127
+
128
+ ```bash
129
+ # Set at install time
130
+ wiki-viewer service install ~/notes --env GOOGLE_CLIENT_ID=... --env GOOGLE_CLIENT_SECRET=...
131
+
132
+ # Or manage them later
133
+ wiki-viewer config set AUTH_ALLOWED_DOMAIN=example.com
134
+ wiki-viewer config set AGENT_RATE_LIMIT=120
135
+ wiki-viewer config unset AGENT_RATE_LIMIT
136
+ wiki-viewer config show
137
+ wiki-viewer service restart # apply changes
138
+ ```
139
+
140
+ These land in the `env` block of `config.json`:
141
+
142
+ ```json
143
+ {
144
+ "rootDir": "/home/you/notes",
145
+ "host": "0.0.0.0",
146
+ "port": "3003",
147
+ "https": true,
148
+ "env": {
149
+ "GOOGLE_CLIENT_ID": "...",
150
+ "AUTH_ALLOWED_DOMAIN": "example.com"
151
+ }
152
+ }
153
+ ```
154
+
155
+ **Precedence:** a variable exported in your shell always wins, then the `env` block in `config.json`, then values the CLI derives for you. So you can still override anything per run with `KEY=VALUE wiki-viewer ...` or `--env KEY=VALUE`.
156
+
157
+ **`BETTER_AUTH_URL` is derived automatically** from the host, port, and scheme you run with, so the common case needs no config. On `localhost` over HTTP the CLI also sets `WIKI_ALLOW_INSECURE=1` for you (browsers treat localhost as a secure context). If you serve plain HTTP on a non-local host the CLI prints a warning, because login cookies and service workers will not work there. Use `--https`, or terminate TLS in a proxy and set `BETTER_AUTH_URL` to its public `https://` URL via `config set` or your shell.
123
158
 
124
159
  ### Update
125
160
 
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+ // Post-build fixups for the Next.js standalone bundle so it survives `npm pack`
3
+ // and runs from a clean install. Run after `next build`.
4
+ //
5
+ // Three problems this addresses:
6
+ //
7
+ // 1. Static assets and public/ are not copied into the standalone output by
8
+ // Next, so we copy them in.
9
+ //
10
+ // 2. Next writes a .gitignore into .next/standalone that lists node_modules/
11
+ // and .next/. npm honors nested .gitignore files when packing, which strips
12
+ // the bundled runtime and compiled server from the tarball. Remove it.
13
+ //
14
+ // 3. Next 16.1+ with Turbopack emits content-hashed require ids for external
15
+ // packages, e.g. require("better-sqlite3-cf218e5bd1d5f04c"). That hashed id
16
+ // does not exist in node_modules, so the server throws "Cannot find module"
17
+ // at runtime. Rewrite every hashed external require back to its real package
18
+ // name. See vercel/next.js#88844 and #91654.
19
+
20
+ import { cpSync, rmSync, existsSync, readdirSync, statSync, readFileSync, writeFileSync } from "node:fs";
21
+ import path from "node:path";
22
+ import { fileURLToPath } from "node:url";
23
+
24
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
25
+ const standalone = path.join(root, ".next", "standalone");
26
+ const serverDir = path.join(standalone, ".next", "server");
27
+
28
+ function copy(from, to) {
29
+ if (!existsSync(from)) return;
30
+ cpSync(from, to, { recursive: true });
31
+ console.log(`postbuild: copied ${path.relative(root, from)} -> ${path.relative(root, to)}`);
32
+ }
33
+
34
+ // 1. static + public
35
+ copy(path.join(root, ".next", "static"), path.join(standalone, ".next", "static"));
36
+ copy(path.join(root, "public"), path.join(standalone, "public"));
37
+
38
+ // 2. drop the nested .gitignore that would exclude node_modules/.next from npm pack
39
+ const nestedGitignore = path.join(standalone, ".gitignore");
40
+ if (existsSync(nestedGitignore)) {
41
+ rmSync(nestedGitignore);
42
+ console.log("postbuild: removed .next/standalone/.gitignore");
43
+ }
44
+
45
+ // 3. strip Turbopack content hashes from external require ids.
46
+ // Only rewrite inside require("...") and the Turbopack external helper
47
+ // e.x("...") so we never touch unrelated 16-hex string literals (e.g. a
48
+ // dev fallback secret). Matches `<pkg>-<16 hex>` as the quoted argument.
49
+ const HASH_RE = /((?:require|\.x)\(\s*["'])((?:@[\w.-]+\/)?[\w.-]+)-[0-9a-f]{16}(["'])/g;
50
+
51
+ function walk(dir) {
52
+ for (const entry of readdirSync(dir)) {
53
+ const full = path.join(dir, entry);
54
+ const st = statSync(full);
55
+ if (st.isDirectory()) walk(full);
56
+ else if (entry.endsWith(".js")) stripHashes(full);
57
+ }
58
+ }
59
+
60
+ let rewrites = 0;
61
+ function stripHashes(file) {
62
+ const src = readFileSync(file, "utf8");
63
+ HASH_RE.lastIndex = 0;
64
+ if (!HASH_RE.test(src)) return;
65
+ HASH_RE.lastIndex = 0;
66
+ const out = src.replace(HASH_RE, "$1$2$3");
67
+ if (out !== src) {
68
+ writeFileSync(file, out);
69
+ rewrites++;
70
+ }
71
+ }
72
+
73
+ if (existsSync(serverDir)) {
74
+ walk(serverDir);
75
+ console.log(`postbuild: stripped Turbopack hashes in ${rewrites} file(s)`);
76
+ }
77
+
78
+ console.log("postbuild: done");
@@ -31,12 +31,18 @@ function printUsage() {
31
31
  console.error(" -H, --host <host> Host to bind to (default: localhost)");
32
32
  console.error(" --https Enable HTTPS (self-signed cert, enables service workers)");
33
33
  console.error("");
34
+ console.error(" -e, --env <KEY=VALUE> Set an app env var (repeatable; persisted with service install)");
35
+ console.error("");
34
36
  console.error("Commands:");
35
37
  console.error(" service install [dir] [options] Install as a user service (persists across reboot)");
36
38
  console.error(" service uninstall Remove the user service");
37
39
  console.error(" service status Show service status");
38
40
  console.error(" service logs Tail service logs");
41
+ console.error(" service restart Restart the service");
39
42
  console.error(" service run Run from saved config (used internally by the service)");
43
+ console.error(" config show Print the saved config");
44
+ console.error(" config set KEY=VALUE Set an app env var in the config");
45
+ console.error(" config unset KEY Remove an app env var from the config");
40
46
  console.error(" update Update wiki-viewer to the latest version and restart");
41
47
  console.error("");
42
48
  console.error("Examples:");
@@ -44,6 +50,8 @@ function printUsage() {
44
50
  console.error(" wiki-viewer ~/notes --https");
45
51
  console.error(" wiki-viewer ~/notes -p 8080 -H 0.0.0.0");
46
52
  console.error(" wiki-viewer service install ~/notes -H 0.0.0.0 -p 3003 --https");
53
+ console.error(" wiki-viewer service install ~/notes --env GOOGLE_CLIENT_ID=... --env GOOGLE_CLIENT_SECRET=...");
54
+ console.error(" wiki-viewer config set AUTH_ALLOWED_DOMAIN=example.com");
47
55
  console.error(" wiki-viewer update");
48
56
  }
49
57
 
@@ -60,6 +68,7 @@ function parseServeArgs(args) {
60
68
  const a = args[i];
61
69
  if (a === "-p" || a === "--port") { port = args[++i] ?? port; userSpecifiedPort = true; }
62
70
  else if (a === "-H" || a === "--host") host = args[++i] ?? host;
71
+ else if (a === "-e" || a === "--env") { i++; } // consumed by parseEnvFlags
63
72
  else if (a === "--https") useHttps = true;
64
73
  else if (!a.startsWith("-") && rootDir === undefined) rootDir = a;
65
74
  }
@@ -84,16 +93,21 @@ function saveConfig(cfg) {
84
93
  writeFileSync(configPath, JSON.stringify(cfg, null, 2) + "\n");
85
94
  }
86
95
 
87
- // Ad-hoc serve: pure CLI flags + built-in defaults. Does NOT read the config
88
- // file, so an installed service never silently alters a one-off invocation.
96
+ // Ad-hoc serve: CLI flags + built-in defaults. The run *shape* (dir/host/port)
97
+ // does NOT read the config file, so an installed service never silently alters
98
+ // a one-off invocation. App-level env (config.env) is still read, because those
99
+ // are settings about the app itself (allowlists, OAuth) rather than the bind.
89
100
  function resolveServeOptions(args) {
90
101
  const cli = parseServeArgs(args);
102
+ const cfg = loadConfig();
91
103
  return {
92
104
  rootDir: cli.rootDir ? path.resolve(cli.rootDir) : null,
93
105
  port: String(cli.port ?? "3000"),
94
106
  host: cli.host ?? "localhost",
95
107
  useHttps: Boolean(cli.useHttps),
96
108
  userSpecifiedPort: cli.userSpecifiedPort,
109
+ // App env: config.env as base, ad-hoc --env flags override per run.
110
+ configEnv: { ...(cfg.env ?? {}), ...parseEnvFlags(args) },
97
111
  };
98
112
  }
99
113
 
@@ -117,9 +131,77 @@ function resolveRunOptions(args) {
117
131
  host,
118
132
  useHttps: Boolean(useHttps),
119
133
  userSpecifiedPort,
134
+ configEnv: { ...(cfg.env ?? {}), ...parseEnvFlags(args) },
120
135
  };
121
136
  }
122
137
 
138
+ // ── environment resolution ───────────────────────────────────────────────────
139
+
140
+ // Env vars the app reads that the bin can derive or manage on the user's behalf.
141
+ // Everything else in config.env is passed through verbatim.
142
+ const LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", ""]);
143
+
144
+ function isLocalHost(h) {
145
+ return LOCAL_HOSTS.has(h);
146
+ }
147
+
148
+ // Build the env for the spawned server.
149
+ // Precedence (highest first):
150
+ // 1. the shell environment the user launched us with (explicit override)
151
+ // 2. config.env from ~/.wiki-viewer/config.json
152
+ // 3. values derived by the bin from the run options (e.g. BETTER_AUTH_URL)
153
+ //
154
+ // Returns { env, warnings } where warnings are human-readable strings to print
155
+ // before the server starts.
156
+ function computeServerEnv({ host, port, useHttps, configEnv }) {
157
+ const warnings = [];
158
+ const derived = {};
159
+
160
+ const scheme = useHttps ? "https" : "http";
161
+ const urlHost = isLocalHost(host) || host === "0.0.0.0" ? "localhost" : host;
162
+ const isSecureContext = useHttps || isLocalHost(host);
163
+
164
+ // BETTER_AUTH_URL: the app requires this in production so cookies and OAuth
165
+ // callbacks resolve. Derive it from the bind so the common case needs no
166
+ // config at all.
167
+ derived.BETTER_AUTH_URL = `${scheme}://${urlHost}:${port}`;
168
+
169
+ // The app refuses to boot in production over an insecure context unless
170
+ // WIKI_ALLOW_INSECURE=1. localhost http is fine (browsers treat it as secure).
171
+ // Remote http is not: auth cookies and service workers will silently break.
172
+ if (!isSecureContext) {
173
+ derived.WIKI_ALLOW_INSECURE = "1";
174
+ warnings.push(
175
+ `Serving plain HTTP on a non-local host (${host}). Browsers treat this as\n` +
176
+ ` an insecure context: login cookies, service workers and PDF.js will not\n` +
177
+ ` work reliably, and OAuth callbacks will fail.\n` +
178
+ ` Fix: re-run with --https, or put a TLS-terminating proxy in front and set\n` +
179
+ ` BETTER_AUTH_URL to its public https:// URL (see "env" in ${configPath}).`,
180
+ );
181
+ } else if (isLocalHost(host) && !useHttps) {
182
+ // localhost http is a secure context for the browser, but the app's prod
183
+ // guard still wants the bypass flag set explicitly. Do it for the user.
184
+ derived.WIKI_ALLOW_INSECURE = "1";
185
+ }
186
+
187
+ // Layer: derived < config.env < shell env.
188
+ const env = { ...derived, ...configEnv };
189
+
190
+ // Note when the shell or config overrode a derived value so the user isn't
191
+ // surprised that --host/--port didn't change the auth URL.
192
+ if (configEnv.BETTER_AUTH_URL && configEnv.BETTER_AUTH_URL !== derived.BETTER_AUTH_URL) {
193
+ // config wins over derived; that's intentional, no warning needed.
194
+ }
195
+ if (process.env.BETTER_AUTH_URL && process.env.BETTER_AUTH_URL !== env.BETTER_AUTH_URL) {
196
+ warnings.push(
197
+ `BETTER_AUTH_URL is set in your shell (${process.env.BETTER_AUTH_URL}) and\n` +
198
+ ` overrides the derived/config value.`,
199
+ );
200
+ }
201
+
202
+ return { env, warnings };
203
+ }
204
+
123
205
  // ── HTTPS cert generation ──────────────────────────────────────────────────
124
206
 
125
207
  function ensureCerts(host) {
@@ -189,7 +271,7 @@ function getNetworkAddress() {
189
271
  // ── start ──────────────────────────────────────────────────────────────────
190
272
 
191
273
  async function start(opts) {
192
- const { rootDir: resolvedRoot, useHttps } = opts;
274
+ const { rootDir: resolvedRoot, useHttps, configEnv = {} } = opts;
193
275
  let { port, host, userSpecifiedPort } = opts;
194
276
 
195
277
  if (!existsSync(serverJs)) {
@@ -221,11 +303,18 @@ async function start(opts) {
221
303
  // Otherwise it must bind to the user-requested host directly.
222
304
  const internalHost = useHttps ? "127.0.0.1" : host;
223
305
 
306
+ // Resolve the app environment (config.env + shell overrides + derived
307
+ // BETTER_AUTH_URL etc.) against the user-facing host/port, then print any
308
+ // guidance before the server boots.
309
+ const { env: appEnv, warnings } = computeServerEnv({ host, port, useHttps, configEnv });
310
+ for (const w of warnings) console.log(`\n⚠️ ${w}`);
311
+
224
312
  const child = spawn(process.execPath, [serverJs], {
225
313
  cwd: path.join(appRoot, ".next", "standalone"),
226
314
  stdio: "inherit",
227
315
  env: {
228
- ...process.env,
316
+ ...appEnv, // derived defaults + config.env
317
+ ...process.env, // shell env always wins over derived/config
229
318
  ...(resolvedRoot ? { ROOT_DIR: resolvedRoot } : {}),
230
319
  PORT: internalPort,
231
320
  HOSTNAME: internalHost,
@@ -310,17 +399,38 @@ function runQuiet(cmd, args) {
310
399
 
311
400
  // ── service: install ──────────────────────────────────────────────────────────
312
401
 
402
+ // Pull repeatable `--env KEY=VALUE` (or `-e KEY=VALUE`) pairs out of an argv
403
+ // list. Returns the collected map; the caller has already parsed the rest.
404
+ function parseEnvFlags(args) {
405
+ const env = {};
406
+ for (let i = 0; i < args.length; i++) {
407
+ if (args[i] === "--env" || args[i] === "-e") {
408
+ const pair = args[++i];
409
+ if (!pair || !pair.includes("=")) {
410
+ console.error(`Error: --env expects KEY=VALUE (got: ${pair ?? "(nothing)"})`);
411
+ process.exit(1);
412
+ }
413
+ const idx = pair.indexOf("=");
414
+ env[pair.slice(0, idx)] = pair.slice(idx + 1);
415
+ }
416
+ }
417
+ return env;
418
+ }
419
+
313
420
  function serviceInstall(args) {
314
421
  const p = requireSupportedPlatform();
315
422
 
316
423
  // Capture the run config from flags (falling back to existing config), persist it.
317
424
  const cli = parseServeArgs(args);
425
+ const envFlags = parseEnvFlags(args);
318
426
  const existing = loadConfig();
427
+ const mergedEnv = { ...(existing.env ?? {}), ...envFlags };
319
428
  const cfg = {
320
429
  rootDir: cli.rootDir != null ? path.resolve(cli.rootDir) : existing.rootDir ?? null,
321
430
  host: cli.host ?? existing.host ?? "localhost",
322
431
  port: cli.port ?? existing.port ?? "3000",
323
432
  https: cli.useHttps ?? existing.https ?? false,
433
+ ...(Object.keys(mergedEnv).length ? { env: mergedEnv } : {}),
324
434
  };
325
435
  saveConfig(cfg);
326
436
  console.log(`Saved config to ${configPath}`);
@@ -328,12 +438,72 @@ function serviceInstall(args) {
328
438
  console.log(` host: ${cfg.host}`);
329
439
  console.log(` port: ${cfg.port}`);
330
440
  console.log(` https: ${cfg.https}`);
441
+ if (cfg.env) {
442
+ console.log(` env: ${Object.keys(cfg.env).join(", ")}`);
443
+ }
331
444
  console.log("");
332
445
 
446
+ // Surface the same secure-context guidance the server would, at install time.
447
+ const { warnings } = computeServerEnv({
448
+ host: cfg.host, port: String(cfg.port), useHttps: Boolean(cfg.https), configEnv: cfg.env ?? {},
449
+ });
450
+ for (const w of warnings) console.log(`⚠️ ${w}\n`);
451
+
333
452
  if (p === "linux") installSystemd();
334
453
  else installLaunchd();
335
454
  }
336
455
 
456
+ // `wiki-viewer config` — show or edit the saved config (incl. env).
457
+ function configCommand(args) {
458
+ const cfg = loadConfig();
459
+
460
+ if (args.length === 0 || args[0] === "show" || args[0] === "list") {
461
+ if (!existsSync(configPath)) {
462
+ console.log(`No config yet at ${configPath}`);
463
+ console.log(`Create one with: wiki-viewer service install [dir] [options] [--env KEY=VALUE]`);
464
+ return;
465
+ }
466
+ console.log(configPath);
467
+ console.log(JSON.stringify(cfg, null, 2));
468
+ return;
469
+ }
470
+
471
+ if (args[0] === "set") {
472
+ const pairs = args.slice(1);
473
+ if (pairs.length === 0) {
474
+ console.error("Usage: wiki-viewer config set KEY=VALUE [KEY=VALUE ...]");
475
+ process.exit(1);
476
+ }
477
+ cfg.env = cfg.env ?? {};
478
+ for (const pair of pairs) {
479
+ const idx = pair.indexOf("=");
480
+ if (idx < 0) { console.error(`Error: expected KEY=VALUE (got: ${pair})`); process.exit(1); }
481
+ cfg.env[pair.slice(0, idx)] = pair.slice(idx + 1);
482
+ }
483
+ saveConfig(cfg);
484
+ console.log(`Updated env in ${configPath}: ${pairs.map((p) => p.split("=")[0]).join(", ")}`);
485
+ if (serviceIsInstalled()) console.log("Run `wiki-viewer service restart` to apply.");
486
+ return;
487
+ }
488
+
489
+ if (args[0] === "unset") {
490
+ const keys = args.slice(1);
491
+ if (keys.length === 0) { console.error("Usage: wiki-viewer config unset KEY [KEY ...]"); process.exit(1); }
492
+ cfg.env = cfg.env ?? {};
493
+ for (const k of keys) delete cfg.env[k];
494
+ saveConfig(cfg);
495
+ console.log(`Removed from env: ${keys.join(", ")}`);
496
+ if (serviceIsInstalled()) console.log("Run `wiki-viewer service restart` to apply.");
497
+ return;
498
+ }
499
+
500
+ if (args[0] === "path") { console.log(configPath); return; }
501
+
502
+ console.error(`Unknown config command: ${args[0]}`);
503
+ console.error("Try: show | set KEY=VALUE | unset KEY | path");
504
+ process.exit(1);
505
+ }
506
+
337
507
  function installSystemd() {
338
508
  const unitDir = path.join(os.homedir(), ".config", "systemd", "user");
339
509
  mkdirSync(unitDir, { recursive: true });
@@ -547,6 +717,9 @@ switch (cmd) {
547
717
  }
548
718
  break;
549
719
  }
720
+ case "config":
721
+ configCommand(rest);
722
+ break;
550
723
  case "update":
551
724
  update();
552
725
  break;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-viewer",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Local file viewer and wiki — view markdown, HTML, PDFs, notebooks, office docs, and more from any directory",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,8 @@
17
17
  "build": "next build",
18
18
  "start": "next start",
19
19
  "wiki": "node bin/wiki-viewer.js",
20
- "prepublishOnly": "npm run build && cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && rm -f .next/standalone/.gitignore",
20
+ "postbuild": "node bin/postbuild.js",
21
+ "prepublishOnly": "npm run build",
21
22
  "test": "tsx --test src/tests/proof/*.test.ts"
22
23
  },
23
24
  "engines": {
package/README.md CHANGED
@@ -119,7 +119,42 @@ The run config is saved to `~/.wiki-viewer/config.json`. Edit that file and run
119
119
 
120
120
  On Linux, install enables lingering (`loginctl enable-linger`) so the service runs without an active login session and survives reboot. If that step needs privileges, the installer prints the command to run manually.
121
121
 
122
- > Ad-hoc runs like `wiki-viewer ~/docs` ignore the saved config. Only the service (and `wiki-viewer service run`) reads `config.json`.
122
+ > Ad-hoc runs like `wiki-viewer ~/docs` ignore the saved bind (dir/host/port), but still read app env from `config.json`. Only the service (and `wiki-viewer service run`) reads the full config.
123
+
124
+ ### App configuration (env)
125
+
126
+ App settings (OAuth keys, allowlists, rate limits) are env vars. You can keep them in the config file instead of exporting them, and the service will load them on every start.
127
+
128
+ ```bash
129
+ # Set at install time
130
+ wiki-viewer service install ~/notes --env GOOGLE_CLIENT_ID=... --env GOOGLE_CLIENT_SECRET=...
131
+
132
+ # Or manage them later
133
+ wiki-viewer config set AUTH_ALLOWED_DOMAIN=example.com
134
+ wiki-viewer config set AGENT_RATE_LIMIT=120
135
+ wiki-viewer config unset AGENT_RATE_LIMIT
136
+ wiki-viewer config show
137
+ wiki-viewer service restart # apply changes
138
+ ```
139
+
140
+ These land in the `env` block of `config.json`:
141
+
142
+ ```json
143
+ {
144
+ "rootDir": "/home/you/notes",
145
+ "host": "0.0.0.0",
146
+ "port": "3003",
147
+ "https": true,
148
+ "env": {
149
+ "GOOGLE_CLIENT_ID": "...",
150
+ "AUTH_ALLOWED_DOMAIN": "example.com"
151
+ }
152
+ }
153
+ ```
154
+
155
+ **Precedence:** a variable exported in your shell always wins, then the `env` block in `config.json`, then values the CLI derives for you. So you can still override anything per run with `KEY=VALUE wiki-viewer ...` or `--env KEY=VALUE`.
156
+
157
+ **`BETTER_AUTH_URL` is derived automatically** from the host, port, and scheme you run with, so the common case needs no config. On `localhost` over HTTP the CLI also sets `WIKI_ALLOW_INSECURE=1` for you (browsers treat localhost as a secure context). If you serve plain HTTP on a non-local host the CLI prints a warning, because login cookies and service workers will not work there. Use `--https`, or terminate TLS in a proxy and set `BETTER_AUTH_URL` to its public `https://` URL via `config set` or your shell.
123
158
 
124
159
  ### Update
125
160