failproofai 0.0.14 → 0.0.15-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +8 -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]__1s2b6h0._.js → [root-of-the-server]__04o-kw7._.js} +2 -2
- 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]__170799-._.js +8 -8
- 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]__1i21qhv._.js +3 -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_audit_loading_tsx_1j1kc6j._.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_0w82veb.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 +10 -10
- package/.next/standalone/.next/static/chunks/0hn30_j22wpp_.js +6 -0
- package/.next/standalone/.next/static/chunks/{3s8aaig91937v.js → 1_20f96f1253b.js} +1 -1
- package/.next/standalone/.next/static/chunks/1hdhteui932bq.js +1 -0
- package/.next/standalone/.next/static/chunks/{33u59vf_8xpd-.js → 1j2xm011_aoae.js} +1 -1
- package/.next/standalone/.next/static/chunks/1qzsbft-jtnf8.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/2xbkqlma_-61k.js +1 -0
- package/.next/standalone/.next/static/chunks/{29o4j32z643_a.js → 2y7acsw0--8xf.js} +1 -1
- package/.next/standalone/.next/static/chunks/3060a-0fayz96.js +1 -0
- package/.next/standalone/.next/static/chunks/312ihvhxeuoi_.js +1 -0
- package/.next/standalone/.next/static/chunks/31c084gsop1bb.js +1 -0
- package/.next/standalone/.next/static/chunks/{1ua5armwfph8o.js → 31fmsp1soxi07.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02jcotghcxrbu.js → 3kmwfieo15mr2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2uh_4k4m296z5.js → 3q9y67-fobgpc.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 +85 -0
- package/.next/standalone/app/components/project-list.tsx +229 -42
- package/.next/standalone/app/policies/hooks-client.tsx +112 -14
- 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/dist/cli.mjs +623 -308
- 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 +58 -4
- package/src/hooks/enforcement-capability.ts +266 -0
- package/src/hooks/handler.ts +12 -1
- package/src/hooks/hook-activity-store.ts +14 -0
- package/src/hooks/hooks-config.ts +59 -1
- package/src/hooks/integrations.ts +123 -19
- package/src/hooks/manager.ts +93 -27
- package/src/hooks/policy-evaluator.ts +59 -7
- package/src/hooks/policy-types.ts +26 -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/06z_ex1ts3n4s.js +0 -1
- 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 → QFmU1xD4R9N_HVfwccP6A}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{WQRKgSfFekLcC_pvyzp4S → QFmU1xD4R9N_HVfwccP6A}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{WQRKgSfFekLcC_pvyzp4S → QFmU1xD4R9N_HVfwccP6A}/_ssgManifest.js +0 -0
|
@@ -28,7 +28,7 @@ async function installDependencies(baseDir, deps, dev = false) {
|
|
|
28
28
|
console.log(`- ${(0, _picocolors.cyan)(dep.pkg)}`);
|
|
29
29
|
}
|
|
30
30
|
console.log();
|
|
31
|
-
await (0, _install.install)(_path.default.resolve(baseDir), deps.map((dep)=>dep.pkg), {
|
|
31
|
+
await (0, _install.install)(_path.default.resolve(baseDir), deps.map((dep)=>dep.install ?? dep.pkg), {
|
|
32
32
|
devDependencies: dev,
|
|
33
33
|
isOnline,
|
|
34
34
|
packageManager
|
|
@@ -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.2.
|
|
75
|
+
const versionData = data.versions["16.2.12"];
|
|
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.2.
|
|
103
|
+
version: "16.2.12",
|
|
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.2.
|
|
111
|
+
version: "16.2.12",
|
|
112
112
|
resolved: pkgData.tarball,
|
|
113
113
|
integrity: pkgData.integrity,
|
|
114
114
|
cpu: pkgData.cpu,
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "loadTsConfigOptions", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return loadTsConfigOptions;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _nodefs = require("node:fs");
|
|
12
|
+
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
|
+
const _commentjson = /*#__PURE__*/ _interop_require_wildcard(require("next/dist/compiled/comment-json"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
+
if (typeof WeakMap !== "function") return null;
|
|
21
|
+
var cacheBabelInterop = new WeakMap();
|
|
22
|
+
var cacheNodeInterop = new WeakMap();
|
|
23
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
24
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
25
|
+
})(nodeInterop);
|
|
26
|
+
}
|
|
27
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
28
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
29
|
+
return obj;
|
|
30
|
+
}
|
|
31
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
32
|
+
return {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
37
|
+
if (cache && cache.has(obj)) {
|
|
38
|
+
return cache.get(obj);
|
|
39
|
+
}
|
|
40
|
+
var newObj = {
|
|
41
|
+
__proto__: null
|
|
42
|
+
};
|
|
43
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
+
for(var key in obj){
|
|
45
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
+
if (desc && (desc.get || desc.set)) {
|
|
48
|
+
Object.defineProperty(newObj, key, desc);
|
|
49
|
+
} else {
|
|
50
|
+
newObj[key] = obj[key];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
newObj.default = obj;
|
|
55
|
+
if (cache) {
|
|
56
|
+
cache.set(obj, newObj);
|
|
57
|
+
}
|
|
58
|
+
return newObj;
|
|
59
|
+
}
|
|
60
|
+
function resolveConfigDirValue(value, configDir, rootConfigDir) {
|
|
61
|
+
return _nodepath.default.resolve(configDir, value.replace(/\$\{configDir\}/g, rootConfigDir));
|
|
62
|
+
}
|
|
63
|
+
function resolveConfigFile(candidate) {
|
|
64
|
+
for (const configPath of [
|
|
65
|
+
candidate,
|
|
66
|
+
candidate.endsWith('.json') ? undefined : candidate + '.json'
|
|
67
|
+
]){
|
|
68
|
+
if (configPath && (0, _nodefs.existsSync)(configPath) && (0, _nodefs.statSync)(configPath).isFile()) {
|
|
69
|
+
return configPath;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function resolvePackageTsConfig(extendsPath, currentConfigDir) {
|
|
74
|
+
const parts = extendsPath.split('/');
|
|
75
|
+
const isPackageRoot = extendsPath.startsWith('@') ? parts.length === 2 : parts.length === 1;
|
|
76
|
+
if (!isPackageRoot) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
const packageJsonPath = require.resolve(extendsPath + '/package.json', {
|
|
81
|
+
paths: [
|
|
82
|
+
currentConfigDir
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
const packageJson = JSON.parse((0, _nodefs.readFileSync)(packageJsonPath, 'utf8'));
|
|
86
|
+
if (packageJson.exports !== undefined) {
|
|
87
|
+
try {
|
|
88
|
+
const exportedConfig = require.resolve(extendsPath, {
|
|
89
|
+
paths: [
|
|
90
|
+
currentConfigDir
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
if (_nodepath.default.extname(exportedConfig) === '.json') {
|
|
94
|
+
return exportedConfig;
|
|
95
|
+
}
|
|
96
|
+
} catch {}
|
|
97
|
+
}
|
|
98
|
+
if (typeof packageJson.tsconfig === 'string') {
|
|
99
|
+
return resolveConfigFile(_nodepath.default.resolve(_nodepath.default.dirname(packageJsonPath), packageJson.tsconfig));
|
|
100
|
+
}
|
|
101
|
+
return resolveConfigFile(_nodepath.default.join(_nodepath.default.dirname(packageJsonPath), 'tsconfig'));
|
|
102
|
+
} catch {}
|
|
103
|
+
}
|
|
104
|
+
function resolveExtends(extendsPath, currentConfigDir) {
|
|
105
|
+
if (extendsPath.startsWith('./') || extendsPath.startsWith('../') || _nodepath.default.isAbsolute(extendsPath)) {
|
|
106
|
+
const resolved = _nodepath.default.resolve(currentConfigDir, extendsPath);
|
|
107
|
+
if ((0, _nodefs.existsSync)(resolved)) {
|
|
108
|
+
return resolved;
|
|
109
|
+
}
|
|
110
|
+
if (!resolved.endsWith('.json') && (0, _nodefs.existsSync)(resolved + '.json')) {
|
|
111
|
+
return resolved + '.json';
|
|
112
|
+
}
|
|
113
|
+
return resolved;
|
|
114
|
+
}
|
|
115
|
+
const packageConfigPath = resolvePackageTsConfig(extendsPath, currentConfigDir);
|
|
116
|
+
if (packageConfigPath) {
|
|
117
|
+
return packageConfigPath;
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
const resolved = require.resolve(extendsPath, {
|
|
121
|
+
paths: [
|
|
122
|
+
currentConfigDir
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
if (_nodepath.default.extname(resolved) === '.json') {
|
|
126
|
+
return resolved;
|
|
127
|
+
}
|
|
128
|
+
} catch {}
|
|
129
|
+
try {
|
|
130
|
+
return require.resolve(extendsPath + '/tsconfig.json', {
|
|
131
|
+
paths: [
|
|
132
|
+
currentConfigDir
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
} catch {
|
|
136
|
+
return _nodepath.default.resolve(currentConfigDir, extendsPath);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function loadTsConfigOptionsRecursive(configPath, visited, rootConfigDir) {
|
|
140
|
+
const resolvedPath = _nodepath.default.resolve(configPath);
|
|
141
|
+
if (visited.has(resolvedPath) || !(0, _nodefs.existsSync)(resolvedPath)) {
|
|
142
|
+
return {};
|
|
143
|
+
}
|
|
144
|
+
const nextVisited = new Set(visited);
|
|
145
|
+
nextVisited.add(resolvedPath);
|
|
146
|
+
const configContent = (0, _nodefs.readFileSync)(resolvedPath, 'utf8');
|
|
147
|
+
const config = _commentjson.parse(configContent);
|
|
148
|
+
const configDir = _nodepath.default.dirname(resolvedPath);
|
|
149
|
+
let mergedOptions = {};
|
|
150
|
+
if (config.extends) {
|
|
151
|
+
const extendsList = Array.isArray(config.extends) ? config.extends : [
|
|
152
|
+
config.extends
|
|
153
|
+
];
|
|
154
|
+
for (const extendsPath of extendsList){
|
|
155
|
+
const parentConfigPath = resolveExtends(extendsPath, configDir);
|
|
156
|
+
const parentOptions = loadTsConfigOptionsRecursive(parentConfigPath, nextVisited, rootConfigDir);
|
|
157
|
+
mergedOptions = {
|
|
158
|
+
...mergedOptions,
|
|
159
|
+
...parentOptions
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const currentOptions = config.compilerOptions ?? {};
|
|
164
|
+
if (Object.hasOwn(currentOptions, 'paths')) {
|
|
165
|
+
mergedOptions.paths = currentOptions.paths;
|
|
166
|
+
mergedOptions.pathsBasePath = configDir;
|
|
167
|
+
}
|
|
168
|
+
if (Object.hasOwn(currentOptions, 'baseUrl') && typeof currentOptions.baseUrl === 'string') {
|
|
169
|
+
mergedOptions.baseUrl = resolveConfigDirValue(currentOptions.baseUrl, configDir, rootConfigDir);
|
|
170
|
+
}
|
|
171
|
+
if (mergedOptions.baseUrl) {
|
|
172
|
+
mergedOptions.pathsBasePath = undefined;
|
|
173
|
+
}
|
|
174
|
+
return mergedOptions;
|
|
175
|
+
}
|
|
176
|
+
function loadTsConfigOptions(configPath) {
|
|
177
|
+
const resolvedPath = _nodepath.default.resolve(configPath);
|
|
178
|
+
return loadTsConfigOptionsRecursive(resolvedPath, new Set(), _nodepath.default.dirname(resolvedPath));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
//# sourceMappingURL=loadTsConfig.js.map
|
|
@@ -14,7 +14,7 @@ const _fatalerror = require("../fatal-error");
|
|
|
14
14
|
const _getpkgmanager = require("../helpers/get-pkg-manager");
|
|
15
15
|
function missingDepsError(dir, missingPackages) {
|
|
16
16
|
const packagesHuman = (0, _oxfordcommalist.getOxfordCommaList)(missingPackages.map((p)=>p.pkg));
|
|
17
|
-
const packagesCli = missingPackages.map((p)=>p.pkg).join(' ');
|
|
17
|
+
const packagesCli = missingPackages.map((p)=>p.install ?? p.pkg).join(' ');
|
|
18
18
|
const packageManager = (0, _getpkgmanager.getPkgManager)(dir);
|
|
19
19
|
const removalMsg = '\n\n' + (0, _picocolors.bold)('If you are not trying to use TypeScript, please remove the ' + (0, _picocolors.cyan)('tsconfig.json') + ' file from your package root (and any TypeScript files in your app and pages directories).');
|
|
20
20
|
throw Object.defineProperty(new _fatalerror.FatalError((0, _picocolors.bold)((0, _picocolors.red)(`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`)) + '\n\n' + (0, _picocolors.bold)(`Please install ${(0, _picocolors.bold)(packagesHuman)} by running:`) + '\n\n' + `\t${(0, _picocolors.bold)((0, _picocolors.cyan)((packageManager === 'yarn' ? 'yarn add --dev' : packageManager === 'pnpm' ? 'pnpm install --save-dev' : 'npm install --save-dev') + ' ' + packagesCli))}` + removalMsg + '\n'), "__NEXT_ERROR_CODE", {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "runTypeCheckCli", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return runTypeCheckCli;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
|
+
const _compileerror = require("../compile-error");
|
|
13
|
+
const _runTypeScriptCli = require("./runTypeScriptCli");
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
async function runTypeCheckCli({ baseDir, tsConfigPath, tscPath, cacheDir, onFirstOutput }) {
|
|
20
|
+
const configuration = await (0, _runTypeScriptCli.getTypeScriptConfigurationCli)({
|
|
21
|
+
baseDir,
|
|
22
|
+
tsConfigPath,
|
|
23
|
+
tscPath
|
|
24
|
+
});
|
|
25
|
+
const incremental = Boolean(configuration.compilerOptions.incremental || configuration.compilerOptions.composite);
|
|
26
|
+
const args = [
|
|
27
|
+
'--project',
|
|
28
|
+
tsConfigPath,
|
|
29
|
+
'--noEmit',
|
|
30
|
+
'--declarationMap',
|
|
31
|
+
'false',
|
|
32
|
+
'--emitDeclarationOnly',
|
|
33
|
+
'false'
|
|
34
|
+
];
|
|
35
|
+
if (incremental && cacheDir) {
|
|
36
|
+
args.push('--tsBuildInfoFile', _nodepath.default.join(cacheDir, '.tsbuildinfo'));
|
|
37
|
+
}
|
|
38
|
+
const result = await (0, _runTypeScriptCli.runTypeScriptCli)({
|
|
39
|
+
cwd: baseDir,
|
|
40
|
+
tscPath,
|
|
41
|
+
args,
|
|
42
|
+
onFirstOutput
|
|
43
|
+
});
|
|
44
|
+
if (result.exitCode !== 0) {
|
|
45
|
+
throw new _compileerror.CompileError();
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
hasWarnings: false,
|
|
49
|
+
incremental
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=runTypeCheckCli.js.map
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
0 && (module.exports = {
|
|
6
|
+
getTypeScriptApiMissingError: null,
|
|
7
|
+
getTypeScriptConfigurationCli: null,
|
|
8
|
+
getTypeScriptPackageInfo: null,
|
|
9
|
+
hasNativeTypeScriptPreview: null,
|
|
10
|
+
runTypeScriptCli: null
|
|
11
|
+
});
|
|
12
|
+
function _export(target, all) {
|
|
13
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: all[name]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
_export(exports, {
|
|
19
|
+
getTypeScriptApiMissingError: function() {
|
|
20
|
+
return getTypeScriptApiMissingError;
|
|
21
|
+
},
|
|
22
|
+
getTypeScriptConfigurationCli: function() {
|
|
23
|
+
return getTypeScriptConfigurationCli;
|
|
24
|
+
},
|
|
25
|
+
getTypeScriptPackageInfo: function() {
|
|
26
|
+
return getTypeScriptPackageInfo;
|
|
27
|
+
},
|
|
28
|
+
hasNativeTypeScriptPreview: function() {
|
|
29
|
+
return hasNativeTypeScriptPreview;
|
|
30
|
+
},
|
|
31
|
+
runTypeScriptCli: function() {
|
|
32
|
+
return runTypeScriptCli;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const _nodefs = require("node:fs");
|
|
36
|
+
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
37
|
+
const _nodechild_process = require("node:child_process");
|
|
38
|
+
const _crossspawn = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/cross-spawn"));
|
|
39
|
+
const _picocolors = require("../picocolors");
|
|
40
|
+
const _resolvefrom = require("../resolve-from");
|
|
41
|
+
function _interop_require_default(obj) {
|
|
42
|
+
return obj && obj.__esModule ? obj : {
|
|
43
|
+
default: obj
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function getTypeScriptPackageInfo(baseDir) {
|
|
47
|
+
var _packageJson_bin;
|
|
48
|
+
let packageJsonPath;
|
|
49
|
+
try {
|
|
50
|
+
packageJsonPath = (0, _resolvefrom.resolveFrom)(baseDir, 'typescript/package.json');
|
|
51
|
+
} catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const packageJson = JSON.parse((0, _nodefs.readFileSync)(packageJsonPath, 'utf8'));
|
|
55
|
+
const packageDir = _nodepath.default.dirname(packageJsonPath);
|
|
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;
|
|
58
|
+
const tscBinPath = tscBin ? _nodepath.default.resolve(packageDir, tscBin) : undefined;
|
|
59
|
+
let tscPath = tscBinPath;
|
|
60
|
+
if (tscBinPath && (0, _nodefs.existsSync)(tscBinPath) && packageJson.type === 'module' && _nodepath.default.extname(tscBinPath) === '') {
|
|
61
|
+
// TypeScript 7's extensionless ESM bin wrapper cannot be used as Node's
|
|
62
|
+
// main entry point on Node.js 20.9. Its imported JS entry is the same CLI
|
|
63
|
+
// wrapper and works across all supported Node.js versions.
|
|
64
|
+
const tscJsPath = _nodepath.default.join(packageDir, 'lib', 'tsc.js');
|
|
65
|
+
if ((0, _nodefs.existsSync)(tscJsPath)) {
|
|
66
|
+
tscPath = tscJsPath;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
packageJsonPath,
|
|
71
|
+
packageDir,
|
|
72
|
+
version: packageJson.version,
|
|
73
|
+
apiPath: (0, _nodefs.existsSync)(apiPath) ? apiPath : undefined,
|
|
74
|
+
tscPath: tscPath && (0, _nodefs.existsSync)(tscPath) ? tscPath : undefined
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function hasNativeTypeScriptPreview(baseDir) {
|
|
78
|
+
try {
|
|
79
|
+
(0, _resolvefrom.resolveFrom)(baseDir, '@typescript/native-preview/package.json');
|
|
80
|
+
return true;
|
|
81
|
+
} catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function getTypeScriptApiMissingError(version) {
|
|
86
|
+
return Object.defineProperty(new Error(`TypeScript ${version} does not provide the compiler API required by Next.js. ` + `Enable ${(0, _picocolors.bold)('experimental.useTypeScriptCli')} in your Next.js config to use the TypeScript CLI, ` + `or install TypeScript 6 instead.`), "__NEXT_ERROR_CODE", {
|
|
87
|
+
value: "E1150",
|
|
88
|
+
enumerable: false,
|
|
89
|
+
configurable: true
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const terminationSignals = [
|
|
93
|
+
'SIGINT',
|
|
94
|
+
'SIGTERM',
|
|
95
|
+
'SIGHUP'
|
|
96
|
+
];
|
|
97
|
+
function runTypeScriptCli({ cwd, tscPath, args, captureOutput = false, onFirstOutput }) {
|
|
98
|
+
return new Promise((resolve, reject)=>{
|
|
99
|
+
var _child_stdout, _child_stderr;
|
|
100
|
+
const child = (0, _crossspawn.default)(process.execPath, [
|
|
101
|
+
tscPath,
|
|
102
|
+
...args
|
|
103
|
+
], {
|
|
104
|
+
cwd,
|
|
105
|
+
// TypeScript 7's Node wrapper starts the native compiler synchronously
|
|
106
|
+
// on older Node.js releases. A separate process group lets termination
|
|
107
|
+
// reach both processes instead of orphaning the native compiler.
|
|
108
|
+
detached: process.platform !== 'win32',
|
|
109
|
+
shell: false,
|
|
110
|
+
stdio: [
|
|
111
|
+
'ignore',
|
|
112
|
+
'pipe',
|
|
113
|
+
'pipe'
|
|
114
|
+
],
|
|
115
|
+
env: {
|
|
116
|
+
...process.env,
|
|
117
|
+
// Piping stdio makes `tsc` disable colored/pretty diagnostics. Restore
|
|
118
|
+
// them when we are forwarding output to a TTY (not capturing it for
|
|
119
|
+
// parsing, e.g. `--showConfig`).
|
|
120
|
+
...!captureOutput && process.stdout.isTTY ? {
|
|
121
|
+
FORCE_COLOR: '1'
|
|
122
|
+
} : undefined
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
let stdout = '';
|
|
126
|
+
let stderr = '';
|
|
127
|
+
(_child_stdout = child.stdout) == null ? void 0 : _child_stdout.setEncoding('utf8');
|
|
128
|
+
(_child_stderr = child.stderr) == null ? void 0 : _child_stderr.setEncoding('utf8');
|
|
129
|
+
if (captureOutput) {
|
|
130
|
+
var _child_stdout1, _child_stderr1;
|
|
131
|
+
(_child_stdout1 = child.stdout) == null ? void 0 : _child_stdout1.on('data', (chunk)=>{
|
|
132
|
+
stdout += chunk;
|
|
133
|
+
});
|
|
134
|
+
(_child_stderr1 = child.stderr) == null ? void 0 : _child_stderr1.on('data', (chunk)=>{
|
|
135
|
+
stderr += chunk;
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
var _child_stdout2, _child_stderr2;
|
|
139
|
+
const forward = (dest, chunk)=>{
|
|
140
|
+
onFirstOutput == null ? void 0 : onFirstOutput();
|
|
141
|
+
onFirstOutput = undefined // ensure we don't call it again
|
|
142
|
+
;
|
|
143
|
+
dest.write(chunk);
|
|
144
|
+
};
|
|
145
|
+
(_child_stdout2 = child.stdout) == null ? void 0 : _child_stdout2.on('data', (chunk)=>{
|
|
146
|
+
forward(process.stdout, chunk);
|
|
147
|
+
});
|
|
148
|
+
(_child_stderr2 = child.stderr) == null ? void 0 : _child_stderr2.on('data', (chunk)=>{
|
|
149
|
+
forward(process.stderr, chunk);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
let terminationRequested = false;
|
|
153
|
+
const terminateChild = ()=>{
|
|
154
|
+
if (terminationRequested || child.killed || child.pid === undefined) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
terminationRequested = true;
|
|
158
|
+
// The native compiler ignores SIGTERM and SIGINT, so send a kill signal.
|
|
159
|
+
// Target the whole process group so the signal reaches the native compiler whether
|
|
160
|
+
// it is a grandchild or a direct child.
|
|
161
|
+
// https://github.com/microsoft/typescript-go/pull/4592 should improve this in the long run
|
|
162
|
+
if (process.platform === 'win32') {
|
|
163
|
+
(0, _nodechild_process.spawnSync)('taskkill', [
|
|
164
|
+
'/pid',
|
|
165
|
+
String(child.pid),
|
|
166
|
+
'/T',
|
|
167
|
+
'/F'
|
|
168
|
+
], {
|
|
169
|
+
stdio: 'ignore',
|
|
170
|
+
windowsHide: true
|
|
171
|
+
});
|
|
172
|
+
} else {
|
|
173
|
+
try {
|
|
174
|
+
// https://www.youtube.com/watch?v=Fow7iUaKrq4
|
|
175
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
176
|
+
} catch {
|
|
177
|
+
// The process may have exited between the lifecycle event and kill.
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const terminateOnExit = ()=>terminateChild();
|
|
182
|
+
process.once('exit', terminateOnExit);
|
|
183
|
+
const handler = ()=>{
|
|
184
|
+
terminateChild();
|
|
185
|
+
process.exit(1);
|
|
186
|
+
};
|
|
187
|
+
for (const signal of terminationSignals){
|
|
188
|
+
process.once(signal, handler);
|
|
189
|
+
}
|
|
190
|
+
const cleanup = ()=>{
|
|
191
|
+
process.off('exit', terminateOnExit);
|
|
192
|
+
for (const signal of terminationSignals){
|
|
193
|
+
process.off(signal, handler);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
let settled = false;
|
|
197
|
+
const finish = (settle)=>{
|
|
198
|
+
if (settled) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
settled = true;
|
|
202
|
+
cleanup();
|
|
203
|
+
settle();
|
|
204
|
+
};
|
|
205
|
+
child.on('error', (error)=>{
|
|
206
|
+
finish(()=>reject(error));
|
|
207
|
+
});
|
|
208
|
+
child.on('close', (code, signal)=>{
|
|
209
|
+
finish(()=>{
|
|
210
|
+
resolve({
|
|
211
|
+
exitCode: code ?? 1,
|
|
212
|
+
signal,
|
|
213
|
+
stdout,
|
|
214
|
+
stderr
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
async function getTypeScriptConfigurationCli({ baseDir, tsConfigPath, tscPath }) {
|
|
221
|
+
const result = await runTypeScriptCli({
|
|
222
|
+
cwd: baseDir,
|
|
223
|
+
tscPath,
|
|
224
|
+
args: [
|
|
225
|
+
'--showConfig',
|
|
226
|
+
'--project',
|
|
227
|
+
tsConfigPath,
|
|
228
|
+
'--pretty',
|
|
229
|
+
'false'
|
|
230
|
+
],
|
|
231
|
+
captureOutput: true
|
|
232
|
+
});
|
|
233
|
+
if (result.exitCode !== 0) {
|
|
234
|
+
throw Object.defineProperty(new Error([
|
|
235
|
+
result.stdout,
|
|
236
|
+
result.stderr
|
|
237
|
+
].filter(Boolean).join('\n').trim()), "__NEXT_ERROR_CODE", {
|
|
238
|
+
value: "E394",
|
|
239
|
+
enumerable: false,
|
|
240
|
+
configurable: true
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
try {
|
|
244
|
+
return JSON.parse(result.stdout);
|
|
245
|
+
} catch (cause) {
|
|
246
|
+
throw Object.defineProperty(new Error(`Could not parse output from TypeScript's --showConfig.`, {
|
|
247
|
+
cause
|
|
248
|
+
}), "__NEXT_ERROR_CODE", {
|
|
249
|
+
value: "E1149",
|
|
250
|
+
enumerable: false,
|
|
251
|
+
configurable: true
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
//# sourceMappingURL=runTypeScriptCli.js.map
|