@sifxprime/krouter 0.5.156 → 0.5.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +11 -11
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +19 -19
- package/app/.next-cli-build/required-server-files.json +0 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/presidio/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/environment.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/environment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/presidio.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/presidio.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/!KGRhc2hib2FyZCk/dashboard/presidio/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +11 -11
- package/app/.next-cli-build/server/chunks/2365.js +1 -1
- package/app/.next-cli-build/server/chunks/2430.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4921.js +1 -1
- package/app/.next-cli-build/server/chunks/5718.js +1 -1
- package/app/.next-cli-build/server/chunks/706.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +2 -2
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{1321-7d90627aa4586868.js → 1321-4d9c10ce0ea6ee4a.js} +1 -1
- package/app/.next-cli-build/static/chunks/3794-a6cbe3f16d804637.js +52 -0
- package/app/.next-cli-build/static/chunks/{5497-cd1266dbd50a8fd6.js → 5497-8ce793eef3eb912e.js} +1 -1
- package/app/.next-cli-build/static/chunks/{main-f5790cdbdcedda06.js → main-2b2e5496298f74dc.js} +1 -1
- package/app/.next-cli-build/static/css/96a7e44d8ae325d4.css +1 -0
- package/app/cli/package.json +1 -1
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/app/node_modules/next/dist/build/webpack-config.js +3 -3
- package/app/node_modules/next/dist/client/components/segment-cache/cache.js +23 -34
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +2 -2
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +2 -2
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +2 -2
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +16 -16
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +5 -5
- package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +5 -5
- package/app/node_modules/next/dist/experimental/testmode/fetch.js +10 -2
- package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +2 -2
- package/app/node_modules/next/dist/lib/verify-typescript-setup.js +3 -1
- package/app/node_modules/next/dist/server/config.js +1 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/app/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +17 -4
- package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/app/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +1 -1
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/package.json +11 -11
- package/app/package.json +2 -2
- package/app/server.js +1 -1
- package/cli.js +6 -7
- package/package.json +1 -1
- package/src/cli/api/client.js +4 -9
- package/src/lib/dataDir.js +75 -0
- package/app/.next-cli-build/static/chunks/3794-d29203733ca4633c.js +0 -52
- package/app/.next-cli-build/static/css/24b1290d34a3afd1.css +0 -1
- /package/app/.next-cli-build/static/{MGyehLQl_r3wD_9pZPANu → TnOVfiF-e4wm7WgSlg2VQ}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{MGyehLQl_r3wD_9pZPANu → TnOVfiF-e4wm7WgSlg2VQ}/_ssgManifest.js +0 -0
|
@@ -83,11 +83,19 @@ function buildResponse(proxyResponse) {
|
|
|
83
83
|
headers: new Headers(headers)
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
function passthroughFetch(originalFetch, request) {
|
|
87
|
+
// Mark the request so the ClientRequest interception in `httpget.ts` sends it
|
|
88
|
+
// to the real server instead of intercepting it again. @mswjs/interceptors
|
|
89
|
+
// intercepts at the TCP level, so an unmarked passthrough would re-enter the
|
|
90
|
+
// interception listener from within itself, recursing indefinitely.
|
|
91
|
+
request.headers.set('next-test-internal', '1');
|
|
92
|
+
return originalFetch(request);
|
|
93
|
+
}
|
|
86
94
|
async function handleFetch(originalFetch, request) {
|
|
87
95
|
const testInfo = (0, _context.getTestReqInfo)(request, reader);
|
|
88
96
|
if (!testInfo) {
|
|
89
97
|
// Passthrough non-test requests.
|
|
90
|
-
return originalFetch
|
|
98
|
+
return passthroughFetch(originalFetch, request);
|
|
91
99
|
}
|
|
92
100
|
const { testData, proxyPort } = testInfo;
|
|
93
101
|
const proxyRequest = await buildProxyRequest(testData, request);
|
|
@@ -118,7 +126,7 @@ async function handleFetch(originalFetch, request) {
|
|
|
118
126
|
const { api } = proxyResponse;
|
|
119
127
|
switch(api){
|
|
120
128
|
case 'continue':
|
|
121
|
-
return originalFetch
|
|
129
|
+
return passthroughFetch(originalFetch, request);
|
|
122
130
|
case 'abort':
|
|
123
131
|
case 'unhandled':
|
|
124
132
|
throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", {
|
|
@@ -72,7 +72,7 @@ async function fetchPkgInfo(pkg) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
const data = await res.json();
|
|
75
|
-
const versionData = data.versions["16.3.
|
|
75
|
+
const versionData = data.versions["16.3.4"];
|
|
76
76
|
return {
|
|
77
77
|
os: versionData.os,
|
|
78
78
|
cpu: versionData.cpu,
|
|
@@ -100,7 +100,7 @@ async function patchIncorrectLockfile(dir) {
|
|
|
100
100
|
const expectedSwcPkgs = Object.keys(_packagejson.optionalDependencies || {}).filter((pkg)=>pkg.startsWith('@next/swc-'));
|
|
101
101
|
const patchDependency = (pkg, pkgData)=>{
|
|
102
102
|
lockfileParsed.dependencies[pkg] = {
|
|
103
|
-
version: "16.3.
|
|
103
|
+
version: "16.3.4",
|
|
104
104
|
resolved: pkgData.tarball,
|
|
105
105
|
integrity: pkgData.integrity,
|
|
106
106
|
optional: true
|
|
@@ -108,7 +108,7 @@ async function patchIncorrectLockfile(dir) {
|
|
|
108
108
|
};
|
|
109
109
|
const patchPackage = (pkg, pkgData)=>{
|
|
110
110
|
lockfileParsed.packages[pkg] = {
|
|
111
|
-
version: "16.3.
|
|
111
|
+
version: "16.3.4",
|
|
112
112
|
resolved: pkgData.tarball,
|
|
113
113
|
integrity: pkgData.integrity,
|
|
114
114
|
cpu: pkgData.cpu,
|
|
@@ -44,7 +44,7 @@ function _interop_require_default(obj) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function getTypeScriptPackageInfo(baseDir) {
|
|
47
|
-
var _packageJson_bin;
|
|
47
|
+
var _packageJson_bin, _Object_entries_find;
|
|
48
48
|
let packageJsonPath;
|
|
49
49
|
try {
|
|
50
50
|
packageJsonPath = (0, _resolvefrom.resolveFrom)(baseDir, 'typescript/package.json');
|
|
@@ -54,7 +54,7 @@ function getTypeScriptPackageInfo(baseDir) {
|
|
|
54
54
|
const packageJson = JSON.parse((0, _nodefs.readFileSync)(packageJsonPath, 'utf8'));
|
|
55
55
|
const packageDir = _nodepath.default.dirname(packageJsonPath);
|
|
56
56
|
const apiPath = _nodepath.default.join(packageDir, 'lib', 'typescript.js');
|
|
57
|
-
const tscBin = typeof packageJson.bin === 'string' ? packageJson.bin : (_packageJson_bin = packageJson.bin) == null ? void 0 : _packageJson_bin.tsc;
|
|
57
|
+
const tscBin = typeof packageJson.bin === 'string' ? packageJson.bin : ((_packageJson_bin = packageJson.bin) == null ? void 0 : _packageJson_bin.tsc) ?? ((_Object_entries_find = Object.entries(packageJson.bin ?? {}).find(([name])=>/^tsc\d+$/.test(name))) == null ? void 0 : _Object_entries_find[1]);
|
|
58
58
|
const tscBinPath = tscBin ? _nodepath.default.resolve(packageDir, tscBin) : undefined;
|
|
59
59
|
let tscPath = tscBinPath;
|
|
60
60
|
if (tscBinPath && (0, _nodefs.existsSync)(tscBinPath) && packageJson.type === 'module' && _nodepath.default.extname(tscBinPath) === '') {
|
|
@@ -86,7 +86,9 @@ const typescriptApiPackage = {
|
|
|
86
86
|
exportsRestrict: true
|
|
87
87
|
};
|
|
88
88
|
const typescriptCliPackage = {
|
|
89
|
-
|
|
89
|
+
// The CLI path is resolved from the package's bin metadata after this initial
|
|
90
|
+
// package-presence check, since aliased TypeScript packages may rename it.
|
|
91
|
+
file: 'typescript/package.json',
|
|
90
92
|
pkg: 'typescript',
|
|
91
93
|
exportsRestrict: true
|
|
92
94
|
};
|
|
@@ -302,7 +302,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
302
302
|
}
|
|
303
303
|
const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
|
|
304
304
|
const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
305
|
-
version: "16.3.
|
|
305
|
+
version: "16.3.4"
|
|
306
306
|
});
|
|
307
307
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
308
308
|
// of the current `next dev` invocation.
|
|
@@ -362,7 +362,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
362
362
|
writeRoutesHashesManifest: false,
|
|
363
363
|
currentNodeJsVersion,
|
|
364
364
|
isPersistentCachingEnabled: (0, _utils2.isFileSystemCacheEnabledForDev)(opts.nextConfig),
|
|
365
|
-
nextVersion: "16.3.
|
|
365
|
+
nextVersion: "16.3.4",
|
|
366
366
|
serverHmr: serverFastRefresh
|
|
367
367
|
}, {
|
|
368
368
|
turbopackMemoryEviction: opts.nextConfig.experimental.turbopackMemoryEvictionMode,
|
|
@@ -234,7 +234,7 @@ class HotReloaderWebpack {
|
|
|
234
234
|
this.previewProps = previewProps;
|
|
235
235
|
this.rewrites = rewrites;
|
|
236
236
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
237
|
-
version: "16.3.
|
|
237
|
+
version: "16.3.4"
|
|
238
238
|
});
|
|
239
239
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
240
240
|
// of the current `next dev` invocation.
|
|
@@ -79,7 +79,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
79
79
|
}
|
|
80
80
|
function logStartInfo({ networkUrl, appUrl, envInfo, logBundler }) {
|
|
81
81
|
const versionSuffix = logBundler ? ` (${(0, _bundler.bundlerName)((0, _bundler.getBundlerFromEnv)())})` : '';
|
|
82
|
-
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.3.
|
|
82
|
+
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.3.4"}`))}${versionSuffix}`);
|
|
83
83
|
if (appUrl) {
|
|
84
84
|
_log.bootstrap(`- Local: ${appUrl}`);
|
|
85
85
|
}
|
|
@@ -310,18 +310,22 @@ class FileSystemCache {
|
|
|
310
310
|
// Wait for all FS operations to complete.
|
|
311
311
|
await writer.wait();
|
|
312
312
|
}
|
|
313
|
-
getFilePath(
|
|
313
|
+
getFilePath(key, kind) {
|
|
314
|
+
let rootDir;
|
|
314
315
|
switch(kind){
|
|
315
316
|
case _responsecache.IncrementalCacheKind.FETCH:
|
|
316
317
|
// we store in .next/cache/fetch-cache so it can be persisted
|
|
317
318
|
// across deploys
|
|
318
|
-
|
|
319
|
+
rootDir = _path.default.join(this.serverDistDir, '..', 'cache', 'fetch-cache');
|
|
320
|
+
break;
|
|
319
321
|
case _responsecache.IncrementalCacheKind.PAGES:
|
|
320
|
-
|
|
322
|
+
rootDir = _path.default.join(this.serverDistDir, 'pages');
|
|
323
|
+
break;
|
|
321
324
|
case _responsecache.IncrementalCacheKind.IMAGE:
|
|
322
325
|
case _responsecache.IncrementalCacheKind.APP_PAGE:
|
|
323
326
|
case _responsecache.IncrementalCacheKind.APP_ROUTE:
|
|
324
|
-
|
|
327
|
+
rootDir = _path.default.join(this.serverDistDir, 'app');
|
|
328
|
+
break;
|
|
325
329
|
default:
|
|
326
330
|
throw Object.defineProperty(new Error(`Unexpected file path kind: ${kind}`), "__NEXT_ERROR_CODE", {
|
|
327
331
|
value: "E479",
|
|
@@ -329,6 +333,15 @@ class FileSystemCache {
|
|
|
329
333
|
configurable: true
|
|
330
334
|
});
|
|
331
335
|
}
|
|
336
|
+
const filePath = _path.default.join(rootDir, key);
|
|
337
|
+
if (!(filePath.startsWith(rootDir + _path.default.sep) || filePath === rootDir)) {
|
|
338
|
+
throw Object.defineProperty(new Error(`Invalid file path: ${filePath}`), "__NEXT_ERROR_CODE", {
|
|
339
|
+
value: "E1468",
|
|
340
|
+
enumerable: false,
|
|
341
|
+
configurable: true
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
return filePath;
|
|
332
345
|
}
|
|
333
346
|
}
|
|
334
347
|
|
|
@@ -177,7 +177,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
|
|
|
177
177
|
async function startServer(serverOptions) {
|
|
178
178
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate, serverFastRefresh } = serverOptions;
|
|
179
179
|
let { port } = serverOptions;
|
|
180
|
-
process.title = `next-server (v${"16.3.
|
|
180
|
+
process.title = `next-server (v${"16.3.4"})`;
|
|
181
181
|
let handlersReady = ()=>{};
|
|
182
182
|
let handlersError = ()=>{};
|
|
183
183
|
let handlersPromise = new Promise((resolve, reject)=>{
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
function escapePathDelimiters(segment, escapeEncoded) {
|
|
13
|
-
return segment.replace(new RegExp(`([
|
|
13
|
+
return segment.replace(new RegExp(`([/#?\\\\]${escapeEncoded ? '|%(2f|23|3f|5c)' : ''})`, 'gi'), (char)=>encodeURIComponent(char));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=escape-path-delimiters.js.map
|
|
@@ -82,7 +82,7 @@ async function getAnonymousMeta() {
|
|
|
82
82
|
isWsl: _iswsl.default,
|
|
83
83
|
isCI: _ciinfo.isCI,
|
|
84
84
|
ciName: _ciinfo.isCI && _ciinfo.name || null,
|
|
85
|
-
nextVersion: "16.3.
|
|
85
|
+
nextVersion: "16.3.4",
|
|
86
86
|
agentName: await (0, _agentname.getAgentName)()
|
|
87
87
|
};
|
|
88
88
|
return traits;
|
|
@@ -12,12 +12,12 @@ const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
|
|
|
12
12
|
function eventCliSession(nextConfig, event) {
|
|
13
13
|
var _nextConfig_experimental, _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_reactCompiler, _nextConfig_reactCompiler1;
|
|
14
14
|
// This should be an invariant, if it fails our build tooling is broken.
|
|
15
|
-
if (typeof "16.3.
|
|
15
|
+
if (typeof "16.3.4" !== 'string') {
|
|
16
16
|
return [];
|
|
17
17
|
}
|
|
18
18
|
const { images, i18n } = nextConfig || {};
|
|
19
19
|
const payload = {
|
|
20
|
-
nextVersion: "16.3.
|
|
20
|
+
nextVersion: "16.3.4",
|
|
21
21
|
nodeVersion: process.version,
|
|
22
22
|
cliCommand: event.cliCommand,
|
|
23
23
|
isSrcDir: event.isSrcDir,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next",
|
|
3
|
-
"version": "16.3.
|
|
3
|
+
"version": "16.3.4",
|
|
4
4
|
"description": "The React Framework",
|
|
5
5
|
"main": "./dist/server/next.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"next": "./dist/bin/next"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@next/env": "16.3.
|
|
84
|
+
"@next/env": "16.3.4",
|
|
85
85
|
"@swc/helpers": "0.5.23",
|
|
86
86
|
"baseline-browser-mapping": "^2.9.19",
|
|
87
87
|
"caniuse-lite": "^1.0.30001579",
|
|
@@ -111,15 +111,15 @@
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"optionalDependencies": {
|
|
114
|
-
"sharp": "^0.35.
|
|
115
|
-
"@next/swc-darwin-arm64": "16.3.
|
|
116
|
-
"@next/swc-darwin-x64": "16.3.
|
|
117
|
-
"@next/swc-linux-arm64-gnu": "16.3.
|
|
118
|
-
"@next/swc-linux-arm64-musl": "16.3.
|
|
119
|
-
"@next/swc-linux-x64-gnu": "16.3.
|
|
120
|
-
"@next/swc-linux-x64-musl": "16.3.
|
|
121
|
-
"@next/swc-win32-arm64-msvc": "16.3.
|
|
122
|
-
"@next/swc-win32-x64-msvc": "16.3.
|
|
114
|
+
"sharp": "^0.35.4",
|
|
115
|
+
"@next/swc-darwin-arm64": "16.3.4",
|
|
116
|
+
"@next/swc-darwin-x64": "16.3.4",
|
|
117
|
+
"@next/swc-linux-arm64-gnu": "16.3.4",
|
|
118
|
+
"@next/swc-linux-arm64-musl": "16.3.4",
|
|
119
|
+
"@next/swc-linux-x64-gnu": "16.3.4",
|
|
120
|
+
"@next/swc-linux-x64-musl": "16.3.4",
|
|
121
|
+
"@next/swc-win32-arm64-msvc": "16.3.4",
|
|
122
|
+
"@next/swc-win32-x64-msvc": "16.3.4"
|
|
123
123
|
},
|
|
124
124
|
"keywords": [
|
|
125
125
|
"react",
|
package/app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "krouter-app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.158",
|
|
4
4
|
"description": "kRouter (Kodelyth Router) web dashboard — Kodelyth AI Infrastructure",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"marked": "^18.0.1",
|
|
33
33
|
"material-symbols": "^0.44.6",
|
|
34
34
|
"monaco-editor": "^0.53.0",
|
|
35
|
-
"next": "^16.
|
|
35
|
+
"next": "^16.3.4",
|
|
36
36
|
"node-forge": "^1.3.3",
|
|
37
37
|
"node-machine-id": "^1.1.12",
|
|
38
38
|
"open": "^11.0.0",
|
package/app/server.js
CHANGED
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{},"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next-cli-build","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/Users/shofiqulislam","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":true,"coldCacheBadge":false,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"useOffline":false,"varyParams":true,"optimisticRouting":true,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":10,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":134217728,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["@xyflow/react","@dnd-kit/core","@dnd-kit/sortable","material-symbols","marked","lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"turbopackMemoryEvictionMode":"auto","useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.mjs","serverExternalPackages":["better-sqlite3","sql.js","node:sqlite","bun:sqlite","open"],"turbopack":{"root":"/Users/shofiqulislam"},"
|
|
12
|
+
const nextConfig = {"env":{},"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next-cli-build","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/Users/shofiqulislam","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":true,"coldCacheBadge":false,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"useOffline":false,"varyParams":true,"optimisticRouting":true,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":10,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":134217728,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["@xyflow/react","@dnd-kit/core","@dnd-kit/sortable","material-symbols","marked","lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"turbopackMemoryEvictionMode":"auto","useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.mjs","serverExternalPackages":["better-sqlite3","sql.js","node:sqlite","bun:sqlite","open"],"turbopack":{"root":"/Users/shofiqulislam"},"repoRoot":"/Users/shofiqulislam/9router-master","distDirRoot":".next-cli-build","supportsImmutableAssets":false,"_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/v1/v1/:path*","destination":"/api/v1/:path*"},{"source":"/v1/v1","destination":"/api/v1"},{"source":"/codex/:path*","destination":"/api/v1/responses"},{"source":"/v1/:path*","destination":"/api/v1/:path*"},{"source":"/v1","destination":"/api/v1"}],"fallback":[]}}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
package/cli.js
CHANGED
|
@@ -45,6 +45,7 @@ function createSpinner(text) {
|
|
|
45
45
|
const pkg = require("./package.json");
|
|
46
46
|
const { ensureSqliteRuntime, buildEnvWithRuntime } = require("./hooks/sqliteRuntime");
|
|
47
47
|
const { ensureTrayRuntime } = require("./hooks/trayRuntime");
|
|
48
|
+
const { getDataDir: getAppDataDir } = require("./src/lib/dataDir");
|
|
48
49
|
const args = process.argv.slice(2);
|
|
49
50
|
|
|
50
51
|
// Self-heal SQLite runtime deps (sql.js + better-sqlite3) into ~/.krouter/runtime
|
|
@@ -202,13 +203,11 @@ function compareVersions(a, b) {
|
|
|
202
203
|
return 0;
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
//
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
: path.join(os.homedir(), `.${DATA_DIR_NAME}`);
|
|
211
|
-
}
|
|
206
|
+
// getAppDataDir comes from ./src/lib/dataDir (required at the top). It used to be
|
|
207
|
+
// a local copy that resolved ~/.krouter unconditionally and ignored DATA_DIR, so
|
|
208
|
+
// the three call sites below -- the tunnel directory, the mitm pidfile, and the
|
|
209
|
+
// db.json write in the crash-loop handler -- all looked in the wrong place
|
|
210
|
+
// whenever DATA_DIR was set. The db.json one failed silently.
|
|
212
211
|
|
|
213
212
|
// Kill PID from file (best-effort, removes file after)
|
|
214
213
|
function killByPidFile(pidFile) {
|
package/package.json
CHANGED
package/src/cli/api/client.js
CHANGED
|
@@ -3,7 +3,6 @@ const https = require("https");
|
|
|
3
3
|
const crypto = require("crypto");
|
|
4
4
|
const fs = require("node:fs");
|
|
5
5
|
const path = require("node:path");
|
|
6
|
-
const os = require("node:os");
|
|
7
6
|
const { machineIdSync } = require("node-machine-id");
|
|
8
7
|
|
|
9
8
|
// Default configuration
|
|
@@ -15,14 +14,10 @@ const DEFAULT_CONFIG = {
|
|
|
15
14
|
|
|
16
15
|
const CLI_TOKEN_HEADER = "x-9r-cli-token";
|
|
17
16
|
const CLI_TOKEN_SALT = "9r-cli-auth";
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return path.join(process.env.APPDATA || path.join(os.homedir(), "AppData", "Roaming"), "krouter");
|
|
23
|
-
}
|
|
24
|
-
return path.join(os.homedir(), ".krouter");
|
|
25
|
-
}
|
|
17
|
+
// Was a third hand-synced copy of this resolver. It honoured DATA_DIR but
|
|
18
|
+
// without the Windows-path and writability guards the others have, so the same
|
|
19
|
+
// setting could resolve three different ways in one process.
|
|
20
|
+
const { getDataDir } = require("../../lib/dataDir");
|
|
26
21
|
|
|
27
22
|
const MACHINE_ID_FILE = path.join(getDataDir(), "machine-id");
|
|
28
23
|
const AUTH_DIR = path.join(getDataDir(), "auth");
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Where the CLI keeps its data. One definition for the whole published package.
|
|
5
|
+
*
|
|
6
|
+
* This exists because there were three hand-synced copies of this logic, each
|
|
7
|
+
* carrying a "kept in sync with..." comment, and one of them had drifted:
|
|
8
|
+
* cli.js resolved `~/.krouter` unconditionally and ignored DATA_DIR entirely.
|
|
9
|
+
* That is a documented setting (README: "DATA_DIR | ~/.krouter | Data directory
|
|
10
|
+
* (SQLite, certs, cache)") and ARCHITECTURE.md promises db.json lives at
|
|
11
|
+
* `${DATA_DIR}/db.json`, so anyone who set it -- Docker users, mainly -- got a
|
|
12
|
+
* split brain: auth and machine-id read from DATA_DIR, while db.json, the
|
|
13
|
+
* tunnel directory and the mitm pidfile read from the home directory.
|
|
14
|
+
*
|
|
15
|
+
* The worst of it was silent. cli.js disables MITM in DATA_DIR/db.json to break
|
|
16
|
+
* a crash loop; looking in the wrong place made existsSync false, the
|
|
17
|
+
* best-effort catch swallowed it, and the server kept crash-looping with the
|
|
18
|
+
* safety valve doing nothing.
|
|
19
|
+
*
|
|
20
|
+
* Mirrors the app's own src/lib/dataDir.js. It cannot import it: that module is
|
|
21
|
+
* ESM and lives outside this package's `files`, so the published CLI has no
|
|
22
|
+
* access to it. Keep the two in step.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const fs = require("node:fs");
|
|
26
|
+
const path = require("node:path");
|
|
27
|
+
const os = require("node:os");
|
|
28
|
+
|
|
29
|
+
const APP_NAME = "krouter";
|
|
30
|
+
|
|
31
|
+
/** The platform default, used when DATA_DIR is unset or unusable. */
|
|
32
|
+
function appDir() {
|
|
33
|
+
if (process.platform === "win32") {
|
|
34
|
+
// Falling back to "" here would yield a *relative* path, which is how the
|
|
35
|
+
// previous cli.js copy could end up writing into the current directory.
|
|
36
|
+
return path.join(
|
|
37
|
+
process.env.APPDATA || path.join(os.homedir(), "AppData", "Roaming"),
|
|
38
|
+
APP_NAME
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return path.join(os.homedir(), `.${APP_NAME}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the data directory, honouring DATA_DIR.
|
|
46
|
+
*
|
|
47
|
+
* Creating the directory is deliberate and matches the app: callers immediately
|
|
48
|
+
* join subpaths onto the result, so a configured-but-absent directory would
|
|
49
|
+
* otherwise fail at the first write rather than here.
|
|
50
|
+
*/
|
|
51
|
+
function getDataDir() {
|
|
52
|
+
const configured = process.env.DATA_DIR;
|
|
53
|
+
if (!configured) return appDir();
|
|
54
|
+
|
|
55
|
+
// A Unix path on Windows almost always means a Linux-targeted .env or Docker
|
|
56
|
+
// config leaked into a Windows run. Honouring it would write somewhere the
|
|
57
|
+
// user never intended.
|
|
58
|
+
if (process.platform === "win32" && /^\//.test(configured)) {
|
|
59
|
+
console.warn(`[DATA_DIR] '${configured}' is a Unix path on Windows - falling back to the default`);
|
|
60
|
+
return appDir();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
fs.mkdirSync(configured, { recursive: true });
|
|
65
|
+
return configured;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
if (e && (e.code === "EACCES" || e.code === "EPERM")) {
|
|
68
|
+
console.warn(`[DATA_DIR] '${configured}' is not writable - falling back to ~/.${APP_NAME}`);
|
|
69
|
+
return appDir();
|
|
70
|
+
}
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports = { getDataDir, appDir, APP_NAME };
|