wiki-viewer 3.0.3 → 3.0.4

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 (97) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/routes-manifest.json +8 -2
  7. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/assets/[...path]/route.js +5 -5
  25. package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/wiki/hosted-apps/[slug]/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/wiki/hosted-apps/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/api/wiki/preview-token/route/app-paths-manifest.json +3 -0
  57. package/.next/standalone/.next/server/app/api/wiki/preview-token/route/build-manifest.json +9 -0
  58. package/.next/standalone/.next/server/app/api/wiki/preview-token/route/server-reference-manifest.json +4 -0
  59. package/.next/standalone/.next/server/app/api/wiki/preview-token/route.js +16 -0
  60. package/.next/standalone/.next/server/app/api/wiki/preview-token/route.js.map +5 -0
  61. package/.next/standalone/.next/server/app/api/wiki/preview-token/route.js.nft.json +1 -0
  62. package/.next/standalone/.next/server/app/api/wiki/preview-token/route_client-reference-manifest.js +3 -0
  63. package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/app/app/[slug]/[[...rest]]/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  73. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_yp6y3._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0brb3j9._.js +3 -0
  75. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wwl3h1._.js +3 -0
  76. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12g8s_j._.js +1 -1
  77. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_preview-token_route_actions_0qy7g8h.js +3 -0
  78. package/.next/standalone/.next/server/chunks/src_lib_auth_api-key_ts_0t_ma-t._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/_0d28.zp._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/_0e1uo~z._.js +1 -1
  81. package/.next/standalone/.next/server/chunks/ssr/_0k6g8yo._.js +2 -2
  82. package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
  83. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  84. package/.next/standalone/.next/server/pages/500.html +1 -1
  85. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  87. package/.next/standalone/.next/static/chunks/{065s1_n.1k11t.js → 0_7f_-q0ts6hi.js} +1 -1
  88. package/.next/standalone/.next/static/chunks/{0f8kfd9d6kq0b.js → 0dbqnlb6493qs.js} +1 -1
  89. package/.next/standalone/.next/static/chunks/{10g31imtogo50.js → 0xhfr19ysckbq.js} +2 -2
  90. package/.next/standalone/next.config.ts +8 -4
  91. package/.next/standalone/package.json +1 -1
  92. package/.next/standalone/server.js +1 -1
  93. package/package.json +1 -1
  94. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ltsov-._.js +0 -3
  95. /package/.next/standalone/.next/static/{mrSrqLgdAMIe7NGggoXtb → BD2zQ3enmSM757-mX63JF}/_buildManifest.js +0 -0
  96. /package/.next/standalone/.next/static/{mrSrqLgdAMIe7NGggoXtb → BD2zQ3enmSM757-mX63JF}/_clientMiddlewareManifest.js +0 -0
  97. /package/.next/standalone/.next/static/{mrSrqLgdAMIe7NGggoXtb → BD2zQ3enmSM757-mX63JF}/_ssgManifest.js +0 -0
