@elench/testkit 0.1.64 → 0.1.66
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/lib/app/browser-bridge.mjs +66 -0
- package/lib/app/configs.mjs +81 -0
- package/lib/app/configs.test.mjs +34 -0
- package/lib/cli/command-helpers.mjs +2 -10
- package/lib/cli/commands/browser/serve.mjs +3 -62
- package/lib/cli/db.mjs +3 -68
- package/lib/config/binaries.mjs +34 -0
- package/lib/config/database.mjs +9 -6
- package/lib/config/index.mjs +2 -31
- package/lib/config/runtime.mjs +24 -95
- package/lib/config/validation.mjs +18 -62
- package/lib/coverage/backend-discovery.mjs +68 -85
- package/lib/coverage/backend-discovery.test.mjs +55 -46
- package/lib/coverage/evidence.mjs +15 -3
- package/lib/coverage/evidence.test.mjs +13 -4
- package/lib/coverage/graph-builder.mjs +25 -26
- package/lib/coverage/next-ir-to-graph.mjs +239 -0
- package/lib/coverage/routing.mjs +2 -29
- package/lib/coverage/routing.test.mjs +0 -16
- package/lib/coverage/shared.mjs +22 -82
- package/lib/database/fingerprint.mjs +1 -1
- package/lib/known-failures/github-cache.mjs +159 -0
- package/lib/known-failures/github-transport.mjs +174 -0
- package/lib/known-failures/github.mjs +17 -325
- package/lib/runner/default-runtime-runner.mjs +4 -10
- package/lib/runner/execution-config.mjs +12 -83
- package/lib/runner/live-run.mjs +45 -0
- package/lib/runner/managed-processes.mjs +29 -0
- package/lib/runner/orchestrator.mjs +57 -188
- package/lib/runner/playwright-runner.mjs +4 -11
- package/lib/runner/run-finalization.mjs +132 -0
- package/lib/runner/run-guards.mjs +45 -0
- package/lib/runner/runtime-preparation.mjs +1 -1
- package/lib/runner/services.mjs +3 -4
- package/lib/runner/template-steps.mjs +8 -45
- package/lib/runner/template.mjs +7 -28
- package/lib/shared/configured-steps.mjs +178 -0
- package/lib/shared/configured-steps.test.mjs +73 -0
- package/lib/shared/execution-schema.mjs +74 -0
- package/lib/shared/execution-schema.test.mjs +26 -0
- package/node_modules/@elench/next-analysis/dist/api-routes.d.ts +7 -0
- package/node_modules/@elench/next-analysis/dist/api-routes.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/api-routes.js +66 -0
- package/node_modules/@elench/next-analysis/dist/api-routes.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/app-root.d.ts +2 -0
- package/node_modules/@elench/next-analysis/dist/app-root.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/app-root.js +7 -0
- package/node_modules/@elench/next-analysis/dist/app-root.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/backend-links.d.ts +8 -0
- package/node_modules/@elench/next-analysis/dist/backend-links.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/backend-links.js +30 -0
- package/node_modules/@elench/next-analysis/dist/backend-links.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/index.d.ts +11 -0
- package/node_modules/@elench/next-analysis/dist/index.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/index.js +10 -0
- package/node_modules/@elench/next-analysis/dist/index.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/pages.d.ts +7 -0
- package/node_modules/@elench/next-analysis/dist/pages.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/pages.js +47 -0
- package/node_modules/@elench/next-analysis/dist/pages.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/project.d.ts +3 -0
- package/node_modules/@elench/next-analysis/dist/project.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/project.js +102 -0
- package/node_modules/@elench/next-analysis/dist/project.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/route-tree.d.ts +7 -0
- package/node_modules/@elench/next-analysis/dist/route-tree.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/route-tree.js +575 -0
- package/node_modules/@elench/next-analysis/dist/route-tree.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/routes.d.ts +6 -0
- package/node_modules/@elench/next-analysis/dist/routes.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/routes.js +41 -0
- package/node_modules/@elench/next-analysis/dist/routes.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/server-actions.d.ts +7 -0
- package/node_modules/@elench/next-analysis/dist/server-actions.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/server-actions.js +37 -0
- package/node_modules/@elench/next-analysis/dist/server-actions.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/shared.d.ts +57 -0
- package/node_modules/@elench/next-analysis/dist/shared.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/shared.js +229 -0
- package/node_modules/@elench/next-analysis/dist/shared.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/swc.d.ts +53 -0
- package/node_modules/@elench/next-analysis/dist/swc.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/swc.js +387 -0
- package/node_modules/@elench/next-analysis/dist/swc.js.map +1 -0
- package/node_modules/@elench/next-analysis/dist/types.d.ts +125 -0
- package/node_modules/@elench/next-analysis/dist/types.d.ts.map +1 -0
- package/node_modules/@elench/next-analysis/dist/types.js +2 -0
- package/node_modules/@elench/next-analysis/dist/types.js.map +1 -0
- package/node_modules/@elench/next-analysis/package.json +27 -0
- package/node_modules/@elench/testkit-bridge/dist/index.d.ts +36 -0
- package/node_modules/@elench/testkit-bridge/dist/index.d.ts.map +1 -0
- package/node_modules/@elench/testkit-bridge/dist/index.js +538 -0
- package/node_modules/@elench/testkit-bridge/dist/index.js.map +1 -0
- package/node_modules/@elench/testkit-bridge/package.json +16 -5
- package/node_modules/@elench/testkit-protocol/dist/index.d.ts +190 -0
- package/node_modules/@elench/testkit-protocol/dist/index.d.ts.map +1 -0
- package/node_modules/@elench/testkit-protocol/dist/index.js +296 -0
- package/node_modules/@elench/testkit-protocol/dist/index.js.map +1 -0
- package/node_modules/@elench/testkit-protocol/package.json +14 -7
- package/node_modules/@elench/ts-analysis/dist/callables.d.ts +8 -0
- package/node_modules/@elench/ts-analysis/dist/callables.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/callables.js +126 -0
- package/node_modules/@elench/ts-analysis/dist/callables.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/exports.d.ts +6 -0
- package/node_modules/@elench/ts-analysis/dist/exports.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/exports.js +70 -0
- package/node_modules/@elench/ts-analysis/dist/exports.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/index.d.ts +10 -0
- package/node_modules/@elench/ts-analysis/dist/index.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/{src/index.mjs → dist/index.js} +9 -14
- package/node_modules/@elench/ts-analysis/dist/index.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/jsx.d.ts +9 -0
- package/node_modules/@elench/ts-analysis/dist/jsx.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/jsx.js +68 -0
- package/node_modules/@elench/ts-analysis/dist/jsx.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/project.d.ts +5 -0
- package/node_modules/@elench/ts-analysis/dist/project.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/project.js +90 -0
- package/node_modules/@elench/ts-analysis/dist/project.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/requests.d.ts +6 -0
- package/node_modules/@elench/ts-analysis/dist/requests.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/requests.js +140 -0
- package/node_modules/@elench/ts-analysis/dist/requests.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/resolution.d.ts +4 -0
- package/node_modules/@elench/ts-analysis/dist/resolution.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/resolution.js +53 -0
- package/node_modules/@elench/ts-analysis/dist/resolution.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/shared.d.ts +6 -0
- package/node_modules/@elench/ts-analysis/dist/shared.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/shared.js +31 -0
- package/node_modules/@elench/ts-analysis/dist/shared.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/syntax.d.ts +7 -0
- package/node_modules/@elench/ts-analysis/dist/syntax.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/syntax.js +27 -0
- package/node_modules/@elench/ts-analysis/dist/syntax.js.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/types.d.ts +58 -0
- package/node_modules/@elench/ts-analysis/dist/types.d.ts.map +1 -0
- package/node_modules/@elench/ts-analysis/dist/types.js +2 -0
- package/node_modules/@elench/ts-analysis/dist/types.js.map +1 -0
- package/node_modules/@elench/ts-analysis/package.json +18 -2
- package/node_modules/@next/routing/README.md +91 -0
- package/node_modules/@next/routing/dist/__tests__/captures.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/conditions.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/dynamic-after-rewrites.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/i18n-resolve-routes.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/i18n.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/middleware.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/normalize-next-data.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/redirects.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/resolve-routes.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/__tests__/rewrites.test.d.ts +1 -0
- package/node_modules/@next/routing/dist/destination.d.ts +22 -0
- package/node_modules/@next/routing/dist/i18n.d.ts +48 -0
- package/node_modules/@next/routing/dist/index.d.ts +5 -0
- package/node_modules/@next/routing/dist/index.js +1 -0
- package/node_modules/@next/routing/dist/matchers.d.ts +12 -0
- package/node_modules/@next/routing/dist/middleware.d.ts +12 -0
- package/node_modules/@next/routing/dist/next-data.d.ts +10 -0
- package/node_modules/@next/routing/dist/resolve-routes.d.ts +2 -0
- package/node_modules/@next/routing/dist/types.d.ts +97 -0
- package/node_modules/@next/routing/package.json +39 -0
- package/node_modules/@swc/core/README.md +100 -0
- package/node_modules/@swc/core/Visitor.d.ts +218 -0
- package/node_modules/@swc/core/Visitor.js +1399 -0
- package/node_modules/@swc/core/binding.d.ts +59 -0
- package/node_modules/@swc/core/binding.js +368 -0
- package/node_modules/@swc/core/index.d.ts +120 -0
- package/node_modules/@swc/core/index.js +443 -0
- package/node_modules/@swc/core/package.json +120 -0
- package/node_modules/@swc/core/postinstall.js +148 -0
- package/node_modules/@swc/core/spack.d.ts +51 -0
- package/node_modules/@swc/core/spack.js +87 -0
- package/node_modules/@swc/core/util.d.ts +1 -0
- package/node_modules/@swc/core/util.js +104 -0
- package/node_modules/@swc/core-linux-x64-gnu/README.md +3 -0
- package/node_modules/@swc/core-linux-x64-gnu/package.json +46 -0
- package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/node_modules/@swc/counter/CHANGELOG.md +7 -0
- package/node_modules/@swc/counter/README.md +7 -0
- package/node_modules/@swc/counter/index.js +1 -0
- package/node_modules/@swc/counter/package.json +27 -0
- package/node_modules/@swc/types/LICENSE +201 -0
- package/node_modules/@swc/types/README.md +4 -0
- package/node_modules/@swc/types/assumptions.d.ts +92 -0
- package/node_modules/@swc/types/assumptions.js +2 -0
- package/node_modules/@swc/types/index.d.ts +2049 -0
- package/node_modules/@swc/types/index.js +2 -0
- package/node_modules/@swc/types/package.json +40 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +50 -0
- package/node_modules/typescript/SECURITY.md +41 -0
- package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/typescript/lib/_tsc.js +133818 -0
- package/node_modules/typescript/lib/_tsserver.js +659 -0
- package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/lib.d.ts +22 -0
- package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tsc.js +8 -0
- package/node_modules/typescript/lib/tsserver.js +8 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/node_modules/typescript/lib/typescript.js +200276 -0
- package/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/package.json +120 -0
- package/package.json +13 -8
- package/lib/coverage/fs-walk.mjs +0 -64
- package/lib/coverage/next-discovery.mjs +0 -205
- package/lib/coverage/next-static-analysis.mjs +0 -1045
- package/node_modules/@elench/testkit-bridge/src/index.mjs +0 -583
- package/node_modules/@elench/testkit-bridge/src/index.test.mjs +0 -409
- package/node_modules/@elench/testkit-protocol/src/index.d.ts +0 -231
- package/node_modules/@elench/testkit-protocol/src/index.mjs +0 -265
- package/node_modules/@elench/testkit-protocol/src/index.test.mjs +0 -242
- package/node_modules/@elench/ts-analysis/src/callables.mjs +0 -135
- package/node_modules/@elench/ts-analysis/src/callables.test.mjs +0 -55
- package/node_modules/@elench/ts-analysis/src/exports.mjs +0 -69
- package/node_modules/@elench/ts-analysis/src/exports.test.mjs +0 -50
- package/node_modules/@elench/ts-analysis/src/jsx.mjs +0 -69
- package/node_modules/@elench/ts-analysis/src/jsx.test.mjs +0 -43
- package/node_modules/@elench/ts-analysis/src/project.mjs +0 -100
- package/node_modules/@elench/ts-analysis/src/project.test.mjs +0 -54
- package/node_modules/@elench/ts-analysis/src/requests.mjs +0 -141
- package/node_modules/@elench/ts-analysis/src/requests.test.mjs +0 -35
- package/node_modules/@elench/ts-analysis/src/resolution.mjs +0 -53
- package/node_modules/@elench/ts-analysis/src/shared.mjs +0 -32
- package/node_modules/@elench/ts-analysis/src/syntax.mjs +0 -27
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { finalizeServiceResult, summarizeDbBackend } from "./results.mjs";
|
|
2
|
+
import { buildLiveRunArtifact } from "./reporting.mjs";
|
|
3
|
+
import { writeLiveRunArtifact } from "./artifacts.mjs";
|
|
4
|
+
|
|
5
|
+
export function createLiveSnapshotWriter({
|
|
6
|
+
productDir,
|
|
7
|
+
configs,
|
|
8
|
+
trackers,
|
|
9
|
+
startedAt,
|
|
10
|
+
execution,
|
|
11
|
+
workerState,
|
|
12
|
+
selection,
|
|
13
|
+
metadata,
|
|
14
|
+
logRegistry,
|
|
15
|
+
setupRegistry,
|
|
16
|
+
}) {
|
|
17
|
+
return () => {
|
|
18
|
+
const now = Date.now();
|
|
19
|
+
const partialResults = configs.map((config) => finalizeServiceResult(trackers.get(config.name), startedAt, now));
|
|
20
|
+
writeLiveRunArtifact(
|
|
21
|
+
productDir,
|
|
22
|
+
buildLiveRunArtifact({
|
|
23
|
+
productDir,
|
|
24
|
+
results: partialResults,
|
|
25
|
+
startedAt,
|
|
26
|
+
updatedAt: now,
|
|
27
|
+
execution,
|
|
28
|
+
workerCount: workerState.workerCount,
|
|
29
|
+
runtimeInstanceCount: workerState.runtimeInstanceCount,
|
|
30
|
+
runtimeStats: workerState.runtimeStats,
|
|
31
|
+
typeValues: selection.typeValues,
|
|
32
|
+
suiteSelectors: selection.suiteSelectors,
|
|
33
|
+
fileNames: selection.fileNames,
|
|
34
|
+
shard: selection.shard,
|
|
35
|
+
serviceFilter: selection.serviceFilter,
|
|
36
|
+
scenarioSeed: selection.scenarioSeed,
|
|
37
|
+
metadata,
|
|
38
|
+
summarizeDbBackend,
|
|
39
|
+
serviceLogs: logRegistry.listServiceLogs(),
|
|
40
|
+
setupLogs: logRegistry.listSetupLogs(),
|
|
41
|
+
setupOperations: setupRegistry.listOperations(),
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { killChildProcess } from "./processes.mjs";
|
|
2
|
+
|
|
3
|
+
export function registerManagedProcess(lifecycle, subprocess, signal = "SIGINT") {
|
|
4
|
+
lifecycle.registerProcess(subprocess, () => {
|
|
5
|
+
killChildProcess(subprocess, signal);
|
|
6
|
+
});
|
|
7
|
+
if (lifecycle.isStopRequested()) {
|
|
8
|
+
interruptManagedProcess(subprocess, signal);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function unregisterManagedProcess(lifecycle, subprocess) {
|
|
13
|
+
lifecycle.unregisterProcess(subprocess.pid);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function registerManagedService(lifecycle, config, child, cwd, signal = "SIGTERM") {
|
|
17
|
+
lifecycle.registerService(config, child, cwd, () => {
|
|
18
|
+
killChildProcess(child, signal);
|
|
19
|
+
});
|
|
20
|
+
if (lifecycle.isStopRequested()) {
|
|
21
|
+
interruptManagedProcess(child, signal);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function interruptManagedProcess(subprocess, signal) {
|
|
26
|
+
const interruptSubprocess = () => killChildProcess(subprocess, signal);
|
|
27
|
+
if (subprocess.pid) interruptSubprocess();
|
|
28
|
+
else subprocess.once?.("spawn", interruptSubprocess);
|
|
29
|
+
}
|
|
@@ -12,26 +12,13 @@ import {
|
|
|
12
12
|
finalizeServiceResult,
|
|
13
13
|
recordGraphError,
|
|
14
14
|
recordTaskOutcome,
|
|
15
|
-
summarizeDbBackend,
|
|
16
15
|
} from "./results.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
applyKnownFailureIssueValidationToArtifacts,
|
|
20
|
-
applyKnownFailuresToArtifacts,
|
|
21
|
-
loadKnownFailuresConfig,
|
|
22
|
-
} from "./triage.mjs";
|
|
16
|
+
import { loadKnownFailuresConfig } from "./triage.mjs";
|
|
23
17
|
import { formatError } from "./formatting.mjs";
|
|
24
|
-
import {
|
|
25
|
-
shouldFailKnownFailureIssueValidation,
|
|
26
|
-
validateKnownFailureIssues,
|
|
27
|
-
} from "../known-failures/github.mjs";
|
|
28
18
|
import {
|
|
29
19
|
loadTimings,
|
|
30
20
|
resetResultArtifacts,
|
|
31
21
|
saveTimings,
|
|
32
|
-
writeLiveRunArtifact,
|
|
33
|
-
writeRunArtifact,
|
|
34
|
-
writeStatusArtifact,
|
|
35
22
|
} from "./artifacts.mjs";
|
|
36
23
|
import { createRunLogRegistry } from "./logs.mjs";
|
|
37
24
|
import { createSetupOperationRegistry } from "./setup-operations.mjs";
|
|
@@ -50,9 +37,9 @@ import {
|
|
|
50
37
|
import { resolveExecutionConfig } from "./execution-config.mjs";
|
|
51
38
|
import { createRuntimeManager } from "./runtime-manager.mjs";
|
|
52
39
|
import { createWorker, runWorker } from "./worker-loop.mjs";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
40
|
+
import { ensureRequestedFilesMatch, ensureStatusWriteAllowed } from "./run-guards.mjs";
|
|
41
|
+
import { createLiveSnapshotWriter } from "./live-run.mjs";
|
|
42
|
+
import { finalizeRunArtifacts } from "./run-finalization.mjs";
|
|
56
43
|
|
|
57
44
|
export async function runAll(configs, typeValues, suiteSelectors, opts, allConfigs = configs) {
|
|
58
45
|
const configMap = new Map(allConfigs.map((config) => [config.name, config]));
|
|
@@ -75,42 +62,14 @@ export async function runAll(configs, typeValues, suiteSelectors, opts, allConfi
|
|
|
75
62
|
);
|
|
76
63
|
const reporter = opts.reporter || null;
|
|
77
64
|
const logRegistry = createRunLogRegistry(productDir);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
const workerState = {
|
|
66
|
+
workerCount: 0,
|
|
67
|
+
runtimeInstanceCount: 0,
|
|
68
|
+
runtimeStats: [],
|
|
69
|
+
};
|
|
81
70
|
const requestedFiles = opts.fileNames || [];
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
configs,
|
|
85
|
-
typeValues,
|
|
86
|
-
suiteSelectors,
|
|
87
|
-
requestedFiles,
|
|
88
|
-
collectSuites,
|
|
89
|
-
normalizePathSeparators
|
|
90
|
-
);
|
|
91
|
-
if (unmatchedFiles.length > 0) {
|
|
92
|
-
throw new Error(
|
|
93
|
-
`Requested file${unmatchedFiles.length === 1 ? "" : "s"} did not match any selected suites:\n` +
|
|
94
|
-
unmatchedFiles.map((file) => `- ${file}`).join("\n")
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (
|
|
99
|
-
opts.writeStatus &&
|
|
100
|
-
!opts.allowPartialStatus &&
|
|
101
|
-
!isFullRunSelection(
|
|
102
|
-
typeValues,
|
|
103
|
-
suiteSelectors,
|
|
104
|
-
requestedFiles,
|
|
105
|
-
opts.shard || null,
|
|
106
|
-
opts.serviceFilter || null
|
|
107
|
-
)
|
|
108
|
-
) {
|
|
109
|
-
throw new Error(
|
|
110
|
-
"Refusing to overwrite testkit.status.json from a filtered run. " +
|
|
111
|
-
"Run the full suite with --write-status, or pass --allow-partial-status to opt in."
|
|
112
|
-
);
|
|
113
|
-
}
|
|
71
|
+
ensureRequestedFilesMatch(configs, typeValues, suiteSelectors, requestedFiles);
|
|
72
|
+
ensureStatusWriteAllowed(opts, typeValues, suiteSelectors, requestedFiles);
|
|
114
73
|
|
|
115
74
|
const execution = resolveExecutionConfig({
|
|
116
75
|
cli: opts,
|
|
@@ -126,39 +85,26 @@ export async function runAll(configs, typeValues, suiteSelectors, opts, allConfi
|
|
|
126
85
|
reporter
|
|
127
86
|
);
|
|
128
87
|
const trackers = buildServiceTrackers(servicePlans, startedAt);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
fileNames: requestedFiles,
|
|
148
|
-
shard: opts.shard || null,
|
|
149
|
-
serviceFilter: opts.serviceFilter || null,
|
|
150
|
-
scenarioSeed: opts.scenarioSeed || null,
|
|
151
|
-
metadata,
|
|
152
|
-
summarizeDbBackend,
|
|
153
|
-
serviceLogs: logRegistry.listServiceLogs(),
|
|
154
|
-
setupLogs: logRegistry.listSetupLogs(),
|
|
155
|
-
setupOperations: setupRegistry.listOperations(),
|
|
156
|
-
})
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
const setupRegistry = createSetupOperationRegistry({
|
|
88
|
+
let writeLiveSnapshot = () => {};
|
|
89
|
+
const setupRegistry = createSetupOperationRegistry({ logRegistry, onChange: () => writeLiveSnapshot() });
|
|
90
|
+
writeLiveSnapshot = createLiveSnapshotWriter({
|
|
91
|
+
productDir,
|
|
92
|
+
configs,
|
|
93
|
+
trackers,
|
|
94
|
+
startedAt,
|
|
95
|
+
execution,
|
|
96
|
+
workerState,
|
|
97
|
+
selection: {
|
|
98
|
+
typeValues,
|
|
99
|
+
suiteSelectors,
|
|
100
|
+
fileNames: requestedFiles,
|
|
101
|
+
shard: opts.shard || null,
|
|
102
|
+
serviceFilter: opts.serviceFilter || null,
|
|
103
|
+
scenarioSeed: opts.scenarioSeed || null,
|
|
104
|
+
},
|
|
105
|
+
metadata,
|
|
160
106
|
logRegistry,
|
|
161
|
-
|
|
107
|
+
setupRegistry,
|
|
162
108
|
});
|
|
163
109
|
const executedPlans = servicePlans.filter((plan) => !plan.skipped);
|
|
164
110
|
let exitCode = 0;
|
|
@@ -178,9 +124,9 @@ export async function runAll(configs, typeValues, suiteSelectors, opts, allConfi
|
|
|
178
124
|
for (const task of queue) {
|
|
179
125
|
task.scenarioSeed = opts.scenarioSeed || null;
|
|
180
126
|
}
|
|
181
|
-
workerCount = Math.max(1, Math.min(execution.workers, queue.length));
|
|
182
|
-
runtimeInstanceCount = graphs.reduce((sum, graph) => sum + graph.instanceCount, 0);
|
|
183
|
-
const workers = Array.from({ length: workerCount }, (_unused, index) =>
|
|
127
|
+
workerState.workerCount = Math.max(1, Math.min(execution.workers, queue.length));
|
|
128
|
+
workerState.runtimeInstanceCount = graphs.reduce((sum, graph) => sum + graph.instanceCount, 0);
|
|
129
|
+
const workers = Array.from({ length: workerState.workerCount }, (_unused, index) =>
|
|
184
130
|
createWorker(index + 1, productDir)
|
|
185
131
|
);
|
|
186
132
|
const runtimeManager = createRuntimeManager({
|
|
@@ -228,7 +174,7 @@ export async function runAll(configs, typeValues, suiteSelectors, opts, allConfi
|
|
|
228
174
|
writeLiveSnapshot();
|
|
229
175
|
}
|
|
230
176
|
}
|
|
231
|
-
runtimeStats = runtimeManager.getStats();
|
|
177
|
+
workerState.runtimeStats = runtimeManager.getStats();
|
|
232
178
|
writeLiveSnapshot();
|
|
233
179
|
} finally {
|
|
234
180
|
await runtimeManager.cleanupAll();
|
|
@@ -241,85 +187,41 @@ export async function runAll(configs, typeValues, suiteSelectors, opts, allConfi
|
|
|
241
187
|
results = configs.map((config) =>
|
|
242
188
|
finalizeServiceResult(trackers.get(config.name), startedAt, finishedAt)
|
|
243
189
|
);
|
|
244
|
-
const
|
|
190
|
+
const finalized = await finalizeRunArtifacts({
|
|
245
191
|
productDir,
|
|
246
192
|
results,
|
|
247
193
|
startedAt,
|
|
248
194
|
finishedAt,
|
|
249
195
|
execution,
|
|
250
|
-
workerCount,
|
|
251
|
-
runtimeInstanceCount,
|
|
252
|
-
runtimeStats,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
serviceLogs: logRegistry.listServiceLogs(),
|
|
262
|
-
setupLogs: logRegistry.listSetupLogs(),
|
|
263
|
-
setupOperations: setupRegistry.listOperations(),
|
|
264
|
-
});
|
|
265
|
-
const statusArtifact = opts.writeStatus
|
|
266
|
-
? buildStatusArtifact({
|
|
267
|
-
productDir,
|
|
268
|
-
results,
|
|
269
|
-
typeValues,
|
|
270
|
-
suiteSelectors,
|
|
271
|
-
fileNames: requestedFiles,
|
|
272
|
-
shard: opts.shard || null,
|
|
273
|
-
serviceFilter: opts.serviceFilter || null,
|
|
274
|
-
scenarioSeed: opts.scenarioSeed || null,
|
|
196
|
+
workerCount: workerState.workerCount,
|
|
197
|
+
runtimeInstanceCount: workerState.runtimeInstanceCount,
|
|
198
|
+
runtimeStats: workerState.runtimeStats,
|
|
199
|
+
selection: {
|
|
200
|
+
typeValues,
|
|
201
|
+
suiteSelectors,
|
|
202
|
+
fileNames: requestedFiles,
|
|
203
|
+
shard: opts.shard || null,
|
|
204
|
+
serviceFilter: opts.serviceFilter || null,
|
|
205
|
+
scenarioSeed: opts.scenarioSeed || null,
|
|
206
|
+
},
|
|
275
207
|
metadata,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
knownFailureIssueValidation = await validateKnownFailureIssues({
|
|
284
|
-
productDir,
|
|
285
|
-
document: knownFailures,
|
|
286
|
-
runArtifact: enrichedArtifacts.runArtifact,
|
|
287
|
-
statusArtifact: enrichedArtifacts.statusArtifact,
|
|
288
|
-
config: configs[0]?.testkit?.reporting?.issueValidation || null,
|
|
289
|
-
gitMetadata: metadata.git,
|
|
208
|
+
logRegistry,
|
|
209
|
+
setupRegistry,
|
|
210
|
+
knownFailures,
|
|
211
|
+
issueValidationConfig: configs[0]?.testkit?.reporting?.issueValidation || null,
|
|
212
|
+
telemetry,
|
|
213
|
+
reporter,
|
|
214
|
+
writeStatus: opts.writeStatus,
|
|
290
215
|
});
|
|
291
|
-
|
|
292
|
-
enrichedArtifacts.runArtifact,
|
|
293
|
-
enrichedArtifacts.statusArtifact,
|
|
294
|
-
knownFailureIssueValidation
|
|
295
|
-
);
|
|
296
|
-
attachKnownFailureIssueValidation(
|
|
297
|
-
enrichedArtifacts.runArtifact,
|
|
298
|
-
enrichedArtifacts.statusArtifact,
|
|
299
|
-
knownFailureIssueValidation
|
|
300
|
-
);
|
|
301
|
-
|
|
302
|
-
writeRunArtifact(productDir, enrichedArtifacts.runArtifact);
|
|
303
|
-
if (opts.writeStatus) {
|
|
304
|
-
writeStatusArtifact(productDir, enrichedArtifacts.statusArtifact);
|
|
305
|
-
}
|
|
306
|
-
const nextHistory = updateHistoryFromRunArtifact(
|
|
307
|
-
loadHistory(productDir),
|
|
308
|
-
enrichedArtifacts.runArtifact,
|
|
309
|
-
enrichedArtifacts.runArtifact.generatedAt
|
|
310
|
-
);
|
|
311
|
-
saveHistory(productDir, nextHistory);
|
|
312
|
-
|
|
313
|
-
reporter?.runSummary?.(results, finishedAt - startedAt, knownFailureIssueValidation);
|
|
314
|
-
await reportTelemetry(telemetry, enrichedArtifacts.runArtifact, reporter);
|
|
216
|
+
knownFailureIssueValidation = finalized.knownFailureIssueValidation;
|
|
315
217
|
if (results.some((result) => result.failed)) exitCode = 1;
|
|
316
|
-
if (
|
|
218
|
+
if (finalized.shouldFailIssueValidation) {
|
|
317
219
|
exitCode = 1;
|
|
318
220
|
}
|
|
319
221
|
if (lifecycle.isStopRequested()) exitCode = Math.max(exitCode, 130);
|
|
320
222
|
return {
|
|
321
|
-
runArtifact:
|
|
322
|
-
statusArtifact:
|
|
223
|
+
runArtifact: finalized.runArtifact,
|
|
224
|
+
statusArtifact: finalized.statusArtifact,
|
|
323
225
|
results,
|
|
324
226
|
exitCode,
|
|
325
227
|
};
|
|
@@ -386,36 +288,3 @@ function collectServicePlans(configs, configMap, typeValues, suiteSelectors, opt
|
|
|
386
288
|
};
|
|
387
289
|
});
|
|
388
290
|
}
|
|
389
|
-
|
|
390
|
-
async function reportTelemetry(telemetry, artifact, reporter = null) {
|
|
391
|
-
if (!telemetry?.enabled) return;
|
|
392
|
-
|
|
393
|
-
try {
|
|
394
|
-
const outcome = await uploadTelemetryArtifact(telemetry, artifact);
|
|
395
|
-
if (outcome?.ok) {
|
|
396
|
-
reporter?.telemetry?.("Telemetry: uploaded run artifact");
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
if (outcome?.reason === "missing-token") {
|
|
400
|
-
reporter?.telemetry?.(
|
|
401
|
-
`Telemetry: skipped upload because ${telemetry.tokenEnv || "configured token env"} is not set`
|
|
402
|
-
);
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
if (outcome?.reason && !outcome.skipped) return;
|
|
406
|
-
} catch (error) {
|
|
407
|
-
reporter?.telemetry?.(`Telemetry: upload failed (${formatError(error)})`);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function normalizePathSeparators(filePath) {
|
|
412
|
-
return filePath.split("\\").join("/");
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
function attachKnownFailureIssueValidation(runArtifact, statusArtifact, validation) {
|
|
416
|
-
if (!validation) return;
|
|
417
|
-
runArtifact.knownFailuresIssueValidation = validation;
|
|
418
|
-
if (statusArtifact) {
|
|
419
|
-
statusArtifact.knownFailuresIssueValidation = validation;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { execa } from "execa";
|
|
3
3
|
import { parsePlaywrightJsonResults } from "../reporters/playwright.mjs";
|
|
4
|
-
import { resolveServiceCwd } from "../config/
|
|
4
|
+
import { resolveServiceCwd } from "../config/paths.mjs";
|
|
5
5
|
import { formatFileTimeoutBudgetError } from "../shared/file-timeout.mjs";
|
|
6
6
|
import { persistTaskOutputArtifacts } from "./artifacts.mjs";
|
|
7
7
|
import { settleSubprocess } from "./default-runtime-runner.mjs";
|
|
8
8
|
import { ensurePlaywrightTestConfig } from "./playwright-config.mjs";
|
|
9
|
+
import { registerManagedProcess, unregisterManagedProcess } from "./managed-processes.mjs";
|
|
9
10
|
import { normalizePathSeparators } from "./state.mjs";
|
|
10
11
|
import { buildPlaywrightEnv } from "./template.mjs";
|
|
11
|
-
import { killChildProcess } from "./processes.mjs";
|
|
12
12
|
|
|
13
13
|
export async function runPlaywrightTask(targetConfig, task, lifecycle, lease, reporter = null) {
|
|
14
14
|
const local = targetConfig.testkit.local;
|
|
@@ -36,21 +36,14 @@ export async function runPlaywrightTask(targetConfig, task, lifecycle, lease, re
|
|
|
36
36
|
forceKillAfterDelay: 5_000,
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
lifecycle
|
|
40
|
-
killChildProcess(subprocess, "SIGINT");
|
|
41
|
-
});
|
|
42
|
-
if (lifecycle.isStopRequested()) {
|
|
43
|
-
const interruptSubprocess = () => killChildProcess(subprocess, "SIGINT");
|
|
44
|
-
if (subprocess.pid) interruptSubprocess();
|
|
45
|
-
else subprocess.once?.("spawn", interruptSubprocess);
|
|
46
|
-
}
|
|
39
|
+
registerManagedProcess(lifecycle, subprocess, "SIGINT");
|
|
47
40
|
reporter?.taskStarted?.(task, targetConfig);
|
|
48
41
|
let result;
|
|
49
42
|
let timedOut;
|
|
50
43
|
try {
|
|
51
44
|
({ result, timedOut } = await settleSubprocess(subprocess, fileTimeoutSeconds));
|
|
52
45
|
} finally {
|
|
53
|
-
lifecycle
|
|
46
|
+
unregisterManagedProcess(lifecycle, subprocess);
|
|
54
47
|
}
|
|
55
48
|
|
|
56
49
|
const parsed = parsePlaywrightJsonResults(result.stdout || "", cwd);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { buildRunArtifact, buildStatusArtifact } from "./reporting.mjs";
|
|
2
|
+
import { applyKnownFailureIssueValidationToArtifacts, applyKnownFailuresToArtifacts } from "./triage.mjs";
|
|
3
|
+
import { writeRunArtifact, writeStatusArtifact } from "./artifacts.mjs";
|
|
4
|
+
import { summarizeDbBackend } from "./results.mjs";
|
|
5
|
+
import { formatError } from "./formatting.mjs";
|
|
6
|
+
import { uploadTelemetryArtifact } from "../telemetry/index.mjs";
|
|
7
|
+
import { loadHistory, saveHistory, updateHistoryFromRunArtifact } from "../history/index.mjs";
|
|
8
|
+
import { shouldFailKnownFailureIssueValidation, validateKnownFailureIssues } from "../known-failures/github.mjs";
|
|
9
|
+
|
|
10
|
+
export async function finalizeRunArtifacts({
|
|
11
|
+
productDir,
|
|
12
|
+
results,
|
|
13
|
+
startedAt,
|
|
14
|
+
finishedAt,
|
|
15
|
+
execution,
|
|
16
|
+
workerCount,
|
|
17
|
+
runtimeInstanceCount,
|
|
18
|
+
runtimeStats,
|
|
19
|
+
selection,
|
|
20
|
+
metadata,
|
|
21
|
+
logRegistry,
|
|
22
|
+
setupRegistry,
|
|
23
|
+
knownFailures,
|
|
24
|
+
issueValidationConfig,
|
|
25
|
+
telemetry,
|
|
26
|
+
reporter,
|
|
27
|
+
writeStatus,
|
|
28
|
+
}) {
|
|
29
|
+
const runArtifact = buildRunArtifact({
|
|
30
|
+
productDir,
|
|
31
|
+
results,
|
|
32
|
+
startedAt,
|
|
33
|
+
finishedAt,
|
|
34
|
+
execution,
|
|
35
|
+
workerCount,
|
|
36
|
+
runtimeInstanceCount,
|
|
37
|
+
runtimeStats,
|
|
38
|
+
typeValues: selection.typeValues,
|
|
39
|
+
suiteSelectors: selection.suiteSelectors,
|
|
40
|
+
fileNames: selection.fileNames,
|
|
41
|
+
shard: selection.shard,
|
|
42
|
+
serviceFilter: selection.serviceFilter,
|
|
43
|
+
scenarioSeed: selection.scenarioSeed,
|
|
44
|
+
metadata,
|
|
45
|
+
summarizeDbBackend,
|
|
46
|
+
serviceLogs: logRegistry.listServiceLogs(),
|
|
47
|
+
setupLogs: logRegistry.listSetupLogs(),
|
|
48
|
+
setupOperations: setupRegistry.listOperations(),
|
|
49
|
+
});
|
|
50
|
+
const statusArtifact = writeStatus
|
|
51
|
+
? buildStatusArtifact({
|
|
52
|
+
productDir,
|
|
53
|
+
results,
|
|
54
|
+
typeValues: selection.typeValues,
|
|
55
|
+
suiteSelectors: selection.suiteSelectors,
|
|
56
|
+
fileNames: selection.fileNames,
|
|
57
|
+
shard: selection.shard,
|
|
58
|
+
serviceFilter: selection.serviceFilter,
|
|
59
|
+
scenarioSeed: selection.scenarioSeed,
|
|
60
|
+
metadata,
|
|
61
|
+
})
|
|
62
|
+
: null;
|
|
63
|
+
const enrichedArtifacts = applyKnownFailuresToArtifacts(runArtifact, statusArtifact, knownFailures);
|
|
64
|
+
const knownFailureIssueValidation = await validateKnownFailureIssues({
|
|
65
|
+
productDir,
|
|
66
|
+
document: knownFailures,
|
|
67
|
+
runArtifact: enrichedArtifacts.runArtifact,
|
|
68
|
+
statusArtifact: enrichedArtifacts.statusArtifact,
|
|
69
|
+
config: issueValidationConfig,
|
|
70
|
+
gitMetadata: metadata.git,
|
|
71
|
+
});
|
|
72
|
+
applyKnownFailureIssueValidationToArtifacts(
|
|
73
|
+
enrichedArtifacts.runArtifact,
|
|
74
|
+
enrichedArtifacts.statusArtifact,
|
|
75
|
+
knownFailureIssueValidation
|
|
76
|
+
);
|
|
77
|
+
attachKnownFailureIssueValidation(
|
|
78
|
+
enrichedArtifacts.runArtifact,
|
|
79
|
+
enrichedArtifacts.statusArtifact,
|
|
80
|
+
knownFailureIssueValidation
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
writeRunArtifact(productDir, enrichedArtifacts.runArtifact);
|
|
84
|
+
if (writeStatus) {
|
|
85
|
+
writeStatusArtifact(productDir, enrichedArtifacts.statusArtifact);
|
|
86
|
+
}
|
|
87
|
+
const nextHistory = updateHistoryFromRunArtifact(
|
|
88
|
+
loadHistory(productDir),
|
|
89
|
+
enrichedArtifacts.runArtifact,
|
|
90
|
+
enrichedArtifacts.runArtifact.generatedAt
|
|
91
|
+
);
|
|
92
|
+
saveHistory(productDir, nextHistory);
|
|
93
|
+
|
|
94
|
+
reporter?.runSummary?.(results, finishedAt - startedAt, knownFailureIssueValidation);
|
|
95
|
+
await reportTelemetry(telemetry, enrichedArtifacts.runArtifact, reporter);
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
runArtifact: enrichedArtifacts.runArtifact,
|
|
99
|
+
statusArtifact: enrichedArtifacts.statusArtifact,
|
|
100
|
+
knownFailureIssueValidation,
|
|
101
|
+
shouldFailIssueValidation: shouldFailKnownFailureIssueValidation(knownFailureIssueValidation),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function reportTelemetry(telemetry, artifact, reporter = null) {
|
|
106
|
+
if (!telemetry?.enabled) return;
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
const outcome = await uploadTelemetryArtifact(telemetry, artifact);
|
|
110
|
+
if (outcome?.ok) {
|
|
111
|
+
reporter?.telemetry?.("Telemetry: uploaded run artifact");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (outcome?.reason === "missing-token") {
|
|
115
|
+
reporter?.telemetry?.(
|
|
116
|
+
`Telemetry: skipped upload because ${telemetry.tokenEnv || "configured token env"} is not set`
|
|
117
|
+
);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (outcome?.reason && !outcome.skipped) return;
|
|
121
|
+
} catch (error) {
|
|
122
|
+
reporter?.telemetry?.(`Telemetry: upload failed (${formatError(error)})`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function attachKnownFailureIssueValidation(runArtifact, statusArtifact, validation) {
|
|
127
|
+
if (!validation) return;
|
|
128
|
+
runArtifact.knownFailuresIssueValidation = validation;
|
|
129
|
+
if (statusArtifact) {
|
|
130
|
+
statusArtifact.knownFailuresIssueValidation = validation;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { collectSuites } from "./planning.mjs";
|
|
2
|
+
import { findUnmatchedRequestedFiles, isFullRunSelection } from "./selection.mjs";
|
|
3
|
+
|
|
4
|
+
export function ensureRequestedFilesMatch(configs, typeValues, suiteSelectors, requestedFiles = []) {
|
|
5
|
+
if (requestedFiles.length === 0) return;
|
|
6
|
+
const unmatchedFiles = findUnmatchedRequestedFiles(
|
|
7
|
+
configs,
|
|
8
|
+
typeValues,
|
|
9
|
+
suiteSelectors,
|
|
10
|
+
requestedFiles,
|
|
11
|
+
collectSuites,
|
|
12
|
+
normalizePathSeparators
|
|
13
|
+
);
|
|
14
|
+
if (unmatchedFiles.length === 0) return;
|
|
15
|
+
|
|
16
|
+
throw new Error(
|
|
17
|
+
`Requested file${unmatchedFiles.length === 1 ? "" : "s"} did not match any selected suites:\n` +
|
|
18
|
+
unmatchedFiles.map((file) => `- ${file}`).join("\n")
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function ensureStatusWriteAllowed(opts, typeValues, suiteSelectors, requestedFiles = []) {
|
|
23
|
+
if (
|
|
24
|
+
!opts.writeStatus ||
|
|
25
|
+
opts.allowPartialStatus ||
|
|
26
|
+
isFullRunSelection(
|
|
27
|
+
typeValues,
|
|
28
|
+
suiteSelectors,
|
|
29
|
+
requestedFiles,
|
|
30
|
+
opts.shard || null,
|
|
31
|
+
opts.serviceFilter || null
|
|
32
|
+
)
|
|
33
|
+
) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
throw new Error(
|
|
38
|
+
"Refusing to overwrite testkit.status.json from a filtered run. " +
|
|
39
|
+
"Run the full suite with --write-status, or pass --allow-partial-status to opt in."
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function normalizePathSeparators(filePath) {
|
|
44
|
+
return filePath.split("\\").join("/");
|
|
45
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import crypto from "crypto";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { resolveServiceCwd } from "../config/
|
|
4
|
+
import { resolveServiceCwd } from "../config/paths.mjs";
|
|
5
5
|
import { appendFileToHash, appendInputToHash } from "../database/fingerprint.mjs";
|
|
6
6
|
import { announceResolvedToolchain, resolveConfiguredToolchain } from "../toolchains/index.mjs";
|
|
7
7
|
import { readDatabaseUrl } from "./state-io.mjs";
|
package/lib/runner/services.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { resolveServiceCwd } from "../config/
|
|
1
|
+
import { resolveServiceCwd } from "../config/paths.mjs";
|
|
2
2
|
import {
|
|
3
3
|
announceResolvedToolchain,
|
|
4
4
|
applyToolchainEnv,
|
|
5
5
|
resolveConfiguredToolchain,
|
|
6
6
|
} from "../toolchains/index.mjs";
|
|
7
|
+
import { registerManagedService } from "./managed-processes.mjs";
|
|
7
8
|
import { buildExecutionEnv, numericPortFromUrl } from "./template.mjs";
|
|
8
9
|
import { DEFAULT_READY_TIMEOUT_MS, assertLocalServicePortsAvailable, isPortInUse, waitForReady } from "./readiness.mjs";
|
|
9
10
|
import { captureOutput, killChildProcess, startDetachedCommand, stopChildProcess, sleep } from "./processes.mjs";
|
|
@@ -70,9 +71,7 @@ export async function startLocalService(config, lifecycle, options = {}) {
|
|
|
70
71
|
},
|
|
71
72
|
}),
|
|
72
73
|
];
|
|
73
|
-
lifecycle
|
|
74
|
-
killChildProcess(child, "SIGTERM");
|
|
75
|
-
});
|
|
74
|
+
registerManagedService(lifecycle, config, child, cwd, "SIGTERM");
|
|
76
75
|
|
|
77
76
|
const readyTimeoutMs = config.testkit.local.readyTimeoutMs || DEFAULT_READY_TIMEOUT_MS;
|
|
78
77
|
|