rylease 0.0.0-stage → 3.1.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.
@@ -0,0 +1,232 @@
1
+ import { D as prettyReporter, O as detectRepo, P as OptionsError, b as errorMessage, g as defineRelease, l as formatChangeFile, n as markdownSummary, r as resolveWorkflow, t as markdownProblems, u as slug, y as ReleaseError } from "./src-BkALSGzm.mjs";
2
+ import { registerHooks } from "node:module";
3
+ import { access, appendFile, readFile } from "node:fs/promises";
4
+ import { resolve } from "node:path";
5
+ import { parse } from "yaml";
6
+ import { pathToFileURL } from "node:url";
7
+ import { randomUUID } from "node:crypto";
8
+ //#region src/config/load.ts
9
+ /** Where a config is looked for, in order, relative to the project. */
10
+ const CONFIG_FILES = [
11
+ "rylease.config.ts",
12
+ "rylease.config.mts",
13
+ "rylease.config.js",
14
+ "rylease.config.mjs",
15
+ "rylease.yml",
16
+ "rylease.yaml",
17
+ ".github/rylease.yml",
18
+ ".github/rylease.yaml"
19
+ ];
20
+ /**
21
+ * Loads the config at `path`, or the first of {@link CONFIG_FILES} there is;
22
+ * `undefined` when there's none.
23
+ */
24
+ async function loadConfig(cwd, path) {
25
+ const file = path ? resolve(cwd, path) : await firstExisting(CONFIG_FILES.map((name) => resolve(cwd, name)));
26
+ if (file === void 0) return void 0;
27
+ if (/\.ya?ml$/.test(file)) {
28
+ const text = await readFile(file, "utf8").catch((error) => {
29
+ throw new OptionsError([`config: can't read ${file}: ${errorMessage(error)}`]);
30
+ });
31
+ let value;
32
+ try {
33
+ value = parse(text);
34
+ } catch (error) {
35
+ throw new OptionsError([`config: invalid YAML in ${file}: ${errorMessage(error)}`]);
36
+ }
37
+ return {
38
+ path: file,
39
+ input: workflowInput(value, file)
40
+ };
41
+ }
42
+ const value = (await import(pathToFileURL(file).href)).default;
43
+ if (isRelease(value)) return {
44
+ path: file,
45
+ release: value
46
+ };
47
+ const input = workflowInput(value, file);
48
+ return Array.isArray(input.steps) && input.steps.some(isStep) ? {
49
+ path: file,
50
+ release: defineRelease(input)
51
+ } : {
52
+ path: file,
53
+ input
54
+ };
55
+ }
56
+ const KEYS = [
57
+ "steps",
58
+ "scheme",
59
+ "tag",
60
+ "history",
61
+ "components",
62
+ "channels"
63
+ ];
64
+ function workflowInput(value, file) {
65
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new OptionsError([`config: ${file} must hold a map of ${KEYS.join(", ")}, or export a release made with defineRelease`]);
66
+ const unknown = Object.keys(value).filter((key) => !KEYS.includes(key));
67
+ if (unknown.length > 0) throw new OptionsError(unknown.map((key) => `config.${key}: unknown key; use ${KEYS.join(", ")}`));
68
+ return value;
69
+ }
70
+ function isRelease(value) {
71
+ return typeof value === "object" && value !== null && typeof value.run === "function";
72
+ }
73
+ function isStep(value) {
74
+ return typeof value === "object" && value !== null && typeof value.run === "function";
75
+ }
76
+ async function firstExisting(paths) {
77
+ for (const path of paths) if (await access(path).then(() => true, () => false)) return path;
78
+ }
79
+ /**
80
+ * The release to run: the config's, with any of its keys given here instead,
81
+ * e.g. by the action's inputs; without a config or `steps`, the
82
+ * `conventional` preset.
83
+ */
84
+ async function configuredRelease(cwd, path, overrides) {
85
+ const config = await loadConfig(cwd, path);
86
+ const given = Object.entries(overrides).filter(([, value]) => value !== void 0);
87
+ if (config && "release" in config) {
88
+ if (given.length > 0) throw new OptionsError(given.map(([key]) => `${key}: ${config.path} defines the release; set ${key} there`));
89
+ return config.release;
90
+ }
91
+ const input = {
92
+ steps: [{ uses: "conventional" }],
93
+ ...config?.input,
94
+ ...Object.fromEntries(given)
95
+ };
96
+ return defineRelease(await resolveWorkflow(input, { cwd }));
97
+ }
98
+ //#endregion
99
+ //#region src/config/outputs.ts
100
+ /**
101
+ * A report as flat outputs, the same for the GitHub Action and the CLI:
102
+ * `status`, `released`, `previous-version`, `version`, `kind`, `notes`,
103
+ * `channel`, `prerelease`, and every component's as JSON in `components`.
104
+ */
105
+ function reportOutputs(report) {
106
+ return {
107
+ status: report.status,
108
+ released: String(report.status === "released"),
109
+ "previous-version": report.previousVersion ?? "",
110
+ version: report.version ?? "",
111
+ kind: report.kind ?? "",
112
+ notes: report.notes ?? "",
113
+ channel: report.env.channel?.name ?? "",
114
+ prerelease: String(report.env.channel?.type === "prerelease"),
115
+ components: JSON.stringify(Object.fromEntries(report.components.map((component) => [component.name, {
116
+ path: component.path,
117
+ status: component.status,
118
+ released: component.status === "released",
119
+ "previous-version": component.previousVersion ?? "",
120
+ version: component.version ?? "",
121
+ tag: component.tag ?? "",
122
+ kind: component.kind ?? "",
123
+ notes: component.notes ?? ""
124
+ }]))),
125
+ "released-components": JSON.stringify(report.components.filter((component) => component.status === "released").map((component) => component.name))
126
+ };
127
+ }
128
+ //#endregion
129
+ //#region src/config/self.ts
130
+ /**
131
+ * Lets custom steps `import { defineStep, z } from "rylease"` without
132
+ * installing it: the import resolves to the running bundle, `url`.
133
+ */
134
+ function provideSelf(url) {
135
+ registerHooks({ resolve: (specifier, context, next) => specifier === "rylease" ? {
136
+ url,
137
+ shortCircuit: true
138
+ } : next(specifier, context) });
139
+ }
140
+ //#endregion
141
+ //#region src/config/action.ts
142
+ /**
143
+ * Runs the GitHub Action: reads its inputs from `INPUT_*`, runs the release
144
+ * and writes its outputs to `GITHUB_OUTPUT`. Resolves with the exit code.
145
+ */
146
+ async function main(env = process.env, reporter = prettyReporter({ ...env.GITHUB_ACTIONS === "true" && { color: true } })) {
147
+ const input = (name) => env[`INPUT_${name.toUpperCase()}`] ?? "";
148
+ let summary = true;
149
+ let report;
150
+ try {
151
+ summary = parseBoolean("summary", input("summary") || "true");
152
+ const cwd = resolve(env.GITHUB_WORKSPACE ?? process.cwd(), input("working-directory") || ".");
153
+ const token = input("token");
154
+ if (token && !env.GITHUB_TOKEN && !env.GH_TOKEN) process.env.GITHUB_TOKEN = token;
155
+ const optional = (name) => {
156
+ const text = input(name);
157
+ return text.trim() === "" ? void 0 : parseYaml(name, text);
158
+ };
159
+ const release = await configuredRelease(cwd, input("config") || void 0, {
160
+ steps: optional("steps"),
161
+ scheme: optional("scheme"),
162
+ tag: input("tag") || void 0,
163
+ history: optional("history"),
164
+ components: optional("components"),
165
+ channels: optional("channels")
166
+ });
167
+ const version = input("version");
168
+ const component = input("component");
169
+ const channel = input("channel");
170
+ report = await release.run({
171
+ cwd,
172
+ dryRun: parseBoolean("dry-run", input("dry-run") || "false"),
173
+ reporter,
174
+ ...channel && { channel },
175
+ ...version && { release: {
176
+ version,
177
+ notes: input("notes"),
178
+ ...component && { component }
179
+ } }
180
+ });
181
+ } catch (error) {
182
+ let issues;
183
+ if (error instanceof ReleaseError) {
184
+ issues = [error.message];
185
+ if (summary) await writeSummary(env, markdownSummary(error.report));
186
+ } else {
187
+ issues = error instanceof OptionsError ? error.issues : [errorMessage(error)];
188
+ if (summary) await writeSummary(env, markdownProblems(issues));
189
+ }
190
+ for (const issue of issues) annotate(issue);
191
+ return 1;
192
+ }
193
+ if (summary) await writeSummary(env, markdownSummary(report));
194
+ await setOutputs(env.GITHUB_OUTPUT, reportOutputs(report));
195
+ return 0;
196
+ }
197
+ /** Appends to the job summary, the Markdown GitHub shows on the run's page. */
198
+ async function writeSummary(env, markdown) {
199
+ if (env.GITHUB_STEP_SUMMARY) await appendFile(env.GITHUB_STEP_SUMMARY, markdown);
200
+ }
201
+ function parseYaml(name, text) {
202
+ try {
203
+ return parse(text);
204
+ } catch (error) {
205
+ throw new OptionsError([`${name}: invalid YAML: ${errorMessage(error)}`]);
206
+ }
207
+ }
208
+ function parseBoolean(name, value) {
209
+ if (value === "true") return true;
210
+ if (value === "false") return false;
211
+ throw new OptionsError([`${name}: expected true or false, got '${value}'`]);
212
+ }
213
+ function annotate(message) {
214
+ const escaped = message.replaceAll("%", "%25").replaceAll("\r", "%0D").replaceAll("\n", "%0A");
215
+ process.stdout.write(`::error::${escaped}\n`);
216
+ }
217
+ async function setOutputs(file, outputs) {
218
+ if (!file) return;
219
+ const delimiter = `rylease_${randomUUID()}`;
220
+ const text = Object.entries(outputs).map(([name, value]) => `${name}<<${delimiter}\n${value}\n${delimiter}\n`).join("");
221
+ await appendFile(file, text);
222
+ }
223
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
224
+ provideSelf(import.meta.url);
225
+ main().then((code) => {
226
+ process.exitCode = code;
227
+ });
228
+ }
229
+ //#endregion
230
+ export { configuredRelease, detectRepo, formatChangeFile, provideSelf, reportOutputs, main as runAction, slug };
231
+
232
+ //# sourceMappingURL=internal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.mjs","names":[],"sources":["../src/config/load.ts","../src/config/outputs.ts","../src/config/self.ts","../src/config/action.ts"],"sourcesContent":["import { access, readFile } from \"node:fs/promises\";\nimport { resolve } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { parse } from \"yaml\";\nimport { defineRelease } from \"../core/define.ts\";\nimport type { ReleaseReport, RunOptions } from \"../core/engine.ts\";\nimport { errorMessage } from \"../core/engine.ts\";\nimport { OptionsError } from \"../core/options.ts\";\nimport { resolveWorkflow, type WorkflowInput } from \"./workflow.ts\";\n\n/** Where a config is looked for, in order, relative to the project. */\nconst CONFIG_FILES = [\n\t\"rylease.config.ts\",\n\t\"rylease.config.mts\",\n\t\"rylease.config.js\",\n\t\"rylease.config.mjs\",\n\t\"rylease.yml\",\n\t\"rylease.yaml\",\n\t\".github/rylease.yml\",\n\t\".github/rylease.yaml\",\n];\n\n/** A release that can be run, whatever its context. */\nexport interface Runnable {\n\trun(options?: RunOptions): Promise<ReleaseReport>;\n}\n\n/**\n * A config: a release defined in TypeScript or JavaScript, or the same keys\n * as the GitHub Action's inputs, from YAML or a plain object.\n */\ntype Config =\n\t| { path: string; release: Runnable }\n\t| { path: string; input: WorkflowInput };\n\n/**\n * Loads the config at `path`, or the first of {@link CONFIG_FILES} there is;\n * `undefined` when there's none.\n */\nasync function loadConfig(\n\tcwd: string,\n\tpath?: string,\n): Promise<Config | undefined> {\n\tconst file = path\n\t\t? resolve(cwd, path)\n\t\t: await firstExisting(CONFIG_FILES.map((name) => resolve(cwd, name)));\n\tif (file === undefined) return undefined;\n\tif (/\\.ya?ml$/.test(file)) {\n\t\tconst text = await readFile(file, \"utf8\").catch((error: unknown) => {\n\t\t\tthrow new OptionsError([\n\t\t\t\t`config: can't read ${file}: ${errorMessage(error)}`,\n\t\t\t]);\n\t\t});\n\t\tlet value: unknown;\n\t\ttry {\n\t\t\tvalue = parse(text);\n\t\t} catch (error) {\n\t\t\tthrow new OptionsError([\n\t\t\t\t`config: invalid YAML in ${file}: ${errorMessage(error)}`,\n\t\t\t]);\n\t\t}\n\t\treturn { path: file, input: workflowInput(value, file) };\n\t}\n\tconst module = (await import(pathToFileURL(file).href)) as {\n\t\tdefault?: unknown;\n\t};\n\tconst value = module.default;\n\tif (isRelease(value)) return { path: file, release: value };\n\tconst input = workflowInput(value, file);\n\t// Steps made in code run as they are; names from YAML-like configs are loaded.\n\tconst made = Array.isArray(input.steps) && input.steps.some(isStep);\n\treturn made\n\t\t? { path: file, release: defineRelease(input as never) }\n\t\t: { path: file, input };\n}\n\nconst KEYS = [\"steps\", \"scheme\", \"tag\", \"history\", \"components\", \"channels\"];\n\nfunction workflowInput(value: unknown, file: string): WorkflowInput {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new OptionsError([\n\t\t\t`config: ${file} must hold a map of ${KEYS.join(\", \")}, or export a release made with defineRelease`,\n\t\t]);\n\t}\n\tconst unknown = Object.keys(value).filter((key) => !KEYS.includes(key));\n\tif (unknown.length > 0) {\n\t\tthrow new OptionsError(\n\t\t\tunknown.map(\n\t\t\t\t(key) => `config.${key}: unknown key; use ${KEYS.join(\", \")}`,\n\t\t\t),\n\t\t);\n\t}\n\treturn value as WorkflowInput;\n}\n\nfunction isRelease(value: unknown): value is Runnable {\n\treturn (\n\t\ttypeof value === \"object\" &&\n\t\tvalue !== null &&\n\t\ttypeof (value as Partial<Runnable>).run === \"function\"\n\t);\n}\n\nfunction isStep(value: unknown): boolean {\n\treturn (\n\t\ttypeof value === \"object\" &&\n\t\tvalue !== null &&\n\t\ttypeof (value as { run?: unknown }).run === \"function\"\n\t);\n}\n\nasync function firstExisting(\n\tpaths: readonly string[],\n): Promise<string | undefined> {\n\tfor (const path of paths) {\n\t\tif (\n\t\t\tawait access(path).then(\n\t\t\t\t() => true,\n\t\t\t\t() => false,\n\t\t\t)\n\t\t)\n\t\t\treturn path;\n\t}\n\treturn undefined;\n}\n\n/**\n * The release to run: the config's, with any of its keys given here instead,\n * e.g. by the action's inputs; without a config or `steps`, the\n * `conventional` preset.\n */\nexport async function configuredRelease(\n\tcwd: string,\n\tpath: string | undefined,\n\toverrides: Partial<WorkflowInput>,\n): Promise<Runnable> {\n\tconst config = await loadConfig(cwd, path);\n\tconst given = Object.entries(overrides).filter(\n\t\t([, value]) => value !== undefined,\n\t);\n\tif (config && \"release\" in config) {\n\t\tif (given.length > 0) {\n\t\t\tthrow new OptionsError(\n\t\t\t\tgiven.map(\n\t\t\t\t\t([key]) =>\n\t\t\t\t\t\t`${key}: ${config.path} defines the release; set ${key} there`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn config.release;\n\t}\n\tconst input: WorkflowInput = {\n\t\tsteps: [{ uses: \"conventional\" }],\n\t\t...config?.input,\n\t\t...Object.fromEntries(given),\n\t};\n\treturn defineRelease(await resolveWorkflow(input, { cwd }));\n}\n","import type { ReleaseReport } from \"../core/engine.ts\";\n\n/**\n * A report as flat outputs, the same for the GitHub Action and the CLI:\n * `status`, `released`, `previous-version`, `version`, `kind`, `notes`,\n * `channel`, `prerelease`, and every component's as JSON in `components`.\n */\nexport function reportOutputs(report: ReleaseReport): Record<string, string> {\n\treturn {\n\t\tstatus: report.status,\n\t\treleased: String(report.status === \"released\"),\n\t\t\"previous-version\": report.previousVersion ?? \"\",\n\t\tversion: report.version ?? \"\",\n\t\tkind: report.kind ?? \"\",\n\t\tnotes: report.notes ?? \"\",\n\t\tchannel: report.env.channel?.name ?? \"\",\n\t\tprerelease: String(report.env.channel?.type === \"prerelease\"),\n\t\tcomponents: JSON.stringify(\n\t\t\tObject.fromEntries(\n\t\t\t\treport.components.map((component) => [\n\t\t\t\t\tcomponent.name,\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: component.path,\n\t\t\t\t\t\tstatus: component.status,\n\t\t\t\t\t\treleased: component.status === \"released\",\n\t\t\t\t\t\t\"previous-version\": component.previousVersion ?? \"\",\n\t\t\t\t\t\tversion: component.version ?? \"\",\n\t\t\t\t\t\ttag: component.tag ?? \"\",\n\t\t\t\t\t\tkind: component.kind ?? \"\",\n\t\t\t\t\t\tnotes: component.notes ?? \"\",\n\t\t\t\t\t},\n\t\t\t\t]),\n\t\t\t),\n\t\t),\n\t\t\"released-components\": JSON.stringify(\n\t\t\treport.components\n\t\t\t\t.filter((component) => component.status === \"released\")\n\t\t\t\t.map((component) => component.name),\n\t\t),\n\t};\n}\n","import { registerHooks } from \"node:module\";\n\n/**\n * Lets custom steps `import { defineStep, z } from \"rylease\"` without\n * installing it: the import resolves to the running bundle, `url`.\n */\nexport function provideSelf(url: string): void {\n\tregisterHooks({\n\t\tresolve: (specifier, context, next) =>\n\t\t\tspecifier === \"rylease\"\n\t\t\t\t? { url, shortCircuit: true }\n\t\t\t\t: next(specifier, context),\n\t});\n}\n","import { randomUUID } from \"node:crypto\";\nimport { appendFile } from \"node:fs/promises\";\nimport { resolve } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { parse } from \"yaml\";\nimport {\n\terrorMessage,\n\tReleaseError,\n\ttype ReleaseReport,\n} from \"../core/engine.ts\";\nimport { OptionsError } from \"../core/options.ts\";\nimport { prettyReporter, type Reporter } from \"../core/reporter.ts\";\nimport { markdownProblems, markdownSummary } from \"../core/summary.ts\";\nimport { configuredRelease } from \"./load.ts\";\nimport { reportOutputs } from \"./outputs.ts\";\nimport { provideSelf } from \"./self.ts\";\n\n// Custom steps import \"rylease\", which resolves to this module (see provideSelf).\nexport * from \"../index.ts\";\n\n/**\n * Runs the GitHub Action: reads its inputs from `INPUT_*`, runs the release\n * and writes its outputs to `GITHUB_OUTPUT`. Resolves with the exit code.\n */\nexport async function main(\n\tenv: NodeJS.ProcessEnv = process.env,\n\treporter: Reporter | null = prettyReporter({\n\t\t...(env.GITHUB_ACTIONS === \"true\" && { color: true }),\n\t}),\n): Promise<number> {\n\tconst input = (name: string) => env[`INPUT_${name.toUpperCase()}`] ?? \"\";\n\tlet summary = true;\n\tlet report: ReleaseReport;\n\ttry {\n\t\tsummary = parseBoolean(\"summary\", input(\"summary\") || \"true\");\n\t\tconst cwd = resolve(\n\t\t\tenv.GITHUB_WORKSPACE ?? process.cwd(),\n\t\t\tinput(\"working-directory\") || \".\",\n\t\t);\n\t\tconst token = input(\"token\");\n\t\tif (token && !env.GITHUB_TOKEN && !env.GH_TOKEN) {\n\t\t\tprocess.env.GITHUB_TOKEN = token;\n\t\t}\n\t\tconst optional = (name: string) => {\n\t\t\tconst text = input(name);\n\t\t\treturn text.trim() === \"\" ? undefined : parseYaml(name, text);\n\t\t};\n\t\tconst release = await configuredRelease(cwd, input(\"config\") || undefined, {\n\t\t\tsteps: optional(\"steps\"),\n\t\t\tscheme: optional(\"scheme\"),\n\t\t\ttag: input(\"tag\") || undefined,\n\t\t\thistory: optional(\"history\"),\n\t\t\tcomponents: optional(\"components\"),\n\t\t\tchannels: optional(\"channels\"),\n\t\t});\n\t\tconst version = input(\"version\");\n\t\tconst component = input(\"component\");\n\t\tconst channel = input(\"channel\");\n\t\treport = await release.run({\n\t\t\tcwd,\n\t\t\tdryRun: parseBoolean(\"dry-run\", input(\"dry-run\") || \"false\"),\n\t\t\treporter,\n\t\t\t...(channel && { channel }),\n\t\t\t...(version && {\n\t\t\t\trelease: {\n\t\t\t\t\tversion,\n\t\t\t\t\tnotes: input(\"notes\"),\n\t\t\t\t\t...(component && { component }),\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\tlet issues: readonly string[];\n\t\tif (error instanceof ReleaseError) {\n\t\t\t// The reporter has printed the details.\n\t\t\tissues = [error.message];\n\t\t\tif (summary) await writeSummary(env, markdownSummary(error.report));\n\t\t} else {\n\t\t\tissues =\n\t\t\t\terror instanceof OptionsError ? error.issues : [errorMessage(error)];\n\t\t\tif (summary) await writeSummary(env, markdownProblems(issues));\n\t\t}\n\t\tfor (const issue of issues) annotate(issue);\n\t\treturn 1;\n\t}\n\n\tif (summary) await writeSummary(env, markdownSummary(report));\n\tawait setOutputs(env.GITHUB_OUTPUT, reportOutputs(report));\n\treturn 0;\n}\n\n/** Appends to the job summary, the Markdown GitHub shows on the run's page. */\nasync function writeSummary(env: NodeJS.ProcessEnv, markdown: string) {\n\tif (env.GITHUB_STEP_SUMMARY)\n\t\tawait appendFile(env.GITHUB_STEP_SUMMARY, markdown);\n}\n\nfunction parseYaml(name: string, text: string): unknown {\n\ttry {\n\t\treturn parse(text);\n\t} catch (error) {\n\t\tthrow new OptionsError([`${name}: invalid YAML: ${errorMessage(error)}`]);\n\t}\n}\n\nfunction parseBoolean(name: string, value: string): boolean {\n\tif (value === \"true\") return true;\n\tif (value === \"false\") return false;\n\tthrow new OptionsError([`${name}: expected true or false, got '${value}'`]);\n}\n\nfunction annotate(message: string) {\n\tconst escaped = message\n\t\t.replaceAll(\"%\", \"%25\")\n\t\t.replaceAll(\"\\r\", \"%0D\")\n\t\t.replaceAll(\"\\n\", \"%0A\");\n\tprocess.stdout.write(`::error::${escaped}\\n`);\n}\n\nasync function setOutputs(\n\tfile: string | undefined,\n\toutputs: Record<string, string>,\n) {\n\tif (!file) return;\n\tconst delimiter = `rylease_${randomUUID()}`;\n\tconst text = Object.entries(outputs)\n\t\t.map(([name, value]) => `${name}<<${delimiter}\\n${value}\\n${delimiter}\\n`)\n\t\t.join(\"\");\n\tawait appendFile(file, text);\n}\n\nif (\n\tprocess.argv[1] &&\n\timport.meta.url === pathToFileURL(process.argv[1]).href\n) {\n\tprovideSelf(import.meta.url);\n\t// Not awaited: custom steps import this module, so it must finish evaluating.\n\tvoid main().then((code) => {\n\t\tprocess.exitCode = code;\n\t});\n}\n"],"mappings":";;;;;;;;;AAWA,MAAM,eAAe;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAmBA,eAAe,WACd,KACA,MAC8B;CAC9B,MAAM,OAAO,OACV,QAAQ,KAAK,IAAI,IACjB,MAAM,cAAc,aAAa,KAAK,SAAS,QAAQ,KAAK,IAAI,CAAC,CAAC;CACrE,IAAI,SAAS,KAAA,GAAW,OAAO,KAAA;CAC/B,IAAI,WAAW,KAAK,IAAI,GAAG;EAC1B,MAAM,OAAO,MAAM,SAAS,MAAM,MAAM,CAAC,CAAC,OAAO,UAAmB;GACnE,MAAM,IAAI,aAAa,CACtB,sBAAsB,KAAK,IAAI,aAAa,KAAK,GAClD,CAAC;EACF,CAAC;EACD,IAAI;EACJ,IAAI;GACH,QAAQ,MAAM,IAAI;EACnB,SAAS,OAAO;GACf,MAAM,IAAI,aAAa,CACtB,2BAA2B,KAAK,IAAI,aAAa,KAAK,GACvD,CAAC;EACF;EACA,OAAO;GAAE,MAAM;GAAM,OAAO,cAAc,OAAO,IAAI;EAAE;CACxD;CAIA,MAAM,SAAQ,MAHQ,OAAO,cAAc,IAAI,CAAC,CAAC,MAAA,CAG5B;CACrB,IAAI,UAAU,KAAK,GAAG,OAAO;EAAE,MAAM;EAAM,SAAS;CAAM;CAC1D,MAAM,QAAQ,cAAc,OAAO,IAAI;CAGvC,OADa,MAAM,QAAQ,MAAM,KAAK,KAAK,MAAM,MAAM,KAAK,MAAM,IAE/D;EAAE,MAAM;EAAM,SAAS,cAAc,KAAc;CAAE,IACrD;EAAE,MAAM;EAAM;CAAM;AACxB;AAEA,MAAM,OAAO;CAAC;CAAS;CAAU;CAAO;CAAW;CAAc;AAAU;AAE3E,SAAS,cAAc,OAAgB,MAA6B;CACnE,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAA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;CACrE,IAAI,IAAI,qBACP,MAAM,WAAW,IAAI,qBAAqB,QAAQ;AACpD;AAEA,SAAS,UAAU,MAAc,MAAuB;CACvD,IAAI;EACH,OAAO,MAAM,IAAI;CAClB,SAAS,OAAO;EACf,MAAM,IAAI,aAAa,CAAC,GAAG,KAAK,kBAAkB,aAAa,KAAK,GAAG,CAAC;CACzE;AACD;AAEA,SAAS,aAAa,MAAc,OAAwB;CAC3D,IAAI,UAAU,QAAQ,OAAO;CAC7B,IAAI,UAAU,SAAS,OAAO;CAC9B,MAAM,IAAI,aAAa,CAAC,GAAG,KAAK,iCAAiC,MAAM,EAAE,CAAC;AAC3E;AAEA,SAAS,SAAS,SAAiB;CAClC,MAAM,UAAU,QACd,WAAW,KAAK,KAAK,CAAC,CACtB,WAAW,MAAM,KAAK,CAAC,CACvB,WAAW,MAAM,KAAK;CACxB,QAAQ,OAAO,MAAM,YAAY,QAAQ,GAAG;AAC7C;AAEA,eAAe,WACd,MACA,SACC;CACD,IAAI,CAAC,MAAM;CACX,MAAM,YAAY,WAAW,WAAW;CACxC,MAAM,OAAO,OAAO,QAAQ,OAAO,CAAC,CAClC,KAAK,CAAC,MAAM,WAAW,GAAG,KAAK,IAAI,UAAU,IAAI,MAAM,IAAI,UAAU,GAAG,CAAC,CACzE,KAAK,EAAE;CACT,MAAM,WAAW,MAAM,IAAI;AAC5B;AAEA,IACC,QAAQ,KAAK,MACb,YAAY,QAAQ,cAAc,QAAQ,KAAK,EAAE,CAAC,CAAC,MAClD;CACD,YAAY,YAAY,GAAG;CAE3B,KAAU,CAAC,CAAC,MAAM,SAAS;EAC1B,QAAQ,WAAW;CACpB,CAAC;AACF"}
@@ -0,0 +1,14 @@
1
+ import "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
+ return target;
12
+ };
13
+ //#endregion
14
+ export { __exportAll as t };