@cloud411716/fancy-webnovel 0.1.78 → 0.1.80
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/package.json +4 -1
- package/plugins/fancy-scan/scripts/scan-output-format.md +1 -1
- package/plugins/fancy-scan/scripts/scraper-registry.md +12 -12
- package/plugins/fancy-scan/scripts/scrapers/cdp-utils.cjs +11 -186
- package/plugins/fancy-scan/scripts/scrapers/node_modules/.package-lock.json +0 -20
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/LICENSE +0 -202
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/NOTICE +0 -5
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/README.md +0 -3
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/ThirdPartyNotices.txt +0 -13
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -33
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/browsers.json +0 -75
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/cli.js +0 -21
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/index.d.ts +0 -17
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/index.js +0 -17
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/index.mjs +0 -28
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/bootstrap.js +0 -88
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/coreBundle.js +0 -74830
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/entry/cliDaemon.js +0 -5
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/entry/dashboardApp.js +0 -3
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/entry/mcp.js +0 -10
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +0 -3
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/package.js +0 -50
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/server/electron/loader.js +0 -118
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/serverRegistry.js +0 -7347
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +0 -354
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +0 -141
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/cli.js +0 -6
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/help.json +0 -708
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/minimist.js +0 -128
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/output.js +0 -343
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/program.js +0 -404
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/registry.js +0 -176
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/cli-client/session.js +0 -258
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +0 -420
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +0 -23
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +0 -39
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +0 -87
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +0 -241
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +0 -225
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +0 -275
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +0 -433
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +0 -139
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +0 -143
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +0 -143
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +0 -144
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +0 -85
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +0 -67
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +0 -75
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +0 -171
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/utils/extension.js +0 -101
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/tools/utils/socketConnection.js +0 -108
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/utilsBundle.js +0 -90764
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +0 -2179
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +0 -11
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/index.html +0 -29
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +0 -24
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -16
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/htmlReport/report.css +0 -2
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/htmlReport/report.js +0 -32
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CwYYHbcZ.js +0 -32
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/assets/index-DYjdXIbE.js +0 -129
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-rXmQmLUY.js +0 -32
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-B-dXF5JN.js +0 -181
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BuZfJS5v.js +0 -7
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/index.KZ4wOW1K.js +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -44
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -10
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -4
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Dzuouizj.js +0 -5
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -18
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +0 -1
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/webp_codec.LICENSE +0 -173
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/lib/xdg-open +0 -1267
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/package.json +0 -34
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/types/protocol.d.ts +0 -24842
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/types/structs.d.ts +0 -52
- package/plugins/fancy-scan/scripts/scrapers/node_modules/playwright-core/types/types.d.ts +0 -26188
- package/plugins/fancy-scan/scripts/scrapers/package.json +0 -9
|
@@ -1,128 +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 minimist_exports = {};
|
|
20
|
-
__export(minimist_exports, {
|
|
21
|
-
minimist: () => minimist
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(minimist_exports);
|
|
24
|
-
function minimist(args, opts) {
|
|
25
|
-
if (!opts)
|
|
26
|
-
opts = {};
|
|
27
|
-
const bools = {};
|
|
28
|
-
const strings = {};
|
|
29
|
-
for (const key of toArray(opts.boolean))
|
|
30
|
-
bools[key] = true;
|
|
31
|
-
for (const key of toArray(opts.string))
|
|
32
|
-
strings[key] = true;
|
|
33
|
-
const argv = { _: [] };
|
|
34
|
-
function setArg(key, val) {
|
|
35
|
-
if (argv[key] === void 0 || bools[key] || typeof argv[key] === "boolean")
|
|
36
|
-
argv[key] = val;
|
|
37
|
-
else if (Array.isArray(argv[key]))
|
|
38
|
-
argv[key].push(val);
|
|
39
|
-
else
|
|
40
|
-
argv[key] = [argv[key], val];
|
|
41
|
-
}
|
|
42
|
-
let notFlags = [];
|
|
43
|
-
const doubleDashIndex = args.indexOf("--");
|
|
44
|
-
if (doubleDashIndex !== -1) {
|
|
45
|
-
notFlags = args.slice(doubleDashIndex + 1);
|
|
46
|
-
args = args.slice(0, doubleDashIndex);
|
|
47
|
-
}
|
|
48
|
-
for (let i = 0; i < args.length; i++) {
|
|
49
|
-
const arg = args[i];
|
|
50
|
-
let key;
|
|
51
|
-
let next;
|
|
52
|
-
if (/^--.+=/.test(arg)) {
|
|
53
|
-
const m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
54
|
-
key = m[1];
|
|
55
|
-
if (bools[key])
|
|
56
|
-
throw new Error(`boolean option '--${key}' should not be passed with '=value', use '--${key}' or '--no-${key}' instead`);
|
|
57
|
-
setArg(key, m[2]);
|
|
58
|
-
} else if (/^--no-.+/.test(arg)) {
|
|
59
|
-
key = arg.match(/^--no-(.+)/)[1];
|
|
60
|
-
setArg(key, false);
|
|
61
|
-
} else if (/^--.+/.test(arg)) {
|
|
62
|
-
key = arg.match(/^--(.+)/)[1];
|
|
63
|
-
next = args[i + 1];
|
|
64
|
-
if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !bools[key]) {
|
|
65
|
-
setArg(key, next);
|
|
66
|
-
i += 1;
|
|
67
|
-
} else if (/^(true|false)$/.test(next)) {
|
|
68
|
-
setArg(key, next === "true");
|
|
69
|
-
i += 1;
|
|
70
|
-
} else {
|
|
71
|
-
setArg(key, strings[key] ? "" : true);
|
|
72
|
-
}
|
|
73
|
-
} else if (/^-[^-]+/.test(arg)) {
|
|
74
|
-
const letters = arg.slice(1, -1).split("");
|
|
75
|
-
let broken = false;
|
|
76
|
-
for (let j = 0; j < letters.length; j++) {
|
|
77
|
-
next = arg.slice(j + 2);
|
|
78
|
-
if (next === "-") {
|
|
79
|
-
setArg(letters[j], next);
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") {
|
|
83
|
-
setArg(letters[j], next.slice(1));
|
|
84
|
-
broken = true;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
|
|
88
|
-
setArg(letters[j], next);
|
|
89
|
-
broken = true;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
93
|
-
setArg(letters[j], arg.slice(j + 2));
|
|
94
|
-
broken = true;
|
|
95
|
-
break;
|
|
96
|
-
} else {
|
|
97
|
-
setArg(letters[j], strings[letters[j]] ? "" : true);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
key = arg.slice(-1)[0];
|
|
101
|
-
if (!broken && key !== "-") {
|
|
102
|
-
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !bools[key]) {
|
|
103
|
-
setArg(key, args[i + 1]);
|
|
104
|
-
i += 1;
|
|
105
|
-
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
106
|
-
setArg(key, args[i + 1] === "true");
|
|
107
|
-
i += 1;
|
|
108
|
-
} else {
|
|
109
|
-
setArg(key, strings[key] ? "" : true);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
} else {
|
|
113
|
-
argv._.push(arg);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
for (const k of notFlags)
|
|
117
|
-
argv._.push(k);
|
|
118
|
-
return argv;
|
|
119
|
-
}
|
|
120
|
-
function toArray(value) {
|
|
121
|
-
if (!value)
|
|
122
|
-
return [];
|
|
123
|
-
return Array.isArray(value) ? value : [value];
|
|
124
|
-
}
|
|
125
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
126
|
-
0 && (module.exports = {
|
|
127
|
-
minimist
|
|
128
|
-
});
|
|
@@ -1,343 +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 output_exports = {};
|
|
30
|
-
__export(output_exports, {
|
|
31
|
-
JsonOutput: () => JsonOutput,
|
|
32
|
-
TextOutput: () => TextOutput
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(output_exports);
|
|
35
|
-
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_extension = require("../utils/extension");
|
|
37
|
-
class TextOutput {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.json = false;
|
|
40
|
-
}
|
|
41
|
-
version(v) {
|
|
42
|
-
console.log(v);
|
|
43
|
-
}
|
|
44
|
-
help(text) {
|
|
45
|
-
console.log(text);
|
|
46
|
-
}
|
|
47
|
-
errorUnknownCommand(name, globalHelp) {
|
|
48
|
-
console.error(`Unknown command: ${name}
|
|
49
|
-
`);
|
|
50
|
-
console.log(globalHelp);
|
|
51
|
-
return process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
errorUnknownOption(opts, commandHelp) {
|
|
54
|
-
console.error(`Unknown option${opts.length > 1 ? "s" : ""}: ${opts.map((f) => `--${f}`).join(", ")}`);
|
|
55
|
-
console.log("");
|
|
56
|
-
console.log(commandHelp);
|
|
57
|
-
return process.exit(1);
|
|
58
|
-
}
|
|
59
|
-
errorTooManyArguments(expected, received, commandHelp) {
|
|
60
|
-
console.error(`error: too many arguments: expected ${expected}, received ${received}`);
|
|
61
|
-
console.log("");
|
|
62
|
-
console.log(commandHelp);
|
|
63
|
-
return process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
errorAttachConflict() {
|
|
66
|
-
console.error(`Error: only one of [name], --cdp, --endpoint, or --extension can be specified`);
|
|
67
|
-
return process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
errorDetachNotAttached(session) {
|
|
70
|
-
console.error(`Error: session '${session}' was not attached; use \`playwright-cli${session !== "default" ? ` -s=${session}` : ""} close\` to stop it.`);
|
|
71
|
-
return process.exit(1);
|
|
72
|
-
}
|
|
73
|
-
errorBrowserNotOpenForTool(session) {
|
|
74
|
-
console.log(`The browser '${session}' is not open, please run open first`);
|
|
75
|
-
console.log("");
|
|
76
|
-
console.log(` playwright-cli${session !== "default" ? ` -s=${session}` : ""} open [params]`);
|
|
77
|
-
return process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
errorAttachNoTarget() {
|
|
80
|
-
console.error(`Error: no target specified for attach command; use one of [name], --cdp, --endpoint, or --extension to specify the target to attach to.`);
|
|
81
|
-
return process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
list({ all, browsers, servers, channelSessions }) {
|
|
84
|
-
const byWorkspace = /* @__PURE__ */ new Map();
|
|
85
|
-
for (const browser of browsers) {
|
|
86
|
-
let list = byWorkspace.get(browser.workspace);
|
|
87
|
-
if (!list) {
|
|
88
|
-
list = [];
|
|
89
|
-
byWorkspace.set(browser.workspace, list);
|
|
90
|
-
}
|
|
91
|
-
list.push(browser);
|
|
92
|
-
}
|
|
93
|
-
let count = 0;
|
|
94
|
-
for (const [workspaceKey, list] of byWorkspace) {
|
|
95
|
-
if (count === 0)
|
|
96
|
-
console.log("### Browsers");
|
|
97
|
-
if (all)
|
|
98
|
-
console.log(`${import_path.default.relative(process.cwd(), workspaceKey) || "/"}:`);
|
|
99
|
-
for (const browser of list)
|
|
100
|
-
console.log(renderBrowser(browser));
|
|
101
|
-
count += list.length;
|
|
102
|
-
}
|
|
103
|
-
if (!all) {
|
|
104
|
-
if (!count)
|
|
105
|
-
console.log(" (no browsers)");
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (servers?.length) {
|
|
109
|
-
if (count)
|
|
110
|
-
console.log("");
|
|
111
|
-
console.log("### Browser servers available for attach");
|
|
112
|
-
const serversByWorkspace = /* @__PURE__ */ new Map();
|
|
113
|
-
for (const server of servers) {
|
|
114
|
-
let list = serversByWorkspace.get(server.workspaceDir ?? "");
|
|
115
|
-
if (!list) {
|
|
116
|
-
list = [];
|
|
117
|
-
serversByWorkspace.set(server.workspaceDir ?? "", list);
|
|
118
|
-
}
|
|
119
|
-
list.push(server);
|
|
120
|
-
}
|
|
121
|
-
for (const [workspaceKey, list] of serversByWorkspace) {
|
|
122
|
-
if (workspaceKey)
|
|
123
|
-
console.log(`${import_path.default.relative(process.cwd(), workspaceKey) || "/"}:`);
|
|
124
|
-
for (const server of list)
|
|
125
|
-
console.log(renderServer(server));
|
|
126
|
-
}
|
|
127
|
-
count += servers.length;
|
|
128
|
-
}
|
|
129
|
-
if (!count)
|
|
130
|
-
console.log(" (no browsers)");
|
|
131
|
-
if (channelSessions?.length) {
|
|
132
|
-
console.log("");
|
|
133
|
-
console.log("### Browsers available to attach via CDP");
|
|
134
|
-
for (const session of channelSessions)
|
|
135
|
-
console.log(renderChannelSession(session));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
closeAll(_sessions) {
|
|
139
|
-
}
|
|
140
|
-
deleteData(session, result) {
|
|
141
|
-
if (!result.existed) {
|
|
142
|
-
console.log(`No user data found for browser '${session}'.`);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (result.deletedUserDataDir)
|
|
146
|
-
console.log(`Deleted user data for browser '${session}'.`);
|
|
147
|
-
}
|
|
148
|
-
killAll(pids) {
|
|
149
|
-
for (const pid of pids)
|
|
150
|
-
console.log(`Killed daemon process ${pid}`);
|
|
151
|
-
if (pids.length === 0)
|
|
152
|
-
console.log("No daemon processes found.");
|
|
153
|
-
else
|
|
154
|
-
console.log(`Killed ${pids.length} daemon process${pids.length === 1 ? "" : "es"}.`);
|
|
155
|
-
}
|
|
156
|
-
open(session, pid, toolResult) {
|
|
157
|
-
console.log(`### Browser \`${session}\` opened with pid ${pid}.`);
|
|
158
|
-
if (toolResult)
|
|
159
|
-
console.log(toolResult);
|
|
160
|
-
}
|
|
161
|
-
attach(session, pid, endpoint, toolResult) {
|
|
162
|
-
if (endpoint) {
|
|
163
|
-
console.log(`### Session \`${session}\` created, attached to \`${endpoint}\`.`);
|
|
164
|
-
console.log(`Run commands with: playwright-cli --s=${session} <command>`);
|
|
165
|
-
console.log("");
|
|
166
|
-
} else {
|
|
167
|
-
console.log(`### Browser \`${session}\` opened with pid ${pid}.`);
|
|
168
|
-
}
|
|
169
|
-
if (toolResult)
|
|
170
|
-
console.log(toolResult);
|
|
171
|
-
}
|
|
172
|
-
close(session, wasOpen) {
|
|
173
|
-
if (!wasOpen) {
|
|
174
|
-
console.log(`Browser '${session}' is not open.`);
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
console.log(`Browser '${session}' closed
|
|
178
|
-
`);
|
|
179
|
-
}
|
|
180
|
-
detach(session, wasAttached) {
|
|
181
|
-
if (!wasAttached) {
|
|
182
|
-
console.log(`Browser '${session}' is not attached.`);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
console.log(`Browser '${session}' detached
|
|
186
|
-
`);
|
|
187
|
-
}
|
|
188
|
-
installed() {
|
|
189
|
-
}
|
|
190
|
-
show(_session, pid) {
|
|
191
|
-
if (process.env.PWTEST_PRINT_DASHBOARD_PID_FOR_TEST)
|
|
192
|
-
console.log(`### Dashboard opened with pid ${pid}.`);
|
|
193
|
-
}
|
|
194
|
-
toolResult(text) {
|
|
195
|
-
console.log(text);
|
|
196
|
-
}
|
|
197
|
-
installStdio() {
|
|
198
|
-
return "inherit";
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
class JsonOutput {
|
|
202
|
-
constructor() {
|
|
203
|
-
this.json = true;
|
|
204
|
-
}
|
|
205
|
-
version(v) {
|
|
206
|
-
this._emit({ version: v });
|
|
207
|
-
}
|
|
208
|
-
help(text) {
|
|
209
|
-
this._emit({ help: text });
|
|
210
|
-
}
|
|
211
|
-
errorUnknownCommand(name, _globalHelp) {
|
|
212
|
-
this._emit({ isError: true, error: `Unknown command: ${name}` });
|
|
213
|
-
return process.exit(1);
|
|
214
|
-
}
|
|
215
|
-
errorUnknownOption(opts, _commandHelp) {
|
|
216
|
-
this._emit({ isError: true, error: `Unknown option${opts.length > 1 ? "s" : ""}: ${opts.map((f) => `--${f}`).join(", ")}` });
|
|
217
|
-
return process.exit(1);
|
|
218
|
-
}
|
|
219
|
-
errorTooManyArguments(expected, received, _commandHelp) {
|
|
220
|
-
this._emit({ isError: true, error: `error: too many arguments: expected ${expected}, received ${received}` });
|
|
221
|
-
return process.exit(1);
|
|
222
|
-
}
|
|
223
|
-
errorAttachConflict() {
|
|
224
|
-
this._emit({ isError: true, error: `only one of [name], --cdp, --endpoint, or --extension can be specified` });
|
|
225
|
-
return process.exit(1);
|
|
226
|
-
}
|
|
227
|
-
errorDetachNotAttached(session) {
|
|
228
|
-
this._emit({ isError: true, error: `session '${session}' was not attached; use close to stop it.` });
|
|
229
|
-
return process.exit(1);
|
|
230
|
-
}
|
|
231
|
-
errorBrowserNotOpenForTool(session) {
|
|
232
|
-
this._emit({ isError: true, error: `The browser '${session}' is not open, please run open first` });
|
|
233
|
-
return process.exit(1);
|
|
234
|
-
}
|
|
235
|
-
errorAttachNoTarget() {
|
|
236
|
-
this._emit({ isError: true, error: `no target specified for attach command; use one of [name], --cdp, --endpoint, or --extension to specify the target to attach to.` });
|
|
237
|
-
return process.exit(1);
|
|
238
|
-
}
|
|
239
|
-
list({ all, browsers, servers, channelSessions }) {
|
|
240
|
-
const payload = { browsers };
|
|
241
|
-
if (all) {
|
|
242
|
-
payload.servers = servers ?? [];
|
|
243
|
-
payload.channelSessions = channelSessions ?? [];
|
|
244
|
-
}
|
|
245
|
-
this._emit(payload);
|
|
246
|
-
}
|
|
247
|
-
closeAll(sessions) {
|
|
248
|
-
this._emit({ closed: sessions });
|
|
249
|
-
}
|
|
250
|
-
deleteData(session, result) {
|
|
251
|
-
this._emit({ session, deleted: result.existed });
|
|
252
|
-
}
|
|
253
|
-
killAll(pids) {
|
|
254
|
-
this._emit({ killed: pids.length, pids });
|
|
255
|
-
}
|
|
256
|
-
open(session, pid, toolResult) {
|
|
257
|
-
this._emit({ session, pid, result: parseJsonText(toolResult) });
|
|
258
|
-
}
|
|
259
|
-
attach(session, pid, endpoint, toolResult) {
|
|
260
|
-
this._emit({
|
|
261
|
-
session,
|
|
262
|
-
pid,
|
|
263
|
-
...endpoint ? { endpoint } : {},
|
|
264
|
-
result: parseJsonText(toolResult)
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
close(session, wasOpen) {
|
|
268
|
-
this._emit({ session, status: wasOpen ? "closed" : "not-open" });
|
|
269
|
-
}
|
|
270
|
-
detach(session, wasAttached) {
|
|
271
|
-
this._emit({ session, status: wasAttached ? "detached" : "not-attached" });
|
|
272
|
-
}
|
|
273
|
-
installed() {
|
|
274
|
-
this._emit({ installed: true });
|
|
275
|
-
}
|
|
276
|
-
show(session, pid) {
|
|
277
|
-
this._emit({ session, pid });
|
|
278
|
-
}
|
|
279
|
-
toolResult(text) {
|
|
280
|
-
console.log(text);
|
|
281
|
-
}
|
|
282
|
-
installStdio() {
|
|
283
|
-
return "ignore";
|
|
284
|
-
}
|
|
285
|
-
_emit(value) {
|
|
286
|
-
console.log(JSON.stringify(value, null, 2));
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
function parseJsonText(text) {
|
|
290
|
-
try {
|
|
291
|
-
return JSON.parse(text);
|
|
292
|
-
} catch {
|
|
293
|
-
return text;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function renderBrowser(browser) {
|
|
297
|
-
const lines = [`- ${browser.name}:`];
|
|
298
|
-
lines.push(` - status: ${browser.status}`);
|
|
299
|
-
if (browser.status === "open" && !browser.compatible)
|
|
300
|
-
lines.push(` - version: v${browser.version} [incompatible please re-open]`);
|
|
301
|
-
if (browser.browserType)
|
|
302
|
-
lines.push(` - browser-type: ${browser.browserType}${browser.attached ? " (attached)" : ""}`);
|
|
303
|
-
if (!browser.attached) {
|
|
304
|
-
if (browser.userDataDir === null)
|
|
305
|
-
lines.push(` - user-data-dir: <in-memory>`);
|
|
306
|
-
else
|
|
307
|
-
lines.push(` - user-data-dir: ${browser.userDataDir}`);
|
|
308
|
-
if (browser.headed !== void 0)
|
|
309
|
-
lines.push(` - headed: ${browser.headed}`);
|
|
310
|
-
}
|
|
311
|
-
return lines.join("\n");
|
|
312
|
-
}
|
|
313
|
-
function renderServer(server) {
|
|
314
|
-
const lines = [`- browser "${server.title}":`];
|
|
315
|
-
lines.push(` - browser: ${server.browser.browserName}`);
|
|
316
|
-
lines.push(` - version: v${server.playwrightVersion}`);
|
|
317
|
-
if (server.browser.userDataDir)
|
|
318
|
-
lines.push(` - data-dir: ${server.browser.userDataDir}`);
|
|
319
|
-
else
|
|
320
|
-
lines.push(` - data-dir: <in-memory>`);
|
|
321
|
-
lines.push(` - run \`playwright-cli attach "${server.title}"\` to attach`);
|
|
322
|
-
return lines.join("\n");
|
|
323
|
-
}
|
|
324
|
-
function renderChannelSession(session) {
|
|
325
|
-
const lines = [`- ${session.channel}:`];
|
|
326
|
-
lines.push(` - data-dir: ${session.userDataDir}`);
|
|
327
|
-
if (session.extensionInstalled)
|
|
328
|
-
lines.push(` - attach (extension): \`playwright-cli attach --extension=${session.channel}\``);
|
|
329
|
-
else
|
|
330
|
-
lines.push(` - attach (extension): install at ${import_extension.playwrightExtensionInstallUrl}`);
|
|
331
|
-
if (session.endpoint) {
|
|
332
|
-
lines.push(` - attach (remote debugging): \`playwright-cli attach --cdp=${session.channel}\``);
|
|
333
|
-
} else {
|
|
334
|
-
const inspectScheme = session.channel.startsWith("msedge") ? "edge" : "chrome";
|
|
335
|
-
lines.push(` - attach (remote debugging): enable at ${inspectScheme}://inspect/#remote-debugging`);
|
|
336
|
-
}
|
|
337
|
-
return lines.join("\n");
|
|
338
|
-
}
|
|
339
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
340
|
-
0 && (module.exports = {
|
|
341
|
-
JsonOutput,
|
|
342
|
-
TextOutput
|
|
343
|
-
});
|