diffhub 0.1.22 → 0.1.23

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 (53) hide show
  1. package/.next/standalone/apps/cli/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/cli/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/apps/cli/.next/build-manifest.json +3 -3
  4. package/.next/standalone/apps/cli/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/apps/cli/.next/routes-manifest.json +6 -0
  6. package/.next/standalone/apps/cli/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/apps/cli/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/apps/cli/.next/server/app/_not-found.html +1 -1
  14. package/.next/standalone/apps/cli/.next/server/app/_not-found.rsc +1 -1
  15. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  16. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  18. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  19. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/standalone/apps/cli/.next/server/app/api/watch/route.js +2 -2
  22. package/.next/standalone/apps/cli/.next/server/app/api/watch/route.js.nft.json +1 -1
  23. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route/app-paths-manifest.json +3 -0
  24. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route/build-manifest.json +9 -0
  25. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route/server-reference-manifest.json +4 -0
  26. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route.js +8 -0
  27. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route.js.map +5 -0
  28. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route.js.nft.json +1 -0
  29. package/.next/standalone/apps/cli/.next/server/app/api/watch-events/route_client-reference-manifest.js +3 -0
  30. package/.next/standalone/apps/cli/.next/server/app/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/apps/cli/.next/server/app-paths-manifest.json +1 -0
  32. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__05nbqqx._.js +4 -0
  33. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__05wbal-._.js +2 -2
  34. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0qe921e._.js +3 -0
  35. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__101690.._.js +9 -0
  36. package/.next/standalone/apps/cli/.next/server/chunks/apps_cli__next-internal_server_app_api_watch-events_route_actions_0i.gzl8.js +3 -0
  37. package/.next/standalone/apps/cli/.next/server/chunks/ssr/_07okxca._.js +2 -2
  38. package/.next/standalone/apps/cli/.next/server/chunks/ssr/_13g0g_e._.js +1 -1
  39. package/.next/standalone/apps/cli/.next/server/functions-config-manifest.json +2 -1
  40. package/.next/standalone/apps/cli/.next/server/middleware-build-manifest.js +3 -3
  41. package/.next/standalone/apps/cli/.next/server/pages/404.html +1 -1
  42. package/.next/standalone/apps/cli/.next/server/pages/500.html +1 -1
  43. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.js +1 -1
  44. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.json +1 -1
  45. package/.next/standalone/apps/cli/.next/static/chunks/{0-le8unvr3s~..js → 0vm79-lt-4syt.js} +5 -5
  46. package/.next/standalone/apps/cli/package.json +1 -1
  47. package/bin/diffhub.mjs +275 -5
  48. package/package.json +1 -1
  49. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__01oij46._.js +0 -8
  50. package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__126jjll._.js +0 -4
  51. /package/.next/standalone/apps/cli/.next/static/{Hr5DhyyWmSFusFY7-HlJ- → XaFUoKZbR-bS9r4T4fiPI}/_buildManifest.js +0 -0
  52. /package/.next/standalone/apps/cli/.next/static/{Hr5DhyyWmSFusFY7-HlJ- → XaFUoKZbR-bS9r4T4fiPI}/_clientMiddlewareManifest.js +0 -0
  53. /package/.next/standalone/apps/cli/.next/static/{Hr5DhyyWmSFusFY7-HlJ- → XaFUoKZbR-bS9r4T4fiPI}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ "/api/watch-events/route": "app/api/watch-events/route.js"
3
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "devFiles": [],
3
+ "ampDevFiles": [],
4
+ "polyfillFiles": [],
5
+ "lowPriorityFiles": [],
6
+ "rootMainFiles": [],
7
+ "pages": {},
8
+ "ampFirstPages": []
9
+ }
@@ -0,0 +1,8 @@
1
+ var R=require("../../../chunks/[turbopack]_runtime.js")("server/app/api/watch-events/route.js")
2
+ R.c("server/chunks/[root-of-the-server]__05nbqqx._.js")
3
+ R.c("server/chunks/[root-of-the-server]__0qe921e._.js")
4
+ R.c("server/chunks/[root-of-the-server]__0op9af~._.js")
5
+ R.c("server/chunks/node_modules_next_04~_e52._.js")
6
+ R.c("server/chunks/apps_cli__next-internal_server_app_api_watch-events_route_actions_0i.gzl8.js")
7
+ R.m(64457)
8
+ module.exports=R.m(64457).exports
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sections": []
5
+ }
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/package.json","../../../chunks/[root-of-the-server]__05nbqqx._.js","../../../chunks/[root-of-the-server]__0op9af~._.js","../../../chunks/[root-of-the-server]__0qe921e._.js","../../../chunks/[turbopack]_runtime.js","../../../chunks/apps_cli__next-internal_server_app_api_watch-events_route_actions_0i.gzl8.js","../../../chunks/node_modules_next_04~_e52._.js","./route_client-reference-manifest.js"]}
@@ -0,0 +1,3 @@
1
+ globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
2
+ globalThis.__RSC_MANIFEST["/api/watch-events/route"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"rscModuleMapping":{},"edgeRscModuleMapping":{},"entryCSSFiles":{},"entryJSFiles":{}};
3
+
@@ -1,3 +1,3 @@
1
1
  globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
2
- globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/agentation/dist/index.mjs <module evaluation>":{"id":31012,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/agentation/dist/index.mjs":{"id":31012,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/DiffsWorkerProvider.tsx <module evaluation>":{"id":71249,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":true},"[project]/apps/cli/components/DiffsWorkerProvider.tsx":{"id":71249,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":true},"[project]/apps/cli/components/theme-provider.tsx <module evaluation>":{"id":87710,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/theme-provider.tsx":{"id":87710,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/DiffApp.tsx <module evaluation>":{"id":93190,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js","/_next/static/chunks/0j84zq9o744on.js","/_next/static/chunks/0-le8unvr3s~..js"],"async":false},"[project]/apps/cli/components/DiffApp.tsx":{"id":93190,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js","/_next/static/chunks/0j84zq9o744on.js","/_next/static/chunks/0-le8unvr3s~..js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"31012":{"*":{"id":2257,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"71249":{"*":{"id":85083,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":true}},"87710":{"*":{"id":53954,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_09w7yel._.js"],"async":false}},"93190":{"*":{"id":85340,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js","server/chunks/ssr/_07okxca._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"31012":{"*":{"id":76494,"name":"*","chunks":[],"async":false}},"71249":{"*":{"id":33734,"name":"*","chunks":[],"async":false}},"87710":{"*":{"id":58655,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"93190":{"*":{"id":84070,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/apps/cli/app/layout":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}],"[project]/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}],"[project]/apps/cli/app/page":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}]},"entryJSFiles":{"[project]/apps/cli/app/layout":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js"],"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js"],"[project]/apps/cli/app/page":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js","static/chunks/0j84zq9o744on.js","static/chunks/0-le8unvr3s~..js"]}};
2
+ globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/agentation/dist/index.mjs <module evaluation>":{"id":31012,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/agentation/dist/index.mjs":{"id":31012,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/DiffsWorkerProvider.tsx <module evaluation>":{"id":71249,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":true},"[project]/apps/cli/components/DiffsWorkerProvider.tsx":{"id":71249,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":true},"[project]/apps/cli/components/theme-provider.tsx <module evaluation>":{"id":87710,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/theme-provider.tsx":{"id":87710,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js"],"async":false},"[project]/apps/cli/components/DiffApp.tsx <module evaluation>":{"id":93190,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js","/_next/static/chunks/0j84zq9o744on.js","/_next/static/chunks/0vm79-lt-4syt.js"],"async":false},"[project]/apps/cli/components/DiffApp.tsx":{"id":93190,"name":"*","chunks":["/_next/static/chunks/13t_ihnxxnv7q.js","/_next/static/chunks/029-i5m87mr_j.js","/_next/static/chunks/0dpr.umiw20gr.js","/_next/static/chunks/11jy8da-iayqc.js","/_next/static/chunks/0j84zq9o744on.js","/_next/static/chunks/0vm79-lt-4syt.js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"31012":{"*":{"id":2257,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"71249":{"*":{"id":85083,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":true}},"87710":{"*":{"id":53954,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_09w7yel._.js"],"async":false}},"93190":{"*":{"id":85340,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0..1fdc._.js","server/chunks/ssr/_0zayoy9._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js","server/chunks/ssr/_07okxca._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"31012":{"*":{"id":76494,"name":"*","chunks":[],"async":false}},"71249":{"*":{"id":33734,"name":"*","chunks":[],"async":false}},"87710":{"*":{"id":58655,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"93190":{"*":{"id":84070,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/apps/cli/app/layout":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}],"[project]/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}],"[project]/apps/cli/app/page":[{"path":"static/chunks/0sf7ki_q88l_a.css","inlined":false}]},"entryJSFiles":{"[project]/apps/cli/app/layout":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js"],"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js"],"[project]/apps/cli/app/page":["static/chunks/13t_ihnxxnv7q.js","static/chunks/029-i5m87mr_j.js","static/chunks/0dpr.umiw20gr.js","static/chunks/11jy8da-iayqc.js","static/chunks/0j84zq9o744on.js","static/chunks/0vm79-lt-4syt.js"]}};
3
3
 
@@ -7,6 +7,7 @@
7
7
  "/api/file/route": "app/api/file/route.js",
8
8
  "/api/files/route": "app/api/files/route.js",
9
9
  "/api/health/route": "app/api/health/route.js",
10
+ "/api/watch-events/route": "app/api/watch-events/route.js",
10
11
  "/api/watch/route": "app/api/watch/route.js",
11
12
  "/favicon.ico/route": "app/favicon.ico/route.js",
12
13
  "/page": "app/page.js"
