@stablyai/internal-playwright 0.1.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +168 -0
- package/ThirdPartyNotices.txt +6277 -0
- package/cli.js +19 -0
- package/index.d.ts +17 -0
- package/index.js +17 -0
- package/index.mjs +18 -0
- package/jsx-runtime.js +42 -0
- package/jsx-runtime.mjs +21 -0
- package/lib/agents/generateAgents.js +265 -0
- package/lib/agents/generator.md +102 -0
- package/lib/agents/healer.md +78 -0
- package/lib/agents/planner.md +135 -0
- package/lib/cli.js +274 -0
- package/lib/common/config.js +274 -0
- package/lib/common/config.js.map +7 -0
- package/lib/common/configLoader.js +377 -0
- package/lib/common/configLoader.js.map +7 -0
- package/lib/common/esmLoaderHost.js +102 -0
- package/lib/common/esmLoaderHost.js.map +7 -0
- package/lib/common/expectBundle.js +52 -0
- package/lib/common/expectBundle.js.map +7 -0
- package/lib/common/expectBundleImpl.js +389 -0
- package/lib/common/expectBundleImpl.js.map +7 -0
- package/lib/common/fixtures.js +302 -0
- package/lib/common/fixtures.js.map +7 -0
- package/lib/common/globals.js +58 -0
- package/lib/common/globals.js.map +7 -0
- package/lib/common/ipc.js +60 -0
- package/lib/common/ipc.js.map +7 -0
- package/lib/common/poolBuilder.js +85 -0
- package/lib/common/poolBuilder.js.map +7 -0
- package/lib/common/process.js +104 -0
- package/lib/common/process.js.map +7 -0
- package/lib/common/suiteUtils.js +140 -0
- package/lib/common/suiteUtils.js.map +7 -0
- package/lib/common/test.js +321 -0
- package/lib/common/test.js.map +7 -0
- package/lib/common/testLoader.js +100 -0
- package/lib/common/testLoader.js.map +7 -0
- package/lib/common/testType.js +310 -0
- package/lib/common/testType.js.map +7 -0
- package/lib/fsWatcher.js +67 -0
- package/lib/fsWatcher.js.map +7 -0
- package/lib/index.js +696 -0
- package/lib/index.js.map +7 -0
- package/lib/internalsForTest.js +42 -0
- package/lib/internalsForTest.js.map +7 -0
- package/lib/isomorphic/events.js +77 -0
- package/lib/isomorphic/events.js.map +7 -0
- package/lib/isomorphic/folders.js +30 -0
- package/lib/isomorphic/folders.js.map +7 -0
- package/lib/isomorphic/stringInternPool.js +69 -0
- package/lib/isomorphic/stringInternPool.js.map +7 -0
- package/lib/isomorphic/teleReceiver.js +507 -0
- package/lib/isomorphic/teleReceiver.js.map +7 -0
- package/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/lib/isomorphic/teleSuiteUpdater.js.map +7 -0
- package/lib/isomorphic/testServerConnection.js +211 -0
- package/lib/isomorphic/testServerConnection.js.map +7 -0
- package/lib/isomorphic/testServerInterface.js +16 -0
- package/lib/isomorphic/testServerInterface.js.map +7 -0
- package/lib/isomorphic/testTree.js +334 -0
- package/lib/isomorphic/testTree.js.map +7 -0
- package/lib/isomorphic/types.d.js +16 -0
- package/lib/isomorphic/types.d.js.map +7 -0
- package/lib/loader/loaderMain.js +59 -0
- package/lib/loader/loaderMain.js.map +7 -0
- package/lib/matchers/expect.js +325 -0
- package/lib/matchers/expect.js.map +7 -0
- package/lib/matchers/matcherHint.js +87 -0
- package/lib/matchers/matcherHint.js.map +7 -0
- package/lib/matchers/matchers.js +366 -0
- package/lib/matchers/matchers.js.map +7 -0
- package/lib/matchers/toBeTruthy.js +73 -0
- package/lib/matchers/toBeTruthy.js.map +7 -0
- package/lib/matchers/toEqual.js +99 -0
- package/lib/matchers/toEqual.js.map +7 -0
- package/lib/matchers/toHaveURL.js +102 -0
- package/lib/matchers/toHaveURL.js.map +7 -0
- package/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/lib/matchers/toMatchAriaSnapshot.js.map +7 -0
- package/lib/matchers/toMatchSnapshot.js +359 -0
- package/lib/matchers/toMatchSnapshot.js.map +7 -0
- package/lib/matchers/toMatchText.js +99 -0
- package/lib/matchers/toMatchText.js.map +7 -0
- package/lib/mcp/browser/actions.d.js +16 -0
- package/lib/mcp/browser/backend.js +93 -0
- package/lib/mcp/browser/backend.js.map +7 -0
- package/lib/mcp/browser/browserContextFactory.js +296 -0
- package/lib/mcp/browser/browserServerBackend.js +76 -0
- package/lib/mcp/browser/codegen.js +66 -0
- package/lib/mcp/browser/config.js +385 -0
- package/lib/mcp/browser/context.js +287 -0
- package/lib/mcp/browser/response.js +228 -0
- package/lib/mcp/browser/sessionLog.js +160 -0
- package/lib/mcp/browser/tab.js +277 -0
- package/lib/mcp/browser/tool.js +30 -0
- package/lib/mcp/browser/tool.js.map +7 -0
- package/lib/mcp/browser/tools/common.js +63 -0
- package/lib/mcp/browser/tools/console.js +44 -0
- package/lib/mcp/browser/tools/dialogs.js +60 -0
- package/lib/mcp/browser/tools/evaluate.js +70 -0
- package/lib/mcp/browser/tools/files.js +58 -0
- package/lib/mcp/browser/tools/form.js +74 -0
- package/lib/mcp/browser/tools/install.js +69 -0
- package/lib/mcp/browser/tools/keyboard.js +85 -0
- package/lib/mcp/browser/tools/mouse.js +107 -0
- package/lib/mcp/browser/tools/navigate.js +62 -0
- package/lib/mcp/browser/tools/network.js +54 -0
- package/lib/mcp/browser/tools/pdf.js +59 -0
- package/lib/mcp/browser/tools/screenshot.js +88 -0
- package/lib/mcp/browser/tools/snapshot.js +182 -0
- package/lib/mcp/browser/tools/tabs.js +67 -0
- package/lib/mcp/browser/tools/tool.js +49 -0
- package/lib/mcp/browser/tools/tracing.js +74 -0
- package/lib/mcp/browser/tools/utils.js +100 -0
- package/lib/mcp/browser/tools/verify.js +154 -0
- package/lib/mcp/browser/tools/wait.js +63 -0
- package/lib/mcp/browser/tools.js +80 -0
- package/lib/mcp/browser/tools.js.map +7 -0
- package/lib/mcp/browser/watchdog.js +44 -0
- package/lib/mcp/config.d.js +16 -0
- package/lib/mcp/extension/cdpRelay.js +351 -0
- package/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/lib/mcp/extension/protocol.js +28 -0
- package/lib/mcp/index.js +61 -0
- package/lib/mcp/log.js +35 -0
- package/lib/mcp/program.js +96 -0
- package/lib/mcp/sdk/bundle.js +81 -0
- package/lib/mcp/sdk/bundle.js.map +7 -0
- package/lib/mcp/sdk/call.js +49 -0
- package/lib/mcp/sdk/call.js.map +7 -0
- package/lib/mcp/sdk/exports.js +32 -0
- package/lib/mcp/sdk/exports.js.map +7 -0
- package/lib/mcp/sdk/http.js +187 -0
- package/lib/mcp/sdk/http.js.map +7 -0
- package/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/lib/mcp/sdk/inProcessTransport.js.map +7 -0
- package/lib/mcp/sdk/mdb.js +206 -0
- package/lib/mcp/sdk/mdb.js.map +7 -0
- package/lib/mcp/sdk/proxyBackend.js +128 -0
- package/lib/mcp/sdk/proxyBackend.js.map +7 -0
- package/lib/mcp/sdk/server.js +189 -0
- package/lib/mcp/sdk/server.js.map +7 -0
- package/lib/mcp/sdk/tool.js +51 -0
- package/lib/mcp/sdk/tool.js.map +7 -0
- package/lib/mcp/test/backend.js +67 -0
- package/lib/mcp/test/backend.js.map +7 -0
- package/lib/mcp/test/browserBackend.js +98 -0
- package/lib/mcp/test/context.js +48 -0
- package/lib/mcp/test/context.js.map +7 -0
- package/lib/mcp/test/generatorTools.js +122 -0
- package/lib/mcp/test/plannerTools.js +46 -0
- package/lib/mcp/test/seed.js +72 -0
- package/lib/mcp/test/streams.js +39 -0
- package/lib/mcp/test/streams.js.map +7 -0
- package/lib/mcp/test/testBackend.js +97 -0
- package/lib/mcp/test/testContext.js +176 -0
- package/lib/mcp/test/testTool.js +30 -0
- package/lib/mcp/test/testTools.js +115 -0
- package/lib/mcp/test/tool.js +30 -0
- package/lib/mcp/test/tool.js.map +7 -0
- package/lib/mcp/test/tools.js +150 -0
- package/lib/mcp/test/tools.js.map +7 -0
- package/lib/mcp/vscode/host.js +187 -0
- package/lib/mcp/vscode/main.js +77 -0
- package/lib/mcpBundleImpl.js +41 -0
- package/lib/mcpBundleImpl.js.map +7 -0
- package/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/lib/plugins/gitCommitInfoPlugin.js.map +7 -0
- package/lib/plugins/index.js +28 -0
- package/lib/plugins/index.js.map +7 -0
- package/lib/plugins/webServerPlugin.js +209 -0
- package/lib/plugins/webServerPlugin.js.map +7 -0
- package/lib/program.js +412 -0
- package/lib/program.js.map +7 -0
- package/lib/reporters/base.js +609 -0
- package/lib/reporters/base.js.map +7 -0
- package/lib/reporters/blob.js +135 -0
- package/lib/reporters/blob.js.map +7 -0
- package/lib/reporters/dot.js +82 -0
- package/lib/reporters/dot.js.map +7 -0
- package/lib/reporters/empty.js +32 -0
- package/lib/reporters/empty.js.map +7 -0
- package/lib/reporters/github.js +128 -0
- package/lib/reporters/github.js.map +7 -0
- package/lib/reporters/html.js +644 -0
- package/lib/reporters/html.js.map +7 -0
- package/lib/reporters/internalReporter.js +130 -0
- package/lib/reporters/internalReporter.js.map +7 -0
- package/lib/reporters/json.js +254 -0
- package/lib/reporters/json.js.map +7 -0
- package/lib/reporters/junit.js +230 -0
- package/lib/reporters/junit.js.map +7 -0
- package/lib/reporters/line.js +113 -0
- package/lib/reporters/line.js.map +7 -0
- package/lib/reporters/list.js +235 -0
- package/lib/reporters/list.js.map +7 -0
- package/lib/reporters/listModeReporter.js +69 -0
- package/lib/reporters/listModeReporter.js.map +7 -0
- package/lib/reporters/markdown.js +144 -0
- package/lib/reporters/markdown.js.map +7 -0
- package/lib/reporters/merge.js +535 -0
- package/lib/reporters/merge.js.map +7 -0
- package/lib/reporters/multiplexer.js +104 -0
- package/lib/reporters/multiplexer.js.map +7 -0
- package/lib/reporters/reporterV2.js +102 -0
- package/lib/reporters/reporterV2.js.map +7 -0
- package/lib/reporters/teleEmitter.js +297 -0
- package/lib/reporters/teleEmitter.js.map +7 -0
- package/lib/reporters/versions/blobV1.js +16 -0
- package/lib/reporters/versions/blobV1.js.map +7 -0
- package/lib/runner/dispatcher.js +491 -0
- package/lib/runner/dispatcher.js.map +7 -0
- package/lib/runner/failureTracker.js +72 -0
- package/lib/runner/failureTracker.js.map +7 -0
- package/lib/runner/lastRun.js +77 -0
- package/lib/runner/lastRun.js.map +7 -0
- package/lib/runner/loadUtils.js +333 -0
- package/lib/runner/loadUtils.js.map +7 -0
- package/lib/runner/loaderHost.js +89 -0
- package/lib/runner/loaderHost.js.map +7 -0
- package/lib/runner/processHost.js +161 -0
- package/lib/runner/processHost.js.map +7 -0
- package/lib/runner/projectUtils.js +241 -0
- package/lib/runner/projectUtils.js.map +7 -0
- package/lib/runner/rebase.js +189 -0
- package/lib/runner/rebase.js.map +7 -0
- package/lib/runner/reporters.js +137 -0
- package/lib/runner/reporters.js.map +7 -0
- package/lib/runner/runner.js +173 -0
- package/lib/runner/sigIntWatcher.js +96 -0
- package/lib/runner/sigIntWatcher.js.map +7 -0
- package/lib/runner/taskRunner.js +127 -0
- package/lib/runner/taskRunner.js.map +7 -0
- package/lib/runner/tasks.js +410 -0
- package/lib/runner/tasks.js.map +7 -0
- package/lib/runner/testGroups.js +117 -0
- package/lib/runner/testGroups.js.map +7 -0
- package/lib/runner/testRunner.js +390 -0
- package/lib/runner/testRunner.js.map +7 -0
- package/lib/runner/testServer.js +264 -0
- package/lib/runner/testServer.js.map +7 -0
- package/lib/runner/uiMode.js +271 -0
- package/lib/runner/uiModeReporter.js +30 -0
- package/lib/runner/uiModeReporter.js.map +7 -0
- package/lib/runner/vcs.js +72 -0
- package/lib/runner/vcs.js.map +7 -0
- package/lib/runner/watchMode.js +395 -0
- package/lib/runner/watchMode.js.map +7 -0
- package/lib/runner/workerHost.js +95 -0
- package/lib/runner/workerHost.js.map +7 -0
- package/lib/store.js +98 -0
- package/lib/third_party/pirates.js +62 -0
- package/lib/third_party/pirates.js.map +7 -0
- package/lib/third_party/tsconfig-loader.js +103 -0
- package/lib/third_party/tsconfig-loader.js.map +7 -0
- package/lib/transform/babelBundle.js +43 -0
- package/lib/transform/babelBundle.js.map +7 -0
- package/lib/transform/babelBundleImpl.js +461 -0
- package/lib/transform/babelBundleImpl.js.map +7 -0
- package/lib/transform/compilationCache.js +272 -0
- package/lib/transform/compilationCache.js.map +7 -0
- package/lib/transform/esmLoader.js +104 -0
- package/lib/transform/esmLoader.js.map +7 -0
- package/lib/transform/esmUtils.js +32 -0
- package/lib/transform/portTransport.js +67 -0
- package/lib/transform/portTransport.js.map +7 -0
- package/lib/transform/transform.js +293 -0
- package/lib/transform/transform.js.map +7 -0
- package/lib/util.js +403 -0
- package/lib/util.js.map +7 -0
- package/lib/utilsBundle.js +43 -0
- package/lib/utilsBundle.js.map +7 -0
- package/lib/utilsBundleImpl.js +100 -0
- package/lib/utilsBundleImpl.js.map +7 -0
- package/lib/worker/fixtureRunner.js +258 -0
- package/lib/worker/fixtureRunner.js.map +7 -0
- package/lib/worker/stepContext.js +34 -0
- package/lib/worker/testInfo.js +508 -0
- package/lib/worker/testInfo.js.map +7 -0
- package/lib/worker/testTracing.js +344 -0
- package/lib/worker/testTracing.js.map +7 -0
- package/lib/worker/timeoutManager.js +174 -0
- package/lib/worker/timeoutManager.js.map +7 -0
- package/lib/worker/util.js +31 -0
- package/lib/worker/util.js.map +7 -0
- package/lib/worker/workerMain.js +520 -0
- package/lib/worker/workerMain.js.map +7 -0
- package/package.json +74 -0
- package/test.d.ts +18 -0
- package/test.js +24 -0
- package/test.mjs +33 -0
- package/types/test.d.ts +10217 -0
- package/types/testReporter.d.ts +816 -0
@@ -0,0 +1,176 @@
|
|
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 testContext_exports = {};
|
30
|
+
__export(testContext_exports, {
|
31
|
+
GeneratorJournal: () => GeneratorJournal,
|
32
|
+
TestContext: () => TestContext
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(testContext_exports);
|
35
|
+
var import_fs = __toESM(require("fs"));
|
36
|
+
var import_path = __toESM(require("path"));
|
37
|
+
var import_utils = require("playwright-core/lib/utils");
|
38
|
+
var import_base = require("../../reporters/base");
|
39
|
+
var import_list = __toESM(require("../../reporters/list"));
|
40
|
+
var import_streams = require("./streams");
|
41
|
+
var import_util = require("../../util");
|
42
|
+
var import_testRunner = require("../../runner/testRunner");
|
43
|
+
var import_seed = require("./seed");
|
44
|
+
class GeneratorJournal {
|
45
|
+
constructor(rootPath, plan, seed) {
|
46
|
+
this._rootPath = rootPath;
|
47
|
+
this._plan = plan;
|
48
|
+
this._seed = seed;
|
49
|
+
this._steps = [];
|
50
|
+
}
|
51
|
+
logStep(title, code) {
|
52
|
+
if (title)
|
53
|
+
this._steps.push({ title, code });
|
54
|
+
}
|
55
|
+
journal() {
|
56
|
+
const result = [];
|
57
|
+
result.push(`# Plan`);
|
58
|
+
result.push(this._plan);
|
59
|
+
result.push(`# Seed file: ${import_path.default.relative(this._rootPath, this._seed.file)}`);
|
60
|
+
result.push("```ts");
|
61
|
+
result.push(this._seed.content);
|
62
|
+
result.push("```");
|
63
|
+
result.push(`# Steps`);
|
64
|
+
result.push(this._steps.map((step) => `### ${step.title}
|
65
|
+
\`\`\`ts
|
66
|
+
${step.code}
|
67
|
+
\`\`\``).join("\n\n"));
|
68
|
+
result.push(bestPracticesMarkdown);
|
69
|
+
return result.join("\n\n");
|
70
|
+
}
|
71
|
+
}
|
72
|
+
class TestContext {
|
73
|
+
constructor(options) {
|
74
|
+
this.options = options;
|
75
|
+
}
|
76
|
+
initialize(rootPath, configLocation) {
|
77
|
+
this.configLocation = configLocation;
|
78
|
+
this.rootPath = rootPath || configLocation.configDir;
|
79
|
+
}
|
80
|
+
existingTestRunner() {
|
81
|
+
return this._testRunner;
|
82
|
+
}
|
83
|
+
async createTestRunner() {
|
84
|
+
if (this._testRunner)
|
85
|
+
await this._testRunner.stopTests();
|
86
|
+
const testRunner = new import_testRunner.TestRunner(this.configLocation, {});
|
87
|
+
await testRunner.initialize({});
|
88
|
+
this._testRunner = testRunner;
|
89
|
+
testRunner.on(import_testRunner.TestRunnerEvent.TestFilesChanged, (testFiles) => {
|
90
|
+
this._testRunner?.emit(import_testRunner.TestRunnerEvent.TestFilesChanged, testFiles);
|
91
|
+
});
|
92
|
+
this._testRunner = testRunner;
|
93
|
+
return testRunner;
|
94
|
+
}
|
95
|
+
async getOrCreateSeedFile(seedFile, projectName) {
|
96
|
+
const configDir = this.configLocation.configDir;
|
97
|
+
const testRunner = await this.createTestRunner();
|
98
|
+
const config = await testRunner.loadConfig();
|
99
|
+
const project = (0, import_seed.seedProject)(config, projectName);
|
100
|
+
if (!seedFile) {
|
101
|
+
seedFile = await (0, import_seed.ensureSeedTest)(project, false);
|
102
|
+
} else {
|
103
|
+
const candidateFiles = [];
|
104
|
+
const testDir = project.project.testDir;
|
105
|
+
candidateFiles.push(import_path.default.resolve(testDir, seedFile));
|
106
|
+
candidateFiles.push(import_path.default.resolve(configDir, seedFile));
|
107
|
+
candidateFiles.push(import_path.default.resolve(this.rootPath, seedFile));
|
108
|
+
let resolvedSeedFile;
|
109
|
+
for (const candidateFile of candidateFiles) {
|
110
|
+
if (await (0, import_util.fileExistsAsync)(candidateFile)) {
|
111
|
+
resolvedSeedFile = candidateFile;
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
if (!resolvedSeedFile)
|
116
|
+
throw new Error("seed test not found.");
|
117
|
+
seedFile = resolvedSeedFile;
|
118
|
+
}
|
119
|
+
const seedFileContent = await import_fs.default.promises.readFile(seedFile, "utf8");
|
120
|
+
return {
|
121
|
+
file: seedFile,
|
122
|
+
content: seedFileContent,
|
123
|
+
projectName: project.project.name
|
124
|
+
};
|
125
|
+
}
|
126
|
+
async runSeedTest(seedFile, projectName, progress) {
|
127
|
+
const { screen } = this.createScreen(progress);
|
128
|
+
const configDir = this.configLocation.configDir;
|
129
|
+
const reporter = new import_list.default({ configDir, screen });
|
130
|
+
const testRunner = await this.createTestRunner();
|
131
|
+
const result = await testRunner.runTests(reporter, {
|
132
|
+
headed: !this.options?.headless,
|
133
|
+
locations: ["/" + (0, import_utils.escapeRegExp)(seedFile) + "/"],
|
134
|
+
projects: [projectName],
|
135
|
+
timeout: 0,
|
136
|
+
workers: 1,
|
137
|
+
pauseAtEnd: true,
|
138
|
+
disableConfigReporters: true,
|
139
|
+
failOnLoadErrors: true
|
140
|
+
});
|
141
|
+
if (result.status === "passed" && !reporter.suite?.allTests().length)
|
142
|
+
throw new Error("seed test not found.");
|
143
|
+
if (result.status !== "passed")
|
144
|
+
throw new Error("Errors while running the seed test.");
|
145
|
+
}
|
146
|
+
createScreen(progress) {
|
147
|
+
const stream = new import_streams.StringWriteStream(progress);
|
148
|
+
const screen = {
|
149
|
+
...import_base.terminalScreen,
|
150
|
+
isTTY: false,
|
151
|
+
colors: import_utils.noColors,
|
152
|
+
stdout: stream,
|
153
|
+
stderr: stream
|
154
|
+
};
|
155
|
+
return { screen, stream };
|
156
|
+
}
|
157
|
+
async close() {
|
158
|
+
}
|
159
|
+
}
|
160
|
+
const bestPracticesMarkdown = `
|
161
|
+
# Best practices
|
162
|
+
- Do not improvise, do not add directives that were not asked for
|
163
|
+
- Use clear, descriptive assertions to validate the expected behavior
|
164
|
+
- Use reliable locators from this log
|
165
|
+
- Use local variables for locators that are used multiple times
|
166
|
+
- Use Playwright waiting assertions and best practices from this log
|
167
|
+
- NEVER! use page.waitForLoadState()
|
168
|
+
- NEVER! use page.waitForNavigation()
|
169
|
+
- NEVER! use page.waitForTimeout()
|
170
|
+
- NEVER! use page.evaluate()
|
171
|
+
`;
|
172
|
+
// Annotate the CommonJS export names for ESM import in node:
|
173
|
+
0 && (module.exports = {
|
174
|
+
GeneratorJournal,
|
175
|
+
TestContext
|
176
|
+
});
|
@@ -0,0 +1,30 @@
|
|
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 testTool_exports = {};
|
20
|
+
__export(testTool_exports, {
|
21
|
+
defineTestTool: () => defineTestTool
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(testTool_exports);
|
24
|
+
function defineTestTool(tool) {
|
25
|
+
return tool;
|
26
|
+
}
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
28
|
+
0 && (module.exports = {
|
29
|
+
defineTestTool
|
30
|
+
});
|
@@ -0,0 +1,115 @@
|
|
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 testTools_exports = {};
|
30
|
+
__export(testTools_exports, {
|
31
|
+
debugTest: () => debugTest,
|
32
|
+
listTests: () => listTests,
|
33
|
+
runTests: () => runTests
|
34
|
+
});
|
35
|
+
module.exports = __toCommonJS(testTools_exports);
|
36
|
+
var import_bundle = require("../sdk/bundle");
|
37
|
+
var import_list = __toESM(require("../../reporters/list"));
|
38
|
+
var import_listModeReporter = __toESM(require("../../reporters/listModeReporter"));
|
39
|
+
var import_testTool = require("./testTool");
|
40
|
+
const listTests = (0, import_testTool.defineTestTool)({
|
41
|
+
schema: {
|
42
|
+
name: "test_list",
|
43
|
+
title: "List tests",
|
44
|
+
description: "List tests",
|
45
|
+
inputSchema: import_bundle.z.object({}),
|
46
|
+
type: "readOnly"
|
47
|
+
},
|
48
|
+
handle: async (context, _, progress) => {
|
49
|
+
const { screen } = context.createScreen(progress);
|
50
|
+
const reporter = new import_listModeReporter.default({ screen, includeTestId: true });
|
51
|
+
const testRunner = await context.createTestRunner();
|
52
|
+
await testRunner.listTests(reporter, {});
|
53
|
+
return { content: [] };
|
54
|
+
}
|
55
|
+
});
|
56
|
+
const runTests = (0, import_testTool.defineTestTool)({
|
57
|
+
schema: {
|
58
|
+
name: "test_run",
|
59
|
+
title: "Run tests",
|
60
|
+
description: "Run tests",
|
61
|
+
inputSchema: import_bundle.z.object({
|
62
|
+
locations: import_bundle.z.array(import_bundle.z.string()).optional().describe('Folder, file or location to run: "test/e2e" or "test/e2e/file.spec.ts" or "test/e2e/file.spec.ts:20"'),
|
63
|
+
projects: import_bundle.z.array(import_bundle.z.string()).optional().describe('Projects to run, projects from playwright.config.ts, by default runs all projects. Running with "chromium" is a good start')
|
64
|
+
}),
|
65
|
+
type: "readOnly"
|
66
|
+
},
|
67
|
+
handle: async (context, params, progress) => {
|
68
|
+
const { screen } = context.createScreen(progress);
|
69
|
+
const configDir = context.configLocation.configDir;
|
70
|
+
const reporter = new import_list.default({ configDir, screen, includeTestId: true, prefixStdio: "out" });
|
71
|
+
const testRunner = await context.createTestRunner();
|
72
|
+
await testRunner.runTests(reporter, {
|
73
|
+
locations: params.locations,
|
74
|
+
projects: params.projects,
|
75
|
+
disableConfigReporters: true
|
76
|
+
});
|
77
|
+
return { content: [] };
|
78
|
+
}
|
79
|
+
});
|
80
|
+
const debugTest = (0, import_testTool.defineTestTool)({
|
81
|
+
schema: {
|
82
|
+
name: "test_debug",
|
83
|
+
title: "Debug single test",
|
84
|
+
description: "Debug single test",
|
85
|
+
inputSchema: import_bundle.z.object({
|
86
|
+
test: import_bundle.z.object({
|
87
|
+
id: import_bundle.z.string().describe("Test ID to debug."),
|
88
|
+
title: import_bundle.z.string().describe("Human readable test title for granting permission to debug the test.")
|
89
|
+
})
|
90
|
+
}),
|
91
|
+
type: "readOnly"
|
92
|
+
},
|
93
|
+
handle: async (context, params, progress) => {
|
94
|
+
const { screen } = context.createScreen(progress);
|
95
|
+
const configDir = context.configLocation.configDir;
|
96
|
+
const reporter = new import_list.default({ configDir, screen, includeTestId: true, prefixStdio: "out" });
|
97
|
+
const testRunner = await context.createTestRunner();
|
98
|
+
await testRunner.runTests(reporter, {
|
99
|
+
headed: !context.options?.headless,
|
100
|
+
testIds: [params.test.id],
|
101
|
+
// For automatic recovery
|
102
|
+
timeout: 0,
|
103
|
+
workers: 1,
|
104
|
+
pauseOnError: true,
|
105
|
+
disableConfigReporters: true
|
106
|
+
});
|
107
|
+
return { content: [] };
|
108
|
+
}
|
109
|
+
});
|
110
|
+
// Annotate the CommonJS export names for ESM import in node:
|
111
|
+
0 && (module.exports = {
|
112
|
+
debugTest,
|
113
|
+
listTests,
|
114
|
+
runTests
|
115
|
+
});
|
@@ -0,0 +1,30 @@
|
|
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 tool_exports = {};
|
20
|
+
__export(tool_exports, {
|
21
|
+
defineTool: () => defineTool
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(tool_exports);
|
24
|
+
function defineTool(tool) {
|
25
|
+
return tool;
|
26
|
+
}
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
28
|
+
0 && (module.exports = {
|
29
|
+
defineTool
|
30
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/mcp/test/tool.ts"],
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { z } from 'zod';\nimport type { Context } from './context.js';\nimport type * as mcp from '../sdk/exports.js';\n\nexport type Tool<Input extends z.Schema = z.Schema> = {\n schema: mcp.ToolSchema<Input>;\n handle: (context: Context, params: z.output<Input>) => Promise<mcp.CallToolResult>;\n};\n\nexport function defineTool<Input extends z.Schema>(tool: Tool<Input>): Tool<Input> {\n return tool;\n}\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBO,SAAS,WAAmC,MAAgC;AACjF,SAAO;AACT;",
|
6
|
+
"names": []
|
7
|
+
}
|
@@ -0,0 +1,150 @@
|
|
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 tools_exports = {};
|
30
|
+
__export(tools_exports, {
|
31
|
+
debugTest: () => debugTest,
|
32
|
+
listTests: () => listTests,
|
33
|
+
runTests: () => runTests
|
34
|
+
});
|
35
|
+
module.exports = __toCommonJS(tools_exports);
|
36
|
+
var import_utils = require("playwright-core/lib/utils");
|
37
|
+
var import_bundle = require("../sdk/bundle");
|
38
|
+
var import_base = require("../../reporters/base");
|
39
|
+
var import_list = __toESM(require("../../reporters/list"));
|
40
|
+
var import_listModeReporter = __toESM(require("../../reporters/listModeReporter"));
|
41
|
+
var import_tool = require("./tool");
|
42
|
+
var import_streams = require("./streams");
|
43
|
+
const listTests = (0, import_tool.defineTool)({
|
44
|
+
schema: {
|
45
|
+
name: "playwright_test_list_tests",
|
46
|
+
title: "List tests",
|
47
|
+
description: "List tests",
|
48
|
+
inputSchema: import_bundle.z.object({}),
|
49
|
+
type: "readOnly"
|
50
|
+
},
|
51
|
+
handle: async (context) => {
|
52
|
+
const { screen, stream } = createScreen();
|
53
|
+
const reporter = new import_listModeReporter.default({ screen, includeTestId: true });
|
54
|
+
const testRunner = await context.createTestRunner();
|
55
|
+
await testRunner.listTests(reporter, {});
|
56
|
+
return {
|
57
|
+
content: [{ type: "text", text: stream.content() }]
|
58
|
+
};
|
59
|
+
}
|
60
|
+
});
|
61
|
+
const runTests = (0, import_tool.defineTool)({
|
62
|
+
schema: {
|
63
|
+
name: "playwright_test_run_tests",
|
64
|
+
title: "Run tests",
|
65
|
+
description: "Run tests",
|
66
|
+
inputSchema: import_bundle.z.object({
|
67
|
+
locations: import_bundle.z.array(import_bundle.z.string()).describe('Folder, file or location to run: "test/e2e" or "test/e2e/file.spec.ts" or "test/e2e/file.spec.ts:20"'),
|
68
|
+
projects: import_bundle.z.array(import_bundle.z.string()).optional().describe('Projects to run, projects from playwright.config.ts, by default runs all projects. Running with "chromium" is a good start')
|
69
|
+
}),
|
70
|
+
type: "readOnly"
|
71
|
+
},
|
72
|
+
handle: async (context, params) => {
|
73
|
+
const { screen, stream } = createScreen();
|
74
|
+
const configDir = context.configLocation.configDir;
|
75
|
+
const reporter = new import_list.default({ configDir, screen, includeTestId: true });
|
76
|
+
const testRunner = await context.createTestRunner();
|
77
|
+
const result = await testRunner.runTests(reporter, {
|
78
|
+
locations: params.locations,
|
79
|
+
projects: params.projects
|
80
|
+
});
|
81
|
+
const text = stream.content();
|
82
|
+
return {
|
83
|
+
content: [
|
84
|
+
{ type: "text", text }
|
85
|
+
],
|
86
|
+
isError: result.status !== "passed"
|
87
|
+
};
|
88
|
+
}
|
89
|
+
});
|
90
|
+
const debugTest = (0, import_tool.defineTool)({
|
91
|
+
schema: {
|
92
|
+
name: "playwright_test_debug_test",
|
93
|
+
title: "Debug single test",
|
94
|
+
description: "Debug single test",
|
95
|
+
inputSchema: import_bundle.z.object({
|
96
|
+
test: import_bundle.z.object({
|
97
|
+
id: import_bundle.z.string().describe("Test ID to debug."),
|
98
|
+
title: import_bundle.z.string().describe("Human readable test title for granting permission to debug the test.")
|
99
|
+
})
|
100
|
+
}),
|
101
|
+
type: "readOnly"
|
102
|
+
},
|
103
|
+
handle: async (context, params) => {
|
104
|
+
const stream = new import_streams.StringWriteStream();
|
105
|
+
const screen = {
|
106
|
+
...import_base.terminalScreen,
|
107
|
+
isTTY: false,
|
108
|
+
colors: import_utils.noColors,
|
109
|
+
stdout: stream,
|
110
|
+
stderr: stream
|
111
|
+
};
|
112
|
+
const configDir = context.configLocation.configDir;
|
113
|
+
const reporter = new import_list.default({ configDir, screen });
|
114
|
+
const testRunner = await context.createTestRunner();
|
115
|
+
process.env.PLAYWRIGHT_DEBUGGER_ENABLED = "1";
|
116
|
+
const result = await testRunner.runTests(reporter, {
|
117
|
+
headed: true,
|
118
|
+
testIds: [params.test.id],
|
119
|
+
// For automatic recovery
|
120
|
+
timeout: 0,
|
121
|
+
workers: 1
|
122
|
+
}).finally(() => {
|
123
|
+
process.env.PLAYWRIGHT_DEBUGGER_ENABLED = void 0;
|
124
|
+
});
|
125
|
+
const text = stream.content();
|
126
|
+
return {
|
127
|
+
content: [
|
128
|
+
{ type: "text", text }
|
129
|
+
],
|
130
|
+
isError: result.status !== "passed"
|
131
|
+
};
|
132
|
+
}
|
133
|
+
});
|
134
|
+
function createScreen() {
|
135
|
+
const stream = new import_streams.StringWriteStream();
|
136
|
+
const screen = {
|
137
|
+
...import_base.terminalScreen,
|
138
|
+
isTTY: false,
|
139
|
+
colors: import_utils.noColors,
|
140
|
+
stdout: stream,
|
141
|
+
stderr: stream
|
142
|
+
};
|
143
|
+
return { screen, stream };
|
144
|
+
}
|
145
|
+
// Annotate the CommonJS export names for ESM import in node:
|
146
|
+
0 && (module.exports = {
|
147
|
+
debugTest,
|
148
|
+
listTests,
|
149
|
+
runTests
|
150
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/mcp/test/tools.ts"],
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { noColors } from 'playwright-core/lib/utils';\n\nimport { z } from '../sdk/bundle';\nimport { terminalScreen } from '../../reporters/base';\nimport ListReporter from '../../reporters/list';\nimport ListModeReporter from '../../reporters/listModeReporter';\n\nimport { defineTool } from './tool';\nimport { StringWriteStream } from './streams';\n\nexport const listTests = defineTool({\n schema: {\n name: 'playwright_test_list_tests',\n title: 'List tests',\n description: 'List tests',\n inputSchema: z.object({}),\n type: 'readOnly',\n },\n\n handle: async context => {\n const { screen, stream } = createScreen();\n const reporter = new ListModeReporter({ screen, includeTestId: true });\n const testRunner = await context.createTestRunner();\n await testRunner.listTests(reporter, {});\n\n return {\n content: [{ type: 'text', text: stream.content() }],\n };\n },\n});\n\nexport const runTests = defineTool({\n schema: {\n name: 'playwright_test_run_tests',\n title: 'Run tests',\n description: 'Run tests',\n inputSchema: z.object({\n locations: z.array(z.string()).describe('Folder, file or location to run: \"test/e2e\" or \"test/e2e/file.spec.ts\" or \"test/e2e/file.spec.ts:20\"'),\n projects: z.array(z.string()).optional().describe('Projects to run, projects from playwright.config.ts, by default runs all projects. Running with \"chromium\" is a good start'),\n }),\n type: 'readOnly',\n },\n\n handle: async (context, params) => {\n const { screen, stream } = createScreen();\n const configDir = context.configLocation.configDir;\n const reporter = new ListReporter({ configDir, screen, includeTestId: true });\n const testRunner = await context.createTestRunner();\n const result = await testRunner.runTests(reporter, {\n locations: params.locations,\n projects: params.projects,\n });\n\n const text = stream.content();\n return {\n content: [\n { type: 'text', text },\n ],\n isError: result.status !== 'passed',\n };\n },\n});\n\nexport const debugTest = defineTool({\n schema: {\n name: 'playwright_test_debug_test',\n title: 'Debug single test',\n description: 'Debug single test',\n inputSchema: z.object({\n test: z.object({\n id: z.string().describe('Test ID to debug.'),\n title: z.string().describe('Human readable test title for granting permission to debug the test.'),\n }),\n }),\n type: 'readOnly',\n },\n\n handle: async (context, params) => {\n const stream = new StringWriteStream();\n const screen = {\n ...terminalScreen,\n isTTY: false,\n colors: noColors,\n stdout: stream as unknown as NodeJS.WriteStream,\n stderr: stream as unknown as NodeJS.WriteStream,\n };\n const configDir = context.configLocation.configDir;\n const reporter = new ListReporter({ configDir, screen });\n const testRunner = await context.createTestRunner();\n process.env.PLAYWRIGHT_DEBUGGER_ENABLED = '1';\n const result = await testRunner.runTests(reporter, {\n headed: true,\n testIds: [params.test.id],\n // For automatic recovery\n timeout: 0,\n workers: 1,\n }).finally(() => {\n process.env.PLAYWRIGHT_DEBUGGER_ENABLED = undefined;\n });\n\n const text = stream.content();\n return {\n content: [\n { type: 'text', text },\n ],\n isError: result.status !== 'passed',\n };\n },\n});\n\nfunction createScreen() {\n const stream = new StringWriteStream();\n const screen = {\n ...terminalScreen,\n isTTY: false,\n colors: noColors,\n stdout: stream as unknown as NodeJS.WriteStream,\n stderr: stream as unknown as NodeJS.WriteStream,\n };\n return { screen, stream };\n}\n"],
|
5
|
+
"mappings": "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",
|
6
|
+
"names": ["ListModeReporter", "ListReporter"]
|
7
|
+
}
|