e2e-ai 1.0.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/README.md +339 -0
- package/agents/init-agent.md +75 -0
- package/agents/playwright-generator-agent.md +100 -0
- package/agents/qa-testcase-agent.md +81 -0
- package/agents/refactor-agent.md +55 -0
- package/agents/scenario-agent.md +94 -0
- package/agents/self-healing-agent.md +94 -0
- package/agents/transcript-agent.md +111 -0
- package/dist/cli-7hdsk36p.js +12500 -0
- package/dist/cli-mesq5m0a.js +57 -0
- package/dist/cli-wckvcay0.js +48 -0
- package/dist/cli.js +4292 -0
- package/dist/config/schema.js +9 -0
- package/dist/index-4fsmqzap.js +7073 -0
- package/dist/index.js +15 -0
- package/package.json +44 -0
- package/scripts/auth/setup-auth.mjs +118 -0
- package/scripts/codegen-env.mjs +337 -0
- package/scripts/exporters/zephyr-json-to-import-xml.ts +156 -0
- package/scripts/trace/replay-with-trace.mjs +95 -0
- package/scripts/trace/replay.config.ts +37 -0
- package/scripts/voice/merger.mjs +88 -0
- package/scripts/voice/recorder.mjs +54 -0
- package/scripts/voice/transcriber.mjs +52 -0
- package/templates/e2e-ai.context.example.md +93 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
E2eAiConfigSchema
|
|
3
|
+
} from "./cli-7hdsk36p.js";
|
|
4
|
+
|
|
5
|
+
// src/config/loader.ts
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import { dirname, join, resolve } from "node:path";
|
|
8
|
+
import { pathToFileURL } from "node:url";
|
|
9
|
+
var CONFIG_FILENAMES = ["e2e-ai.config.ts", "e2e-ai.config.js", "e2e-ai.config.mjs"];
|
|
10
|
+
var cachedConfig = null;
|
|
11
|
+
var cachedProjectRoot = null;
|
|
12
|
+
function findConfigDir(startDir) {
|
|
13
|
+
let dir = resolve(startDir);
|
|
14
|
+
const root = dirname(dir) === dir ? dir : undefined;
|
|
15
|
+
while (true) {
|
|
16
|
+
for (const name of CONFIG_FILENAMES) {
|
|
17
|
+
if (existsSync(join(dir, name))) {
|
|
18
|
+
return dir;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const parent = dirname(dir);
|
|
22
|
+
if (parent === dir || dir === root)
|
|
23
|
+
return null;
|
|
24
|
+
dir = parent;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function getProjectRoot() {
|
|
28
|
+
if (cachedProjectRoot)
|
|
29
|
+
return cachedProjectRoot;
|
|
30
|
+
const found = findConfigDir(process.cwd());
|
|
31
|
+
cachedProjectRoot = found ?? process.cwd();
|
|
32
|
+
return cachedProjectRoot;
|
|
33
|
+
}
|
|
34
|
+
function getPackageRoot() {
|
|
35
|
+
return resolve(import.meta.dirname, "..", "..");
|
|
36
|
+
}
|
|
37
|
+
async function loadConfig() {
|
|
38
|
+
if (cachedConfig)
|
|
39
|
+
return cachedConfig;
|
|
40
|
+
const projectRoot = getProjectRoot();
|
|
41
|
+
let userConfig = {};
|
|
42
|
+
for (const name of CONFIG_FILENAMES) {
|
|
43
|
+
const configPath = join(projectRoot, name);
|
|
44
|
+
if (existsSync(configPath)) {
|
|
45
|
+
try {
|
|
46
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
47
|
+
const mod = await import(fileUrl);
|
|
48
|
+
userConfig = mod.default ?? mod;
|
|
49
|
+
break;
|
|
50
|
+
} catch {}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
cachedConfig = E2eAiConfigSchema.parse(userConfig);
|
|
54
|
+
return cachedConfig;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { getProjectRoot, getPackageRoot, loadConfig };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
for (let key of __getOwnPropNames(mod))
|
|
23
|
+
if (!__hasOwnProp.call(to, key))
|
|
24
|
+
__defProp(to, key, {
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
26
|
+
enumerable: true
|
|
27
|
+
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
47
|
+
|
|
48
|
+
export { __toESM, __commonJS, __export, __require };
|