@@ -29,12 +29,16 @@ const nextConfig: NextConfig = {
29
29
  allowedDevOrigins: process.env.NEXT_ALLOWED_DEV_ORIGINS
30
30
  ? process.env.NEXT_ALLOWED_DEV_ORIGINS.split(",").map((o) => o.trim()).filter(Boolean)
31
31
  : ["localhost"],
32
- // Block framing on all routes by default. Same-origin framing for nested
33
- // /api/assets and /api/app-proxy iframes still works because the host is now
34
- // same-origin (X-Frame-Options: SAMEORIGIN permits same-origin ancestors).
32
+ // Block framing on every route except the asset route. An HTML preview runs
33
+ // sandboxed WITHOUT allow-same-origin (the security invariant), so it has a
34
+ // transient origin; no framing header can express "allow a transient
35
+ // ancestor", and SAMEORIGIN rejects one outright. Nested local files
36
+ // (<iframe src="sibling.html">) would therefore never load. Asset reads stay
37
+ // gated by cookie scope or the directory-scoped preview token in the path
38
+ // (src/lib/preview-token.ts), which is what a hostile framer cannot present.
35
39
  headers: async () => [
36
40
  {
37
- source: "/(.*)",
41
+ source: "/((?!api/assets).*)",
38
42
  headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
39
43
  },
40
44
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-viewer",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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",
@@ -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":"3.0.3"},"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"}
18
+ const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"3.0.4"},"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,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-viewer",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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",
@@ -1,3 +0,0 @@
1
- module.exports=[536654,e=>{"use strict";var t=e.i(912714),a=e.i(750227);function r(e){return!!(a.default.isAbsolute(e)||".."===e||e.startsWith(".."+a.default.sep)||e.startsWith("../"))}async function s(e,n,i={}){let o;if(!e)return null;let l=function(e){if(e.includes("\0")||a.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=a.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(n);if(null===l)return null;if(i.deniedSegments?.length){for(let e of l.split("/").filter(Boolean))if(i.deniedSegments.includes(e))return null}try{o=await (0,t.realpath)(e)}catch{return null}let u=l?a.default.join(o,l):o;try{let e=await (0,t.realpath)(u),s=a.default.relative(o,e);if(r(s))return null;return{relPath:l,absolutePath:e}}catch{if(!i.allowMissing)return null;let e=u;for(;;){let s=a.default.dirname(e);if(s===e)break;try{let e=await (0,t.realpath)(s),n=a.default.relative(o,e);if(r(n))return null;return{relPath:l,absolutePath:u}}catch{e=s}}return null}}e.s(["resolveWorkspacePath",0,s])},848475,e=>{"use strict";var t=e.i(750227);let a={".md":"text/markdown; charset=utf-8",".markdown":"text/markdown; charset=utf-8",".mdx":"text/markdown; charset=utf-8",".txt":"text/plain; charset=utf-8",".json":"application/json; charset=utf-8",".jsonc":"application/json; charset=utf-8",".ts":"text/typescript; charset=utf-8",".tsx":"text/typescript; charset=utf-8",".mts":"text/typescript; charset=utf-8",".js":"text/javascript; charset=utf-8",".jsx":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".html":"text/html; charset=utf-8",".htm":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".yaml":"text/yaml; charset=utf-8",".yml":"text/yaml; charset=utf-8",".toml":"text/toml; charset=utf-8",".xml":"application/xml; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".bmp":"image/bmp",".pdf":"application/pdf",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip",".py":"text/x-python; charset=utf-8",".rs":"text/x-rustsrc; charset=utf-8",".go":"text/x-go; charset=utf-8",".sh":"text/x-shellscript; charset=utf-8",".csv":"text/csv; charset=utf-8",".tsv":"text/tab-separated-values; charset=utf-8",".env":"text/plain; charset=utf-8",".log":"text/plain; charset=utf-8",".ini":"text/plain; charset=utf-8",".conf":"text/plain; charset=utf-8",".mmd":"text/plain; charset=utf-8",".ipynb":"application/json; charset=utf-8",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".doc":"application/msword",".xls":"application/vnd.ms-excel",".ppt":"application/vnd.ms-powerpoint",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".m4v":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac"};e.s(["contentTypeForPath",0,function(e){return a[t.default.extname(e).toLowerCase()]??"application/octet-stream"}])},763459,e=>{"use strict";var t=e.i(985426),a=e.i(257574),r=e.i(507835),s=e.i(457789),n=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),m=e.i(257858),f=e.i(487476),v=e.i(193695);e.i(484264);var x=e.i(315709),g=e.i(912714),w=e.i(351216),R=e.i(660038),_=e.i(536654),y=e.i(848475),E=e.i(716234);function b(e,t,a){let r=new URL(e.url);return r.searchParams.set(t,a),new Request(r.toString(),e)}async function P(e,{params:t}){let a=(await t).path,r=e,s=a;if(a.length>=2&&"_ws"===a[0])r=b(e,"ws",a[1]),s=a.slice(2);else if(a.length>=2&&"_root"===a[0]){let t;r=b(e,"root",(t=a[1].replace(/-/g,"+").replace(/_/g,"/"),Buffer.from(t,"base64").toString("utf8"))),s=a.slice(2)}let n=await (0,R.resolveWorkspaceForUser)(r);if(!n.ok)return w.NextResponse.json({error:n.code},{status:n.status});let{rootDir:i}=n,o=s.join("/"),l=await (0,_.resolveWorkspacePath)(i,o,{deniedSegments:E.DENIED_SEGMENTS});if(!l)return w.NextResponse.json({error:"Invalid path"},{status:400});try{if((await (0,g.stat)(l.absolutePath)).isDirectory())return w.NextResponse.json({error:"Not a file"},{status:400});let e=(0,y.contentTypeForPath)(l.absolutePath),t=await (0,g.readFile)(l.absolutePath);return new Response(t,{headers:{"Content-Type":e,"Cache-Control":"private, max-age=60"}})}catch{return w.NextResponse.json({error:"File not found"},{status:404})}}e.s(["GET",0,P],667292);var C=e.i(667292);let j=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/assets/[...path]/route",pathname:"/api/assets/[...path]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/assets/[...path]/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:k,serverHooks:N}=j;async function T(e,t,r){r.requestMeta&&(0,s.setRequestMeta)(e,r.requestMeta),j.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/assets/[...path]/route";g=g.replace(/\/index$/,"")||"/";let w=await j.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,params:_,nextConfig:y,parsedUrl:E,isDraftMode:b,prerenderManifest:P,routerServerContext:C,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,resolvedPathname:N,clientReferenceManifest:T,serverActionsManifest:S}=w,q=(0,o.normalizeAppPath)(g),O=!!(P.dynamicRoutes[q]||P.routes[N]),I=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,E,!1):t.end("This page could not be found"),null);if(O&&!b){let e=!!P.routes[N],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await I();throw new v.NoFallbackError}}let U=null;!O||j.isDev||b||(U="/index"===(U=N)?"/":U);let D=!0===j.isDev||!O,H=O&&!D;S&&T&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:T,serverActionsManifest:S});let M=e.method||"GET",F=(0,n.getTracer)(),z=F.getActiveScopeSpan(),W=!!(null==C?void 0:C.isWrappedByNextServer),B=!!(0,s.getRequestMeta)(e,"minimalMode"),K=(0,s.getRequestMeta)(e,"incrementalCache")||await j.getIncrementalCache(e,y,P,B);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let $={params:_,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:D,incrementalCache:K,cacheLifeProfiles:y.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,s)=>j.onRequestError(e,t,r,s,C)},sharedContext:{buildId:R}},L=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let s,i=async e=>j.handle(V,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=F.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${M} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",r),s.updateName(t))}else e.updateName(`${M} ${g}`)}),o=async s=>{var n,o;let l=async({previousCacheEntry:a})=>{try{if(!B&&A&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=$.renderOpts.fetchMetrics;let o=$.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=$.renderOpts.collectedTags;if(!O)return await (0,d.sendResponse)(L,G,n,$.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,r=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await j.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,C),t}},u=await j.handleResponse({req:e,nextConfig:y,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:B});if(!O)return null;if((null==u||null==(n=u.value)?void 0:n.kind)!==x.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});B||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return B&&O||p.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,d.sendResponse)(L,G,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};W&&z?await o(z):(s=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!W))}catch(t){if(t instanceof v.NoFallbackError||await j.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,C),O)throw t;return await (0,d.sendResponse)(L,G,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:k})},"routeModule",0,j,"serverHooks",0,N,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,k],763459)},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__0ltsov-._.js.map