@@ -0,0 +1,4 @@
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},16781,e=>{"use strict";var t=e.i(2157);let r="/tmp/diffhub-active-repo";e.s(["REPO_POINTER",0,r,"getConfiguredRepoPath",0,()=>{if(process.env.DIFFHUB_REPO)return process.env.DIFFHUB_REPO;let e=(()=>{try{let e=(0,t.readFileSync)(r,"utf-8").trim();if(e)return e}catch{}return null})();return e||process.cwd()}])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},57405,e=>{"use strict";var t=e.i(2157),r=e.i(50227);let n="gitdir:";class a extends Error{constructor(e){super(`Invalid repo-relative path: ${e}`),this.name="InvalidRepoFilePathError"}}e.s(["InvalidRepoFilePathError",0,a,"getGitDirectory",0,e=>{let a=(0,r.join)(e,".git");if(!(0,t.existsSync)(a)||(0,t.lstatSync)(a).isDirectory())return a;let i=(0,t.readFileSync)(a,"utf-8").trim();if(!i.startsWith(n))return a;let s=i.slice(n.length).trim();return(0,r.resolve)((0,r.dirname)(a),s)},"resolveRepoFilePath",0,(e,t)=>{if(!t||(0,r.isAbsolute)(t))throw new a(t);let n=(0,r.resolve)(e,t),i=(0,r.relative)(e,n);if(i.startsWith("..")||(0,r.isAbsolute)(i))throw new a(t);return n}])},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},23318,e=>{"use strict";var t=e.i(74533),r=e.i(66680),n=e.i(2157),a=e.i(60526),i=e.i(50227),s=e.i(57405),o=e.i(16781);let l=(()=>{let e=globalThis;if(!e.__diffhubGitRuntimeState){let t=process.env.DIFFHUB_SERVER_BOOT_ID;e.__diffhubGitRuntimeState={cache:new Map,gitCommandQueue:Promise.resolve(),inflight:new Map,lastPointerMtime:0,serverBootId:t??(0,r.createHash)("sha1").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex")}}return e.__diffhubGitRuntimeState})(),{cache:d,inflight:u}=l,c=["main","master","develop","dev"],p="1"===process.env.DIFFHUB_DEBUG,f=e=>`diffhub-snapshot-${(0,r.createHash)("sha1").update(e).digest("hex")}-`,h=(e,t,n,s)=>{let o=JSON.stringify({base:t??"",mode:n??"",whitespace:s??""}),l=(0,r.createHash)("sha1").update(o).digest("hex");return(0,i.join)((0,a.tmpdir)(),`${f(e)}${l}.json`)},m=e=>{if(!e)return void d.clear();let t=`:${e}`;for(let e of d.keys())e.includes(t)&&d.delete(e)},g=e=>{if(m(e),"1"!==process.env.DIFFHUB_CMUX||"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER)return;if(!e){for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith("diffhub-snapshot-")&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0});return}let t=f(e);for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith(t)&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0})},v=async(e,t,r)=>{try{let e=(0,n.statSync)(o.REPO_POINTER).mtimeMs;e!==l.lastPointerMtime&&(l.lastPointerMtime=e,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?m():g())}catch{}let a=d.get(e);if(a&&a.expires>Date.now())return a.value;let i=await r();return d.set(e,{expires:Date.now()+t,value:i}),i},w=()=>(0,o.getConfiguredRepoPath)(),x=async e=>{let r=Date.now();p&&console.info("[diffhub] git command start",{args:e});try{let n,a,{promise:i,reject:s,resolve:o}={promise:new Promise((e,t)=>{n=e,a=t}),reject:a,resolve:n};{let r=(0,t.spawn)("git",e,{cwd:w(),env:{...process.env,GIT_TERMINAL_PROMPT:"0"},stdio:["ignore","pipe","pipe"]}),n=[],a=[],i=0,l=!1,d=e=>{l||(l=!0,e())},u=(t,n)=>{let a=Buffer.isBuffer(n)?n:Buffer.from(n);if((i+=a.length)>0x1400000){r.kill("SIGKILL"),d(()=>{s(Error(`git ${e.join(" ")} failed: output exceeded 20971520 bytes`))});return}t.push(a)};r.stdout.on("data",e=>{u(n,e)}),r.stderr.on("data",e=>{u(a,e)}),r.on("error",e=>{d(()=>s(e))}),r.on("close",t=>{let r=Buffer.concat(n).toString("utf-8"),i=Buffer.concat(a).toString("utf-8").trim();0===t?d(()=>o(r)):d(()=>{s(Object.assign(Error(i||`git ${e.join(" ")} failed with exit code ${t??"unknown"}`),{code:t,status:t??void 0,stderr:i}))})})}let l=await i;return p&&console.info("[diffhub] git command success",{args:e,durationMs:Date.now()-r}),l}catch(n){let t="string"==typeof n.stderr?n.stderr.trim():n.stderr?.toString("utf-8").trim()||"";if(console.error("[diffhub] git command failed",{args:e,code:n.code,durationMs:Date.now()-r,error:n,status:n.status,stderr:t||null}),n instanceof Error&&!t)throw n;throw Error(t||`git ${e.join(" ")} failed: ${n.message}`,{cause:n})}},R=async e=>{let t,r=new Promise(e=>{t=e}),n=l.gitCommandQueue;l.gitCommandQueue=r,await n;try{return await x(e)}finally{t()}},y=e=>e.split("\n").map(e=>e.trim()).filter(Boolean),E=e=>(0,r.createHash)("sha1").update(e).digest("hex"),b=(e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return null;let s=h(e,t,r,a);try{let t=(0,n.readFileSync)(s,"utf-8"),r=JSON.parse(t),a=Date.now()-r.metadata.createdAt;if(void 0!==i&&r.generation!==i||r.metadata.bootId!==l.serverBootId||r.metadata.repoPath!==e)return p&&console.info("[diffhub] snapshot cache stale",{ageMs:a,expectedBootId:l.serverBootId,expectedGeneration:i??null,repoPath:e,snapshotBootId:r.metadata.bootId,snapshotGeneration:r.generation,snapshotRepoPath:r.metadata.repoPath,source:"disk"}),null;return p&&console.info("[diffhub] snapshot cache hit",{ageMs:Date.now()-r.metadata.createdAt,generation:r.generation,repoPath:e,source:"disk"}),{...r,patchByFile:new Map(Object.entries(r.patchByFile))}}catch{return null}},_=async(e,t,r,n,a)=>{let i=Date.now()+1e3;for(;Date.now()<i;){let i=b(e,t,r,n,a);if(i)return i;await new Promise(e=>{setTimeout(e,50)})}return null},P=(e,t,a,i)=>{let s=w(),o=`snapshot:${s}:${e??""}:${t??""}:${a??""}:${i??""}`;return v(o,15e3,()=>{let d=u.get(o);if(d)return d;let f=(async()=>{try{let o,d,u,f,m=b(s,e,t,a,i);if(m)return m;if("1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER){let r=await _(s,e,t,a,i);if(r)return r;console.warn("[diffhub] external snapshot unavailable, recomputing inline",{expectedGeneration:i??null,mode:t??"all",repoPath:s,whitespace:a??"default"})}let g=(await R(["rev-parse","--abbrev-ref","HEAD"])).trim(),x="uncommitted"===t?"HEAD":e??process.env.DIFFHUB_BASE??await (o=w(),v(`baseBranch:${o}`,3e4,async()=>{let e=y(await R(["branch","-r","--format=%(refname:short)"]));for(let t of c)if(e.includes(`origin/${t}`))return`origin/${t}`;let t=y(await R(["branch","--format=%(refname:short)"]));for(let e of c)if(t.includes(e))return e;return"origin/main"})),E="uncommitted"===t?"HEAD":await (d=w(),v(`mergeBase:${d}:${x}`,3e4,async()=>(await R(["merge-base","HEAD",x])).trim())),P=(u=[E],"ignore"===a?["-w",...u]:u),[F,I]=await Promise.all([R(["diff",...P]),R(["diff","--numstat","-z","-M",...P])]),S=(0,r.createHash)("sha1").update(F).digest("hex"),B=(e=>{let t=[],r=0,n=0,a=0;for(;a<e.length;){let i=e.indexOf(" ",a);if(-1===i)break;let s=e.indexOf(" ",i+1);if(-1===s)throw Error("Malformed git diff --numstat output");let o=e.slice(a,i),l=e.slice(i+1,s),d="";if("\0"===e[a=s+1]){a+=1;let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat rename output");a=t+1;let r=e.indexOf("\0",a);if(-1===r)throw Error("Malformed git diff --numstat rename output");d=e.slice(a,r),a=r+1}else{let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat output");d=e.slice(a,t),a=t+1}let u="-"===o||"-"===l,c=u?0:Number.parseInt(o,10)||0,p=u?0:Number.parseInt(l,10)||0;t.push({binary:u,changes:c+p,deletions:p,file:d,insertions:c}),r+=c,n+=p}return{deletions:n,files:t,insertions:r}})(I),A=Date.now(),C=(f=l.serverBootId,(0,r.createHash)("sha1").update(`${f}:${S}:${E}`).digest("hex")),D={baseBranch:x,branch:g,deletions:B.deletions,files:B.files,fingerprint:S,fullPatch:F,generation:C,insertions:B.insertions,mergeBase:E,metadata:{bootId:l.serverBootId,createdAt:A,repoPath:s},patchByFile:(e=>{let t=new Map,r=/^diff --git a\/(.+?) b\/(.+)$/gm,n=[],a=r.exec(e);for(;a;)n.push({file:a[2],start:a.index}),a=r.exec(e);for(let[r,a]of n.entries()){let i=n[r+1]?.start??e.length,s=e.slice(a.start,i).trimEnd();t.set(a.file,s?`${s}
2
+ `:"")}return t})(F)};return p&&console.info("[diffhub] snapshot cache miss",{generation:C,repoPath:s,source:"recomputed"}),((e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return;let s={...i,patchByFile:Object.fromEntries(i.patchByFile)};(0,n.writeFileSync)(h(e,t,r,a),JSON.stringify(s),"utf-8"),p&&console.info("[diffhub] snapshot cache wrote",{generation:i.generation,repoPath:e,source:"disk"})})(s,e,t,a,D),D}finally{u.delete(o)}})();return u.set(o,f),f})},F=async(e,t,r,n,a)=>{let i=await P(t,r,n,a),s=i.patchByFile.get(e)??"";return{baseBranch:i.baseBranch,branch:i.branch,fingerprint:i.fingerprint,generation:i.generation,mergeBase:i.mergeBase,patch:s,reviewKey:E(s)}},I=async(e,t,r,n)=>{let a=await P(e,t,r,n),i=Object.fromEntries(a.patchByFile),s=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,E(t)]));return{baseBranch:a.baseBranch,branch:a.branch,deletions:a.deletions,files:a.files,fingerprint:a.fingerprint,generation:a.generation,insertions:a.insertions,mergeBase:a.mergeBase,patchByFile:i,reviewKeyByFile:s}},S=async(e,t,r)=>{let n=await P(e,t,r);return{baseBranch:n.baseBranch,branch:n.branch,deletions:n.deletions,files:n.files,fingerprint:n.fingerprint,generation:n.generation,insertions:n.insertions}},B=async e=>{await R(["restore","--staged","--worktree","--",e])};e.s(["discardFile",0,B,"getDiffForFile",0,F,"getDiffStats",0,S,"getFileAtRef",0,(e,t)=>{let r=w();if("WORKING_TREE"===t)try{return Promise.resolve((0,n.readFileSync)((0,s.resolveRepoFilePath)(r,e),"utf-8"))}catch{return Promise.resolve("")}return v(`file:${r}:${t}:${e}`,3e4,async()=>{try{return await R(["show",`${t}:${e}`])}catch{return""}})},"getMultiFileDiff",0,I,"invalidateGitCache",0,g],23318)},64457,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),g=e.i(93695);e.i(20232);var v=e.i(220),w=e.i(89171),x=e.i(16781),R=e.i(64387);let y=new Set(["add","addDir","change","unlink","unlinkDir"]),E=async e=>{try{let t=await e.json();return t&&"object"==typeof t?t:{}}catch{return{}}},b=async e=>{let t;if("1"!==process.env.DIFFHUB_EXTERNAL_WATCHER)return w.NextResponse.json({error:"External watcher is not enabled"},{status:404});let r=process.env.DIFFHUB_WATCH_TOKEN,n=e.headers.get("x-diffhub-watch-token");if(!r||n!==r)return w.NextResponse.json({error:"Unauthorized"},{status:401});let a=await E(e);return(0,R.publishExternalRepoChange)((0,x.getConfiguredRepoPath)(),{event:"string"==typeof(t=a.event)&&y.has(t)?t:"change",path:"string"==typeof a.path?a.path:null}),w.NextResponse.json({ok:!0})};e.s(["POST",0,b,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],20075);var _=e.i(20075);let P=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/watch-events/route",pathname:"/api/watch-events",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch-events/route.ts",nextConfigOutput:"standalone",userland:_,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:I,serverHooks:S}=P;async function B(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),P.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/watch-events/route";w=w.replace(/\/index$/,"")||"/";let x=await P.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:y,nextConfig:E,parsedUrl:b,isDraftMode:_,prerenderManifest:F,routerServerContext:I,isOnDemandRevalidate:S,revalidateOnlyGenerated:B,resolvedPathname:A,clientReferenceManifest:C,serverActionsManifest:D}=x,O=(0,o.normalizeAppPath)(w),T=!!(F.dynamicRoutes[O]||F.routes[A]),H=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,b,!1):t.end("This page could not be found"),null);if(T&&!_){let e=!!F.routes[A],t=F.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await H();throw new g.NoFallbackError}}let N=null;!T||P.isDev||_||(N="/index"===(N=A)?"/":N);let $=!0===P.isDev||!T,j=T&&!$;D&&C&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:C,serverActionsManifest:D});let M=e.method||"GET",U=(0,i.getTracer)(),k=U.getActiveScopeSpan(),q=!!(null==I?void 0:I.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),W=(0,a.getRequestMeta)(e,"incrementalCache")||await P.getIncrementalCache(e,E,F,G);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let K={params:y,previewProps:F.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:$,incrementalCache:W,cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>P.onRequestError(e,t,n,a,I)},sharedContext:{buildId:R}},L=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let a,s=async e=>P.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${M} ${w}`)}),o=async a=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&S&&B&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let o=K.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=K.renderOpts.collectedTags;if(!T)return await (0,p.sendResponse)(L,X,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await P.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,I),t}},d=await P.handleResponse({req:e,nextConfig:E,cacheKey:N,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:F,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:B,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:G});if(!T)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",S?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return G&&T||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(L,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};q&&k?await o(k):(a=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!q))}catch(t){if(t instanceof g.NoFallbackError||await P.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,I),T)throw t;return await (0,p.sendResponse)(L,X,new Response(null,{status:500})),null}}e.s(["handler",0,B,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:I})},"routeModule",0,P,"serverHooks",0,S,"workAsyncStorage",0,F,"workUnitAsyncStorage",0,I],64457)}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__05nbqqx._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},16781,e=>{"use strict";var t=e.i(2157);let r="/tmp/diffhub-active-repo";e.s(["REPO_POINTER",0,r,"getConfiguredRepoPath",0,()=>{if(process.env.DIFFHUB_REPO)return process.env.DIFFHUB_REPO;let e=(()=>{try{let e=(0,t.readFileSync)(r,"utf-8").trim();if(e)return e}catch{}return null})();return e||process.cwd()}])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},57405,e=>{"use strict";var t=e.i(2157),r=e.i(50227);let n="gitdir:";class a extends Error{constructor(e){super(`Invalid repo-relative path: ${e}`),this.name="InvalidRepoFilePathError"}}e.s(["InvalidRepoFilePathError",0,a,"getGitDirectory",0,e=>{let a=(0,r.join)(e,".git");if(!(0,t.existsSync)(a)||(0,t.lstatSync)(a).isDirectory())return a;let i=(0,t.readFileSync)(a,"utf-8").trim();if(!i.startsWith(n))return a;let s=i.slice(n.length).trim();return(0,r.resolve)((0,r.dirname)(a),s)},"resolveRepoFilePath",0,(e,t)=>{if(!t||(0,r.isAbsolute)(t))throw new a(t);let n=(0,r.resolve)(e,t),i=(0,r.relative)(e,n);if(i.startsWith("..")||(0,r.isAbsolute)(i))throw new a(t);return n}])},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},23318,e=>{"use strict";var t=e.i(74533),r=e.i(66680),n=e.i(2157),a=e.i(60526),i=e.i(50227),s=e.i(57405),o=e.i(16781);let l=(()=>{let e=globalThis;if(!e.__diffhubGitRuntimeState){let t=process.env.DIFFHUB_SERVER_BOOT_ID;e.__diffhubGitRuntimeState={cache:new Map,gitCommandQueue:Promise.resolve(),inflight:new Map,lastPointerMtime:0,serverBootId:t??(0,r.createHash)("sha1").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex")}}return e.__diffhubGitRuntimeState})(),{cache:d,inflight:u}=l,c=["main","master","develop","dev"],p="1"===process.env.DIFFHUB_DEBUG,f=e=>`diffhub-snapshot-${(0,r.createHash)("sha1").update(e).digest("hex")}-`,h=(e,t,n,s)=>{let o=JSON.stringify({base:t??"",mode:n??"",whitespace:s??""}),l=(0,r.createHash)("sha1").update(o).digest("hex");return(0,i.join)((0,a.tmpdir)(),`${f(e)}${l}.json`)},m=e=>{if(!e)return void d.clear();let t=`:${e}`;for(let e of d.keys())e.includes(t)&&d.delete(e)},g=e=>{if(m(e),"1"!==process.env.DIFFHUB_CMUX||"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER)return;if(!e){for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith("diffhub-snapshot-")&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0});return}let t=f(e);for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith(t)&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0})},v=async(e,t,r)=>{try{let e=(0,n.statSync)(o.REPO_POINTER).mtimeMs;e!==l.lastPointerMtime&&(l.lastPointerMtime=e,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?m():g())}catch{}let a=d.get(e);if(a&&a.expires>Date.now())return a.value;let i=await r();return d.set(e,{expires:Date.now()+t,value:i}),i},w=()=>(0,o.getConfiguredRepoPath)(),x=async e=>{let r=Date.now();p&&console.info("[diffhub] git command start",{args:e});try{let n,a,{promise:i,reject:s,resolve:o}={promise:new Promise((e,t)=>{n=e,a=t}),reject:a,resolve:n};{let r=(0,t.spawn)("git",e,{cwd:w(),env:{...process.env,GIT_TERMINAL_PROMPT:"0"},stdio:["ignore","pipe","pipe"]}),n=[],a=[],i=0,l=!1,d=e=>{l||(l=!0,e())},u=(t,n)=>{let a=Buffer.isBuffer(n)?n:Buffer.from(n);if((i+=a.length)>0x1400000){r.kill("SIGKILL"),d(()=>{s(Error(`git ${e.join(" ")} failed: output exceeded 20971520 bytes`))});return}t.push(a)};r.stdout.on("data",e=>{u(n,e)}),r.stderr.on("data",e=>{u(a,e)}),r.on("error",e=>{d(()=>s(e))}),r.on("close",t=>{let r=Buffer.concat(n).toString("utf-8"),i=Buffer.concat(a).toString("utf-8").trim();0===t?d(()=>o(r)):d(()=>{s(Object.assign(Error(i||`git ${e.join(" ")} failed with exit code ${t??"unknown"}`),{code:t,status:t??void 0,stderr:i}))})})}let l=await i;return p&&console.info("[diffhub] git command success",{args:e,durationMs:Date.now()-r}),l}catch(n){let t="string"==typeof n.stderr?n.stderr.trim():n.stderr?.toString("utf-8").trim()||"";if(console.error("[diffhub] git command failed",{args:e,code:n.code,durationMs:Date.now()-r,error:n,status:n.status,stderr:t||null}),n instanceof Error&&!t)throw n;throw Error(t||`git ${e.join(" ")} failed: ${n.message}`,{cause:n})}},R=async e=>{let t,r=new Promise(e=>{t=e}),n=l.gitCommandQueue;l.gitCommandQueue=r,await n;try{return await x(e)}finally{t()}},y=e=>e.split("\n").map(e=>e.trim()).filter(Boolean),E=e=>(0,r.createHash)("sha1").update(e).digest("hex"),b=(e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return null;let s=h(e,t,r,a);try{let t=(0,n.readFileSync)(s,"utf-8"),r=JSON.parse(t),a=Date.now()-r.metadata.createdAt;if(void 0!==i&&r.generation!==i||r.metadata.bootId!==l.serverBootId||r.metadata.repoPath!==e)return p&&console.info("[diffhub] snapshot cache stale",{ageMs:a,expectedBootId:l.serverBootId,expectedGeneration:i??null,repoPath:e,snapshotBootId:r.metadata.bootId,snapshotGeneration:r.generation,snapshotRepoPath:r.metadata.repoPath,source:"disk"}),null;return p&&console.info("[diffhub] snapshot cache hit",{ageMs:Date.now()-r.metadata.createdAt,generation:r.generation,repoPath:e,source:"disk"}),{...r,patchByFile:new Map(Object.entries(r.patchByFile))}}catch{return null}},I=async(e,t,r,n,a)=>{let i=Date.now()+1e3;for(;Date.now()<i;){let i=b(e,t,r,n,a);if(i)return i;await new Promise(e=>{setTimeout(e,50)})}return null},P=(e,t,a,i)=>{let s=w(),o=`snapshot:${s}:${e??""}:${t??""}:${a??""}:${i??""}`;return v(o,15e3,()=>{let d=u.get(o);if(d)return d;let f=(async()=>{try{let o,d,u,f,m=b(s,e,t,a,i);if(m)return m;if("1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER){let r=await I(s,e,t,a,i);if(r)return r;console.warn("[diffhub] external snapshot unavailable, recomputing inline",{expectedGeneration:i??null,mode:t??"all",repoPath:s,whitespace:a??"default"})}let g=(await R(["rev-parse","--abbrev-ref","HEAD"])).trim(),x="uncommitted"===t?"HEAD":e??process.env.DIFFHUB_BASE??await (o=w(),v(`baseBranch:${o}`,3e4,async()=>{let e=y(await R(["branch","-r","--format=%(refname:short)"]));for(let t of c)if(e.includes(`origin/${t}`))return`origin/${t}`;let t=y(await R(["branch","--format=%(refname:short)"]));for(let e of c)if(t.includes(e))return e;return"origin/main"})),E="uncommitted"===t?"HEAD":await (d=w(),v(`mergeBase:${d}:${x}`,3e4,async()=>(await R(["merge-base","HEAD",x])).trim())),P=(u=[E],"ignore"===a?["-w",...u]:u),[S,_]=await Promise.all([R(["diff",...P]),R(["diff","--numstat","-z","-M",...P])]),B=(0,r.createHash)("sha1").update(S).digest("hex"),F=(e=>{let t=[],r=0,n=0,a=0;for(;a<e.length;){let i=e.indexOf(" ",a);if(-1===i)break;let s=e.indexOf(" ",i+1);if(-1===s)throw Error("Malformed git diff --numstat output");let o=e.slice(a,i),l=e.slice(i+1,s),d="";if("\0"===e[a=s+1]){a+=1;let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat rename output");a=t+1;let r=e.indexOf("\0",a);if(-1===r)throw Error("Malformed git diff --numstat rename output");d=e.slice(a,r),a=r+1}else{let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat output");d=e.slice(a,t),a=t+1}let u="-"===o||"-"===l,c=u?0:Number.parseInt(o,10)||0,p=u?0:Number.parseInt(l,10)||0;t.push({binary:u,changes:c+p,deletions:p,file:d,insertions:c}),r+=c,n+=p}return{deletions:n,files:t,insertions:r}})(_),A=Date.now(),O=(f=l.serverBootId,(0,r.createHash)("sha1").update(`${f}:${B}:${E}`).digest("hex")),D={baseBranch:x,branch:g,deletions:F.deletions,files:F.files,fingerprint:B,fullPatch:S,generation:O,insertions:F.insertions,mergeBase:E,metadata:{bootId:l.serverBootId,createdAt:A,repoPath:s},patchByFile:(e=>{let t=new Map,r=/^diff --git a\/(.+?) b\/(.+)$/gm,n=[],a=r.exec(e);for(;a;)n.push({file:a[2],start:a.index}),a=r.exec(e);for(let[r,a]of n.entries()){let i=n[r+1]?.start??e.length,s=e.slice(a.start,i).trimEnd();t.set(a.file,s?`${s}
2
- `:"")}return t})(S)};return p&&console.info("[diffhub] snapshot cache miss",{generation:O,repoPath:s,source:"recomputed"}),((e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return;let s={...i,patchByFile:Object.fromEntries(i.patchByFile)};(0,n.writeFileSync)(h(e,t,r,a),JSON.stringify(s),"utf-8"),p&&console.info("[diffhub] snapshot cache wrote",{generation:i.generation,repoPath:e,source:"disk"})})(s,e,t,a,D),D}finally{u.delete(o)}})();return u.set(o,f),f})},S=async(e,t,r,n,a)=>{let i=await P(t,r,n,a),s=i.patchByFile.get(e)??"";return{baseBranch:i.baseBranch,branch:i.branch,fingerprint:i.fingerprint,generation:i.generation,mergeBase:i.mergeBase,patch:s,reviewKey:E(s)}},_=async(e,t,r,n)=>{let a=await P(e,t,r,n),i=Object.fromEntries(a.patchByFile),s=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,E(t)]));return{baseBranch:a.baseBranch,branch:a.branch,deletions:a.deletions,files:a.files,fingerprint:a.fingerprint,generation:a.generation,insertions:a.insertions,mergeBase:a.mergeBase,patchByFile:i,reviewKeyByFile:s}},B=async(e,t,r)=>{let n=await P(e,t,r);return{baseBranch:n.baseBranch,branch:n.branch,deletions:n.deletions,files:n.files,fingerprint:n.fingerprint,generation:n.generation,insertions:n.insertions}},F=async e=>{await R(["restore","--staged","--worktree","--",e])};e.s(["discardFile",0,F,"getDiffForFile",0,S,"getDiffStats",0,B,"getFileAtRef",0,(e,t)=>{let r=w();if("WORKING_TREE"===t)try{return Promise.resolve((0,n.readFileSync)((0,s.resolveRepoFilePath)(r,e),"utf-8"))}catch{return Promise.resolve("")}return v(`file:${r}:${t}:${e}`,3e4,async()=>{try{return await R(["show",`${t}:${e}`])}catch{return""}})},"getMultiFileDiff",0,_,"invalidateGitCache",0,g],23318)},86296,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),g=e.i(93695);e.i(20232);var v=e.i(220),w=e.i(89171),x=e.i(23318);let R=async e=>{let{searchParams:t}=new URL(e.url),r=t.get("base")??void 0,n="uncommitted"===t.get("mode")?"uncommitted":void 0,a="ignore"===t.get("ws")?"ignore":void 0;try{let e=await (0,x.getDiffStats)(r,n,a);return w.NextResponse.json(e)}catch(e){return w.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}};e.s(["GET",0,R],44977);var y=e.i(44977);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/files/route",pathname:"/api/files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/files/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:I,serverHooks:P}=E;async function S(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),E.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/files/route";w=w.replace(/\/index$/,"")||"/";let x=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:y,nextConfig:b,parsedUrl:I,isDraftMode:P,prerenderManifest:S,routerServerContext:_,isOnDemandRevalidate:B,revalidateOnlyGenerated:F,resolvedPathname:A,clientReferenceManifest:O,serverActionsManifest:D}=x,C=(0,o.normalizeAppPath)(w),T=!!(S.dynamicRoutes[C]||S.routes[A]),N=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,I,!1):t.end("This page could not be found"),null);if(T&&!P){let e=!!S.routes[A],t=S.dynamicRoutes[C];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await N();throw new g.NoFallbackError}}let $=null;!T||E.isDev||P||($="/index"===($=A)?"/":$);let H=!0===E.isDev||!T,M=T&&!H;D&&O&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:O,serverActionsManifest:D});let j=e.method||"GET",U=(0,i.getTracer)(),k=U.getActiveScopeSpan(),q=!!(null==_?void 0:_.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),L=(0,a.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,b,S,G);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let K={params:y,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>E.onRequestError(e,t,n,a,_)},sharedContext:{buildId:R}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(W,(0,d.signalFromNodeResponse)(t));try{let a,s=async e=>E.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${j} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${j} ${w}`)}),o=async a=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&B&&F&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let o=K.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=K.renderOpts.collectedTags;if(!T)return await (0,p.sendResponse)(W,X,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),t}},d=await E.handleResponse({req:e,nextConfig:b,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:F,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:G});if(!T)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",B?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),P&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return G&&T||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(W,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};q&&k?await o(k):(a=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(u.BaseServerSpan.handleRequest,{spanName:`${j} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},o),void 0,!q))}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),T)throw t;return await (0,p.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:I})},"routeModule",0,E,"serverHooks",0,P,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,I],86296)}];
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},16781,e=>{"use strict";var t=e.i(2157);let r="/tmp/diffhub-active-repo";e.s(["REPO_POINTER",0,r,"getConfiguredRepoPath",0,()=>{if(process.env.DIFFHUB_REPO)return process.env.DIFFHUB_REPO;let e=(()=>{try{let e=(0,t.readFileSync)(r,"utf-8").trim();if(e)return e}catch{}return null})();return e||process.cwd()}])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},57405,e=>{"use strict";var t=e.i(2157),r=e.i(50227);let a="gitdir:";class n extends Error{constructor(e){super(`Invalid repo-relative path: ${e}`),this.name="InvalidRepoFilePathError"}}e.s(["InvalidRepoFilePathError",0,n,"getGitDirectory",0,e=>{let n=(0,r.join)(e,".git");if(!(0,t.existsSync)(n)||(0,t.lstatSync)(n).isDirectory())return n;let i=(0,t.readFileSync)(n,"utf-8").trim();if(!i.startsWith(a))return n;let s=i.slice(a.length).trim();return(0,r.resolve)((0,r.dirname)(n),s)},"resolveRepoFilePath",0,(e,t)=>{if(!t||(0,r.isAbsolute)(t))throw new n(t);let a=(0,r.resolve)(e,t),i=(0,r.relative)(e,a);if(i.startsWith("..")||(0,r.isAbsolute)(i))throw new n(t);return a}])},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},23318,e=>{"use strict";var t=e.i(74533),r=e.i(66680),a=e.i(2157),n=e.i(60526),i=e.i(50227),s=e.i(57405),o=e.i(16781);let l=(()=>{let e=globalThis;if(!e.__diffhubGitRuntimeState){let t=process.env.DIFFHUB_SERVER_BOOT_ID;e.__diffhubGitRuntimeState={cache:new Map,gitCommandQueue:Promise.resolve(),inflight:new Map,lastPointerMtime:0,serverBootId:t??(0,r.createHash)("sha1").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex")}}return e.__diffhubGitRuntimeState})(),{cache:d,inflight:u}=l,c=["main","master","develop","dev"],p="1"===process.env.DIFFHUB_DEBUG,f=e=>`diffhub-snapshot-${(0,r.createHash)("sha1").update(e).digest("hex")}-`,h=(e,t,a,s)=>{let o=JSON.stringify({base:t??"",mode:a??"",whitespace:s??""}),l=(0,r.createHash)("sha1").update(o).digest("hex");return(0,i.join)((0,n.tmpdir)(),`${f(e)}${l}.json`)},m=e=>{if(!e)return void d.clear();let t=`:${e}`;for(let e of d.keys())e.includes(t)&&d.delete(e)},g=e=>{if(m(e),"1"!==process.env.DIFFHUB_CMUX||"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER)return;if(!e){for(let e of(0,a.readdirSync)((0,n.tmpdir)()))e.startsWith("diffhub-snapshot-")&&(0,a.rmSync)((0,i.join)((0,n.tmpdir)(),e),{force:!0});return}let t=f(e);for(let e of(0,a.readdirSync)((0,n.tmpdir)()))e.startsWith(t)&&(0,a.rmSync)((0,i.join)((0,n.tmpdir)(),e),{force:!0})},v=async(e,t,r)=>{try{let e=(0,a.statSync)(o.REPO_POINTER).mtimeMs;e!==l.lastPointerMtime&&(l.lastPointerMtime=e,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?m():g())}catch{}let n=d.get(e);if(n&&n.expires>Date.now())return n.value;let i=await r();return d.set(e,{expires:Date.now()+t,value:i}),i},w=()=>(0,o.getConfiguredRepoPath)(),x=async e=>{let r=Date.now();p&&console.info("[diffhub] git command start",{args:e});try{let a,n,{promise:i,reject:s,resolve:o}={promise:new Promise((e,t)=>{a=e,n=t}),reject:n,resolve:a};{let r=(0,t.spawn)("git",e,{cwd:w(),env:{...process.env,GIT_TERMINAL_PROMPT:"0"},stdio:["ignore","pipe","pipe"]}),a=[],n=[],i=0,l=!1,d=e=>{l||(l=!0,e())},u=(t,a)=>{let n=Buffer.isBuffer(a)?a:Buffer.from(a);if((i+=n.length)>0x1400000){r.kill("SIGKILL"),d(()=>{s(Error(`git ${e.join(" ")} failed: output exceeded 20971520 bytes`))});return}t.push(n)};r.stdout.on("data",e=>{u(a,e)}),r.stderr.on("data",e=>{u(n,e)}),r.on("error",e=>{d(()=>s(e))}),r.on("close",t=>{let r=Buffer.concat(a).toString("utf-8"),i=Buffer.concat(n).toString("utf-8").trim();0===t?d(()=>o(r)):d(()=>{s(Object.assign(Error(i||`git ${e.join(" ")} failed with exit code ${t??"unknown"}`),{code:t,status:t??void 0,stderr:i}))})})}let l=await i;return p&&console.info("[diffhub] git command success",{args:e,durationMs:Date.now()-r}),l}catch(a){let t="string"==typeof a.stderr?a.stderr.trim():a.stderr?.toString("utf-8").trim()||"";if(console.error("[diffhub] git command failed",{args:e,code:a.code,durationMs:Date.now()-r,error:a,status:a.status,stderr:t||null}),a instanceof Error&&!t)throw a;throw Error(t||`git ${e.join(" ")} failed: ${a.message}`,{cause:a})}},R=async e=>{let t,r=new Promise(e=>{t=e}),a=l.gitCommandQueue;l.gitCommandQueue=r,await a;try{return await x(e)}finally{t()}},y=e=>e.split("\n").map(e=>e.trim()).filter(Boolean),E=e=>(0,r.createHash)("sha1").update(e).digest("hex"),b=(e,t,r,n,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return null;let s=h(e,t,r,n);try{let t=(0,a.readFileSync)(s,"utf-8"),r=JSON.parse(t),n=Date.now()-r.metadata.createdAt;if(void 0!==i&&r.generation!==i||r.metadata.bootId!==l.serverBootId||r.metadata.repoPath!==e)return p&&console.info("[diffhub] snapshot cache stale",{ageMs:n,expectedBootId:l.serverBootId,expectedGeneration:i??null,repoPath:e,snapshotBootId:r.metadata.bootId,snapshotGeneration:r.generation,snapshotRepoPath:r.metadata.repoPath,source:"disk"}),null;return p&&console.info("[diffhub] snapshot cache hit",{ageMs:Date.now()-r.metadata.createdAt,generation:r.generation,repoPath:e,source:"disk"}),{...r,patchByFile:new Map(Object.entries(r.patchByFile))}}catch{return null}},I=async(e,t,r,a,n)=>{let i=Date.now()+1e3;for(;Date.now()<i;){let i=b(e,t,r,a,n);if(i)return i;await new Promise(e=>{setTimeout(e,50)})}return null},P=(e,t,n,i)=>{let s=w(),o=`snapshot:${s}:${e??""}:${t??""}:${n??""}:${i??""}`;return v(o,15e3,()=>{let d=u.get(o);if(d)return d;let f=(async()=>{try{let o,d,u,f,m=b(s,e,t,n,i);if(m)return m;if("1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER){let r=await I(s,e,t,n,i);if(r)return r;console.warn("[diffhub] external snapshot unavailable, recomputing inline",{expectedGeneration:i??null,mode:t??"all",repoPath:s,whitespace:n??"default"})}let g=(await R(["rev-parse","--abbrev-ref","HEAD"])).trim(),x="uncommitted"===t?"HEAD":e??process.env.DIFFHUB_BASE??await (o=w(),v(`baseBranch:${o}`,3e4,async()=>{let e=y(await R(["branch","-r","--format=%(refname:short)"]));for(let t of c)if(e.includes(`origin/${t}`))return`origin/${t}`;let t=y(await R(["branch","--format=%(refname:short)"]));for(let e of c)if(t.includes(e))return e;return"origin/main"})),E="uncommitted"===t?"HEAD":await (d=w(),v(`mergeBase:${d}:${x}`,3e4,async()=>(await R(["merge-base","HEAD",x])).trim())),P=(u=[E],"ignore"===n?["-w",...u]:u),[S,_]=await Promise.all([R(["diff",...P]),R(["diff","--numstat","-z","-M",...P])]),B=(0,r.createHash)("sha1").update(S).digest("hex"),F=(e=>{let t=[],r=0,a=0,n=0;for(;n<e.length;){let i=e.indexOf(" ",n);if(-1===i)break;let s=e.indexOf(" ",i+1);if(-1===s)throw Error("Malformed git diff --numstat output");let o=e.slice(n,i),l=e.slice(i+1,s),d="";if("\0"===e[n=s+1]){n+=1;let t=e.indexOf("\0",n);if(-1===t)throw Error("Malformed git diff --numstat rename output");n=t+1;let r=e.indexOf("\0",n);if(-1===r)throw Error("Malformed git diff --numstat rename output");d=e.slice(n,r),n=r+1}else{let t=e.indexOf("\0",n);if(-1===t)throw Error("Malformed git diff --numstat output");d=e.slice(n,t),n=t+1}let u="-"===o||"-"===l,c=u?0:Number.parseInt(o,10)||0,p=u?0:Number.parseInt(l,10)||0;t.push({binary:u,changes:c+p,deletions:p,file:d,insertions:c}),r+=c,a+=p}return{deletions:a,files:t,insertions:r}})(_),A=Date.now(),O=(f=l.serverBootId,(0,r.createHash)("sha1").update(`${f}:${B}:${E}`).digest("hex")),C={baseBranch:x,branch:g,deletions:F.deletions,files:F.files,fingerprint:B,fullPatch:S,generation:O,insertions:F.insertions,mergeBase:E,metadata:{bootId:l.serverBootId,createdAt:A,repoPath:s},patchByFile:(e=>{let t=new Map,r=/^diff --git a\/(.+?) b\/(.+)$/gm,a=[],n=r.exec(e);for(;n;)a.push({file:n[2],start:n.index}),n=r.exec(e);for(let[r,n]of a.entries()){let i=a[r+1]?.start??e.length,s=e.slice(n.start,i).trimEnd();t.set(n.file,s?`${s}
2
+ `:"")}return t})(S)};return p&&console.info("[diffhub] snapshot cache miss",{generation:O,repoPath:s,source:"recomputed"}),((e,t,r,n,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return;let s={...i,patchByFile:Object.fromEntries(i.patchByFile)};(0,a.writeFileSync)(h(e,t,r,n),JSON.stringify(s),"utf-8"),p&&console.info("[diffhub] snapshot cache wrote",{generation:i.generation,repoPath:e,source:"disk"})})(s,e,t,n,C),C}finally{u.delete(o)}})();return u.set(o,f),f})},S=async(e,t,r,a,n)=>{let i=await P(t,r,a,n),s=i.patchByFile.get(e)??"";return{baseBranch:i.baseBranch,branch:i.branch,fingerprint:i.fingerprint,generation:i.generation,mergeBase:i.mergeBase,patch:s,reviewKey:E(s)}},_=async(e,t,r,a)=>{let n=await P(e,t,r,a),i=Object.fromEntries(n.patchByFile),s=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,E(t)]));return{baseBranch:n.baseBranch,branch:n.branch,deletions:n.deletions,files:n.files,fingerprint:n.fingerprint,generation:n.generation,insertions:n.insertions,mergeBase:n.mergeBase,patchByFile:i,reviewKeyByFile:s}},B=async(e,t,r)=>{let a=await P(e,t,r);return{baseBranch:a.baseBranch,branch:a.branch,deletions:a.deletions,files:a.files,fingerprint:a.fingerprint,generation:a.generation,insertions:a.insertions}},F=async e=>{await R(["restore","--staged","--worktree","--",e])};e.s(["discardFile",0,F,"getDiffForFile",0,S,"getDiffStats",0,B,"getFileAtRef",0,(e,t)=>{let r=w();if("WORKING_TREE"===t)try{return Promise.resolve((0,a.readFileSync)((0,s.resolveRepoFilePath)(r,e),"utf-8"))}catch{return Promise.resolve("")}return v(`file:${r}:${t}:${e}`,3e4,async()=>{try{return await R(["show",`${t}:${e}`])}catch{return""}})},"getMultiFileDiff",0,_,"invalidateGitCache",0,g],23318)},86296,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),g=e.i(93695);e.i(20232);var v=e.i(220),w=e.i(89171),x=e.i(23318);let R=async e=>{let{searchParams:t}=new URL(e.url),r=t.get("base")??void 0,a="uncommitted"===t.get("mode")?"uncommitted":void 0,n="ignore"===t.get("ws")?"ignore":void 0,i="1"===t.get("refresh");try{i&&(0,x.invalidateGitCache)();let e=await (0,x.getDiffStats)(r,a,n);return w.NextResponse.json(e)}catch(e){return w.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}};e.s(["GET",0,R],44977);var y=e.i(44977);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/files/route",pathname:"/api/files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/files/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:I,serverHooks:P}=E;async function S(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/files/route";w=w.replace(/\/index$/,"")||"/";let x=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,params:y,nextConfig:b,parsedUrl:I,isDraftMode:P,prerenderManifest:S,routerServerContext:_,isOnDemandRevalidate:B,revalidateOnlyGenerated:F,resolvedPathname:A,clientReferenceManifest:O,serverActionsManifest:C}=x,D=(0,o.normalizeAppPath)(w),T=!!(S.dynamicRoutes[D]||S.routes[A]),N=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,I,!1):t.end("This page could not be found"),null);if(T&&!P){let e=!!S.routes[A],t=S.dynamicRoutes[D];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await N();throw new g.NoFallbackError}}let $=null;!T||E.isDev||P||($="/index"===($=A)?"/":$);let H=!0===E.isDev||!T,M=T&&!H;C&&O&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:O,serverActionsManifest:C});let j=e.method||"GET",U=(0,i.getTracer)(),k=U.getActiveScopeSpan(),q=!!(null==_?void 0:_.isWrappedByNextServer),G=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,b,S,G);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let K={params:y,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,_)},sharedContext:{buildId:R}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(W,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>E.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${j} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${j} ${w}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&B&&F&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let o=K.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=K.renderOpts.collectedTags;if(!T)return await (0,p.sendResponse)(W,X,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),t}},d=await E.handleResponse({req:e,nextConfig:b,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:F,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:G});if(!T)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",B?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),P&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return G&&T||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(W,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};q&&k?await o(k):(n=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(u.BaseServerSpan.handleRequest,{spanName:`${j} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},o),void 0,!q))}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),T)throw t;return await (0,p.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:I})},"routeModule",0,E,"serverHooks",0,P,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,I],86296)}];
3
3
 
