@mizchi/vlmkit-generate 0.7.0 → 0.8.1
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 +21 -1
- package/dist/cli.d.mts +26 -0
- package/dist/cli.mjs +181 -0
- package/dist/generate.d.mts +14 -0
- package/dist/generate.mjs +335 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +3 -0
- package/{src/types.ts → dist/types.d.mts} +12 -13
- package/dist/types.mjs +1 -0
- package/dist/write.d.mts +46 -0
- package/dist/write.mjs +121 -0
- package/package.json +23 -8
- package/src/cli.ts +0 -213
- package/src/generate.ts +0 -422
- package/src/index.ts +0 -21
- package/src/write.ts +0 -177
package/dist/write.d.mts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/write.d.ts
|
|
2
|
+
interface GateCommand {
|
|
3
|
+
name?: string;
|
|
4
|
+
command: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
env?: Record<string, string | undefined>;
|
|
7
|
+
runs?: number;
|
|
8
|
+
}
|
|
9
|
+
interface GateResult {
|
|
10
|
+
name: string;
|
|
11
|
+
command: string;
|
|
12
|
+
ok: boolean;
|
|
13
|
+
exitCode: number;
|
|
14
|
+
stdout: string;
|
|
15
|
+
stderr: string;
|
|
16
|
+
}
|
|
17
|
+
interface WriteGeneratedTestOptions {
|
|
18
|
+
filePath: string;
|
|
19
|
+
source: string;
|
|
20
|
+
overwrite?: boolean;
|
|
21
|
+
dryRun?: boolean;
|
|
22
|
+
gates?: GateCommand[];
|
|
23
|
+
cwd?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WriteGeneratedTestResult {
|
|
26
|
+
filePath: string;
|
|
27
|
+
written: boolean;
|
|
28
|
+
gates: GateResult[];
|
|
29
|
+
}
|
|
30
|
+
interface WriteGeneratedTestDeps {
|
|
31
|
+
runCommand?: (gate: GateCommand) => Promise<GateResult>;
|
|
32
|
+
}
|
|
33
|
+
declare class GeneratedTestWriteError extends Error {
|
|
34
|
+
readonly code: "EEXIST";
|
|
35
|
+
constructor(code: "EEXIST", message: string);
|
|
36
|
+
}
|
|
37
|
+
declare class GeneratedTestGateError extends Error {
|
|
38
|
+
readonly result: GateResult;
|
|
39
|
+
constructor(result: GateResult);
|
|
40
|
+
}
|
|
41
|
+
declare function writeGeneratedTestFile(options: WriteGeneratedTestOptions, deps?: WriteGeneratedTestDeps): Promise<WriteGeneratedTestResult>;
|
|
42
|
+
declare function buildPlaywrightListGate(): GateCommand;
|
|
43
|
+
declare function buildPlaywrightRuntimeGate(config?: string, runs?: number): GateCommand;
|
|
44
|
+
declare function buildTypecheckGate(tsconfig?: string): GateCommand;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { GateCommand, GateResult, GeneratedTestGateError, GeneratedTestWriteError, WriteGeneratedTestDeps, WriteGeneratedTestOptions, WriteGeneratedTestResult, buildPlaywrightListGate, buildPlaywrightRuntimeGate, buildTypecheckGate, writeGeneratedTestFile };
|
package/dist/write.mjs
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { exec } from "node:child_process";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
//#region src/write.ts
|
|
5
|
+
var GeneratedTestWriteError = class extends Error {
|
|
6
|
+
code;
|
|
7
|
+
constructor(code, message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "GeneratedTestWriteError";
|
|
10
|
+
this.code = code;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var GeneratedTestGateError = class extends Error {
|
|
14
|
+
result;
|
|
15
|
+
constructor(result) {
|
|
16
|
+
super(`Generated test gate failed: ${result.name}`);
|
|
17
|
+
this.name = "GeneratedTestGateError";
|
|
18
|
+
this.result = result;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
async function writeGeneratedTestFile(options, deps = {}) {
|
|
22
|
+
const cwd = options.cwd ?? process.cwd();
|
|
23
|
+
const filePath = resolve(cwd, options.filePath);
|
|
24
|
+
const gates = options.gates ?? [];
|
|
25
|
+
const runCommand = deps.runCommand ?? runShellGate;
|
|
26
|
+
const previous = await readOptional(filePath);
|
|
27
|
+
if (previous !== void 0 && !options.overwrite) throw new GeneratedTestWriteError("EEXIST", `Refusing to overwrite existing file: ${filePath}`);
|
|
28
|
+
if (options.dryRun) return {
|
|
29
|
+
filePath,
|
|
30
|
+
written: false,
|
|
31
|
+
gates: []
|
|
32
|
+
};
|
|
33
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
34
|
+
await writeFile(filePath, options.source, "utf8");
|
|
35
|
+
const results = [];
|
|
36
|
+
try {
|
|
37
|
+
for (const gate of gates) {
|
|
38
|
+
const runs = normalizeGateRuns(gate.runs);
|
|
39
|
+
for (let i = 0; i < runs; i++) {
|
|
40
|
+
const result = await runCommand({
|
|
41
|
+
...gate,
|
|
42
|
+
cwd: gate.cwd ?? cwd,
|
|
43
|
+
command: formatGateCommand(gate.command, filePath)
|
|
44
|
+
});
|
|
45
|
+
results.push(result);
|
|
46
|
+
if (!result.ok) throw new GeneratedTestGateError(result);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch (error) {
|
|
50
|
+
if (previous !== void 0) await writeFile(filePath, previous, "utf8");
|
|
51
|
+
else await rm(filePath, { force: true });
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
filePath,
|
|
56
|
+
written: true,
|
|
57
|
+
gates: results
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function buildPlaywrightListGate() {
|
|
61
|
+
return {
|
|
62
|
+
name: "playwright-list",
|
|
63
|
+
command: "pnpm exec playwright test --list {testFile}"
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function buildPlaywrightRuntimeGate(config, runs) {
|
|
67
|
+
const normalizedRuns = normalizeGateRuns(runs);
|
|
68
|
+
return {
|
|
69
|
+
name: "playwright-runtime",
|
|
70
|
+
command: config ? `pnpm exec playwright test --config ${config} {testFile}` : "pnpm exec playwright test {testFile}",
|
|
71
|
+
...normalizedRuns > 1 ? { runs: normalizedRuns } : {}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function buildTypecheckGate(tsconfig) {
|
|
75
|
+
return {
|
|
76
|
+
name: "typecheck",
|
|
77
|
+
command: tsconfig ? `pnpm exec tsc --noEmit -p ${tsconfig}` : "pnpm exec tsc --noEmit"
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async function readOptional(path) {
|
|
81
|
+
try {
|
|
82
|
+
return await readFile(path, "utf8");
|
|
83
|
+
} catch (error) {
|
|
84
|
+
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") return void 0;
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function formatGateCommand(command, filePath) {
|
|
89
|
+
return command.replaceAll("{testFile}", shellQuote(filePath));
|
|
90
|
+
}
|
|
91
|
+
function normalizeGateRuns(runs) {
|
|
92
|
+
if (runs === void 0) return 1;
|
|
93
|
+
if (!Number.isInteger(runs) || runs < 1) throw new Error("gate runs must be a positive integer");
|
|
94
|
+
return runs;
|
|
95
|
+
}
|
|
96
|
+
function shellQuote(value) {
|
|
97
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
98
|
+
}
|
|
99
|
+
function runShellGate(gate) {
|
|
100
|
+
return new Promise((resolveResult) => {
|
|
101
|
+
exec(gate.command, {
|
|
102
|
+
cwd: gate.cwd,
|
|
103
|
+
env: {
|
|
104
|
+
...process.env,
|
|
105
|
+
...gate.env
|
|
106
|
+
}
|
|
107
|
+
}, (error, stdout, stderr) => {
|
|
108
|
+
const exitCode = typeof error?.code === "number" ? error.code : error ? 1 : 0;
|
|
109
|
+
resolveResult({
|
|
110
|
+
name: gate.name ?? gate.command,
|
|
111
|
+
command: gate.command,
|
|
112
|
+
ok: !error,
|
|
113
|
+
exitCode,
|
|
114
|
+
stdout,
|
|
115
|
+
stderr
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { GeneratedTestGateError, GeneratedTestWriteError, buildPlaywrightListGate, buildPlaywrightRuntimeGate, buildTypecheckGate, writeGeneratedTestFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mizchi/vlmkit-generate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Generator contract for Playwright tests: turns a Markdown plan and generation rules into a Playwright spec source file.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "mizchi",
|
|
@@ -14,25 +14,40 @@
|
|
|
14
14
|
"url": "https://github.com/mizchi/vlmkit/issues"
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=24"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
17
23
|
"files": [
|
|
18
|
-
"
|
|
19
|
-
"!src/**/*.test.ts",
|
|
24
|
+
"dist/**",
|
|
20
25
|
"README.md",
|
|
21
26
|
"LICENSE"
|
|
22
27
|
],
|
|
23
28
|
"bin": {
|
|
24
|
-
"vlmkit-generate": "./
|
|
29
|
+
"vlmkit-generate": "./dist/cli.mjs"
|
|
25
30
|
},
|
|
26
31
|
"exports": {
|
|
27
|
-
".":
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.mts",
|
|
34
|
+
"import": "./dist/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"./cli": {
|
|
37
|
+
"types": "./dist/cli.d.mts",
|
|
38
|
+
"import": "./dist/cli.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./*.ts": {
|
|
41
|
+
"types": "./dist/*.d.mts",
|
|
42
|
+
"import": "./dist/*.mjs"
|
|
43
|
+
}
|
|
30
44
|
},
|
|
31
45
|
"dependencies": {
|
|
32
46
|
"typescript": "^6.0.2",
|
|
33
|
-
"@mizchi/vlmkit-ai": "0.
|
|
47
|
+
"@mizchi/vlmkit-ai": "0.8.1"
|
|
34
48
|
},
|
|
35
49
|
"scripts": {
|
|
50
|
+
"build": "pnpm --dir ../.. exec tsdown --config tsdown.packages.config.ts --filter @mizchi/vlmkit-generate",
|
|
36
51
|
"test": "node --test 'src/**/*.test.ts'"
|
|
37
52
|
}
|
|
38
53
|
}
|
package/src/cli.ts
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { realpathSync } from "node:fs";
|
|
3
|
-
import { readFile } from "node:fs/promises";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { generatePlaywrightTestWithRetry } from "./generate.ts";
|
|
6
|
-
import { buildPlaywrightRuntimeGate, GeneratedTestGateError, GeneratedTestWriteError, type GateCommand, writeGeneratedTestFile } from "./write.ts";
|
|
7
|
-
import type { GenerateDeps, GenerateInput, GeneratorModelOptions, LocatorInventory } from "./types.ts";
|
|
8
|
-
|
|
9
|
-
export interface GenerateCliArgs {
|
|
10
|
-
plan: string;
|
|
11
|
-
out: string;
|
|
12
|
-
rules?: string;
|
|
13
|
-
helperImportPath?: string;
|
|
14
|
-
seedTestPath?: string;
|
|
15
|
-
locatorInventory?: string;
|
|
16
|
-
requireScreenshots: boolean;
|
|
17
|
-
provider?: GeneratorModelOptions["provider"];
|
|
18
|
-
model?: string;
|
|
19
|
-
maxTokens?: number;
|
|
20
|
-
maxAttempts?: number;
|
|
21
|
-
overwrite: boolean;
|
|
22
|
-
runtimeGate?: boolean;
|
|
23
|
-
playwrightConfig?: string;
|
|
24
|
-
runtimeGateRuns?: number;
|
|
25
|
-
gateCommands: GateCommand[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function parseGenerateCliArgs(argv: string[]): GenerateCliArgs {
|
|
29
|
-
const args: Partial<GenerateCliArgs> = { requireScreenshots: true, overwrite: false, gateCommands: [] };
|
|
30
|
-
for (let i = 0; i < argv.length; i++) {
|
|
31
|
-
const arg = argv[i]!;
|
|
32
|
-
const next = () => {
|
|
33
|
-
const value = argv[++i];
|
|
34
|
-
if (!value) throw new Error(`Missing value for ${arg}`);
|
|
35
|
-
return value;
|
|
36
|
-
};
|
|
37
|
-
switch (arg) {
|
|
38
|
-
case "--plan":
|
|
39
|
-
args.plan = next();
|
|
40
|
-
break;
|
|
41
|
-
case "--out":
|
|
42
|
-
args.out = next();
|
|
43
|
-
break;
|
|
44
|
-
case "--rules":
|
|
45
|
-
args.rules = next();
|
|
46
|
-
break;
|
|
47
|
-
case "--helper-import":
|
|
48
|
-
args.helperImportPath = next();
|
|
49
|
-
break;
|
|
50
|
-
case "--seed":
|
|
51
|
-
args.seedTestPath = next();
|
|
52
|
-
break;
|
|
53
|
-
case "--locator-inventory":
|
|
54
|
-
args.locatorInventory = next();
|
|
55
|
-
break;
|
|
56
|
-
case "--no-screenshots":
|
|
57
|
-
args.requireScreenshots = false;
|
|
58
|
-
break;
|
|
59
|
-
case "--provider":
|
|
60
|
-
args.provider = parseProvider(next());
|
|
61
|
-
break;
|
|
62
|
-
case "--model":
|
|
63
|
-
args.model = next();
|
|
64
|
-
break;
|
|
65
|
-
case "--max-tokens":
|
|
66
|
-
args.maxTokens = parsePositiveInt(next(), arg);
|
|
67
|
-
break;
|
|
68
|
-
case "--max-attempts":
|
|
69
|
-
args.maxAttempts = parsePositiveInt(next(), arg);
|
|
70
|
-
break;
|
|
71
|
-
case "--overwrite":
|
|
72
|
-
args.overwrite = true;
|
|
73
|
-
break;
|
|
74
|
-
case "--runtime-gate":
|
|
75
|
-
args.runtimeGate = true;
|
|
76
|
-
break;
|
|
77
|
-
case "--playwright-config":
|
|
78
|
-
args.playwrightConfig = next();
|
|
79
|
-
break;
|
|
80
|
-
case "--runtime-gate-runs":
|
|
81
|
-
args.runtimeGateRuns = parsePositiveInt(next(), arg);
|
|
82
|
-
break;
|
|
83
|
-
case "--gate-command":
|
|
84
|
-
args.gateCommands!.push({ command: next() });
|
|
85
|
-
break;
|
|
86
|
-
case "--help":
|
|
87
|
-
case "-h":
|
|
88
|
-
throw new Error(GENERATE_USAGE);
|
|
89
|
-
default:
|
|
90
|
-
throw new Error(`Unknown argument: ${arg}\n\n${GENERATE_USAGE}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (!args.plan) throw new Error(`--plan is required\n\n${GENERATE_USAGE}`);
|
|
95
|
-
if (!args.out) throw new Error(`--out is required\n\n${GENERATE_USAGE}`);
|
|
96
|
-
if (args.runtimeGate) args.gateCommands!.push(buildPlaywrightRuntimeGate(args.playwrightConfig, args.runtimeGateRuns));
|
|
97
|
-
return args as GenerateCliArgs;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export async function runGenerateCli(argv: string[], deps?: Partial<GenerateDeps>): Promise<number> {
|
|
101
|
-
if (argv.includes("--help") || argv.includes("-h")) {
|
|
102
|
-
console.log(GENERATE_USAGE);
|
|
103
|
-
return 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
let args: GenerateCliArgs;
|
|
107
|
-
try {
|
|
108
|
-
args = parseGenerateCliArgs(argv);
|
|
109
|
-
} catch (error) {
|
|
110
|
-
console.error(error instanceof Error ? error.message : error);
|
|
111
|
-
return 1;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const input = await buildGenerateInput(args);
|
|
115
|
-
const result = await generatePlaywrightTestWithRetry(input, {
|
|
116
|
-
provider: args.provider,
|
|
117
|
-
model: args.model,
|
|
118
|
-
maxTokens: args.maxTokens,
|
|
119
|
-
}, deps, { maxAttempts: args.maxAttempts });
|
|
120
|
-
|
|
121
|
-
if (result.diagnostics.length) {
|
|
122
|
-
console.error(`Invalid generated test after ${result.attempts} attempt(s):`);
|
|
123
|
-
for (const diagnostic of result.diagnostics) console.error(`- ${diagnostic}`);
|
|
124
|
-
return 2;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
try {
|
|
128
|
-
await writeGeneratedTestFile({
|
|
129
|
-
filePath: args.out,
|
|
130
|
-
source: result.source,
|
|
131
|
-
overwrite: args.overwrite,
|
|
132
|
-
gates: args.gateCommands,
|
|
133
|
-
});
|
|
134
|
-
} catch (error) {
|
|
135
|
-
if (error instanceof GeneratedTestWriteError) {
|
|
136
|
-
console.error(error.message);
|
|
137
|
-
return 1;
|
|
138
|
-
}
|
|
139
|
-
if (error instanceof GeneratedTestGateError) {
|
|
140
|
-
console.error(`Generated test gate failed: ${error.result.name}`);
|
|
141
|
-
if (error.result.stdout) console.error(error.result.stdout.trimEnd());
|
|
142
|
-
if (error.result.stderr) console.error(error.result.stderr.trimEnd());
|
|
143
|
-
return 2;
|
|
144
|
-
}
|
|
145
|
-
throw error;
|
|
146
|
-
}
|
|
147
|
-
return 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
async function buildGenerateInput(args: GenerateCliArgs): Promise<GenerateInput> {
|
|
151
|
-
return {
|
|
152
|
-
planMarkdown: await readFile(args.plan, "utf8"),
|
|
153
|
-
rulesMarkdown: args.rules ? await readFile(args.rules, "utf8") : undefined,
|
|
154
|
-
testFilePath: args.out,
|
|
155
|
-
helperImportPath: args.helperImportPath,
|
|
156
|
-
seedTestPath: args.seedTestPath,
|
|
157
|
-
requireScreenshots: args.requireScreenshots,
|
|
158
|
-
locatorInventory: args.locatorInventory ? parseLocatorInventory(await readFile(args.locatorInventory, "utf8")) : undefined,
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function parseLocatorInventory(raw: string): LocatorInventory {
|
|
163
|
-
return JSON.parse(raw) as LocatorInventory;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function parseProvider(value: string): GeneratorModelOptions["provider"] {
|
|
167
|
-
if (value === "anthropic" || value === "gemini" || value === "openrouter") return value;
|
|
168
|
-
throw new Error(`Invalid --provider: ${value}`);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function parsePositiveInt(value: string, flag: string): number {
|
|
172
|
-
const parsed = Number(value);
|
|
173
|
-
if (!Number.isInteger(parsed) || parsed < 1) throw new Error(`${flag} must be a positive integer`);
|
|
174
|
-
return parsed;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
const GENERATE_USAGE = `Usage: vlmkit-generate --plan <path> --out <path>
|
|
178
|
-
|
|
179
|
-
Options:
|
|
180
|
-
--rules <path> Additional generation rules markdown
|
|
181
|
-
--helper-import <path> Module path for gotoApp import (default: ./_helpers)
|
|
182
|
-
--seed <path> Seed test reference path
|
|
183
|
-
--locator-inventory <path>
|
|
184
|
-
JSON file with roles/labels/testIds/texts
|
|
185
|
-
--no-screenshots Do not require toHaveScreenshot assertions
|
|
186
|
-
--provider <name> anthropic | gemini | openrouter
|
|
187
|
-
--model <id> Provider model id
|
|
188
|
-
--max-tokens <n> LLM output token budget
|
|
189
|
-
--max-attempts <n> Retry attempts when diagnostics remain
|
|
190
|
-
--overwrite Allow replacing an existing output file
|
|
191
|
-
--runtime-gate Run the generated test after writing it
|
|
192
|
-
--playwright-config <path>
|
|
193
|
-
Playwright config path for --runtime-gate
|
|
194
|
-
--runtime-gate-runs <n> Run the Playwright runtime gate n times (default: 1)
|
|
195
|
-
--gate-command <cmd> Repeatable post-write gate; use {testFile} placeholder`;
|
|
196
|
-
|
|
197
|
-
if (isDirectRun()) {
|
|
198
|
-
runGenerateCli(process.argv.slice(2)).then((code) => {
|
|
199
|
-
process.exitCode = code;
|
|
200
|
-
}).catch((error) => {
|
|
201
|
-
console.error(error instanceof Error ? error.stack : error);
|
|
202
|
-
process.exitCode = 1;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
function isDirectRun(): boolean {
|
|
207
|
-
if (!process.argv[1]) return false;
|
|
208
|
-
try {
|
|
209
|
-
return realpathSync(fileURLToPath(import.meta.url)) === realpathSync(process.argv[1]);
|
|
210
|
-
} catch {
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
}
|