@capyclaw/browser-suite 0.2.36 → 0.2.37
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/composition.lock.json +3 -3
- package/contract/browser-contract.json +1 -1
- package/dsh-suite.json +5 -5
- package/node_modules/@capyclaw/asset-service/src/index.mjs +86 -5
- package/node_modules/@capyclaw/browser-skill-api/contract/browser-contract.json +1 -1
- package/node_modules/@capyclaw/browser-skill-api/skills/browser-api/references/tool-contract.md +1 -1
- package/node_modules/@capyclaw/browser-skill-browser/contract/browser-contract.json +1 -1
- package/node_modules/@capyclaw/browser-skill-ops/contract/browser-contract.json +1 -1
- package/node_modules/@capyclaw/browser-workbench/contract/browser-contract.json +1 -1
- package/node_modules/@capyclaw/browser-workbench/package.json +1 -1
- package/node_modules/@capyclaw/browser-workbench/server/contract.mjs +1 -1
- package/node_modules/@capyclaw/browser-workbench/server/session-engines.mjs +39 -0
- package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +17 -5
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +11 -10
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +8 -1
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +31 -3
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +13 -6
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +31 -15
- package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +28 -4
- package/node_modules/@capyclaw/tool-host/src/index.mjs +32 -6
- package/package.json +5 -6
- package/node_modules/playwright/LICENSE +0 -202
- package/node_modules/playwright/NOTICE +0 -5
- package/node_modules/playwright/README.md +0 -318
- package/node_modules/playwright/ThirdPartyNotices.txt +0 -14
- package/node_modules/playwright/cli.js +0 -19
- package/node_modules/playwright/index.d.ts +0 -17
- package/node_modules/playwright/index.js +0 -17
- package/node_modules/playwright/index.mjs +0 -18
- package/node_modules/playwright/lib/agents/agentParser.js +0 -89
- package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +0 -34
- package/node_modules/playwright/lib/agents/generateAgents.js +0 -395
- package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +0 -31
- package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +0 -8
- package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +0 -88
- package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +0 -6
- package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +0 -56
- package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +0 -9
- package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +0 -74
- package/node_modules/playwright/lib/cli/reportActions.js +0 -78
- package/node_modules/playwright/lib/cli/testActions.js +0 -217
- package/node_modules/playwright/lib/common/index.js +0 -2937
- package/node_modules/playwright/lib/common/index.js.txt +0 -33
- package/node_modules/playwright/lib/errorContext.js +0 -129
- package/node_modules/playwright/lib/globals.js +0 -58
- package/node_modules/playwright/lib/index.js +0 -827
- package/node_modules/playwright/lib/isomorphic.js +0 -260
- package/node_modules/playwright/lib/isomorphic.js.txt +0 -9
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js +0 -34
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +0 -9
- package/node_modules/playwright/lib/matchers/expect.js +0 -13496
- package/node_modules/playwright/lib/matchers/expect.js.LICENSE +0 -640
- package/node_modules/playwright/lib/matchers/expect.js.txt +0 -67
- package/node_modules/playwright/lib/package.js +0 -47
- package/node_modules/playwright/lib/program.js +0 -242
- package/node_modules/playwright/lib/runner/index.js +0 -8721
- package/node_modules/playwright/lib/runner/index.js.txt +0 -62
- package/node_modules/playwright/lib/transform/babelBundle.js +0 -72490
- package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +0 -2384
- package/node_modules/playwright/lib/transform/babelBundle.js.txt +0 -328
- package/node_modules/playwright/lib/transform/esmLoader.js +0 -8066
- package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +0 -355
- package/node_modules/playwright/lib/transform/esmLoader.js.txt +0 -60
- package/node_modules/playwright/lib/util.js +0 -373
- package/node_modules/playwright/lib/worker/workerProcessEntry.js +0 -1860
- package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +0 -19
- package/node_modules/playwright/package.json +0 -50
- package/node_modules/playwright/test.d.ts +0 -18
- package/node_modules/playwright/test.js +0 -24
- package/node_modules/playwright/test.mjs +0 -35
- package/node_modules/playwright/types/test.d.ts +0 -11191
- package/node_modules/playwright/types/testReporter.d.ts +0 -950
- package/node_modules/playwright-core/LICENSE +0 -202
- package/node_modules/playwright-core/NOTICE +0 -5
- package/node_modules/playwright-core/README.md +0 -3
- package/node_modules/playwright-core/ThirdPartyNotices.txt +0 -13
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -33
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
- package/node_modules/playwright-core/browsers.json +0 -52
- package/node_modules/playwright-core/cli.js +0 -22
- package/node_modules/playwright-core/index.d.ts +0 -17
- package/node_modules/playwright-core/index.js +0 -17
- package/node_modules/playwright-core/index.mjs +0 -28
- package/node_modules/playwright-core/lib/bootstrap.js +0 -149
- package/node_modules/playwright-core/lib/coreBundle.js +0 -78041
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +0 -5
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +0 -3
- package/node_modules/playwright-core/lib/entry/mcp.js +0 -10
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +0 -3
- package/node_modules/playwright-core/lib/package.js +0 -50
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +0 -123
- package/node_modules/playwright-core/lib/serverRegistry.js +0 -1939
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +0 -65
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +0 -141
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +0 -7
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +0 -808
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +0 -128
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +0 -352
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +0 -422
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +0 -180
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +0 -261
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +0 -493
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +0 -23
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +0 -39
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +0 -60
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +0 -87
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +0 -245
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +0 -227
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +0 -275
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +0 -433
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +0 -139
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +0 -216
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +0 -136
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +0 -144
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +0 -89
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +0 -69
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +0 -173
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +0 -77
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +0 -174
- package/node_modules/playwright-core/lib/tools/utils/extension.js +0 -112
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +0 -108
- package/node_modules/playwright-core/lib/utilsBundle.js +0 -86078
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +0 -1890
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +0 -32
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +0 -12
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +0 -29
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +0 -24
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -16
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +0 -2
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +0 -32
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +0 -1
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +0 -32
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +0 -1
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +0 -129
- package/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +0 -32
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +0 -184
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +0 -7
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -44
- package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -10
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -4
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +0 -5
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -18
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +0 -1
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +0 -173
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +0 -1267
- package/node_modules/playwright-core/package.json +0 -34
- package/node_modules/playwright-core/types/protocol.d.ts +0 -24776
- package/node_modules/playwright-core/types/structs.d.ts +0 -52
- package/node_modules/playwright-core/types/types.d.ts +0 -27167
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# packages/playwright/lib/common/index.js
|
|
2
|
-
# total: 113.6 KB
|
|
3
|
-
|
|
4
|
-
## Inlined (20)
|
|
5
|
-
12.5 KB packages/playwright/src/common/config.ts
|
|
6
|
-
13.8 KB packages/playwright/src/common/configLoader.ts
|
|
7
|
-
11.5 KB packages/playwright/src/common/fixtures.ts
|
|
8
|
-
0.8 KB packages/playwright/src/common/index.ts
|
|
9
|
-
1.3 KB packages/playwright/src/common/ipc.ts
|
|
10
|
-
2.1 KB packages/playwright/src/common/poolBuilder.ts
|
|
11
|
-
3.9 KB packages/playwright/src/common/process.ts
|
|
12
|
-
4.9 KB packages/playwright/src/common/suiteUtils.ts
|
|
13
|
-
8.7 KB packages/playwright/src/common/test.ts
|
|
14
|
-
2.0 KB packages/playwright/src/common/testLoader.ts
|
|
15
|
-
12.9 KB packages/playwright/src/common/testType.ts
|
|
16
|
-
1.4 KB packages/playwright/src/common/validators.ts
|
|
17
|
-
1.3 KB packages/playwright/src/isomorphic/teleReceiver.ts
|
|
18
|
-
7.8 KB packages/playwright/src/transform/compilationCache.ts
|
|
19
|
-
1.7 KB packages/playwright/src/transform/esmLoaderSync.ts
|
|
20
|
-
1.1 KB packages/playwright/src/transform/pirates.ts
|
|
21
|
-
1.1 KB packages/playwright/src/transform/portTransport.ts
|
|
22
|
-
12.0 KB packages/playwright/src/transform/transform.ts
|
|
23
|
-
3.2 KB packages/playwright/src/transform/tsconfig-loader.ts
|
|
24
|
-
7.0 KB packages/playwright/src/util.ts
|
|
25
|
-
|
|
26
|
-
## External (7)
|
|
27
|
-
../globals
|
|
28
|
-
../matchers/expect
|
|
29
|
-
../package
|
|
30
|
-
../transform/esmLoader.js
|
|
31
|
-
playwright-core/lib/bootstrap
|
|
32
|
-
playwright-core/lib/coreBundle
|
|
33
|
-
playwright-core/lib/utilsBundle
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var errorContext_exports = {};
|
|
30
|
-
__export(errorContext_exports, {
|
|
31
|
-
buildErrorContext: () => buildErrorContext
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(errorContext_exports);
|
|
34
|
-
var import_fs = __toESM(require("fs"));
|
|
35
|
-
var import_util = require("./util");
|
|
36
|
-
const { parseErrorStack } = require("playwright-core/lib/coreBundle").utils;
|
|
37
|
-
const { stripAnsiEscapes } = require("playwright-core/lib/coreBundle").iso;
|
|
38
|
-
const fixTestInstructions = `# Instructions
|
|
39
|
-
|
|
40
|
-
- Following Playwright test failed.
|
|
41
|
-
- Explain why, be concise, respect Playwright best practices.
|
|
42
|
-
- Provide a snippet of code with the fix, if possible.
|
|
43
|
-
`;
|
|
44
|
-
function buildErrorContext(options) {
|
|
45
|
-
const { titlePath, location, errors, pageSnapshot } = options;
|
|
46
|
-
const meaningfulErrors = errors.filter((e) => !!e.message);
|
|
47
|
-
if (!meaningfulErrors.length && !pageSnapshot)
|
|
48
|
-
return void 0;
|
|
49
|
-
const lines = [
|
|
50
|
-
fixTestInstructions,
|
|
51
|
-
"# Test info",
|
|
52
|
-
"",
|
|
53
|
-
`- Name: ${titlePath.join(" >> ")}`,
|
|
54
|
-
`- Location: ${(0, import_util.relativeFilePath)(location.file)}:${location.line}:${location.column}`
|
|
55
|
-
];
|
|
56
|
-
if (meaningfulErrors.length) {
|
|
57
|
-
lines.push("", "# Error details");
|
|
58
|
-
for (const error of meaningfulErrors) {
|
|
59
|
-
lines.push(
|
|
60
|
-
"",
|
|
61
|
-
"```",
|
|
62
|
-
stripAnsiEscapes(error.message || ""),
|
|
63
|
-
"```"
|
|
64
|
-
);
|
|
65
|
-
if (error.errorContext) {
|
|
66
|
-
lines.push(
|
|
67
|
-
"",
|
|
68
|
-
"```yaml",
|
|
69
|
-
error.errorContext,
|
|
70
|
-
"```"
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (pageSnapshot) {
|
|
76
|
-
lines.push(
|
|
77
|
-
"",
|
|
78
|
-
"# Page snapshot",
|
|
79
|
-
"",
|
|
80
|
-
"```yaml",
|
|
81
|
-
pageSnapshot,
|
|
82
|
-
"```"
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
const lastError = meaningfulErrors[meaningfulErrors.length - 1];
|
|
86
|
-
const codeFrame = lastError ? buildCodeFrame(lastError, location) : void 0;
|
|
87
|
-
if (codeFrame) {
|
|
88
|
-
lines.push(
|
|
89
|
-
"",
|
|
90
|
-
"# Test source",
|
|
91
|
-
"",
|
|
92
|
-
"```ts",
|
|
93
|
-
codeFrame,
|
|
94
|
-
"```"
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
return lines.join("\n");
|
|
98
|
-
}
|
|
99
|
-
function buildCodeFrame(error, testLocation) {
|
|
100
|
-
const stack = error.stack;
|
|
101
|
-
if (!stack)
|
|
102
|
-
return void 0;
|
|
103
|
-
const parsed = parseErrorStack(stack);
|
|
104
|
-
const errorLocation = parsed.location;
|
|
105
|
-
if (!errorLocation)
|
|
106
|
-
return void 0;
|
|
107
|
-
let source;
|
|
108
|
-
try {
|
|
109
|
-
source = import_fs.default.readFileSync(errorLocation.file, "utf8");
|
|
110
|
-
} catch {
|
|
111
|
-
return void 0;
|
|
112
|
-
}
|
|
113
|
-
const sourceLines = source.split("\n");
|
|
114
|
-
const linesAbove = 100;
|
|
115
|
-
const linesBelow = 100;
|
|
116
|
-
const start = Math.max(0, errorLocation.line - linesAbove - 1);
|
|
117
|
-
const end = Math.min(sourceLines.length, errorLocation.line + linesBelow);
|
|
118
|
-
const scope = sourceLines.slice(start, end);
|
|
119
|
-
const lineNumberWidth = String(end).length;
|
|
120
|
-
const message = stripAnsiEscapes(error.message || "").split("\n")[0] || void 0;
|
|
121
|
-
const frame = scope.map((line, index) => `${start + index + 1 === errorLocation.line ? "> " : " "}${(start + index + 1).toString().padEnd(lineNumberWidth, " ")} | ${line}`);
|
|
122
|
-
if (message)
|
|
123
|
-
frame.splice(errorLocation.line - start, 0, `${" ".repeat(lineNumberWidth + 2)} | ${" ".repeat(Math.max(0, errorLocation.column - 2))} ^ ${message}`);
|
|
124
|
-
return frame.join("\n");
|
|
125
|
-
}
|
|
126
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
-
0 && (module.exports = {
|
|
128
|
-
buildErrorContext
|
|
129
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var globals_exports = {};
|
|
20
|
-
__export(globals_exports, {
|
|
21
|
-
currentTestInfo: () => currentTestInfo,
|
|
22
|
-
currentlyLoadingFileSuite: () => currentlyLoadingFileSuite,
|
|
23
|
-
isWorkerProcess: () => isWorkerProcess,
|
|
24
|
-
setCurrentTestInfo: () => setCurrentTestInfo,
|
|
25
|
-
setCurrentlyLoadingFileSuite: () => setCurrentlyLoadingFileSuite,
|
|
26
|
-
setIsWorkerProcess: () => setIsWorkerProcess
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(globals_exports);
|
|
29
|
-
let currentTestInfoValue = null;
|
|
30
|
-
function setCurrentTestInfo(testInfo) {
|
|
31
|
-
currentTestInfoValue = testInfo;
|
|
32
|
-
}
|
|
33
|
-
function currentTestInfo() {
|
|
34
|
-
return currentTestInfoValue;
|
|
35
|
-
}
|
|
36
|
-
let currentFileSuite;
|
|
37
|
-
function setCurrentlyLoadingFileSuite(suite) {
|
|
38
|
-
currentFileSuite = suite;
|
|
39
|
-
}
|
|
40
|
-
function currentlyLoadingFileSuite() {
|
|
41
|
-
return currentFileSuite;
|
|
42
|
-
}
|
|
43
|
-
let _isWorkerProcess = false;
|
|
44
|
-
function setIsWorkerProcess() {
|
|
45
|
-
_isWorkerProcess = true;
|
|
46
|
-
}
|
|
47
|
-
function isWorkerProcess() {
|
|
48
|
-
return _isWorkerProcess;
|
|
49
|
-
}
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
currentTestInfo,
|
|
53
|
-
currentlyLoadingFileSuite,
|
|
54
|
-
isWorkerProcess,
|
|
55
|
-
setCurrentTestInfo,
|
|
56
|
-
setCurrentlyLoadingFileSuite,
|
|
57
|
-
setIsWorkerProcess
|
|
58
|
-
});
|