@cotestdev/mcp_playwright 0.0.15 → 0.0.17

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.
@@ -0,0 +1,62 @@
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 pirates_exports = {};
30
+ __export(pirates_exports, {
31
+ addHook: () => addHook
32
+ });
33
+ module.exports = __toCommonJS(pirates_exports);
34
+ var import_module = __toESM(require("module"));
35
+ var import_path = __toESM(require("path"));
36
+ function addHook(transformHook, shouldTransform, extensions) {
37
+ const extensionsToOverwrite = extensions.filter((e) => e !== ".cjs");
38
+ const allSupportedExtensions = new Set(extensions);
39
+ const loaders = import_module.default._extensions;
40
+ const jsLoader = loaders[".js"];
41
+ for (const extension of extensionsToOverwrite) {
42
+ let newLoader2 = function(mod, filename, ...loaderArgs) {
43
+ if (allSupportedExtensions.has(import_path.default.extname(filename)) && shouldTransform(filename)) {
44
+ let newCompile2 = function(code, file, ...ignoredArgs) {
45
+ mod._compile = oldCompile;
46
+ return oldCompile.call(this, transformHook(code, filename), file);
47
+ };
48
+ var newCompile = newCompile2;
49
+ const oldCompile = mod._compile;
50
+ mod._compile = newCompile2;
51
+ }
52
+ originalLoader.call(this, mod, filename, ...loaderArgs);
53
+ };
54
+ var newLoader = newLoader2;
55
+ const originalLoader = loaders[extension] || jsLoader;
56
+ loaders[extension] = newLoader2;
57
+ }
58
+ }
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ addHook
62
+ });
@@ -0,0 +1,103 @@
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 tsconfig_loader_exports = {};
30
+ __export(tsconfig_loader_exports, {
31
+ loadTsConfig: () => loadTsConfig
32
+ });
33
+ module.exports = __toCommonJS(tsconfig_loader_exports);
34
+ var import_path = __toESM(require("path"));
35
+ var import_fs = __toESM(require("fs"));
36
+ var import_utilsBundle = require("../utilsBundle");
37
+ function loadTsConfig(configPath) {
38
+ try {
39
+ const references = [];
40
+ const config = innerLoadTsConfig(configPath, references);
41
+ return [config, ...references];
42
+ } catch (e) {
43
+ throw new Error(`Failed to load tsconfig file at ${configPath}:
44
+ ${e.message}`);
45
+ }
46
+ }
47
+ function resolveConfigFile(baseConfigFile, referencedConfigFile) {
48
+ if (!referencedConfigFile.endsWith(".json"))
49
+ referencedConfigFile += ".json";
50
+ const currentDir = import_path.default.dirname(baseConfigFile);
51
+ let resolvedConfigFile = import_path.default.resolve(currentDir, referencedConfigFile);
52
+ if (referencedConfigFile.includes("/") && referencedConfigFile.includes(".") && !import_fs.default.existsSync(resolvedConfigFile))
53
+ resolvedConfigFile = import_path.default.join(currentDir, "node_modules", referencedConfigFile);
54
+ return resolvedConfigFile;
55
+ }
56
+ function innerLoadTsConfig(configFilePath, references, visited = /* @__PURE__ */ new Map()) {
57
+ if (visited.has(configFilePath))
58
+ return visited.get(configFilePath);
59
+ let result = {
60
+ tsConfigPath: configFilePath
61
+ };
62
+ visited.set(configFilePath, result);
63
+ if (!import_fs.default.existsSync(configFilePath))
64
+ return result;
65
+ const configString = import_fs.default.readFileSync(configFilePath, "utf-8");
66
+ const cleanedJson = StripBom(configString);
67
+ const parsedConfig = import_utilsBundle.json5.parse(cleanedJson);
68
+ const extendsArray = Array.isArray(parsedConfig.extends) ? parsedConfig.extends : parsedConfig.extends ? [parsedConfig.extends] : [];
69
+ for (const extendedConfig of extendsArray) {
70
+ const extendedConfigPath = resolveConfigFile(configFilePath, extendedConfig);
71
+ const base = innerLoadTsConfig(extendedConfigPath, references, visited);
72
+ Object.assign(result, base, { tsConfigPath: configFilePath });
73
+ }
74
+ if (parsedConfig.compilerOptions?.allowJs !== void 0)
75
+ result.allowJs = parsedConfig.compilerOptions.allowJs;
76
+ if (parsedConfig.compilerOptions?.paths !== void 0) {
77
+ result.paths = {
78
+ mapping: parsedConfig.compilerOptions.paths,
79
+ pathsBasePath: import_path.default.dirname(configFilePath)
80
+ };
81
+ }
82
+ if (parsedConfig.compilerOptions?.baseUrl !== void 0) {
83
+ result.absoluteBaseUrl = import_path.default.resolve(import_path.default.dirname(configFilePath), parsedConfig.compilerOptions.baseUrl);
84
+ }
85
+ for (const ref of parsedConfig.references || [])
86
+ references.push(innerLoadTsConfig(resolveConfigFile(configFilePath, ref.path), references, visited));
87
+ if (import_path.default.basename(configFilePath) === "jsconfig.json" && result.allowJs === void 0)
88
+ result.allowJs = true;
89
+ return result;
90
+ }
91
+ function StripBom(string) {
92
+ if (typeof string !== "string") {
93
+ throw new TypeError(`Expected a string, got ${typeof string}`);
94
+ }
95
+ if (string.charCodeAt(0) === 65279) {
96
+ return string.slice(1);
97
+ }
98
+ return string;
99
+ }
100
+ // Annotate the CommonJS export names for ESM import in node:
101
+ 0 && (module.exports = {
102
+ loadTsConfig
103
+ });
@@ -0,0 +1,43 @@
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 babelBundle_exports = {};
20
+ __export(babelBundle_exports, {
21
+ babelParse: () => babelParse,
22
+ babelTransform: () => babelTransform,
23
+ codeFrameColumns: () => codeFrameColumns,
24
+ declare: () => declare,
25
+ traverse: () => traverse,
26
+ types: () => types
27
+ });
28
+ module.exports = __toCommonJS(babelBundle_exports);
29
+ const codeFrameColumns = require("./babelBundleImpl").codeFrameColumns;
30
+ const declare = require("./babelBundleImpl").declare;
31
+ const types = require("./babelBundleImpl").types;
32
+ const traverse = require("./babelBundleImpl").traverse;
33
+ const babelTransform = require("./babelBundleImpl").babelTransform;
34
+ const babelParse = require("./babelBundleImpl").babelParse;
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ babelParse,
38
+ babelTransform,
39
+ codeFrameColumns,
40
+ declare,
41
+ traverse,
42
+ types
43
+ });