4
4
  //# sourceMappingURL=%5Broot-of-the-server%5D__05wbal-._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[87769,(t,e,i)=>{e.exports=t.x("node:events",()=>require("node:events"))},12714,(t,e,i)=>{e.exports=t.x("node:fs/promises",()=>require("node:fs/promises"))},81111,(t,e,i)=>{e.exports=t.x("node:stream",()=>require("node:stream"))},64387,t=>{"use strict";var e=t.i(50227),i=t.i(87769),s=t.i(2157),r=t.i(12714),a=t.i(81111);let n="files",h="directories",o="files_directories",l={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:n,lstat:!1,depth:0x80000000,alwaysStat:!1,highWaterMark:4096};Object.freeze(l);let d="READDIRP_RECURSIVE_ERROR",c=new Set(["ENOENT","EPERM","EACCES","ELOOP",d]),f=[h,"all",o,n],p=new Set([h,"all",o]),u=new Set(["all",o,n]);process.platform;let m=t=>!0,_=t=>{if(void 0===t)return m;if("function"==typeof t)return t;if("string"==typeof t){let e=t.trim();return t=>t.basename===e}if(Array.isArray(t)){let e=t.map(t=>t.trim());return t=>e.some(e=>t.basename===e)}return m};class w extends a.Readable{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor(t={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:t.highWaterMark});const i={...l,...t},{root:s,type:a}=i;this._fileFilter=_(i.fileFilter),this._directoryFilter=_(i.directoryFilter);const n=i.lstat?r.lstat:r.stat;this._stat=n,this._maxDepth=null!=i.depth&&Number.isSafeInteger(i.depth)?i.depth:l.depth,this._wantsDir=!!a&&p.has(a),this._wantsFile=!!a&&u.has(a),this._wantsEverything="all"===a,this._root=(0,e.resolve)(s),this._isDirent=!i.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(t){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&t>0;){let e=this.parent,i=e&&e.files;if(i&&i.length>0){let{path:s,depth:r}=e,a=i.splice(0,t).map(t=>this._formatEntry(t,s));for(let e of(await Promise.all(a))){if(!e)continue;if(this.destroyed)return;let i=await this._getEntryType(e);"directory"===i&&this._directoryFilter(e)?(r<=this._maxDepth&&this.parents.push(this._exploreDir(e.fullPath,r+1)),this._wantsDir&&(this.push(e),t--)):("file"===i||this._includeAsFile(e))&&this._fileFilter(e)&&this._wantsFile&&(this.push(e),t--)}}else{let t=this.parents.pop();if(!t){this.push(null);break}if(this.parent=await t,this.destroyed)return}}}catch(t){this.destroy(t)}finally{this.reading=!1}}}async _exploreDir(t,e){let i;try{i=await (0,r.readdir)(t,this._rdOptions)}catch(t){this._onError(t)}return{files:i,depth:e,path:t}}async _formatEntry(t,i){let s,r=this._isDirent?t.name:t;try{let a=(0,e.resolve)((0,e.join)(i,r));(s={path:(0,e.relative)(this._root,a),fullPath:a,basename:r})[this._statsProp]=this._isDirent?t:await this._stat(a)}catch(t){this._onError(t);return}return s}_onError(t){c.has(t.code)&&!this.destroyed?this.emit("warn",t):this.destroy(t)}async _getEntryType(t){if(!t&&this._statsProp in t)return"";let i=t[this._statsProp];if(i.isFile())return"file";if(i.isDirectory())return"directory";if(i&&i.isSymbolicLink()){let i=t.fullPath;try{let t=await (0,r.realpath)(i),s=await (0,r.lstat)(t);if(s.isFile())return"file";if(s.isDirectory()){let s=t.length;if(i.startsWith(t)&&i.substr(s,1)===e.sep){let e=Error(`Circular symlink detected: "${i}" points to "${t}"`);return e.code=d,this._onError(e)}return"directory"}}catch(t){return this._onError(t),""}}}_includeAsFile(t){let e=t&&t[this._statsProp];return e&&this._wantsEverything&&!e.isDirectory()}}var g=t.i(60526);let y=()=>{},v=process.platform,b="win32"===v,P="darwin"===v,E="linux"===v,x="freebsd"===v,D="OS400"===(0,g.type)(),W="all",k="ready",I="add",F="change",S="addDir",R="unlink",C="unlinkDir",z="raw",j="error",A={lstat:r.lstat,stat:r.stat},T="listeners",M="errHandlers",O="rawEmitters",H=[T,M,O],N=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),U=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},L=(t,e,i)=>{let s=t[e];s instanceof Set||(t[e]=s=new Set([s])),s.add(i)},$=(t,e,i)=>{let s=t[e];s instanceof Set?s.delete(i):s===i&&delete t[e]},q=t=>t instanceof Set?0===t.size:!t,B=new Map;function G(t,i,r,a,n){try{return(0,s.watch)(t,{persistent:i.persistent},(i,s)=>{r(t),n(i,s,{watchedPath:t}),s&&t!==s&&X(e.resolve(t,s),T,e.join(t,s))})}catch(t){a(t);return}}let X=(t,e,i,s,r)=>{let a=B.get(t);a&&U(a[e],t=>{t(i,s,r)})},K=new Map;class V{fsw;_boundHandleError;constructor(t){this.fsw=t,this._boundHandleError=e=>t._handleError(e)}_watchWithNodeFs(t,i){let r,a=this.fsw.options,n=e.dirname(t),h=e.basename(t);this.fsw._getWatchedDir(n).add(h);let o=e.resolve(t),l={persistent:a.persistent};if(i||(i=y),a.usePolling)l.interval=a.interval!==a.binaryInterval&&N.has(e.extname(h).slice(1).toLowerCase())?a.binaryInterval:a.interval,r=((t,e,i,r)=>{let{listener:a,rawEmitter:n}=r,h=K.get(e),o=h&&h.options;return o&&(o.persistent<i.persistent||o.interval>i.interval)&&((0,s.unwatchFile)(e),h=void 0),h?(L(h,T,a),L(h,O,n)):(h={listeners:a,rawEmitters:n,options:i,watcher:(0,s.watchFile)(e,i,(i,s)=>{U(h.rawEmitters,t=>{t(F,e,{curr:i,prev:s})});let r=i.mtimeMs;(i.size!==s.size||r>s.mtimeMs||0===r)&&U(h.listeners,e=>e(t,i))})},K.set(e,h)),()=>{$(h,T,a),$(h,O,n),q(h.listeners)&&(K.delete(e),(0,s.unwatchFile)(e),h.options=h.watcher=void 0,Object.freeze(h))}})(t,o,l,{listener:i,rawEmitter:this.fsw._emitRaw});else r=((t,e,i,s)=>{let r,{listener:a,errHandler:n,rawEmitter:h}=s,o=B.get(e);if(!i.persistent){if(!(r=G(t,i,a,n,h)))return;return r.close.bind(r)}if(o)L(o,T,a),L(o,M,n),L(o,O,h);else{if(!(r=G(t,i,X.bind(null,e,T),n,X.bind(null,e,O))))return;r.on(j,async t=>{let i=X.bind(null,e,M);o&&(o.watcherUnusable=!0),i(t)}),o={listeners:a,errHandlers:n,rawEmitters:h,watcher:r},B.set(e,o)}return()=>{if($(o,T,a),$(o,M,n),$(o,O,h),q(o.listeners)){let t;o.watcher.close(),B.delete(e),H.forEach((t=o,e=>{let i=t[e];i instanceof Set?i.clear():delete t[e]})),o.watcher=void 0,Object.freeze(o)}}})(t,o,l,{listener:i,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return r}_handleFile(t,i,s){if(this.fsw.closed)return;let a=e.dirname(t),n=e.basename(t),h=this.fsw._getWatchedDir(a),o=i;if(h.has(n))return;let l=async(e,i)=>{if(this.fsw._throttle("watch",t,5))if(i&&0!==i.mtimeMs){if(h.has(n)){let e=i.atimeMs,s=i.mtimeMs;(!e||e<=s||s!==o.mtimeMs)&&this.fsw._emit(F,t,i),o=i}}else try{let i=await (0,r.stat)(t);if(this.fsw.closed)return;let s=i.atimeMs,a=i.mtimeMs;if((!s||s<=a||a!==o.mtimeMs)&&this.fsw._emit(F,t,i),(P||E||x)&&o.ino!==i.ino){this.fsw._closeFile(e),o=i;let s=this._watchWithNodeFs(t,l);s&&this.fsw._addPathCloser(e,s)}else o=i}catch(t){this.fsw._remove(a,n)}},d=this._watchWithNodeFs(t,l);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(t)){if(!this.fsw._throttle(I,t,0))return;this.fsw._emit(I,t,i)}return d}async _handleSymlink(t,e,i,s){if(this.fsw.closed)return;let a=t.fullPath,n=this.fsw._getWatchedDir(e);if(!this.fsw.options.followSymlinks){let e;this.fsw._incrReadyCount();try{e=await (0,r.realpath)(i)}catch(t){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;return n.has(s)?this.fsw._symlinkPaths.get(a)!==e&&(this.fsw._symlinkPaths.set(a,e),this.fsw._emit(F,i,t.stats)):(n.add(s),this.fsw._symlinkPaths.set(a,e),this.fsw._emit(I,i,t.stats)),this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(a))return!0;this.fsw._symlinkPaths.set(a,!0)}_handleRead(t,i,s,r,a,n,h){t=e.join(t,"");let o=r?`${t}:${r}`:t;if(!(h=this.fsw._throttle("readdir",o,1e3)))return;let l=this.fsw._getWatchedDir(s.path),d=new Set,c=this.fsw._readdirp(t,{fileFilter:t=>s.filterPath(t),directoryFilter:t=>s.filterDir(t)});if(c)return c.on("data",async h=>{if(this.fsw.closed){c=void 0;return}let o=h.path,f=e.join(t,o);if(d.add(o),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,t,f,o))){if(this.fsw.closed){c=void 0;return}o!==r&&(r||l.has(o))||(this.fsw._incrReadyCount(),f=e.join(a,e.relative(a,f)),this._addToNodeFs(f,i,s,n+1))}}).on(j,this._boundHandleError),new Promise((e,i)=>{if(!c)return i();c.once("end",()=>{if(this.fsw.closed){c=void 0;return}let i=!!h&&h.clear();e(void 0),l.getChildren().filter(e=>e!==t&&!d.has(e)).forEach(e=>{this.fsw._remove(t,e)}),c=void 0,i&&this._handleRead(t,!1,s,r,a,n,h)})})}async _handleDir(t,i,s,r,a,n,h){let o,l,d=this.fsw._getWatchedDir(e.dirname(t)),c=d.has(e.basename(t));s&&this.fsw.options.ignoreInitial||a||c||this.fsw._emit(S,t,i),d.add(e.basename(t)),this.fsw._getWatchedDir(t);let f=this.fsw.options.depth;if((null==f||r<=f)&&!this.fsw._symlinkPaths.has(h)){if(!a&&(await this._handleRead(t,s,n,a,t,r,o),this.fsw.closed))return;l=this._watchWithNodeFs(t,(e,i)=>{i&&0===i.mtimeMs||this._handleRead(e,!1,n,a,t,r,o)})}return l}async _addToNodeFs(t,i,s,a,n){let h=this.fsw._emitReady;if(this.fsw._isIgnored(t)||this.fsw.closed)return h(),!1;let o=this.fsw._getWatchHelpers(t);s&&(o.filterPath=t=>s.filterPath(t),o.filterDir=t=>s.filterDir(t));try{let s,l=await A[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,l))return h(),!1;let d=this.fsw.options.followSymlinks;if(l.isDirectory()){let h=e.resolve(t),c=d?await (0,r.realpath)(t):t;if(this.fsw.closed||(s=await this._handleDir(o.watchPath,l,i,a,n,o,c),this.fsw.closed))return;h!==c&&void 0!==c&&this.fsw._symlinkPaths.set(h,c)}else if(l.isSymbolicLink()){let n=d?await (0,r.realpath)(t):t;if(this.fsw.closed)return;let h=e.dirname(o.watchPath);if(this.fsw._getWatchedDir(h).add(o.watchPath),this.fsw._emit(I,o.watchPath,l),s=await this._handleDir(h,l,i,a,t,o,n),this.fsw.closed)return;void 0!==n&&this.fsw._symlinkPaths.set(e.resolve(t),n)}else s=this._handleFile(o.watchPath,l,i);return h(),s&&this.fsw._addPathCloser(t,s),!1}catch(e){if(this.fsw._handleError(e))return h(),t}}}let J=/\\/g,Q=/\/\//g,Y=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,Z=/^\.[/\\]/;function tt(t){return Array.isArray(t)?t:[t]}let te=t=>"object"==typeof t&&null!==t&&!(t instanceof RegExp);function ti(t,i,s){let r=function(t){if("string"!=typeof t)throw Error("string expected");t=(t=e.normalize(t)).replace(/\\/g,"/");let i=!1;return t.startsWith("//")&&(i=!0),t=t.replace(Q,"/"),i&&(t="/"+t),t}(i);for(let e=0;e<t.length;e++)if((0,t[e])(r,s))return!0;return!1}let ts=t=>{let e=tt(t).flat();if(!e.every(t=>"string"==typeof t))throw TypeError(`Non-string provided as watch path: ${e}`);return e.map(ta)},tr=t=>{let e=t.replace(J,"/"),i=!1;return e.startsWith("//")&&(i=!0),e=e.replace(Q,"/"),i&&(e="/"+e),e},ta=t=>tr(e.normalize(tr(t))),tn=(t="")=>i=>"string"==typeof i?ta(e.isAbsolute(i)?i:e.join(t,i)):i,th=Object.freeze(new Set);class to{path;_removeWatcher;items;constructor(t,e){this.path=t,this._removeWatcher=e,this.items=new Set}add(t){let{items:e}=this;e&&"."!==t&&".."!==t&&e.add(t)}async remove(t){let{items:i}=this;if(!i||(i.delete(t),i.size>0))return;let s=this.path;try{await (0,r.readdir)(s)}catch(t){this._removeWatcher&&this._removeWatcher(e.dirname(s),e.basename(s))}}has(t){let{items:e}=this;if(e)return e.has(t)}getChildren(){let{items:t}=this;return t?[...t.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=y,this.items=th,Object.freeze(this)}}class tl{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor(t,i,s){this.fsw=s;const r=t;this.path=t=t.replace(Z,""),this.watchPath=r,this.fullWatchPath=e.resolve(r),this.dirParts=[],this.dirParts.forEach(t=>{t.length>1&&t.pop()}),this.followSymlinks=i,this.statMethod=i?"stat":"lstat"}entryPath(t){return e.join(this.watchPath,e.relative(this.watchPath,t.fullPath))}filterPath(t){let{stats:e}=t;if(e&&e.isSymbolicLink())return this.filterDir(t);let i=this.entryPath(t);return this.fsw._isntIgnored(i,e)&&this.fsw._hasReadPermissions(e)}filterDir(t){return this.fsw._isntIgnored(this.entryPath(t),t.stats)}}class td extends i.EventEmitter{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor(t={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;const e=t.awaitWriteFinish,i={stabilityThreshold:2e3,pollInterval:100},s={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...t,ignored:t.ignored?tt(t.ignored):tt([]),awaitWriteFinish:!0===e?i:"object"==typeof e&&{...i,...e}};D&&(s.usePolling=!0),void 0===s.atomic&&(s.atomic=!s.usePolling);const r=process.env.CHOKIDAR_USEPOLLING;if(void 0!==r){const t=r.toLowerCase();"false"===t||"0"===t?s.usePolling=!1:"true"===t||"1"===t?s.usePolling=!0:s.usePolling=!!t}const a=process.env.CHOKIDAR_INTERVAL;a&&(s.interval=Number.parseInt(a,10));let n=0;this._emitReady=()=>{++n>=this._readyCount&&(this._emitReady=y,this._readyEmitted=!0,process.nextTick(()=>this.emit(k)))},this._emitRaw=(...t)=>this.emit(z,...t),this._boundRemove=this._remove.bind(this),this.options=s,this._nodeFsHandler=new V(this),Object.freeze(s)}_addIgnoredPath(t){if(te(t)){for(let e of this._ignoredPaths)if(te(e)&&e.path===t.path&&e.recursive===t.recursive)return}this._ignoredPaths.add(t)}_removeIgnoredPath(t){if(this._ignoredPaths.delete(t),"string"==typeof t)for(let e of this._ignoredPaths)te(e)&&e.path===t&&this._ignoredPaths.delete(e)}add(t,i,s){let{cwd:r}=this.options;this.closed=!1,this._closePromise=void 0;let a=ts(t);return r&&(a=a.map(t=>e.isAbsolute(t)?t:e.join(r,t))),a.forEach(t=>{this._removeIgnoredPath(t)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=a.length,Promise.all(a.map(async t=>{let e=await this._nodeFsHandler._addToNodeFs(t,!s,void 0,0,i);return e&&this._emitReady(),e})).then(t=>{this.closed||t.forEach(t=>{t&&this.add(e.dirname(t),e.basename(i||t))})}),this}unwatch(t){if(this.closed)return this;let i=ts(t),{cwd:s}=this.options;return i.forEach(t=>{e.isAbsolute(t)||this._closers.has(t)||(s&&(t=e.join(s,t)),t=e.resolve(t)),this._closePath(t),this._addIgnoredPath(t),this._watched.has(t)&&this._addIgnoredPath({path:t,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let t=[];return this._closers.forEach(e=>e.forEach(e=>{let i=e();i instanceof Promise&&t.push(i)})),this._streams.forEach(t=>t.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(t=>t.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=t.length?Promise.all(t).then(()=>void 0):Promise.resolve(),this._closePromise}getWatched(){let t={};return this._watched.forEach((i,s)=>{t[(this.options.cwd?e.relative(this.options.cwd,s):s)||"."]=i.getChildren().sort()}),t}emitWithAll(t,e){this.emit(t,...e),t!==j&&this.emit(W,t,...e)}async _emit(t,i,s){let a;if(this.closed)return;let n=this.options;b&&(i=e.normalize(i)),n.cwd&&(i=e.relative(n.cwd,i));let h=[i];null!=s&&h.push(s);let o=n.awaitWriteFinish;if(o&&(a=this._pendingWrites.get(i)))return a.lastChange=new Date,this;if(n.atomic){if(t===R)return this._pendingUnlinks.set(i,[t,...h]),setTimeout(()=>{this._pendingUnlinks.forEach((t,e)=>{this.emit(...t),this.emit(W,...t),this._pendingUnlinks.delete(e)})},"number"==typeof n.atomic?n.atomic:100),this;t===I&&this._pendingUnlinks.has(i)&&(t=F,this._pendingUnlinks.delete(i))}if(o&&(t===I||t===F)&&this._readyEmitted){let e=(e,i)=>{e?(t=j,h[0]=e,this.emitWithAll(t,h)):i&&(h.length>1?h[1]=i:h.push(i),this.emitWithAll(t,h))};return this._awaitWriteFinish(i,o.stabilityThreshold,t,e),this}if(t===F&&!this._throttle(F,i,50))return this;if(n.alwaysStat&&void 0===s&&(t===I||t===S||t===F)){let t,s=n.cwd?e.join(n.cwd,i):i;try{t=await (0,r.stat)(s)}catch(t){}if(!t||this.closed)return;h.push(t)}return this.emitWithAll(t,h),this}_handleError(t){let e=t&&t.code;return t&&"ENOENT"!==e&&"ENOTDIR"!==e&&(!this.options.ignorePermissionErrors||"EPERM"!==e&&"EACCES"!==e)&&this.emit(j,t),t||this.closed}_throttle(t,e,i){let s;this._throttled.has(t)||this._throttled.set(t,new Map);let r=this._throttled.get(t);if(!r)throw Error("invalid throttle");let a=r.get(e);if(a)return a.count++,!1;let n=()=>{let t=r.get(e),i=t?t.count:0;return r.delete(e),clearTimeout(s),t&&clearTimeout(t.timeoutObject),i},h={timeoutObject:s=setTimeout(n,i),clear:n,count:0};return r.set(e,h),h}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(t,i,r,a){let n,h=this.options.awaitWriteFinish;if("object"!=typeof h)return;let o=h.pollInterval,l=t;this.options.cwd&&!e.isAbsolute(t)&&(l=e.join(this.options.cwd,t));let d=new Date,c=this._pendingWrites;c.has(t)||(c.set(t,{lastChange:d,cancelWait:()=>(c.delete(t),clearTimeout(n),r)}),n=setTimeout(function e(r){(0,s.stat)(l,(s,h)=>{if(s||!c.has(t)){s&&"ENOENT"!==s.code&&a(s);return}let l=Number(new Date);r&&h.size!==r.size&&(c.get(t).lastChange=l),l-c.get(t).lastChange>=i?(c.delete(t),a(void 0,h)):n=setTimeout(e,o,h)})},o))}_isIgnored(t,i){if(this.options.atomic&&Y.test(t))return!0;if(!this._userIgnored){let{cwd:t}=this.options,i=(this.options.ignored||[]).map(tn(t)),s=[...[...this._ignoredPaths].map(tn(t)),...i];this._userIgnored=function(t,i){if(null==t)throw TypeError("anymatch: specify first argument");let s=tt(t).map(t=>"function"==typeof t?t:"string"==typeof t?e=>t===e:t instanceof RegExp?e=>t.test(e):"object"==typeof t&&null!==t?i=>{if(t.path===i)return!0;if(t.recursive){let s=e.relative(t.path,i);return!!s&&!s.startsWith("..")&&!e.isAbsolute(s)}return!1}:()=>!1);return null==i?(t,e)=>ti(s,t,e):ti(s,i)}(s,void 0)}return this._userIgnored(t,i)}_isntIgnored(t,e){return!this._isIgnored(t,e)}_getWatchHelpers(t){return new tl(t,this.options.followSymlinks,this)}_getWatchedDir(t){let i=e.resolve(t);return this._watched.has(i)||this._watched.set(i,new to(i,this._boundRemove)),this._watched.get(i)}_hasReadPermissions(t){return!!this.options.ignorePermissionErrors||!!(256&Number(t.mode))}_remove(t,i,s){let r=e.join(t,i),a=e.resolve(r);if(s=null!=s?s:this._watched.has(r)||this._watched.has(a),!this._throttle("remove",r,100))return;s||1!==this._watched.size||this.add(t,i,!0),this._getWatchedDir(r).getChildren().forEach(t=>this._remove(r,t));let n=this._getWatchedDir(t),h=n.has(i);n.remove(i),this._symlinkPaths.has(a)&&this._symlinkPaths.delete(a);let o=r;if(this.options.cwd&&(o=e.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(o)&&this._pendingWrites.get(o).cancelWait()===I)return;this._watched.delete(r),this._watched.delete(a);let l=s?C:R;h&&!this._isIgnored(r)&&this._emit(l,r),this._closePath(r)}_closePath(t){this._closeFile(t);let i=e.dirname(t);this._getWatchedDir(i).remove(e.basename(t))}_closeFile(t){let e=this._closers.get(t);e&&(e.forEach(t=>t()),this._closers.delete(t))}_addPathCloser(t,e){if(!e)return;let i=this._closers.get(t);i||(i=[],this._closers.set(t,i)),i.push(e)}_readdirp(t,e){if(this.closed)return;let i=function(t,e={}){let i=e.entryType||e.type;if("both"===i&&(i=o),i&&(e.type=i),t){if("string"!=typeof t)throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(i&&!f.includes(i))throw Error(`readdirp: Invalid type passed. Use one of ${f.join(", ")}`)}else throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new w(e)}(t,{type:W,alwaysStat:!0,lstat:!0,...e,depth:0});return this._streams.add(i),i.once("close",()=>{i=void 0}),i.once("end",()=>{i&&(this._streams.delete(i),i=void 0)}),i}}var tc=t.i(57405),tf=t.i(23318);let tp=[".next",".turbo","node_modules"],tu=["HEAD","index","packed-refs","refs"],tm={event:"change",path:null},t_=()=>void 0,tw=()=>{let t=globalThis;return t.__diffhubRepoWatchRuntimeState??={entries:new Map},t.__diffhubRepoWatchRuntimeState},tg=()=>"1"===process.env.DIFFHUB_DISABLE_WATCH||"1"===process.env.DIFFHUB_CMUX&&"1"!==process.env.DIFFHUB_EXTERNAL_WATCHER,ty=(t,e)=>{for(let i of t.subscribers)i(e)},tv=(t,e,i)=>{0!==t.subscribers.size&&(t.pendingChange={event:e,path:i},t.timer&&clearTimeout(t.timer),t.timer=setTimeout(()=>(t=>{let{pendingChange:e}=t;t.pendingChange=null,t.timer=null,e&&0!==t.subscribers.size&&((0,tf.invalidateGitCache)(t.repoPath),t.eventId+=1,ty(t,{createdAt:new Date().toISOString(),event:e.event,id:t.eventId,path:e.path,repoPath:t.repoPath,type:"change"}))})(t),150))};t.s(["isRepoWatchDisabled",0,tg,"publishExternalRepoChange",0,(t,e)=>{let i=e??tm;(0,tf.invalidateGitCache)(t);let s=tw().entries.get(t);s&&0!==s.subscribers.size&&(s.eventId+=1,ty(s,{createdAt:new Date().toISOString(),event:i.event,id:s.eventId,path:i.path,repoPath:t,type:"change"}))},"subscribeRepoChanges",0,(t,i)=>{if(tg())return t_;let s=tw(),r=s.entries.get(t);return r||(r="1"===process.env.DIFFHUB_EXTERNAL_WATCHER?{eventId:0,pendingChange:null,repoPath:t,subscribers:new Set,timer:null,watcher:null}:(t=>{let i,s=function(t,e={}){let i=new td(e);return i.add(t),i}((i=(0,tc.getGitDirectory)(t),[t,...tu.map(t=>(0,e.join)(i,t))]),{atomic:!0,ignoreInitial:!0,ignored:e=>((t,e)=>{let i=e.endsWith("/")?e:`${e}/`,s=(t.startsWith(i)?t.slice(i.length):t).replaceAll("\\","/");if(!s||s.startsWith(".."))return!1;for(let t of tp)if(s===t||s.startsWith(`${t}/`))return!0;return!(!(".git"===s||s.startsWith(".git/"))||".git/HEAD"===s||".git/index"===s||".git/packed-refs"===s||".git/refs"===s||s.startsWith(".git/refs/"))})(e,t),persistent:!0}),r={eventId:0,pendingChange:null,repoPath:t,subscribers:new Set,timer:null,watcher:s};for(let t of["add","addDir","change","unlink","unlinkDir"])s.on(t,e=>tv(r,t,e??null));return s.on("error",e=>{r.eventId+=1,ty(r,{createdAt:new Date().toISOString(),error:e instanceof Error?e.message:String(e),id:r.eventId,repoPath:t,type:"error"})}),r})(t),s.entries.set(t,r)),r.subscribers.add(i),()=>{let e=s.entries.get(t);e&&(e.subscribers.delete(i),0===e.subscribers.size&&(s.entries.delete(t),(t=>{t.timer&&(clearTimeout(t.timer),t.timer=null),t.subscribers.clear();let{watcher:e}=t;e&&(async()=>{try{await e.close()}catch(t){console.error("[diffhub] failed to close repo watcher",{error:t})}})()})(e)))}}],64387)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0qe921e._.js.map
