failproofai 0.0.14 → 0.0.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +6 -6
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/reminder/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/reminder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +20 -8
- package/.next/standalone/.next/server/app/policies/page.js +2 -2
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js +4 -4
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +4 -4
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +3 -3
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-219ec._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0hv08mx._.js → [root-of-the-server]__0-dh5jy._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04_h-a5._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06cuf1y._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0obaznk._.js → [root-of-the-server]__0h3lfmp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jnjf2t._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xvsnvt._.js → [root-of-the-server]__0l4vuqm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0longh-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sb_5m8._.js +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xuaoik._.js +6 -4
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1hkdkmz._.js → [root-of-the-server]__10oa-v9._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__16le-kd._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1i9rknc._.js → [root-of-the-server]__18d-9oi._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19120tr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1fwl2mz._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1is3glr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1myjm-d._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_17k9e3w.js +6 -6
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hdsupo._.js → [root-of-the-server]__0114ewg._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01od0m6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02r5bgf._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e8sjqm._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lkzqax._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lpvwqm._.js +21 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ynf7tx._.js → [root-of-the-server]__0qucxyj._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u02miy._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uno39i._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1s2b6h0._.js → [root-of-the-server]__0x3anhr._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y4wf1u._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__170799-._.js +10 -10
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00cz9as._.js → [root-of-the-server]__1apb7k_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ath6v_._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1nq7ivq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1py795m._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qapotl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1zqz4v8._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_077y5np._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1-3unkg._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1e19atl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1m_p7pi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_components_project-list_tsx_1ke6anr._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_0xkhw_v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_hermes-projects_ts_05b8-it._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_openclaw-projects_ts_0qxq3bp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_0gkzjaa.js → node_modules_html-to-image_es_index_1wnt2ya.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +6 -6
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +22 -10
- package/.next/standalone/.next/static/chunks/{29o4j32z643_a.js → 05h7pau8d3rpj.js} +1 -1
- package/.next/standalone/.next/static/chunks/0oos4ntyvkmjl.js +1 -0
- package/.next/standalone/.next/static/chunks/0tuwf_7uhfn2y.js +6 -0
- package/.next/standalone/.next/static/chunks/1hdhteui932bq.js +1 -0
- package/.next/standalone/.next/static/chunks/1l6q2-8m0gk19.js +1 -0
- package/.next/standalone/.next/static/chunks/2geqsiz0n8e3w.js +1 -0
- package/.next/standalone/.next/static/chunks/{3-ogr79xqbw0h.js → 2mazwb1qmur1p.js} +1 -1
- package/.next/standalone/.next/static/chunks/2pujpnfx4pws6.css +2 -0
- package/.next/standalone/.next/static/chunks/{1ua5armwfph8o.js → 31fmsp1soxi07.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3s8aaig91937v.js → 37-so-zy208k7.js} +1 -1
- package/.next/standalone/.next/static/chunks/3a_o5v_sl858j.js +1 -0
- package/.next/standalone/.next/static/chunks/{02jcotghcxrbu.js → 3kmwfieo15mr2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2uh_4k4m296z5.js → 3p66lo2y-ezfr.js} +1 -1
- package/.next/standalone/.next/static/chunks/{06z_ex1ts3n4s.js → 412ajx6jkb5_i.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-10hj8t5pf33tu.js → turbopack-1lsv92x7klwrn.js} +1 -1
- package/.next/standalone/app/actions/get-hooks-config.ts +125 -8
- package/.next/standalone/app/actions/update-hooks-config.ts +38 -1
- package/.next/standalone/app/components/project-list.tsx +229 -42
- package/.next/standalone/app/policies/hooks-client.tsx +149 -27
- package/.next/standalone/app/project/[name]/page.tsx +12 -2
- package/.next/standalone/integration-suite/README.md +43 -1
- package/.next/standalone/integration-suite/ci-entrypoint.sh +21 -6
- package/.next/standalone/integration-suite/install-clis.sh +58 -13
- package/.next/standalone/integration-suite/probe-cli.sh +51 -11
- package/.next/standalone/integration-suite/report.js +52 -6
- package/.next/standalone/integration-suite/run.sh +55 -3
- package/.next/standalone/lib/hermes-profiles.ts +156 -0
- package/.next/standalone/lib/hermes-projects.ts +91 -25
- package/.next/standalone/lib/hermes-sessions.ts +65 -10
- package/.next/standalone/lib/openclaw-projects.ts +111 -18
- package/.next/standalone/lib/openclaw-sessions.ts +20 -0
- package/.next/standalone/lib/paths.ts +36 -0
- package/.next/standalone/lib/project-tree.ts +193 -0
- package/.next/standalone/lib/projects.ts +22 -0
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +3 -114
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/cli/next-test.js +2 -1
- package/.next/standalone/node_modules/next/dist/compiled/http-proxy/index.js +5 -5
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -10
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -10
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
- package/.next/standalone/node_modules/next/dist/lib/install-dependencies.js +1 -1
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
- package/.next/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -1
- package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
- package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
- package/.next/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +97 -56
- package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +129 -34
- package/.next/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +52 -4
- package/.next/standalone/node_modules/next/dist/server/config-schema.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/config-shared.js +1 -2
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +8 -27
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +90 -53
- package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +15 -2
- package/.next/standalone/node_modules/next/dist/server/lib/router-utils/proxy-request.js +4 -0
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +1 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +2 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/server-reference-info.js +12 -0
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +10 -10
- package/.next/standalone/package.json +7 -6
- package/.next/standalone/pi-extension/index.ts +38 -5
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +14 -13
- package/dist/cli.mjs +789 -399
- package/lib/hermes-profiles.ts +156 -0
- package/lib/hermes-projects.ts +91 -25
- package/lib/hermes-sessions.ts +65 -10
- package/lib/openclaw-projects.ts +111 -18
- package/lib/openclaw-sessions.ts +20 -0
- package/lib/paths.ts +36 -0
- package/lib/project-tree.ts +193 -0
- package/lib/projects.ts +22 -0
- package/package.json +7 -6
- package/pi-extension/index.ts +38 -5
- package/scripts/launch.ts +7 -0
- package/src/audit/cli-adapters/hermes.ts +6 -3
- package/src/audit/cli-adapters/openclaw.ts +17 -13
- package/src/hooks/configure-wizard.ts +24 -2
- package/src/hooks/custom-hooks-loader.ts +90 -13
- package/src/hooks/enforcement-capability.ts +266 -0
- package/src/hooks/handler.ts +20 -3
- package/src/hooks/hook-activity-store.ts +14 -0
- package/src/hooks/hooks-config.ts +90 -6
- package/src/hooks/integrations.ts +123 -19
- package/src/hooks/manager.ts +206 -75
- package/src/hooks/policy-evaluator.ts +59 -7
- package/src/hooks/policy-types.ts +31 -0
- package/src/hooks/types.ts +50 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q2nbsl._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1d9qen3._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1mrihkj._.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_openclaw-projects_ts_0gc-p24._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__015_i4t._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__030k0c6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03lv-pe._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__042d3cd._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09q1168._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qeuy9c._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s89hoe._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zf8xlq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17ai7sy._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1d8omgc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1fax1sl._.js +0 -19
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1tkjqka._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_05whahf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_9_ytf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1kje4fm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1p0-leb._.js +0 -3
- package/.next/standalone/.next/static/chunks/0o0ut0ugd0_-s.js +0 -1
- package/.next/standalone/.next/static/chunks/0xl97x-874k-u.js +0 -1
- package/.next/standalone/.next/static/chunks/19d7hqx8udopz.js +0 -1
- package/.next/standalone/.next/static/chunks/36j05kb2x323i.css +0 -2
- package/.next/standalone/.next/static/chunks/370sj2lgkw5ey.js +0 -1
- package/.next/standalone/.next/static/chunks/3w7g0n0iwwnbs.js +0 -1
- package/.next/standalone/.next/static/chunks/42oeva1-w0z2d.js +0 -6
- /package/.next/standalone/.next/static/{WQRKgSfFekLcC_pvyzp4S → nhn6Tt0--xZKdgVGIqR6E}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{WQRKgSfFekLcC_pvyzp4S → nhn6Tt0--xZKdgVGIqR6E}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{WQRKgSfFekLcC_pvyzp4S → nhn6Tt0--xZKdgVGIqR6E}/_ssgManifest.js +0 -0
|
@@ -29,6 +29,42 @@ export function decodeFolderName(name: string): string {
|
|
|
29
29
|
return name.replace(/-/g, "/");
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Synthetic project path for gateway CLIs with no working directory —
|
|
34
|
+
* `hermes:<profile>:<source>`, `openclaw:<channel>`. Two or more leading letters
|
|
35
|
+
* so a Windows drive letter (`c:/code`) can never match.
|
|
36
|
+
*/
|
|
37
|
+
const SYNTHETIC_PROJECT_PATH = /^[a-z]{2,}:/;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Whether a project `path` is a synthetic gateway path rather than a real
|
|
41
|
+
* filesystem path — `hermes:<profile>:<source>`, `openclaw:<agent>:<channel>`.
|
|
42
|
+
*
|
|
43
|
+
* These are the only projects with a meaningful segment hierarchy, so this is
|
|
44
|
+
* also what decides which rows the projects panel renders as a folder tree.
|
|
45
|
+
*/
|
|
46
|
+
export function isSyntheticProjectPath(path?: string): boolean {
|
|
47
|
+
return !!path && SYNTHETIC_PROJECT_PATH.test(path);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Segments of a synthetic gateway path, outermost first. `[]` for real paths. */
|
|
51
|
+
export function syntheticPathSegments(path?: string): string[] {
|
|
52
|
+
return isSyntheticProjectPath(path) ? path!.split(":") : [];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Label to display for a project card.
|
|
57
|
+
*
|
|
58
|
+
* Filesystem-backed projects decode their folder name. Gateway projects must
|
|
59
|
+
* NOT: `decodeFolderName` turns every `-` into `/`, which splits a Hermes
|
|
60
|
+
* profile named `my-bot` into `my/bot`. Their `path` already carries the
|
|
61
|
+
* segments explicitly, so use it.
|
|
62
|
+
*/
|
|
63
|
+
export function projectDisplayName(name: string, path?: string): string {
|
|
64
|
+
if (isSyntheticProjectPath(path)) return path!.replace(/:/g, "/");
|
|
65
|
+
return decodeFolderName(name);
|
|
66
|
+
}
|
|
67
|
+
|
|
32
68
|
/**
|
|
33
69
|
* Encodes a filesystem path into a Claude-compatible project folder name.
|
|
34
70
|
* Inverse of `decodeFolderName`.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Folder tree for the projects panel.
|
|
3
|
+
*
|
|
4
|
+
* Gateway CLIs (Hermes, OpenClaw) are USER-scoped: their sessions have no
|
|
5
|
+
* working directory, so they can't sit in the cwd-based project model the other
|
|
6
|
+
* CLIs use. What they have instead is a hierarchy — which profile/agent, then
|
|
7
|
+
* which channel — and that hierarchy is already encoded in the synthetic
|
|
8
|
+
* `path` those producers emit (`hermes:work:slack`,
|
|
9
|
+
* `openclaw:weather-bot:telegram`).
|
|
10
|
+
*
|
|
11
|
+
* So this is a pure PRESENTATION transform over the flat `ProjectFolder[]` the
|
|
12
|
+
* server already returns: split those paths into nodes, leave every real
|
|
13
|
+
* filesystem project as a top-level leaf. Nothing about project `name`s
|
|
14
|
+
* changes, which is what keeps existing `/project/<name>` links, bookmarks and
|
|
15
|
+
* stored audit history resolving.
|
|
16
|
+
*
|
|
17
|
+
* Pure and dependency-free on purpose — `import type` only, so the client
|
|
18
|
+
* bundle never pulls in `lib/projects.ts`'s node:fs imports.
|
|
19
|
+
*/
|
|
20
|
+
import type { ProjectCli, ProjectFolder } from "./projects";
|
|
21
|
+
import { syntheticPathSegments } from "./paths";
|
|
22
|
+
|
|
23
|
+
export interface ProjectTreeNode {
|
|
24
|
+
/** Colon-joined segment path (`hermes:work`) — stable across renders, used as
|
|
25
|
+
* the React key and as the collapsed-state key. */
|
|
26
|
+
key: string;
|
|
27
|
+
/** The single segment this row shows (`work`), not the whole path. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** 0 for top-level rows; each level below adds 1 (drives indentation). */
|
|
30
|
+
depth: number;
|
|
31
|
+
children: ProjectTreeNode[];
|
|
32
|
+
/** The real project, on rows that map to one. Leaves always have it; a folder
|
|
33
|
+
* row has it only if a project exists at exactly that path. Rows without one
|
|
34
|
+
* are pure grouping and must not link anywhere. */
|
|
35
|
+
project?: ProjectFolder;
|
|
36
|
+
/** Sessions beneath this row, summed. `undefined` when nothing underneath
|
|
37
|
+
* reported a count — rendered as nothing rather than as `0`, since the two
|
|
38
|
+
* mean very different things. */
|
|
39
|
+
sessionCount?: number;
|
|
40
|
+
/** How many real projects this row covers (1 for a leaf). Lets the caller
|
|
41
|
+
* paginate over top-level rows while still reporting a project range. */
|
|
42
|
+
projectCount: number;
|
|
43
|
+
/** Newest activity anywhere beneath this row. */
|
|
44
|
+
lastModified: Date;
|
|
45
|
+
lastModifiedFormatted?: string;
|
|
46
|
+
/** Union of the CLIs beneath this row, in first-seen order. */
|
|
47
|
+
cli: ProjectCli[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface Builder {
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
depth: number;
|
|
54
|
+
children: Map<string, Builder>;
|
|
55
|
+
project?: ProjectFolder;
|
|
56
|
+
sessionCount?: number;
|
|
57
|
+
projectCount: number;
|
|
58
|
+
lastModified: Date;
|
|
59
|
+
lastModifiedFormatted?: string;
|
|
60
|
+
cli: string[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function makeBuilder(key: string, label: string, depth: number): Builder {
|
|
64
|
+
return {
|
|
65
|
+
key,
|
|
66
|
+
label,
|
|
67
|
+
depth,
|
|
68
|
+
children: new Map(),
|
|
69
|
+
projectCount: 0,
|
|
70
|
+
lastModified: new Date(0),
|
|
71
|
+
cli: [],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Fold a project's stats into a node — newest date wins, counts add, CLIs union. */
|
|
76
|
+
function absorb(node: Builder, folder: ProjectFolder): void {
|
|
77
|
+
if (folder.lastModified.getTime() > node.lastModified.getTime()) {
|
|
78
|
+
node.lastModified = folder.lastModified;
|
|
79
|
+
node.lastModifiedFormatted = folder.lastModifiedFormatted;
|
|
80
|
+
}
|
|
81
|
+
if (typeof folder.sessionCount === "number") {
|
|
82
|
+
node.sessionCount = (node.sessionCount ?? 0) + folder.sessionCount;
|
|
83
|
+
}
|
|
84
|
+
node.projectCount += 1;
|
|
85
|
+
for (const c of folder.cli) if (!node.cli.includes(c)) node.cli.push(c);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function finalize(node: Builder): ProjectTreeNode {
|
|
89
|
+
const children = [...node.children.values()]
|
|
90
|
+
.map(finalize)
|
|
91
|
+
.sort((a, b) => b.lastModified.getTime() - a.lastModified.getTime());
|
|
92
|
+
return {
|
|
93
|
+
key: node.key,
|
|
94
|
+
label: node.label,
|
|
95
|
+
depth: node.depth,
|
|
96
|
+
children,
|
|
97
|
+
project: node.project,
|
|
98
|
+
sessionCount: node.sessionCount,
|
|
99
|
+
projectCount: node.projectCount,
|
|
100
|
+
lastModified: node.lastModified,
|
|
101
|
+
lastModifiedFormatted: node.lastModifiedFormatted,
|
|
102
|
+
cli: node.cli as ProjectCli[],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Build the render tree for a list of projects (already filtered, sorted and
|
|
108
|
+
* paginated by the caller — this adds no policy of its own).
|
|
109
|
+
*
|
|
110
|
+
* Real filesystem projects become depth-0 leaves in input order-by-recency,
|
|
111
|
+
* exactly as the flat table showed them. Gateway projects nest under one node
|
|
112
|
+
* per path segment.
|
|
113
|
+
*/
|
|
114
|
+
export function buildProjectTree(folders: ProjectFolder[]): ProjectTreeNode[] {
|
|
115
|
+
const roots = new Map<string, Builder>();
|
|
116
|
+
|
|
117
|
+
for (const folder of folders) {
|
|
118
|
+
const segments = syntheticPathSegments(folder.path);
|
|
119
|
+
|
|
120
|
+
if (segments.length === 0) {
|
|
121
|
+
// Real filesystem project — a top-level leaf, keyed by name so two
|
|
122
|
+
// projects with an identical path (or none) can't collide.
|
|
123
|
+
const node = makeBuilder(`project:${folder.name}`, folder.name, 0);
|
|
124
|
+
node.project = folder;
|
|
125
|
+
absorb(node, folder);
|
|
126
|
+
roots.set(node.key, node);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let level = roots;
|
|
131
|
+
let key = "";
|
|
132
|
+
let node: Builder | undefined;
|
|
133
|
+
for (let depth = 0; depth < segments.length; depth++) {
|
|
134
|
+
const label = segments[depth];
|
|
135
|
+
key = depth === 0 ? label : `${key}:${label}`;
|
|
136
|
+
let next = level.get(key);
|
|
137
|
+
if (!next) {
|
|
138
|
+
next = makeBuilder(key, label, depth);
|
|
139
|
+
level.set(key, next);
|
|
140
|
+
}
|
|
141
|
+
// Every ancestor rolls up the project's stats, so a collapsed folder still
|
|
142
|
+
// reports the freshest activity and total sessions underneath it.
|
|
143
|
+
absorb(next, folder);
|
|
144
|
+
node = next;
|
|
145
|
+
level = next.children;
|
|
146
|
+
}
|
|
147
|
+
// The deepest segment IS this project. Guard against two projects claiming
|
|
148
|
+
// the same path (shouldn't happen post-merge, but silently losing one would
|
|
149
|
+
// be worse than keeping the first).
|
|
150
|
+
if (node && !node.project) node.project = folder;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return [...roots.values()]
|
|
154
|
+
.map(finalize)
|
|
155
|
+
.sort((a, b) => b.lastModified.getTime() - a.lastModified.getTime());
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Flatten the tree to the rows actually rendered, honouring collapsed state.
|
|
160
|
+
*
|
|
161
|
+
* We track COLLAPSED rather than expanded keys deliberately: a profile or agent
|
|
162
|
+
* that appears for the first time should be visible, not hidden behind a click
|
|
163
|
+
* the user doesn't know to make.
|
|
164
|
+
*/
|
|
165
|
+
export function visibleTreeRows(
|
|
166
|
+
nodes: ProjectTreeNode[],
|
|
167
|
+
isCollapsed: (key: string) => boolean,
|
|
168
|
+
): ProjectTreeNode[] {
|
|
169
|
+
const out: ProjectTreeNode[] = [];
|
|
170
|
+
const walk = (list: ProjectTreeNode[]) => {
|
|
171
|
+
for (const node of list) {
|
|
172
|
+
out.push(node);
|
|
173
|
+
if (node.children.length > 0 && !isCollapsed(node.key)) walk(node.children);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
walk(nodes);
|
|
177
|
+
return out;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Keys of every node that has children — i.e. every collapsible row. */
|
|
181
|
+
export function collapsibleKeys(nodes: ProjectTreeNode[]): string[] {
|
|
182
|
+
const out: string[] = [];
|
|
183
|
+
const walk = (list: ProjectTreeNode[]) => {
|
|
184
|
+
for (const node of list) {
|
|
185
|
+
if (node.children.length > 0) {
|
|
186
|
+
out.push(node.key);
|
|
187
|
+
walk(node.children);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
walk(nodes);
|
|
192
|
+
return out;
|
|
193
|
+
}
|
|
@@ -29,6 +29,20 @@ export interface ProjectFolder {
|
|
|
29
29
|
* the same cwd has transcripts from more than one CLI; rendered as badges.
|
|
30
30
|
*/
|
|
31
31
|
cli: ProjectCli[];
|
|
32
|
+
/**
|
|
33
|
+
* How many sessions this project holds.
|
|
34
|
+
*
|
|
35
|
+
* Only the GATEWAY producers (Hermes, OpenClaw) fill this in, because only
|
|
36
|
+
* they render as a folder tree where a collapsed row has to say how much is
|
|
37
|
+
* underneath it — and for them the count is free, since their grouping loop
|
|
38
|
+
* already visits every session. The cwd-based CLIs leave it undefined and the
|
|
39
|
+
* UI renders nothing, rather than a `0` that would read as "empty".
|
|
40
|
+
*
|
|
41
|
+
* Deliberately NOT filled for Claude: counting there needs an extra readdir
|
|
42
|
+
* per project folder, and a number that exists for some CLIs and not others
|
|
43
|
+
* would sum to a wrong-but-plausible total on a merged row.
|
|
44
|
+
*/
|
|
45
|
+
sessionCount?: number;
|
|
32
46
|
}
|
|
33
47
|
|
|
34
48
|
export interface SessionFile {
|
|
@@ -126,6 +140,14 @@ function mergeProjectFolders(...sources: ProjectFolder[][]): ProjectFolder[] {
|
|
|
126
140
|
cli: mergedCli,
|
|
127
141
|
lastModified: newer.lastModified,
|
|
128
142
|
lastModifiedFormatted: newer.lastModifiedFormatted,
|
|
143
|
+
// Spreading `existing` alone would silently keep only the FIRST source's
|
|
144
|
+
// count for a name several CLIs contribute to, so sum explicitly. Stays
|
|
145
|
+
// undefined unless at least one side reported a count — `0` would claim
|
|
146
|
+
// "no sessions" for producers that simply don't count.
|
|
147
|
+
sessionCount:
|
|
148
|
+
existing.sessionCount === undefined && f.sessionCount === undefined
|
|
149
|
+
? undefined
|
|
150
|
+
: (existing.sessionCount ?? 0) + (f.sessionCount ?? 0),
|
|
129
151
|
});
|
|
130
152
|
}
|
|
131
153
|
}
|
|
@@ -11,56 +11,15 @@ Object.defineProperty(exports, "transpileConfig", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _nodefs = require("node:fs");
|
|
13
13
|
const _nodeurl = require("node:url");
|
|
14
|
-
const _commentjson = /*#__PURE__*/ _interop_require_wildcard(require("next/dist/compiled/comment-json"));
|
|
15
14
|
const _requirehook = require("./require-hook");
|
|
16
15
|
const _log = require("../output/log");
|
|
17
16
|
const _utils = require("../../server/lib/utils");
|
|
17
|
+
const _loadTsConfig = require("../../lib/typescript/loadTsConfig");
|
|
18
18
|
function _interop_require_default(obj) {
|
|
19
19
|
return obj && obj.__esModule ? obj : {
|
|
20
20
|
default: obj
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
24
|
-
if (typeof WeakMap !== "function") return null;
|
|
25
|
-
var cacheBabelInterop = new WeakMap();
|
|
26
|
-
var cacheNodeInterop = new WeakMap();
|
|
27
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
28
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
-
})(nodeInterop);
|
|
30
|
-
}
|
|
31
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
35
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
-
return {
|
|
37
|
-
default: obj
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
-
if (cache && cache.has(obj)) {
|
|
42
|
-
return cache.get(obj);
|
|
43
|
-
}
|
|
44
|
-
var newObj = {
|
|
45
|
-
__proto__: null
|
|
46
|
-
};
|
|
47
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
48
|
-
for(var key in obj){
|
|
49
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
50
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
51
|
-
if (desc && (desc.get || desc.set)) {
|
|
52
|
-
Object.defineProperty(newObj, key, desc);
|
|
53
|
-
} else {
|
|
54
|
-
newObj[key] = obj[key];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
newObj.default = obj;
|
|
59
|
-
if (cache) {
|
|
60
|
-
cache.set(obj, newObj);
|
|
61
|
-
}
|
|
62
|
-
return newObj;
|
|
63
|
-
}
|
|
64
23
|
function resolveSWCOptions(cwd, compilerOptions) {
|
|
65
24
|
var _process_versions, _process;
|
|
66
25
|
return {
|
|
@@ -74,7 +33,7 @@ function resolveSWCOptions(cwd, compilerOptions) {
|
|
|
74
33
|
...compilerOptions.baseUrl ? {
|
|
75
34
|
baseUrl: _nodepath.default.resolve(cwd, compilerOptions.baseUrl)
|
|
76
35
|
} : compilerOptions.paths ? {
|
|
77
|
-
baseUrl: cwd
|
|
36
|
+
baseUrl: compilerOptions.pathsBasePath ?? cwd
|
|
78
37
|
} : {}
|
|
79
38
|
},
|
|
80
39
|
module: {
|
|
@@ -89,76 +48,6 @@ function resolveSWCOptions(cwd, compilerOptions) {
|
|
|
89
48
|
}
|
|
90
49
|
};
|
|
91
50
|
}
|
|
92
|
-
function resolveExtends(extendsPath, currentConfigDir) {
|
|
93
|
-
// Relative paths are resolved relative to the current config's directory
|
|
94
|
-
if (extendsPath.startsWith('./') || extendsPath.startsWith('../') || _nodepath.default.isAbsolute(extendsPath)) {
|
|
95
|
-
const resolved = _nodepath.default.resolve(currentConfigDir, extendsPath);
|
|
96
|
-
// TypeScript allows omitting .json extension
|
|
97
|
-
if ((0, _nodefs.existsSync)(resolved)) {
|
|
98
|
-
return resolved;
|
|
99
|
-
}
|
|
100
|
-
if (!resolved.endsWith('.json') && (0, _nodefs.existsSync)(resolved + '.json')) {
|
|
101
|
-
return resolved + '.json';
|
|
102
|
-
}
|
|
103
|
-
return resolved;
|
|
104
|
-
}
|
|
105
|
-
// Package paths - use require.resolve to find the package
|
|
106
|
-
try {
|
|
107
|
-
// Try resolving as a direct path within the package
|
|
108
|
-
return require.resolve(extendsPath, {
|
|
109
|
-
paths: [
|
|
110
|
-
currentConfigDir
|
|
111
|
-
]
|
|
112
|
-
});
|
|
113
|
-
} catch {
|
|
114
|
-
// If that fails, try appending tsconfig.json for package names like "@tsconfig/node18"
|
|
115
|
-
try {
|
|
116
|
-
return require.resolve(extendsPath + '/tsconfig.json', {
|
|
117
|
-
paths: [
|
|
118
|
-
currentConfigDir
|
|
119
|
-
]
|
|
120
|
-
});
|
|
121
|
-
} catch {
|
|
122
|
-
// Return the original path and let it fail later with a clear error
|
|
123
|
-
return _nodepath.default.resolve(currentConfigDir, extendsPath);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function loadTsConfigFile(configPath, visited) {
|
|
128
|
-
const resolvedPath = _nodepath.default.resolve(configPath);
|
|
129
|
-
if (visited.has(resolvedPath)) {
|
|
130
|
-
return {};
|
|
131
|
-
}
|
|
132
|
-
visited.add(resolvedPath);
|
|
133
|
-
if (!(0, _nodefs.existsSync)(resolvedPath)) {
|
|
134
|
-
return {};
|
|
135
|
-
}
|
|
136
|
-
const configContent = (0, _nodefs.readFileSync)(resolvedPath, 'utf8');
|
|
137
|
-
const config = _commentjson.parse(configContent);
|
|
138
|
-
const configDir = _nodepath.default.dirname(resolvedPath);
|
|
139
|
-
let mergedOptions = {};
|
|
140
|
-
// Note that config options from `extends` should get overwritten, not merged
|
|
141
|
-
if (config.extends) {
|
|
142
|
-
const extendsList = Array.isArray(config.extends) ? config.extends : [
|
|
143
|
-
config.extends
|
|
144
|
-
];
|
|
145
|
-
for (const extendsPath of extendsList){
|
|
146
|
-
const parentConfigPath = resolveExtends(extendsPath, configDir);
|
|
147
|
-
const parentOptions = loadTsConfigFile(parentConfigPath, visited);
|
|
148
|
-
mergedOptions = {
|
|
149
|
-
...mergedOptions,
|
|
150
|
-
...parentOptions
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const currentOptions = config.compilerOptions ?? {};
|
|
155
|
-
mergedOptions = {
|
|
156
|
-
...mergedOptions,
|
|
157
|
-
paths: currentOptions.paths ?? mergedOptions.paths,
|
|
158
|
-
baseUrl: currentOptions.baseUrl ?? mergedOptions.baseUrl
|
|
159
|
-
};
|
|
160
|
-
return mergedOptions;
|
|
161
|
-
}
|
|
162
51
|
async function loadTsConfig(dir) {
|
|
163
52
|
// NOTE: This doesn't fully cover the edge case for setting
|
|
164
53
|
// "typescript.tsconfigPath" in next config which is currently
|
|
@@ -169,7 +58,7 @@ async function loadTsConfig(dir) {
|
|
|
169
58
|
if (!(0, _nodefs.existsSync)(resolvedTsConfigPath)) {
|
|
170
59
|
return {};
|
|
171
60
|
}
|
|
172
|
-
return
|
|
61
|
+
return (0, _loadTsConfig.loadTsConfigOptions)(resolvedTsConfigPath);
|
|
173
62
|
}
|
|
174
63
|
async function transpileConfig({ nextConfigPath, dir }) {
|
|
175
64
|
try {
|
|
@@ -134,7 +134,7 @@ var HmrTarget = /*#__PURE__*/ function(HmrTarget) {
|
|
|
134
134
|
HmrTarget["Server"] = "server";
|
|
135
135
|
return HmrTarget;
|
|
136
136
|
}({});
|
|
137
|
-
const nextVersion = "16.2.
|
|
137
|
+
const nextVersion = "16.2.12";
|
|
138
138
|
const ArchName = (0, _os.arch)();
|
|
139
139
|
const PlatformName = (0, _os.platform)();
|
|
140
140
|
function infoLog(...args) {
|
|
@@ -134,7 +134,8 @@ async function runPlaywright(baseDir, nextConfig, testRunnerArgs) {
|
|
|
134
134
|
hasAppDir: !!appDir,
|
|
135
135
|
hasPagesDir: !!pagesDir,
|
|
136
136
|
appDir: appDir || undefined,
|
|
137
|
-
pagesDir: pagesDir || undefined
|
|
137
|
+
pagesDir: pagesDir || undefined,
|
|
138
|
+
useTypeScriptCli: Boolean(nextConfig.experimental.useTypeScriptCli)
|
|
138
139
|
});
|
|
139
140
|
const isUsingTypeScript = !!typeScriptVersion;
|
|
140
141
|
const playwrightConfigFilename = isUsingTypeScript ? 'playwright.config.ts' : 'playwright.config.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var e={993:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)r=false}function EE(e,t,r){this.fn=e;this.context=t;this.once=r||false}function addListener(e,t,o,n
|
|
1
|
+
(()=>{var e={993:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)r=false}function EE(e,t,r){this.fn=e;this.context=t;this.once=r||false}function addListener(e,t,o,s,n){if(typeof o!=="function"){throw new TypeError("The listener must be a function")}var i=new EE(o,s||e,n),a=r?r+t:t;if(!e._events[a])e._events[a]=i,e._eventsCount++;else if(!e._events[a].fn)e._events[a].push(i);else e._events[a]=[e._events[a],i];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],o,s;if(this._eventsCount===0)return e;for(s in o=this._events){if(t.call(o,s))e.push(r?s.slice(1):s)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(o))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=r?r+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var s=0,n=o.length,i=new Array(n);s<n;s++){i[s]=o[s].fn}return i};EventEmitter.prototype.listenerCount=function listenerCount(e){var t=r?r+e:e,o=this._events[t];if(!o)return 0;if(o.fn)return 1;return o.length};EventEmitter.prototype.emit=function emit(e,t,o,s,n,i){var a=r?r+e:e;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,h;if(c.fn){if(c.once)this.removeListener(e,c.fn,undefined,true);switch(u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,t),true;case 3:return c.fn.call(c.context,t,o),true;case 4:return c.fn.call(c.context,t,o,s),true;case 5:return c.fn.call(c.context,t,o,s,n),true;case 6:return c.fn.call(c.context,t,o,s,n,i),true}for(h=1,f=new Array(u-1);h<u;h++){f[h-1]=arguments[h]}c.fn.apply(c.context,f)}else{var p=c.length,d;for(h=0;h<p;h++){if(c[h].once)this.removeListener(e,c[h].fn,undefined,true);switch(u){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,t);break;case 3:c[h].fn.call(c[h].context,t,o);break;case 4:c[h].fn.call(c[h].context,t,o,s);break;default:if(!f)for(d=1,f=new Array(u-1);d<u;d++){f[d-1]=arguments[d]}c[h].fn.apply(c[h].context,f)}}}return true};EventEmitter.prototype.on=function on(e,t,r){return addListener(this,e,t,r,false)};EventEmitter.prototype.once=function once(e,t,r){return addListener(this,e,t,r,true)};EventEmitter.prototype.removeListener=function removeListener(e,t,o,s){var n=r?r+e:e;if(!this._events[n])return this;if(!t){clearEvent(this,n);return this}var i=this._events[n];if(i.fn){if(i.fn===t&&(!s||i.once)&&(!o||i.context===o)){clearEvent(this,n)}}else{for(var a=0,c=[],u=i.length;a<u;a++){if(i[a].fn!==t||s&&!i[a].once||o&&i[a].context!==o){c.push(i[a])}}if(c.length)this._events[n]=c.length===1?c[0]:c;else clearEvent(this,n)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t;if(e){t=r?r+e:e;if(this._events[t])clearEvent(this,t)}else{this._events=new Events;this._eventsCount=0}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.addListener=EventEmitter.prototype.on;EventEmitter.prefixed=r;EventEmitter.EventEmitter=EventEmitter;if(true){e.exports=EventEmitter}},900:(e,t,r)=>{var o=r(310);var s=o.URL;var n=r(181);var i=r(687);var a=r(491);var c=r(781).Writable;var u=r(937)("follow-redirects");var f={GET:true,HEAD:true,OPTIONS:true,TRACE:true};var h=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach((function(e){h[e]=function(t,r,o){this._redirectable.emit(e,t,r,o)}}));function RedirectableRequest(e,t){c.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(e){r._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(c.prototype);RedirectableRequest.prototype.write=function(e,t,r){if(this._ending){throw new Error("write after end")}if(!(typeof e==="string"||typeof e==="object"&&"length"in e)){throw new Error("data should be a string, Buffer or Uint8Array")}if(typeof t==="function"){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new Error("Request body larger than maxBodyLength limit"));this.abort()}};RedirectableRequest.prototype.end=function(e,t,r){if(typeof e==="function"){r=e;e=t=null}else if(typeof t==="function"){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var o=this;var s=this._currentRequest;this.write(e,t,(function(){o._ended=true;s.end(null,null,r)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){if(t){this.once("timeout",t)}if(this.socket){startTimer(this,e)}else{var r=this;this._currentRequest.once("socket",(function(){startTimer(r,e)}))}this.once("response",clearTimer);this.once("error",clearTimer);return this};function startTimer(e,t){clearTimeout(e._timeout);e._timeout=setTimeout((function(){e.emit("timeout")}),t)}function clearTimer(){clearTimeout(this._timeout)}["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new Error("Unsupported protocol "+e));return}if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var s=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=o.format(this._options);s._redirectable=this;for(var n in h){if(n){s.on(n,h[n])}}if(this._isRedirect){var i=0;var a=this;var c=this._requestBodyBuffers;(function writeNext(e){if(s===a._currentRequest){if(e){a.emit("error",e)}else if(i<c.length){var t=c[i++];if(!s.finished){s.write(t.data,t.encoding,writeNext)}}else if(a._ended){s.end()}}})()}};RedirectableRequest.prototype._processResponse=function(e){var t=e.statusCode;if(this._options.trackRedirects){this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t})}var r=e.headers.location;if(r&&this._options.followRedirects!==false&&t>=300&&t<400){this._currentRequest.removeAllListeners();this._currentRequest.on("error",noop);this._currentRequest.abort();e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new Error("Max redirects exceeded."));return}var s;var n=this._options.headers;if(t!==307&&!(this._options.method in f)){this._options.method="GET";this._requestBodyBuffers=[];for(s in n){if(/^content-/i.test(s)){delete n[s]}}}if(!this._isRedirect){for(s in n){if(/^host$/i.test(s)){delete n[s]}}}var i=o.resolve(this._currentUrl,r);u("redirecting to",i);Object.assign(this._options,o.parse(i));if(typeof this._options.beforeRedirect==="function"){try{this._options.beforeRedirect.call(null,this._options)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}this._isRedirect=true;this._performRequest()}else{e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[]}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach((function(n){var i=n+":";var c=r[i]=e[n];var f=t[n]=Object.create(c);f.request=function(e,n,c){if(typeof e==="string"){var f=e;try{e=urlToOptions(new s(f))}catch(t){e=o.parse(f)}}else if(s&&e instanceof s){e=urlToOptions(e)}else{c=n;n=e;e={protocol:i}}if(typeof n==="function"){c=n;n=null}n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n);n.nativeProtocols=r;a.equal(n.protocol,i,"protocol mismatch");u("options",n);return new RedirectableRequest(n,c)};f.get=function(e,t,r){var o=f.request(e,t,r);o.end();return o}}));return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}e.exports=wrap({http:n,https:i});e.exports.wrap=wrap},950:(e,t,r)=>{
|
|
2
2
|
/*!
|
|
3
3
|
* Caron dimonio, con occhi di bragia
|
|
4
4
|
* loro accennando, tutte le raccoglie;
|
|
@@ -10,25 +10,25 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Dante - The Divine Comedy (Canto III)
|
|
12
12
|
*/
|
|
13
|
-
e.exports=r(
|
|
13
|
+
e.exports=r(934)},934:(e,t,r)=>{var o=r(354).Server;function createProxyServer(e){return new o(e)}o.createProxyServer=createProxyServer;o.createServer=createProxyServer;o.createProxy=createProxyServer;e.exports=o},940:(e,t,r)=>{var o=t,s=r(272).parseUrl,n=r(685);var i=/(^|,)\s*upgrade\s*($|,)/i,a=/(^|,)\s*transfer-encoding\s*($|,)/i,c=/^https|wss/;o.isSSL=c;o.parseUrl=function(e){var t=s(e);var r=t.hostname;return Object.assign(t,{host:r?r+(t.port?":"+t.port:""):r,hostname:r&&r.startsWith("[")?r.slice(1,-1):r,path:t.pathname+t.search})};o.setupOutgoing=function(e,t,r,s){e.port=t[s||"target"].port||(c.test(t[s||"target"].protocol)?443:80);["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach((function(r){e[r]=t[s||"target"][r]}));e.method=t.method||r.method;e.headers=Object.assign({},r.headers);if(t.headers){Object.assign(e.headers,t.headers)}if(t.auth){e.auth=t.auth}if(t.ca){e.ca=t.ca}if(c.test(t[s||"target"].protocol)){e.rejectUnauthorized=typeof t.secure==="undefined"?true:t.secure}e.agent=t.agent||false;e.localAddress=t.localAddress;e.headers=e.headers||{};var u=Object.keys(e.headers).some((function(t){return t.toLowerCase()==="transfer-encoding"&&typeof e.headers[t]!=="undefined"}));if(u||typeof e.headers.connection==="string"&&a.test(e.headers.connection)){e.headers.connection="close"}if(!e.agent){if(typeof e.headers.connection!=="string"||!i.test(e.headers.connection)){e.headers.connection="close"}}var f=t[s||"target"];var h=f&&t.prependPath!==false?f.path||"":"";var p=!t.toProxy?o.parseUrl(r.url).path||"":r.url;p=!t.ignorePath?p:"";e.path=o.urlJoin(h,p);if(t.changeOrigin){e.headers.host=n(e.port,t[s||"target"].protocol)&&!hasPort(e.host)?e.host+":"+e.port:e.host}return e};o.setupSocket=function(e){e.setTimeout(0);e.setNoDelay(true);e.setKeepAlive(true,0);return e};o.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:o.hasEncryptedConnection(e)?"443":"80"};o.hasEncryptedConnection=function(e){return Boolean(e.connection.encrypted||e.connection.pair)};o.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],o=r.split("?"),s;e[t]=o.shift();s=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")];s.push.apply(s,o);return s.join("?")};o.rewriteCookieProperty=function rewriteCookieProperty(e,t,r){if(Array.isArray(e)){return e.map((function(e){return rewriteCookieProperty(e,t,r)}))}return e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(function(e,r,o){var s;if(o in t){s=t[o]}else if("*"in t){s=t["*"]}else{return e}if(s){return r+s}else{return""}}))};function hasPort(e){return!!~e.indexOf(":")}},354:(e,t,r)=>{var o=e.exports,s=r(940).parseUrl,n=r(993),i=r(181),a=r(687),c=r(842),u=r(802);o.Server=ProxyServer;function createRightProxy(e){return function(t){return function(r,o){var n=e==="ws"?this.wsPasses:this.webPasses,i=[].slice.call(arguments),a=i.length-1,c,u;if(typeof i[a]==="function"){u=i[a];a--}var f=t;if(!(i[a]instanceof Buffer)&&i[a]!==o){f=Object.assign({},t);Object.assign(f,i[a]);a--}if(i[a]instanceof Buffer){c=i[a]}["target","forward"].forEach((function(e){if(typeof f[e]==="string")f[e]=s(f[e])}));if(!f.target&&!f.forward){return this.emit("error",new Error("Must provide a proper URL as target"))}for(var h=0;h<n.length;h++){if(n[h](r,o,f,c,this,u)){break}}}}}o.createRightProxy=createRightProxy;function ProxyServer(e){n.call(this);e=e||{};e.prependPath=e.prependPath===false?false:true;this.web=this.proxyRequest=createRightProxy("web")(e);this.ws=this.proxyWebsocketRequest=createRightProxy("ws")(e);this.options=e;this.webPasses=Object.keys(c).map((function(e){return c[e]}));this.wsPasses=Object.keys(u).map((function(e){return u[e]}));this.on("error",this.onError,this)}r(837).inherits(ProxyServer,n);ProxyServer.prototype.onError=function(e){if(this.listeners("error").length===1){throw e}};ProxyServer.prototype.listen=function(e,t){var r=this,closure=function(e,t){r.web(e,t)};this._server=this.options.ssl?a.createServer(this.options.ssl,closure):i.createServer(closure);if(this.options.ws){this._server.on("upgrade",(function(e,t,o){r.ws(e,t,o)}))}this._server.listen(e,t);return this};ProxyServer.prototype.close=function(e){var t=this;if(this._server){this._server.close(done)}function done(){t._server=null;if(e){e.apply(null,arguments)}}};ProxyServer.prototype.before=function(e,t,r){if(e!=="ws"&&e!=="web"){throw new Error("type must be `web` or `ws`")}var o=e==="ws"?this.wsPasses:this.webPasses,s=false;o.forEach((function(e,r){if(e.name===t)s=r}));if(s===false)throw new Error("No such pass");o.splice(s,0,r)};ProxyServer.prototype.after=function(e,t,r){if(e!=="ws"&&e!=="web"){throw new Error("type must be `web` or `ws`")}var o=e==="ws"?this.wsPasses:this.webPasses,s=false;o.forEach((function(e,r){if(e.name===t)s=r}));if(s===false)throw new Error("No such pass");o.splice(s++,0,r)}},842:(e,t,r)=>{var o=r(181),s=r(687),n=r(558),i=r(940),a=r(900);n=Object.keys(n).map((function(e){return n[e]}));var c={http:o,https:s};
|
|
14
14
|
/*!
|
|
15
15
|
* Array of passes.
|
|
16
16
|
*
|
|
17
17
|
* A `pass` is just a function that is executed on `req, res, options`
|
|
18
18
|
* so that you can easily add new checks while still keeping the base
|
|
19
19
|
* flexible.
|
|
20
|
-
*/e.exports={deleteLength:function deleteLength(e,t,r){if((e.method==="DELETE"||e.method==="OPTIONS")&&typeof e.headers["content-length"]==="undefined"&&typeof e.headers["transfer-encoding"]==="undefined"){e.headers["content-length"]="0"}},timeout:function timeout(e,t,r){if(r.timeout){e.socket.setTimeout(r.timeout)}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o=e.isSpdy||i.hasEncryptedConnection(e);var
|
|
20
|
+
*/e.exports={deleteLength:function deleteLength(e,t,r){if((e.method==="DELETE"||e.method==="OPTIONS")&&typeof e.headers["content-length"]==="undefined"&&typeof e.headers["transfer-encoding"]==="undefined"){e.headers["content-length"]="0"}},timeout:function timeout(e,t,r){if(r.timeout){e.socket.setTimeout(r.timeout)}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o=e.isSpdy||i.hasEncryptedConnection(e);var s={for:e.connection.remoteAddress||e.socket.remoteAddress,port:i.getPort(e),proto:o?"https":"http"};["for","port","proto"].forEach((function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+s[t]}));e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers["host"]||""},stream:function stream(e,t,r,o,s,u){s.emit("start",e,t,r.target||r.forward);var f=r.followRedirects?a:c;var h=f.http;var p=f.https;if(r.forward){var d=(r.forward.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e,"forward"));var l=createErrorHandler(d,r.forward);e.on("error",l);d.on("error",l);(r.buffer||e).pipe(d);if(!r.target){return t.end()}}var v=(r.target.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e));v.on("socket",(function(o){if(s&&!v.getHeader("expect")){s.emit("proxyReq",v,e,t,r)}}));if(r.proxyTimeout){v.setTimeout(r.proxyTimeout,(function(){v.abort()}))}e.on("aborted",(function(){v.abort()}));var m=createErrorHandler(v,r.target);e.on("error",m);v.on("error",m);function createErrorHandler(r,o){return function proxyError(n){if(e.socket.destroyed&&n.code==="ECONNRESET"){s.emit("econnreset",n,e,t,o);return r.abort()}if(u){u(n,e,t,o)}else{s.emit("error",n,e,t,o)}}}(r.buffer||e).pipe(v);v.on("response",(function(o){if(s){s.emit("proxyRes",o,e,t)}if(!t.headersSent&&!r.selfHandleResponse){for(var i=0;i<n.length;i++){if(n[i](e,t,o,r)){break}}}if(!t.finished){o.on("end",(function(){if(s)s.emit("end",e,t,o)}));if(!r.selfHandleResponse)o.pipe(t)}else{if(s)s.emit("end",e,t,o)}}))}}},558:(e,t,r)=>{var o=r(310),s=r(940);var n=/^201|30(1|2|7|8)$/;
|
|
21
21
|
/*!
|
|
22
22
|
* Array of passes.
|
|
23
23
|
*
|
|
24
24
|
* A `pass` is just a function that is executed on `req, res, options`
|
|
25
25
|
* so that you can easily add new checks while still keeping the base
|
|
26
26
|
* flexible.
|
|
27
|
-
*/e.exports={removeChunked:function removeChunked(e,t,r){if(e.httpVersion==="1.0"){delete r.headers["transfer-encoding"]}},setConnection:function setConnection(e,t,r){if(e.httpVersion==="1.0"){r.headers.connection=e.headers.connection||"close"}else if(e.httpVersion!=="2.0"&&!r.headers.connection){r.headers.connection=e.headers.connection||"keep-alive"}},setRedirectHostRewrite:function setRedirectHostRewrite(e,t,r,
|
|
27
|
+
*/e.exports={removeChunked:function removeChunked(e,t,r){if(e.httpVersion==="1.0"){delete r.headers["transfer-encoding"]}},setConnection:function setConnection(e,t,r){if(e.httpVersion==="1.0"){r.headers.connection=e.headers.connection||"close"}else if(e.httpVersion!=="2.0"&&!r.headers.connection){r.headers.connection=e.headers.connection||"keep-alive"}},setRedirectHostRewrite:function setRedirectHostRewrite(e,t,r,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&r.headers["location"]&&n.test(r.statusCode)){var a=s.parseUrl(i.target);var c=s.parseUrl(r.headers["location"]);if(a.host!=c.host){return}if(i.hostRewrite){c.host=i.hostRewrite}else if(i.autoRewrite){c.host=e.headers["host"]}if(i.protocolRewrite){c.protocol=i.protocolRewrite}r.headers["location"]=o.format(c)}},writeHeaders:function writeHeaders(e,t,r,o){var n=o.cookieDomainRewrite,i=o.cookiePathRewrite,a=o.preserveHeaderKeyCase,c,setHeader=function(e,r){if(r==undefined)return;if(n&&e.toLowerCase()==="set-cookie"){r=s.rewriteCookieProperty(r,n,"domain")}if(i&&e.toLowerCase()==="set-cookie"){r=s.rewriteCookieProperty(r,i,"path")}t.setHeader(String(e).trim(),r)};if(typeof n==="string"){n={"*":n}}if(typeof i==="string"){i={"*":i}}if(a&&r.rawHeaders!=undefined){c={};for(var u=0;u<r.rawHeaders.length;u+=2){var f=r.rawHeaders[u];c[f.toLowerCase()]=f}}Object.keys(r.headers).forEach((function(e){var t=r.headers[e];if(a&&c){e=c[e]||e}setHeader(e,t)}))},writeStatusCode:function writeStatusCode(e,t,r){if(r.statusMessage){t.statusCode=r.statusCode;t.statusMessage=r.statusMessage}else{t.statusCode=r.statusCode}}}},802:(e,t,r)=>{var o=r(181),s=r(687),n=r(940);
|
|
28
28
|
/*!
|
|
29
29
|
* Array of passes.
|
|
30
30
|
*
|
|
31
31
|
* A `pass` is just a function that is executed on `req, socket, options`
|
|
32
32
|
* so that you can easily add new checks while still keeping the base
|
|
33
33
|
* flexible.
|
|
34
|
-
*/e.exports={checkMethodAndHeader:function checkMethodAndHeader(e,t){if(e.method!=="GET"||!e.headers.upgrade){t.destroy();return true}if(e.headers.upgrade.toLowerCase()!=="websocket"){t.destroy();return true}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:
|
|
34
|
+
*/e.exports={checkMethodAndHeader:function checkMethodAndHeader(e,t){if(e.method!=="GET"||!e.headers.upgrade){t.destroy();return true}if(e.headers.upgrade.toLowerCase()!=="websocket"){t.destroy();return true}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:n.getPort(e),proto:n.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach((function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+o[t]}))},stream:function stream(e,t,r,i,a,c){var createHttpHeader=function(e,t){return Object.keys(t).reduce((function(e,r){var o=t[r];if(!Array.isArray(o)){e.push(r+": "+o);return e}for(var s=0;s<o.length;s++){e.push(r+": "+o[s])}return e}),[e]).join("\r\n")+"\r\n\r\n"};n.setupSocket(t);if(i&&i.length)t.unshift(i);var u=(n.isSSL.test(r.target.protocol)?s:o).request(n.setupOutgoing(r.ssl||{},r,e));if(a){a.emit("proxyReqWs",u,e,t,r,i)}u.on("error",onOutgoingError);u.on("response",(function(e){if(!e.upgrade){t.write(createHttpHeader("HTTP/"+e.httpVersion+" "+e.statusCode+" "+e.statusMessage,e.headers));e.pipe(t)}}));u.on("upgrade",(function(e,r,o){r.on("error",onOutgoingError);r.on("end",(function(){a.emit("close",e,r,o)}));t.on("error",(function(){r.end()}));n.setupSocket(r);if(o&&o.length)r.unshift(o);t.write(createHttpHeader("HTTP/1.1 101 Switching Protocols",e.headers));r.pipe(t).pipe(r);a.emit("open",r);a.emit("proxySocket",r)}));return u.end();function onOutgoingError(r){if(c){c(r,e,t)}else{a.emit("error",r,e,t)}t.end()}}}},685:e=>{"use strict";e.exports=function required(e,t){t=t.split(":")[0];e=+e;if(!e)return false;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return false}return e!==0}},491:e=>{"use strict";e.exports=require("assert")},181:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},937:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},272:e=>{"use strict";e.exports=require("next/dist/shared/lib/router/utils/parse-url")},781:e=>{"use strict";e.exports=require("stream")},310:e=>{"use strict";e.exports=require("url")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var o=t[r];if(o!==undefined){return o.exports}var s=t[r]={exports:{}};var n=true;try{e[r](s,s.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(950);module.exports=r})();
|