@fairfox/polly 0.80.0 → 0.82.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/dist/cli/polly.js +42 -1
- package/dist/cli/polly.js.map +3 -3
- package/dist/gallery/gallery.css +1589 -0
- package/dist/gallery/gallery.js +5354 -0
- package/dist/gallery/index.html +13 -0
- package/dist/src/polly-ui/index.js +32 -1
- package/dist/src/polly-ui/index.js.map +3 -3
- package/dist/src/polly-ui/markdown.js +547 -233
- package/dist/src/polly-ui/markdown.js.map +4 -4
- package/dist/tools/gallery/src/cli.js +210 -0
- package/dist/tools/gallery/src/cli.js.map +11 -0
- package/dist/tools/mutate/src/args.d.ts +22 -0
- package/dist/tools/mutate/src/cli.d.ts +2 -0
- package/dist/tools/mutate/src/cli.js +743 -0
- package/dist/tools/mutate/src/cli.js.map +19 -0
- package/dist/tools/mutate/src/config.d.ts +13 -0
- package/dist/tools/mutate/src/decisions.d.ts +34 -0
- package/dist/tools/mutate/src/index.d.ts +13 -0
- package/dist/tools/mutate/src/index.js +471 -0
- package/dist/tools/mutate/src/index.js.map +14 -0
- package/dist/tools/mutate/src/ingest.d.ts +47 -0
- package/dist/tools/mutate/src/init.d.ts +12 -0
- package/dist/tools/mutate/src/report.d.ts +15 -0
- package/dist/tools/mutate/src/run.d.ts +11 -0
- package/dist/tools/mutate/src/verify-matrix.d.ts +49 -0
- package/package.json +7 -11
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __returnValue = (v) => v;
|
|
5
|
+
function __exportSetter(name, newValue) {
|
|
6
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
7
|
+
}
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
set: __exportSetter.bind(all, name)
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
18
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
19
|
+
|
|
20
|
+
// tools/gallery/src/server.ts
|
|
21
|
+
import { dirname, join } from "node:path";
|
|
22
|
+
import { fileURLToPath } from "node:url";
|
|
23
|
+
var HERE = dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
var CLIENT_ENTRY = join(HERE, "client.tsx");
|
|
25
|
+
var PREBUILT_DIR = join(HERE, "..", "..", "..", "gallery");
|
|
26
|
+
async function buildGalleryBundle() {
|
|
27
|
+
const result = await Bun.build({
|
|
28
|
+
entrypoints: [CLIENT_ENTRY],
|
|
29
|
+
target: "browser",
|
|
30
|
+
format: "esm",
|
|
31
|
+
minify: false,
|
|
32
|
+
sourcemap: "inline"
|
|
33
|
+
});
|
|
34
|
+
if (!result.success) {
|
|
35
|
+
const logs = result.logs.map((log) => String(log)).join(`
|
|
36
|
+
`);
|
|
37
|
+
throw new Error(`gallery build failed:
|
|
38
|
+
${logs}`);
|
|
39
|
+
}
|
|
40
|
+
let js = "";
|
|
41
|
+
let css = "";
|
|
42
|
+
for (const output of result.outputs) {
|
|
43
|
+
const text = await output.text();
|
|
44
|
+
if (output.path.endsWith(".css"))
|
|
45
|
+
css += text;
|
|
46
|
+
else
|
|
47
|
+
js += text;
|
|
48
|
+
}
|
|
49
|
+
return { js, css };
|
|
50
|
+
}
|
|
51
|
+
function galleryHtml() {
|
|
52
|
+
return `<!DOCTYPE html>
|
|
53
|
+
<html lang="en">
|
|
54
|
+
<head>
|
|
55
|
+
<meta charset="utf-8">
|
|
56
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
57
|
+
<title>Polly UI gallery</title>
|
|
58
|
+
<link rel="stylesheet" href="./gallery.css">
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<div id="app"></div>
|
|
62
|
+
<script type="module" src="./gallery.js"></script>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
async function resolveAssets() {
|
|
68
|
+
if (await Bun.file(CLIENT_ENTRY).exists()) {
|
|
69
|
+
const bundle = await buildGalleryBundle();
|
|
70
|
+
return { html: galleryHtml(), js: bundle.js, css: bundle.css };
|
|
71
|
+
}
|
|
72
|
+
const indexFile = Bun.file(join(PREBUILT_DIR, "index.html"));
|
|
73
|
+
if (!await indexFile.exists()) {
|
|
74
|
+
throw new Error(`no gallery source or pre-built bundle found (looked for ${CLIENT_ENTRY} and ${PREBUILT_DIR}). ` + "Rebuild the package with 'bun run build:lib'.");
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
html: await indexFile.text(),
|
|
78
|
+
js: await Bun.file(join(PREBUILT_DIR, "gallery.js")).text(),
|
|
79
|
+
css: await Bun.file(join(PREBUILT_DIR, "gallery.css")).text()
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
async function serveGallery(options = {}) {
|
|
83
|
+
const { html, js, css } = await resolveAssets();
|
|
84
|
+
const bundle = { js, css };
|
|
85
|
+
const server = Bun.serve({
|
|
86
|
+
port: options.port ?? 0,
|
|
87
|
+
fetch(req) {
|
|
88
|
+
const { pathname } = new URL(req.url);
|
|
89
|
+
if (pathname === "/" || pathname === "/index.html") {
|
|
90
|
+
return new Response(html, {
|
|
91
|
+
headers: { "Content-Type": "text/html; charset=utf-8" }
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (pathname === "/gallery.js") {
|
|
95
|
+
return new Response(bundle.js, {
|
|
96
|
+
headers: { "Content-Type": "text/javascript; charset=utf-8" }
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (pathname === "/gallery.css") {
|
|
100
|
+
return new Response(bundle.css, {
|
|
101
|
+
headers: { "Content-Type": "text/css; charset=utf-8" }
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (pathname === "/favicon.ico") {
|
|
105
|
+
return new Response(null, { status: 204 });
|
|
106
|
+
}
|
|
107
|
+
return new Response("Not found", { status: 404 });
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const boundPort = server.port ?? options.port ?? 0;
|
|
111
|
+
return {
|
|
112
|
+
url: `http://localhost:${boundPort}/`,
|
|
113
|
+
port: boundPort,
|
|
114
|
+
stop: () => server.stop(true)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async function buildGalleryToDir(outDir) {
|
|
118
|
+
const { html, js, css } = await resolveAssets();
|
|
119
|
+
const files = [
|
|
120
|
+
["index.html", html],
|
|
121
|
+
["gallery.js", js],
|
|
122
|
+
["gallery.css", css]
|
|
123
|
+
];
|
|
124
|
+
const written = [];
|
|
125
|
+
for (const [name, content] of files) {
|
|
126
|
+
const path = join(outDir, name);
|
|
127
|
+
await Bun.write(path, content);
|
|
128
|
+
written.push(path);
|
|
129
|
+
}
|
|
130
|
+
return written;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// tools/gallery/src/cli.ts
|
|
134
|
+
var DEFAULT_PORT = 4321;
|
|
135
|
+
function printHelp() {
|
|
136
|
+
console.log(`polly gallery — preview every polly-ui primitive in one page.
|
|
137
|
+
|
|
138
|
+
Usage:
|
|
139
|
+
polly gallery [--port <n>] [--open] Serve the gallery (default port ${DEFAULT_PORT})
|
|
140
|
+
polly gallery --build <dir> Write a static gallery to <dir>
|
|
141
|
+
polly gallery --help Show this help
|
|
142
|
+
|
|
143
|
+
The gallery catalogues every polly-ui primitive and doubles as the
|
|
144
|
+
render surface for the visual-regression baselines.`);
|
|
145
|
+
}
|
|
146
|
+
function flagValue(args, flag) {
|
|
147
|
+
const idx = args.indexOf(flag);
|
|
148
|
+
if (idx === -1)
|
|
149
|
+
return;
|
|
150
|
+
const value = args[idx + 1];
|
|
151
|
+
if (value === undefined || value.startsWith("-")) {
|
|
152
|
+
console.log(`error: ${flag} requires a value`);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
return value;
|
|
156
|
+
}
|
|
157
|
+
function openBrowser(url) {
|
|
158
|
+
const command = process.platform === "darwin" ? ["open", url] : process.platform === "win32" ? ["cmd", "/c", "start", "", url] : ["xdg-open", url];
|
|
159
|
+
try {
|
|
160
|
+
Bun.spawn(command, { stdout: "ignore", stderr: "ignore" });
|
|
161
|
+
} catch {}
|
|
162
|
+
}
|
|
163
|
+
async function main() {
|
|
164
|
+
const args = process.argv.slice(2);
|
|
165
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
166
|
+
printHelp();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const buildDir = flagValue(args, "--build");
|
|
170
|
+
if (buildDir !== undefined) {
|
|
171
|
+
const files = await buildGalleryToDir(buildDir);
|
|
172
|
+
console.log(`Gallery written to ${buildDir}:`);
|
|
173
|
+
for (const file of files)
|
|
174
|
+
console.log(` ${file}`);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const portArg = flagValue(args, "--port");
|
|
178
|
+
const port = portArg === undefined ? DEFAULT_PORT : Number(portArg);
|
|
179
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535) {
|
|
180
|
+
console.log(`error: --port must be an integer in 0–65535 (got "${portArg}")`);
|
|
181
|
+
process.exit(1);
|
|
182
|
+
}
|
|
183
|
+
let gallery;
|
|
184
|
+
try {
|
|
185
|
+
gallery = await serveGallery({ port });
|
|
186
|
+
} catch (error) {
|
|
187
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
188
|
+
console.log(`error: could not start the gallery server: ${message}`);
|
|
189
|
+
if (/EADDRINUSE|in use|address already/i.test(message)) {
|
|
190
|
+
console.log(`Port ${port} is in use — try 'polly gallery --port <other>'.`);
|
|
191
|
+
}
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
console.log(`Polly UI gallery → ${gallery.url}`);
|
|
195
|
+
console.log("Serving the polly-ui component gallery. Press Ctrl-C to stop.");
|
|
196
|
+
if (args.includes("--open"))
|
|
197
|
+
openBrowser(gallery.url);
|
|
198
|
+
const shutdown = () => {
|
|
199
|
+
gallery.stop();
|
|
200
|
+
process.exit(0);
|
|
201
|
+
};
|
|
202
|
+
process.on("SIGINT", shutdown);
|
|
203
|
+
process.on("SIGTERM", shutdown);
|
|
204
|
+
}
|
|
205
|
+
main().catch((error) => {
|
|
206
|
+
console.log(error);
|
|
207
|
+
process.exit(1);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
//# debugId=81DE099A157158AA64756E2164756E21
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../tools/gallery/src/server.ts", "../tools/gallery/src/cli.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Build and serve the component gallery.\n *\n * One `Bun.build` pass of client.tsx bundles the Preact app and — through the\n * components' transitive `.module.css` imports plus the global stylesheets the\n * entry pulls in — emits a single CSS artifact (verified: ~38KB for one\n * primitive). The JS and CSS outputs are served as separate routes, or written\n * to a directory for a static export. CSS-module class hashing is deterministic\n * across builds, so the bundled JS and CSS always agree (the same property the\n * extension build relies on).\n */\n\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nconst HERE = dirname(fileURLToPath(import.meta.url));\nconst CLIENT_ENTRY = join(HERE, \"client.tsx\");\n/**\n * Where build-lib.ts writes the static gallery at package-build time. Polly\n * ships only `dist`, so the published CLI can't bundle from source at runtime —\n * it serves these pre-built files instead. From the bundled CLI at\n * `dist/tools/gallery/src/`, three levels up is `dist/`, then `gallery/`.\n */\nconst PREBUILT_DIR = join(HERE, \"..\", \"..\", \"..\", \"gallery\");\n\nexport interface GalleryBundle {\n js: string;\n css: string;\n}\n\n/** Bundle the gallery client into a JS string and a CSS string. */\nexport async function buildGalleryBundle(): Promise<GalleryBundle> {\n const result = await Bun.build({\n entrypoints: [CLIENT_ENTRY],\n target: \"browser\",\n format: \"esm\",\n minify: false,\n sourcemap: \"inline\",\n });\n\n if (!result.success) {\n const logs = result.logs.map((log) => String(log)).join(\"\\n\");\n throw new Error(`gallery build failed:\\n${logs}`);\n }\n\n let js = \"\";\n let css = \"\";\n for (const output of result.outputs) {\n const text = await output.text();\n if (output.path.endsWith(\".css\")) css += text;\n else js += text;\n }\n return { js, css };\n}\n\n/** The page shell — links the bundle's JS and CSS as separate files. */\nfunction galleryHtml(): string {\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Polly UI gallery</title>\n<link rel=\"stylesheet\" href=\"./gallery.css\">\n</head>\n<body>\n<div id=\"app\"></div>\n<script type=\"module\" src=\"./gallery.js\"></script>\n</body>\n</html>\n`;\n}\n\nexport interface ServeOptions {\n /** Port to bind. 0 (the default) asks the OS for a free port. */\n port?: number;\n}\n\nexport interface RunningGallery {\n url: string;\n port: number;\n stop: () => void;\n}\n\n/**\n * Resolve the page assets to serve. In the monorepo (source present) the client\n * is bundled fresh; in a published package (source stripped) the pre-built files\n * written by build-lib.ts are read from disk. Either way the served bytes are\n * self-contained — no source is needed at request time.\n */\nasync function resolveAssets(): Promise<{ html: string; js: string; css: string }> {\n if (await Bun.file(CLIENT_ENTRY).exists()) {\n const bundle = await buildGalleryBundle();\n return { html: galleryHtml(), js: bundle.js, css: bundle.css };\n }\n const indexFile = Bun.file(join(PREBUILT_DIR, \"index.html\"));\n if (!(await indexFile.exists())) {\n throw new Error(\n `no gallery source or pre-built bundle found (looked for ${CLIENT_ENTRY} and ${PREBUILT_DIR}). ` +\n \"Rebuild the package with 'bun run build:lib'.\"\n );\n }\n return {\n html: await indexFile.text(),\n js: await Bun.file(join(PREBUILT_DIR, \"gallery.js\")).text(),\n css: await Bun.file(join(PREBUILT_DIR, \"gallery.css\")).text(),\n };\n}\n\n/** Build (or load) once, then serve the gallery over HTTP until `stop()`. */\nexport async function serveGallery(options: ServeOptions = {}): Promise<RunningGallery> {\n const { html, js, css } = await resolveAssets();\n const bundle = { js, css };\n\n const server = Bun.serve({\n port: options.port ?? 0,\n fetch(req) {\n const { pathname } = new URL(req.url);\n if (pathname === \"/\" || pathname === \"/index.html\") {\n return new Response(html, {\n headers: { \"Content-Type\": \"text/html; charset=utf-8\" },\n });\n }\n if (pathname === \"/gallery.js\") {\n return new Response(bundle.js, {\n headers: { \"Content-Type\": \"text/javascript; charset=utf-8\" },\n });\n }\n if (pathname === \"/gallery.css\") {\n return new Response(bundle.css, {\n headers: { \"Content-Type\": \"text/css; charset=utf-8\" },\n });\n }\n // The browser always requests a favicon; answer quietly so it doesn't\n // surface as a console error (the e2e gates on a clean console).\n if (pathname === \"/favicon.ico\") {\n return new Response(null, { status: 204 });\n }\n return new Response(\"Not found\", { status: 404 });\n },\n });\n\n const boundPort = server.port ?? options.port ?? 0;\n return {\n url: `http://localhost:${boundPort}/`,\n port: boundPort,\n stop: () => server.stop(true),\n };\n}\n\n/** Build the gallery and write index.html + gallery.js + gallery.css to a dir. */\nexport async function buildGalleryToDir(outDir: string): Promise<string[]> {\n const { html, js, css } = await resolveAssets();\n const files: Array<[string, string]> = [\n [\"index.html\", html],\n [\"gallery.js\", js],\n [\"gallery.css\", css],\n ];\n const written: string[] = [];\n for (const [name, content] of files) {\n const path = join(outDir, name);\n await Bun.write(path, content);\n written.push(path);\n }\n return written;\n}\n",
|
|
6
|
+
"#!/usr/bin/env bun\n/**\n * `polly gallery` — serve (or statically export) the polly-ui component gallery.\n *\n * polly gallery # serve at http://localhost:4321\n * polly gallery --port 5000 # serve on a chosen port\n * polly gallery --open # serve and open the default browser\n * polly gallery --build <dir> # write a static index.html + js + css\n *\n * Hand-rolled arg parsing, matching the other polly tool CLIs.\n */\n\nimport { buildGalleryToDir, serveGallery } from \"./server.ts\";\n\nconst DEFAULT_PORT = 4321;\n\nfunction printHelp(): void {\n console.log(`polly gallery — preview every polly-ui primitive in one page.\n\nUsage:\n polly gallery [--port <n>] [--open] Serve the gallery (default port ${DEFAULT_PORT})\n polly gallery --build <dir> Write a static gallery to <dir>\n polly gallery --help Show this help\n\nThe gallery catalogues every polly-ui primitive and doubles as the\nrender surface for the visual-regression baselines.`);\n}\n\n/** Read the value following a flag, erroring if it is missing or another flag. */\nfunction flagValue(args: string[], flag: string): string | undefined {\n const idx = args.indexOf(flag);\n if (idx === -1) return undefined;\n const value = args[idx + 1];\n if (value === undefined || value.startsWith(\"-\")) {\n console.log(`error: ${flag} requires a value`);\n process.exit(1);\n }\n return value;\n}\n\nfunction openBrowser(url: string): void {\n const command =\n process.platform === \"darwin\"\n ? [\"open\", url]\n : process.platform === \"win32\"\n ? [\"cmd\", \"/c\", \"start\", \"\", url]\n : [\"xdg-open\", url];\n try {\n Bun.spawn(command, { stdout: \"ignore\", stderr: \"ignore\" });\n } catch {\n // Opening the browser is best-effort; the URL is printed regardless.\n }\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return;\n }\n\n const buildDir = flagValue(args, \"--build\");\n if (buildDir !== undefined) {\n const files = await buildGalleryToDir(buildDir);\n console.log(`Gallery written to ${buildDir}:`);\n for (const file of files) console.log(` ${file}`);\n return;\n }\n\n const portArg = flagValue(args, \"--port\");\n const port = portArg === undefined ? DEFAULT_PORT : Number(portArg);\n if (!Number.isInteger(port) || port < 0 || port > 65535) {\n console.log(`error: --port must be an integer in 0–65535 (got \"${portArg}\")`);\n process.exit(1);\n }\n\n let gallery: Awaited<ReturnType<typeof serveGallery>>;\n try {\n gallery = await serveGallery({ port });\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n console.log(`error: could not start the gallery server: ${message}`);\n if (/EADDRINUSE|in use|address already/i.test(message)) {\n console.log(`Port ${port} is in use — try 'polly gallery --port <other>'.`);\n }\n process.exit(1);\n }\n\n console.log(`Polly UI gallery → ${gallery.url}`);\n console.log(\"Serving the polly-ui component gallery. Press Ctrl-C to stop.\");\n if (args.includes(\"--open\")) openBrowser(gallery.url);\n\n const shutdown = (): void => {\n gallery.stop();\n process.exit(0);\n };\n process.on(\"SIGINT\", shutdown);\n process.on(\"SIGTERM\", shutdown);\n}\n\nmain().catch((error) => {\n console.log(error);\n process.exit(1);\n});\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAYA;AACA;AAEA,IAAM,OAAO,QAAQ,cAAc,YAAY,GAAG,CAAC;AACnD,IAAM,eAAe,KAAK,MAAM,YAAY;AAO5C,IAAM,eAAe,KAAK,MAAM,MAAM,MAAM,MAAM,SAAS;AAQ3D,eAAsB,kBAAkB,GAA2B;AAAA,EACjE,MAAM,SAAS,MAAM,IAAI,MAAM;AAAA,IAC7B,aAAa,CAAC,YAAY;AAAA,IAC1B,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,EACb,CAAC;AAAA,EAED,IAAI,CAAC,OAAO,SAAS;AAAA,IACnB,MAAM,OAAO,OAAO,KAAK,IAAI,CAAC,QAAQ,OAAO,GAAG,CAAC,EAAE,KAAK;AAAA,CAAI;AAAA,IAC5D,MAAM,IAAI,MAAM;AAAA,EAA0B,MAAM;AAAA,EAClD;AAAA,EAEA,IAAI,KAAK;AAAA,EACT,IAAI,MAAM;AAAA,EACV,WAAW,UAAU,OAAO,SAAS;AAAA,IACnC,MAAM,OAAO,MAAM,OAAO,KAAK;AAAA,IAC/B,IAAI,OAAO,KAAK,SAAS,MAAM;AAAA,MAAG,OAAO;AAAA,IACpC;AAAA,YAAM;AAAA,EACb;AAAA,EACA,OAAO,EAAE,IAAI,IAAI;AAAA;AAInB,SAAS,WAAW,GAAW;AAAA,EAC7B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,IACrE,QAAQ,IAAI,8CAA8C,SAAS;AAAA,IACnE,IAAI,qCAAqC,KAAK,OAAO,GAAG;AAAA,MACtD,QAAQ,IAAI,QAAQ,sDAAqD;AAAA,IAC3E;AAAA,IACA,QAAQ,KAAK,CAAC;AAAA;AAAA,EAGhB,QAAQ,IAAI,sBAAqB,QAAQ,KAAK;AAAA,EAC9C,QAAQ,IAAI,+DAA+D;AAAA,EAC3E,IAAI,KAAK,SAAS,QAAQ;AAAA,IAAG,YAAY,QAAQ,GAAG;AAAA,EAEpD,MAAM,WAAW,MAAY;AAAA,IAC3B,QAAQ,KAAK;AAAA,IACb,QAAQ,KAAK,CAAC;AAAA;AAAA,EAEhB,QAAQ,GAAG,UAAU,QAAQ;AAAA,EAC7B,QAAQ,GAAG,WAAW,QAAQ;AAAA;AAGhC,KAAK,EAAE,MAAM,CAAC,UAAU;AAAA,EACtB,QAAQ,IAAI,KAAK;AAAA,EACjB,QAAQ,KAAK,CAAC;AAAA,CACf;",
|
|
9
|
+
"debugId": "81DE099A157158AA64756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument parsing for `polly mutate`. Hand-rolled (matching the rest of the
|
|
3
|
+
* polly CLI), with the value-flag / bool-flag split that lets a flag value
|
|
4
|
+
* (`--report path.json`) not be mistaken for a positional verb.
|
|
5
|
+
*/
|
|
6
|
+
export interface MutateArgs {
|
|
7
|
+
/** First positional: "run" (default when bare) | "report" | "decisions" | "verify" | an unknown token to error on. */
|
|
8
|
+
verb: string;
|
|
9
|
+
/** Positionals after the verb (e.g. ["decide", file, verdict, ...rationale] for `decisions decide …`). */
|
|
10
|
+
rest: string[];
|
|
11
|
+
config?: string;
|
|
12
|
+
report?: string;
|
|
13
|
+
decisions?: string;
|
|
14
|
+
db?: string;
|
|
15
|
+
noReport: boolean;
|
|
16
|
+
/** `verify --run` (run a fresh Stryker pass before checking the contract). */
|
|
17
|
+
run: boolean;
|
|
18
|
+
/** `init --force` (overwrite an existing stryker.conf.json). */
|
|
19
|
+
force: boolean;
|
|
20
|
+
help: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function parseMutateArgs(argv: string[]): MutateArgs;
|