@@ -0,0 +1,9 @@
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},16781,e=>{"use strict";var t=e.i(2157);let r="/tmp/diffhub-active-repo";e.s(["REPO_POINTER",0,r,"getConfiguredRepoPath",0,()=>{if(process.env.DIFFHUB_REPO)return process.env.DIFFHUB_REPO;let e=(()=>{try{let e=(0,t.readFileSync)(r,"utf-8").trim();if(e)return e}catch{}return null})();return e||process.cwd()}])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},57405,e=>{"use strict";var t=e.i(2157),r=e.i(50227);let n="gitdir:";class a extends Error{constructor(e){super(`Invalid repo-relative path: ${e}`),this.name="InvalidRepoFilePathError"}}e.s(["InvalidRepoFilePathError",0,a,"getGitDirectory",0,e=>{let a=(0,r.join)(e,".git");if(!(0,t.existsSync)(a)||(0,t.lstatSync)(a).isDirectory())return a;let i=(0,t.readFileSync)(a,"utf-8").trim();if(!i.startsWith(n))return a;let s=i.slice(n.length).trim();return(0,r.resolve)((0,r.dirname)(a),s)},"resolveRepoFilePath",0,(e,t)=>{if(!t||(0,r.isAbsolute)(t))throw new a(t);let n=(0,r.resolve)(e,t),i=(0,r.relative)(e,n);if(i.startsWith("..")||(0,r.isAbsolute)(i))throw new a(t);return n}])},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},23318,e=>{"use strict";var t=e.i(74533),r=e.i(66680),n=e.i(2157),a=e.i(60526),i=e.i(50227),s=e.i(57405),o=e.i(16781);let l=(()=>{let e=globalThis;if(!e.__diffhubGitRuntimeState){let t=process.env.DIFFHUB_SERVER_BOOT_ID;e.__diffhubGitRuntimeState={cache:new Map,gitCommandQueue:Promise.resolve(),inflight:new Map,lastPointerMtime:0,serverBootId:t??(0,r.createHash)("sha1").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex")}}return e.__diffhubGitRuntimeState})(),{cache:d,inflight:u}=l,c=["main","master","develop","dev"],p="1"===process.env.DIFFHUB_DEBUG,f=e=>`diffhub-snapshot-${(0,r.createHash)("sha1").update(e).digest("hex")}-`,h=(e,t,n,s)=>{let o=JSON.stringify({base:t??"",mode:n??"",whitespace:s??""}),l=(0,r.createHash)("sha1").update(o).digest("hex");return(0,i.join)((0,a.tmpdir)(),`${f(e)}${l}.json`)},m=e=>{if(!e)return void d.clear();let t=`:${e}`;for(let e of d.keys())e.includes(t)&&d.delete(e)},g=e=>{if(m(e),"1"!==process.env.DIFFHUB_CMUX||"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER)return;if(!e){for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith("diffhub-snapshot-")&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0});return}let t=f(e);for(let e of(0,n.readdirSync)((0,a.tmpdir)()))e.startsWith(t)&&(0,n.rmSync)((0,i.join)((0,a.tmpdir)(),e),{force:!0})},v=async(e,t,r)=>{try{let e=(0,n.statSync)(o.REPO_POINTER).mtimeMs;e!==l.lastPointerMtime&&(l.lastPointerMtime=e,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?m():g())}catch{}let a=d.get(e);if(a&&a.expires>Date.now())return a.value;let i=await r();return d.set(e,{expires:Date.now()+t,value:i}),i},w=()=>(0,o.getConfiguredRepoPath)(),R=async e=>{let r=Date.now();p&&console.info("[diffhub] git command start",{args:e});try{let n,a,{promise:i,reject:s,resolve:o}={promise:new Promise((e,t)=>{n=e,a=t}),reject:a,resolve:n};{let r=(0,t.spawn)("git",e,{cwd:w(),env:{...process.env,GIT_TERMINAL_PROMPT:"0"},stdio:["ignore","pipe","pipe"]}),n=[],a=[],i=0,l=!1,d=e=>{l||(l=!0,e())},u=(t,n)=>{let a=Buffer.isBuffer(n)?n:Buffer.from(n);if((i+=a.length)>0x1400000){r.kill("SIGKILL"),d(()=>{s(Error(`git ${e.join(" ")} failed: output exceeded 20971520 bytes`))});return}t.push(a)};r.stdout.on("data",e=>{u(n,e)}),r.stderr.on("data",e=>{u(a,e)}),r.on("error",e=>{d(()=>s(e))}),r.on("close",t=>{let r=Buffer.concat(n).toString("utf-8"),i=Buffer.concat(a).toString("utf-8").trim();0===t?d(()=>o(r)):d(()=>{s(Object.assign(Error(i||`git ${e.join(" ")} failed with exit code ${t??"unknown"}`),{code:t,status:t??void 0,stderr:i}))})})}let l=await i;return p&&console.info("[diffhub] git command success",{args:e,durationMs:Date.now()-r}),l}catch(n){let t="string"==typeof n.stderr?n.stderr.trim():n.stderr?.toString("utf-8").trim()||"";if(console.error("[diffhub] git command failed",{args:e,code:n.code,durationMs:Date.now()-r,error:n,status:n.status,stderr:t||null}),n instanceof Error&&!t)throw n;throw Error(t||`git ${e.join(" ")} failed: ${n.message}`,{cause:n})}},x=async e=>{let t,r=new Promise(e=>{t=e}),n=l.gitCommandQueue;l.gitCommandQueue=r,await n;try{return await R(e)}finally{t()}},y=e=>e.split("\n").map(e=>e.trim()).filter(Boolean),b=e=>(0,r.createHash)("sha1").update(e).digest("hex"),E=(e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return null;let s=h(e,t,r,a);try{let t=(0,n.readFileSync)(s,"utf-8"),r=JSON.parse(t),a=Date.now()-r.metadata.createdAt;if(void 0!==i&&r.generation!==i||r.metadata.bootId!==l.serverBootId||r.metadata.repoPath!==e)return p&&console.info("[diffhub] snapshot cache stale",{ageMs:a,expectedBootId:l.serverBootId,expectedGeneration:i??null,repoPath:e,snapshotBootId:r.metadata.bootId,snapshotGeneration:r.generation,snapshotRepoPath:r.metadata.repoPath,source:"disk"}),null;return p&&console.info("[diffhub] snapshot cache hit",{ageMs:Date.now()-r.metadata.createdAt,generation:r.generation,repoPath:e,source:"disk"}),{...r,patchByFile:new Map(Object.entries(r.patchByFile))}}catch{return null}},I=async(e,t,r,n,a)=>{let i=Date.now()+1e3;for(;Date.now()<i;){let i=E(e,t,r,n,a);if(i)return i;await new Promise(e=>{setTimeout(e,50)})}return null},P=(e,t,a,i)=>{let s=w(),o=`snapshot:${s}:${e??""}:${t??""}:${a??""}:${i??""}`;return v(o,15e3,()=>{let d=u.get(o);if(d)return d;let f=(async()=>{try{let o,d,u,f,m=E(s,e,t,a,i);if(m)return m;if("1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER){let r=await I(s,e,t,a,i);if(r)return r;console.warn("[diffhub] external snapshot unavailable, recomputing inline",{expectedGeneration:i??null,mode:t??"all",repoPath:s,whitespace:a??"default"})}let g=(await x(["rev-parse","--abbrev-ref","HEAD"])).trim(),R="uncommitted"===t?"HEAD":e??process.env.DIFFHUB_BASE??await (o=w(),v(`baseBranch:${o}`,3e4,async()=>{let e=y(await x(["branch","-r","--format=%(refname:short)"]));for(let t of c)if(e.includes(`origin/${t}`))return`origin/${t}`;let t=y(await x(["branch","--format=%(refname:short)"]));for(let e of c)if(t.includes(e))return e;return"origin/main"})),b="uncommitted"===t?"HEAD":await (d=w(),v(`mergeBase:${d}:${R}`,3e4,async()=>(await x(["merge-base","HEAD",R])).trim())),P=(u=[b],"ignore"===a?["-w",...u]:u),[S,_]=await Promise.all([x(["diff",...P]),x(["diff","--numstat","-z","-M",...P])]),B=(0,r.createHash)("sha1").update(S).digest("hex"),C=(e=>{let t=[],r=0,n=0,a=0;for(;a<e.length;){let i=e.indexOf(" ",a);if(-1===i)break;let s=e.indexOf(" ",i+1);if(-1===s)throw Error("Malformed git diff --numstat output");let o=e.slice(a,i),l=e.slice(i+1,s),d="";if("\0"===e[a=s+1]){a+=1;let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat rename output");a=t+1;let r=e.indexOf("\0",a);if(-1===r)throw Error("Malformed git diff --numstat rename output");d=e.slice(a,r),a=r+1}else{let t=e.indexOf("\0",a);if(-1===t)throw Error("Malformed git diff --numstat output");d=e.slice(a,t),a=t+1}let u="-"===o||"-"===l,c=u?0:Number.parseInt(o,10)||0,p=u?0:Number.parseInt(l,10)||0;t.push({binary:u,changes:c+p,deletions:p,file:d,insertions:c}),r+=c,n+=p}return{deletions:n,files:t,insertions:r}})(_),A=Date.now(),F=(f=l.serverBootId,(0,r.createHash)("sha1").update(`${f}:${B}:${b}`).digest("hex")),O={baseBranch:R,branch:g,deletions:C.deletions,files:C.files,fingerprint:B,fullPatch:S,generation:F,insertions:C.insertions,mergeBase:b,metadata:{bootId:l.serverBootId,createdAt:A,repoPath:s},patchByFile:(e=>{let t=new Map,r=/^diff --git a\/(.+?) b\/(.+)$/gm,n=[],a=r.exec(e);for(;a;)n.push({file:a[2],start:a.index}),a=r.exec(e);for(let[r,a]of n.entries()){let i=n[r+1]?.start??e.length,s=e.slice(a.start,i).trimEnd();t.set(a.file,s?`${s}
2
+ `:"")}return t})(S)};return p&&console.info("[diffhub] snapshot cache miss",{generation:F,repoPath:s,source:"recomputed"}),((e,t,r,a,i)=>{if("1"!==process.env.DIFFHUB_CMUX)return;let s={...i,patchByFile:Object.fromEntries(i.patchByFile)};(0,n.writeFileSync)(h(e,t,r,a),JSON.stringify(s),"utf-8"),p&&console.info("[diffhub] snapshot cache wrote",{generation:i.generation,repoPath:e,source:"disk"})})(s,e,t,a,O),O}finally{u.delete(o)}})();return u.set(o,f),f})},S=async(e,t,r,n,a)=>{let i=await P(t,r,n,a),s=i.patchByFile.get(e)??"";return{baseBranch:i.baseBranch,branch:i.branch,fingerprint:i.fingerprint,generation:i.generation,mergeBase:i.mergeBase,patch:s,reviewKey:b(s)}},_=async(e,t,r,n)=>{let a=await P(e,t,r,n),i=Object.fromEntries(a.patchByFile),s=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,b(t)]));return{baseBranch:a.baseBranch,branch:a.branch,deletions:a.deletions,files:a.files,fingerprint:a.fingerprint,generation:a.generation,insertions:a.insertions,mergeBase:a.mergeBase,patchByFile:i,reviewKeyByFile:s}},B=async(e,t,r)=>{let n=await P(e,t,r);return{baseBranch:n.baseBranch,branch:n.branch,deletions:n.deletions,files:n.files,fingerprint:n.fingerprint,generation:n.generation,insertions:n.insertions}},C=async e=>{await x(["restore","--staged","--worktree","--",e])};e.s(["discardFile",0,C,"getDiffForFile",0,S,"getDiffStats",0,B,"getFileAtRef",0,(e,t)=>{let r=w();if("WORKING_TREE"===t)try{return Promise.resolve((0,n.readFileSync)((0,s.resolveRepoFilePath)(r,e),"utf-8"))}catch{return Promise.resolve("")}return v(`file:${r}:${t}:${e}`,3e4,async()=>{try{return await x(["show",`${t}:${e}`])}catch{return""}})},"getMultiFileDiff",0,_,"invalidateGitCache",0,g],23318)},14916,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),g=e.i(93695);e.i(20232);var v=e.i(220),w=e.i(16781),R=e.i(64387);let x=new TextEncoder;e.s(["GET",0,e=>{if((0,R.isRepoWatchDisabled)())return new Response(null,{status:204});let t=(0,w.getConfiguredRepoPath)(),r=null,n=null,a=null,i=!1,s=()=>{if(!i){i=!0,e.signal.removeEventListener("abort",s),a&&(clearInterval(a),a=null),n?.(),n=null;try{r?.close()}catch{}}};return new Response(new ReadableStream({cancel(){s()},start(o){r=o;let l=(e,t)=>{!i&&o.enqueue(x.encode(`event: ${e}
3
+ data: ${JSON.stringify(t)}
4
+
5
+ `))};e.signal.addEventListener("abort",s,{once:!0}),n=(0,R.subscribeRepoChanges)(t,e=>{l("error"===e.type?"watch-error":"change",{createdAt:e.createdAt,id:e.id})}),l("ready",{}),a=setInterval(()=>{i||o.enqueue(x.encode(`: keep-alive
6
+
7
+ `))},25e3)}}),{headers:{"Cache-Control":"no-cache, no-transform",Connection:"keep-alive","Content-Type":"text/event-stream; charset=utf-8","X-Accel-Buffering":"no"}})},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],57106);var y=e.i(57106);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:I,serverHooks:P}=b;async function S(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),b.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/watch/route";w=w.replace(/\/index$/,"")||"/";let R=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:x,params:y,nextConfig:E,parsedUrl:I,isDraftMode:P,prerenderManifest:S,routerServerContext:_,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:A,clientReferenceManifest:F,serverActionsManifest:O}=R,D=(0,o.normalizeAppPath)(w),T=!!(S.dynamicRoutes[D]||S.routes[A]),$=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,I,!1):t.end("This page could not be found"),null);if(T&&!P){let e=!!S.routes[A],t=S.dynamicRoutes[D];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await $();throw new g.NoFallbackError}}let H=null;!T||b.isDev||P||(H="/index"===(H=A)?"/":H);let N=!0===b.isDev||!T,M=T&&!N;O&&F&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:F,serverActionsManifest:O});let j=e.method||"GET",U=(0,i.getTracer)(),q=U.getActiveScopeSpan(),k=!!(null==_?void 0:_.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),L=(0,a.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,S,G);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let W={params:y,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:N,incrementalCache:L,cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>b.onRequestError(e,t,n,a,_)},sharedContext:{buildId:x}},K=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let a,s=async e=>b.handle(J,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${j} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${j} ${w}`)}),o=async a=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!G&&B&&C&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=W.renderOpts.collectedTags;if(!T)return await (0,p.sendResponse)(K,X,i,W.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,n=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),t}},d=await b.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:G});if(!T)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",B?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),P&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return G&&T||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(K,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};k&&q?await o(q):(a=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(u.BaseServerSpan.handleRequest,{spanName:`${j} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},o),void 0,!k))}catch(t){if(t instanceof g.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,_),T)throw t;return await (0,p.sendResponse)(K,X,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:I})},"routeModule",0,b,"serverHooks",0,P,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,I],14916)}];
8
+
9
+ //# sourceMappingURL=%5Broot-of-the-server%5D__101690.._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[67636,s=>{"use strict";s.s([])}];
2
+
3
+ //# sourceMappingURL=apps_cli__next-internal_server_app_api_watch-events_route_actions_0i.gzl8.js.map