@cloud-cli/on 1.5.0 ā 1.5.2
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 +5 -6
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/on.js +1036 -1036
- package/dist/preprocessors/github.d.ts.map +1 -1
- package/dist/reporters/html.reporter.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/signals.d.ts +2 -0
- package/dist/signals.d.ts.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/on.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import e, { existsSync as t, readFileSync as n, readdirSync as r, statSync as i } from "node:fs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
3
|
+
import { parseArgs as a, parseEnv as o, promisify as s } from "node:util";
|
|
4
|
+
import c from "node:http";
|
|
5
|
+
import { URL as l } from "node:url";
|
|
6
|
+
import u, { randomUUID as d } from "node:crypto";
|
|
7
|
+
import f, { isAbsolute as p, join as m, resolve as h } from "node:path";
|
|
8
8
|
import { readdir as g } from "node:fs/promises";
|
|
9
9
|
import { exec as _, spawn as v } from "node:child_process";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
@@ -3399,16 +3399,17 @@ var dn = {
|
|
|
3399
3399
|
parse(e, t, n) {
|
|
3400
3400
|
let r = !0, i = null, a = e["x-hub-signature-256"];
|
|
3401
3401
|
if (n || (r = !1), n && a) {
|
|
3402
|
-
let e = "sha256=" +
|
|
3403
|
-
r =
|
|
3402
|
+
let e = "sha256=" + u.createHmac("sha256", n).update(t).digest("hex");
|
|
3403
|
+
r = u.timingSafeEqual(Buffer.from(a), Buffer.from(e));
|
|
3404
3404
|
}
|
|
3405
3405
|
if (r) {
|
|
3406
|
-
let n = JSON.parse(t.toString("utf-8")), r = e["x-github-event"] || "unknown", a =
|
|
3406
|
+
let n = JSON.parse(t.toString("utf-8")), r = e["x-github-event"] || "unknown", a = n.ref || "", o = a.includes("refs/heads") ? a.replace("refs/heads/", "") : "", s = a.includes("refs/tags") ? a.replace("refs/tags/", "") : "", [c, l] = (n.repository?.full_name || "").split("/");
|
|
3407
3407
|
i = {
|
|
3408
3408
|
event: r,
|
|
3409
|
-
branch:
|
|
3410
|
-
|
|
3411
|
-
|
|
3409
|
+
branch: o,
|
|
3410
|
+
tag: s,
|
|
3411
|
+
owner: c,
|
|
3412
|
+
repo: l,
|
|
3412
3413
|
clone_url: n.repository?.clone_url,
|
|
3413
3414
|
commit_sha: n.after || n.head_commit?.id,
|
|
3414
3415
|
author: n.pusher?.name || n.sender?.login,
|
|
@@ -3796,29 +3797,27 @@ var vn, yn, bn, xn = class {
|
|
|
3796
3797
|
}
|
|
3797
3798
|
async report(t) {
|
|
3798
3799
|
e.mkdirSync(this.outputDir, { recursive: !0 });
|
|
3799
|
-
let n = this.generateHtml(t), r =
|
|
3800
|
+
let n = this.generateHtml(t), r = f.join(this.outputDir, `run-${t.jobId}.html`);
|
|
3800
3801
|
e.writeFileSync(r, n, "utf-8"), console.log(`š HTML Execution Report generated: ${r}`);
|
|
3801
3802
|
}
|
|
3802
3803
|
generateHtml(e) {
|
|
3803
3804
|
let t = e.status === "success" ? "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" : e.status === "failed" ? "bg-rose-500/10 text-rose-400 border-rose-500/20" : "bg-amber-500/10 text-amber-400 border-amber-500/20", n = e.steps.map((e, t) => {
|
|
3804
3805
|
let n = e.logContent, r = n ? this.ansiUp.ansi_to_html(n) : "<span class=\"text-gray-500\">(No terminal log output recorded for this step)</span>", i = e.status === "success" ? "text-emerald-400 bg-emerald-500/10" : e.status === "failed" ? "text-rose-400 bg-rose-500/10" : "text-gray-400 bg-gray-500/10";
|
|
3805
|
-
return
|
|
3806
|
-
|
|
3807
|
-
<div class="flex items-center justify-between p-2 bg-gray-800/40 border-b border-gray-800">
|
|
3806
|
+
return `<details class="border border-b-0 border-gray-800 bg-gray-900/50 text-sm" open>
|
|
3807
|
+
<summary class="flex items-center justify-between p-2 bg-gray-800/40 border-b border-gray-800 cursor-pointer">
|
|
3808
3808
|
<div class="flex items-center gap-3">
|
|
3809
|
-
<span class="
|
|
3810
|
-
<h3 class="font-semibold text-gray-200
|
|
3811
|
-
<span class="px-2.5 py-0.5 rounded-full
|
|
3809
|
+
<span class="font-mono text-gray-500">#${t + 1} ${e.exitCode === 0 ? "" : "(" + e.exitCode + ")"}</span>
|
|
3810
|
+
<h3 class="font-semibold text-gray-200">${e.name}</h3>
|
|
3811
|
+
<span class="px-2.5 py-0.5 rounded-full font-medium ${i}">
|
|
3812
3812
|
${e.status.toUpperCase()}
|
|
3813
3813
|
</span>
|
|
3814
3814
|
</div>
|
|
3815
|
-
<div class="
|
|
3816
|
-
</
|
|
3817
|
-
<div class="p-4 bg-gray-950 font-mono text-
|
|
3815
|
+
<div class="font-mono text-gray-400">${e.durationMs}ms</div>
|
|
3816
|
+
</summary>
|
|
3817
|
+
<div class="p-4 bg-gray-950 font-mono text-gray-300 leading-relaxed overflow-auto w-full">
|
|
3818
3818
|
<pre class="whitespace-pre-wrap">${r}</pre>
|
|
3819
3819
|
</div>
|
|
3820
|
-
</
|
|
3821
|
-
`;
|
|
3820
|
+
</details>`;
|
|
3822
3821
|
}).join("");
|
|
3823
3822
|
return `<!DOCTYPE html>
|
|
3824
3823
|
<html lang="en" class="dark">
|
|
@@ -3826,12 +3825,11 @@ var vn, yn, bn, xn = class {
|
|
|
3826
3825
|
<meta charset="UTF-8">
|
|
3827
3826
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3828
3827
|
<title>Run #${e.jobId} - ${e.workflowName}</title>
|
|
3829
|
-
<script
|
|
3828
|
+
<script type="importmap"> {"imports": { "@li3/": "https://cdn.li3.dev/@li3/" }}<\/script>
|
|
3830
3829
|
</head>
|
|
3831
3830
|
<body class="bg-gray-950 text-gray-100 min-h-screen p-6 font-sans">
|
|
3832
3831
|
<div class="max-w-5xl mx-auto space-y-4">
|
|
3833
3832
|
|
|
3834
|
-
<!-- Top Header -->
|
|
3835
3833
|
<div class="flex items-center justify-between border-b border-gray-800 pb-6">
|
|
3836
3834
|
<div>
|
|
3837
3835
|
<a href="/runs" class="text-xs text-indigo-400 hover:underline mb-1 inline-block">ā Back to Dashboard</a>
|
|
@@ -3846,294 +3844,99 @@ var vn, yn, bn, xn = class {
|
|
|
3846
3844
|
</span>
|
|
3847
3845
|
</div>
|
|
3848
3846
|
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
<h2 class="text-lg font-semibold text-white mb-4">Execution Steps</h2>
|
|
3847
|
+
<div class="rounded overflow-hidden border-b border-gray-800">
|
|
3848
|
+
<h2 class="sr-only">Execution Steps</h2>
|
|
3852
3849
|
${n}
|
|
3853
3850
|
</div>
|
|
3854
3851
|
|
|
3855
|
-
|
|
3856
|
-
<div class="bg-gray-900 border border-gray-800 rounded-xl p-4">
|
|
3852
|
+
<div class="bg-gray-900 border border-gray-800 rounded-xl p-4 overflow-auto max-h-[400px]">
|
|
3857
3853
|
<h2 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Trigger Inputs</h2>
|
|
3858
3854
|
<pre class="font-mono text-xs text-indigo-300 bg-gray-950 p-3 rounded-lg overflow-x-auto">${JSON.stringify(e.inputs, null, 2)}</pre>
|
|
3859
3855
|
</div>
|
|
3860
3856
|
|
|
3861
3857
|
</div>
|
|
3858
|
+
<script type="module">import "@li3/web"<\/script>
|
|
3859
|
+
<script defer async src="https://cdn.tailwindcss.com"><\/script>
|
|
3862
3860
|
</body>
|
|
3863
3861
|
</html>`;
|
|
3864
3862
|
}
|
|
3865
|
-
}, Sn =
|
|
3866
|
-
server;
|
|
3867
|
-
preprocessors = /* @__PURE__ */ new Map();
|
|
3868
|
-
workflows = [];
|
|
3869
|
-
queue;
|
|
3870
|
-
secrets;
|
|
3871
|
-
adminToken;
|
|
3872
|
-
static async withPort(t) {
|
|
3873
|
-
let { port: n, ...r } = t;
|
|
3874
|
-
return new e(r).listen(n);
|
|
3875
|
-
}
|
|
3876
|
-
constructor(e) {
|
|
3877
|
-
this.queue = e.queue, this.secrets = e.secrets, this.adminToken = e.adminToken, this.workflows = e.workflows, this.registerPreprocessor(new pn()), this.server = f.createServer((e, t) => this.handleRequest(e, t));
|
|
3878
|
-
}
|
|
3879
|
-
registerPreprocessor(e) {
|
|
3880
|
-
this.preprocessors.set(e.name, e);
|
|
3881
|
-
}
|
|
3882
|
-
async handleRequest(e, t) {
|
|
3883
|
-
let n = new p(e.url || "/", `${e.headers["x-forwarded-proto"] || "http"}://${e.headers["x-forwarded-host"] || e.headers.host}`);
|
|
3884
|
-
if (e.method === "GET" && (n.pathname === "/runs" || n.pathname === "/")) return this.renderDashboard(t);
|
|
3885
|
-
if (e.method === "GET" && n.pathname.startsWith("/runs/")) {
|
|
3886
|
-
let e = n.pathname.replace("/runs/", "");
|
|
3887
|
-
return this.renderRunDetails(e, t);
|
|
3888
|
-
}
|
|
3889
|
-
if (e.method === "POST" && n.pathname === "/admin/reload-secrets") return this.handleSecretReload(e, t);
|
|
3890
|
-
if (e.method === "POST" && n.pathname.startsWith("/webhooks/")) {
|
|
3891
|
-
let r = n.pathname.replace("/webhooks/", "");
|
|
3892
|
-
return this.handleWebhook(r, e, t);
|
|
3893
|
-
}
|
|
3894
|
-
t.writeHead(404, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Endpoint not found" }));
|
|
3895
|
-
}
|
|
3896
|
-
async handleWebhook(e, t, n) {
|
|
3897
|
-
try {
|
|
3898
|
-
let { rawBuffer: r, headers: i } = await this.readRequest(t, n);
|
|
3899
|
-
if (n.headersSent || !r) return;
|
|
3900
|
-
let { isValid: a, inputs: o } = this.preprocess(e, i, r);
|
|
3901
|
-
if (!a) {
|
|
3902
|
-
n.writeHead(401, { "Content-Type": "application/json" }), n.end(JSON.stringify({ error: "Invalid HMAC signature or authentication failed" }));
|
|
3903
|
-
return;
|
|
3904
|
-
}
|
|
3905
|
-
let s = this.matchWorkflows(e, o);
|
|
3906
|
-
n.writeHead(202, { "Content-Type": "application/json" }), n.end(JSON.stringify({
|
|
3907
|
-
message: "Webhook processed",
|
|
3908
|
-
triggeredWorkflows: s
|
|
3909
|
-
}));
|
|
3910
|
-
} catch (e) {
|
|
3911
|
-
console.error("ā Webhook Ingress Error:", e), n.writeHead(500, { "Content-Type": "application/json" }), n.end(JSON.stringify({
|
|
3912
|
-
error: "Internal Ingress Error",
|
|
3913
|
-
details: e.message
|
|
3914
|
-
}));
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
async readRequest(e, t) {
|
|
3918
|
-
let n = [], r = 0;
|
|
3919
|
-
for await (let i of e) {
|
|
3920
|
-
if (r += i.length, r > 5242880) return t.writeHead(413, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Payload size exceeds limit" })), {
|
|
3921
|
-
rawBuffer: null,
|
|
3922
|
-
headers: {}
|
|
3923
|
-
};
|
|
3924
|
-
n.push(typeof i == "string" ? Buffer.from(i) : i);
|
|
3925
|
-
}
|
|
3926
|
-
return {
|
|
3927
|
-
rawBuffer: Buffer.concat(n),
|
|
3928
|
-
headers: Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e.toLowerCase(), Array.isArray(t) ? t[0] : t || ""]))
|
|
3929
|
-
};
|
|
3930
|
-
}
|
|
3931
|
-
preprocess(e, t, n) {
|
|
3932
|
-
let r = this.secrets.get(`${e.toUpperCase()}_WEBHOOK_SECRET`), i = this.preprocessors.get(e);
|
|
3933
|
-
try {
|
|
3934
|
-
if (i) {
|
|
3935
|
-
let { inputs: e, isValid: a } = i.parse(t, n, r);
|
|
3936
|
-
return {
|
|
3937
|
-
inputs: e,
|
|
3938
|
-
isValid: a
|
|
3939
|
-
};
|
|
3940
|
-
}
|
|
3941
|
-
return {
|
|
3942
|
-
isValid: !0,
|
|
3943
|
-
inputs: JSON.parse(n.toString("utf-8"))
|
|
3944
|
-
};
|
|
3945
|
-
} catch {
|
|
3946
|
-
return {
|
|
3947
|
-
isValid: !1,
|
|
3948
|
-
inputs: null
|
|
3949
|
-
};
|
|
3950
|
-
}
|
|
3951
|
-
}
|
|
3952
|
-
async matchWorkflows(e, t) {
|
|
3953
|
-
let n = [];
|
|
3954
|
-
for (let r of this.workflows) {
|
|
3955
|
-
if (r.on.provider !== e) continue;
|
|
3956
|
-
if (r.on.if) try {
|
|
3957
|
-
if (!fn.evaluateCondition(r.on.if, { inputs: t })) continue;
|
|
3958
|
-
} catch (e) {
|
|
3959
|
-
console.error(`ā ļø Condition evaluation error in workflow [${r.id}]:`, e.message);
|
|
3960
|
-
continue;
|
|
3961
|
-
}
|
|
3962
|
-
let i;
|
|
3963
|
-
r.concurrency?.group && (i = await fn.evaluateValue(r.concurrency.group, { inputs: t }));
|
|
3964
|
-
let a = {
|
|
3965
|
-
workflowId: r.id,
|
|
3966
|
-
env: r.env,
|
|
3967
|
-
steps: r.steps,
|
|
3968
|
-
inputs: t
|
|
3969
|
-
};
|
|
3970
|
-
await this.queue.enqueue(r.id, a, i), n.push(r.id);
|
|
3971
|
-
}
|
|
3972
|
-
return n;
|
|
3973
|
-
}
|
|
3974
|
-
async handleSecretReload(e, t) {
|
|
3975
|
-
if (e.headers.authorization !== `Bearer ${this.adminToken}`) return t.writeHead(403, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Unauthorized" }));
|
|
3976
|
-
this.secrets.reload(), console.log("š SecretStore reloaded successfully without downtime!"), t.writeHead(200, { "Content-Type": "application/json" }), t.end(JSON.stringify({ message: "Secrets reloaded successfully" }));
|
|
3977
|
-
}
|
|
3978
|
-
async renderDashboard(e) {
|
|
3979
|
-
let t = (await this.queue.listJobs(500)).map((e) => {
|
|
3980
|
-
let t = e.status === "success" ? "bg-emerald-500/10 text-emerald-400" : e.status === "failed" ? "bg-rose-500/10 text-rose-400" : e.status === "running" ? "bg-indigo-500/10 text-indigo-400 animate-pulse" : "bg-gray-500/10 text-gray-400";
|
|
3981
|
-
return `
|
|
3982
|
-
<tr class="border-b border-gray-800 hover:bg-gray-900/50 transition">
|
|
3983
|
-
<td class="py-3 px-4 font-mono text-indigo-400"><a href="/runs/${e.id}" class="hover:underline">#${e.id}</a></td>
|
|
3984
|
-
<td class="py-3 px-4 font-medium text-white">${e.workflow_id}</td>
|
|
3985
|
-
<td class="py-3 px-4">
|
|
3986
|
-
<span class="px-2.5 py-0.5 rounded-full text-xs font-semibold ${t}">${e.status.toUpperCase()}</span>
|
|
3987
|
-
</td>
|
|
3988
|
-
<td class="py-3 px-4 text-xs font-mono text-gray-400">${e.worker_id || "-"}</td>
|
|
3989
|
-
<td class="py-3 px-4 text-xs text-gray-400">${e.created_at}</td>
|
|
3990
|
-
<td class="py-3 px-4 text-right">
|
|
3991
|
-
<a href="/runs/${e.id}" class="text-xs bg-gray-800 hover:bg-gray-700 text-gray-200 px-3 py-1 rounded border border-gray-700">View Trace ā</a>
|
|
3992
|
-
</td>
|
|
3993
|
-
</tr>
|
|
3994
|
-
`;
|
|
3995
|
-
}).join(""), n = `<!DOCTYPE html>
|
|
3996
|
-
<html lang="en" class="dark">
|
|
3997
|
-
<head>
|
|
3998
|
-
<meta charset="UTF-8">
|
|
3999
|
-
<meta http-equiv="refresh" content="10"> <!-- Auto-refreshes every 10s -->
|
|
4000
|
-
<title>Workflow Engine Dashboard</title>
|
|
4001
|
-
<script src="https://cdn.tailwindcss.com"><\/script>
|
|
4002
|
-
</head>
|
|
4003
|
-
<body class="bg-gray-950 text-gray-100 min-h-screen p-6 font-sans">
|
|
4004
|
-
<div class="max-w-6xl mx-auto space-y-6">
|
|
4005
|
-
<div class="flex items-center justify-between border-b border-gray-800 pb-4">
|
|
4006
|
-
<div>
|
|
4007
|
-
<h1 class="text-2xl font-bold text-white">āļø Runner Engine Status</h1>
|
|
4008
|
-
<p class="text-xs text-gray-400">Live Job Queue & Execution Traces</p>
|
|
4009
|
-
</div>
|
|
4010
|
-
<span class="text-xs font-mono bg-emerald-500/10 text-emerald-400 px-3 py-1 rounded-full border border-emerald-500/20">
|
|
4011
|
-
ā System Operational
|
|
4012
|
-
</span>
|
|
4013
|
-
</div>
|
|
4014
|
-
|
|
4015
|
-
<div class="bg-gray-900 border border-gray-800 rounded-xl overflow-hidden">
|
|
4016
|
-
<table class="w-full text-left text-sm">
|
|
4017
|
-
<thead class="bg-gray-800/50 text-gray-400 text-xs uppercase font-mono border-b border-gray-800">
|
|
4018
|
-
<tr>
|
|
4019
|
-
<th class="py-3 px-4">Job ID</th>
|
|
4020
|
-
<th class="py-3 px-4">Workflow</th>
|
|
4021
|
-
<th class="py-3 px-4">Status</th>
|
|
4022
|
-
<th class="py-3 px-4">Worker</th>
|
|
4023
|
-
<th class="py-3 px-4">Created At</th>
|
|
4024
|
-
<th class="py-3 px-4 text-right">Action</th>
|
|
4025
|
-
</tr>
|
|
4026
|
-
</thead>
|
|
4027
|
-
<tbody>${t.length ? t : "<tr><td colspan=\"6\" class=\"p-6 text-center text-gray-500\">No jobs recorded yet.</td></tr>"}</tbody>
|
|
4028
|
-
</table>
|
|
4029
|
-
</div>
|
|
4030
|
-
</div>
|
|
4031
|
-
</body>
|
|
4032
|
-
</html>`, r = this.secrets.redactText(n);
|
|
4033
|
-
e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(r);
|
|
4034
|
-
}
|
|
4035
|
-
async renderRunDetails(e, t) {
|
|
4036
|
-
let n = await this.queue.getJob(e);
|
|
4037
|
-
if (!n || !n.report) return t.writeHead(404, { "Content-Type": "text/html; charset=utf-8" }), t.end("<h1>404 - Report Not Found</h1>");
|
|
4038
|
-
let r = JSON.parse(n.report), i = await this.queue.getJobLogs(e);
|
|
4039
|
-
r.steps = r.steps.map((e) => ({
|
|
4040
|
-
...e,
|
|
4041
|
-
logContent: i[e.id] || ""
|
|
4042
|
-
}));
|
|
4043
|
-
let a = new xn({ outputDir: "" }).generateHtml(r), o = this.secrets.redactText(a);
|
|
4044
|
-
t.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), t.end(o);
|
|
4045
|
-
}
|
|
4046
|
-
listen(e) {
|
|
4047
|
-
return new Promise((t) => {
|
|
4048
|
-
this.server.listen(e, process.env.RUNNER_HOST || "0.0.0.0", () => {
|
|
4049
|
-
console.log(`š Webhook Ingress Server running on port ${e}`), t(this);
|
|
4050
|
-
});
|
|
4051
|
-
});
|
|
4052
|
-
}
|
|
4053
|
-
async stop() {
|
|
4054
|
-
return new Promise((e) => {
|
|
4055
|
-
this.server.close(() => {
|
|
4056
|
-
console.log("š Webhook Ingress Server stopped listening."), e();
|
|
4057
|
-
});
|
|
4058
|
-
});
|
|
4059
|
-
}
|
|
4060
|
-
}, Cn = Symbol.for("yaml.alias"), wn = Symbol.for("yaml.document"), Tn = Symbol.for("yaml.map"), En = Symbol.for("yaml.pair"), Dn = Symbol.for("yaml.scalar"), On = Symbol.for("yaml.seq"), H = Symbol.for("yaml.node.type"), kn = (e) => !!e && typeof e == "object" && e[H] === Cn, An = (e) => !!e && typeof e == "object" && e[H] === wn, jn = (e) => !!e && typeof e == "object" && e[H] === Tn, U = (e) => !!e && typeof e == "object" && e[H] === En, W = (e) => !!e && typeof e == "object" && e[H] === Dn, Mn = (e) => !!e && typeof e == "object" && e[H] === On;
|
|
3863
|
+
}, Sn = Symbol.for("yaml.alias"), Cn = Symbol.for("yaml.document"), wn = Symbol.for("yaml.map"), Tn = Symbol.for("yaml.pair"), En = Symbol.for("yaml.scalar"), Dn = Symbol.for("yaml.seq"), H = Symbol.for("yaml.node.type"), On = (e) => !!e && typeof e == "object" && e[H] === Sn, kn = (e) => !!e && typeof e == "object" && e[H] === Cn, An = (e) => !!e && typeof e == "object" && e[H] === wn, U = (e) => !!e && typeof e == "object" && e[H] === Tn, W = (e) => !!e && typeof e == "object" && e[H] === En, jn = (e) => !!e && typeof e == "object" && e[H] === Dn;
|
|
4061
3864
|
function G(e) {
|
|
4062
3865
|
if (e && typeof e == "object") switch (e[H]) {
|
|
4063
|
-
case
|
|
4064
|
-
case
|
|
3866
|
+
case wn:
|
|
3867
|
+
case Dn: return !0;
|
|
4065
3868
|
}
|
|
4066
3869
|
return !1;
|
|
4067
3870
|
}
|
|
4068
3871
|
function K(e) {
|
|
4069
3872
|
if (e && typeof e == "object") switch (e[H]) {
|
|
4070
|
-
case
|
|
4071
|
-
case
|
|
4072
|
-
case
|
|
4073
|
-
case
|
|
3873
|
+
case Sn:
|
|
3874
|
+
case wn:
|
|
3875
|
+
case En:
|
|
3876
|
+
case Dn: return !0;
|
|
4074
3877
|
}
|
|
4075
3878
|
return !1;
|
|
4076
3879
|
}
|
|
4077
|
-
var
|
|
4078
|
-
function
|
|
4079
|
-
let n =
|
|
4080
|
-
|
|
3880
|
+
var Mn = (e) => (W(e) || G(e)) && !!e.anchor, q = Symbol("break visit"), Nn = Symbol("skip children"), Pn = Symbol("remove node");
|
|
3881
|
+
function Fn(e, t) {
|
|
3882
|
+
let n = zn(t);
|
|
3883
|
+
kn(e) ? In(null, e.contents, n, Object.freeze([e])) === Pn && (e.contents = null) : In(null, e, n, Object.freeze([]));
|
|
4081
3884
|
}
|
|
4082
|
-
|
|
4083
|
-
function
|
|
4084
|
-
let i =
|
|
4085
|
-
if (K(i) || U(i)) return
|
|
3885
|
+
Fn.BREAK = q, Fn.SKIP = Nn, Fn.REMOVE = Pn;
|
|
3886
|
+
function In(e, t, n, r) {
|
|
3887
|
+
let i = Bn(e, t, n, r);
|
|
3888
|
+
if (K(i) || U(i)) return Vn(e, r, i), In(e, i, n, r);
|
|
4086
3889
|
if (typeof i != "symbol") {
|
|
4087
3890
|
if (G(t)) {
|
|
4088
3891
|
r = Object.freeze(r.concat(t));
|
|
4089
3892
|
for (let e = 0; e < t.items.length; ++e) {
|
|
4090
|
-
let i =
|
|
3893
|
+
let i = In(e, t.items[e], n, r);
|
|
4091
3894
|
if (typeof i == "number") e = i - 1;
|
|
4092
3895
|
else if (i === q) return q;
|
|
4093
|
-
else i ===
|
|
3896
|
+
else i === Pn && (t.items.splice(e, 1), --e);
|
|
4094
3897
|
}
|
|
4095
3898
|
} else if (U(t)) {
|
|
4096
3899
|
r = Object.freeze(r.concat(t));
|
|
4097
|
-
let e =
|
|
3900
|
+
let e = In("key", t.key, n, r);
|
|
4098
3901
|
if (e === q) return q;
|
|
4099
|
-
e ===
|
|
4100
|
-
let i =
|
|
3902
|
+
e === Pn && (t.key = null);
|
|
3903
|
+
let i = In("value", t.value, n, r);
|
|
4101
3904
|
if (i === q) return q;
|
|
4102
|
-
i ===
|
|
3905
|
+
i === Pn && (t.value = null);
|
|
4103
3906
|
}
|
|
4104
3907
|
}
|
|
4105
3908
|
return i;
|
|
4106
3909
|
}
|
|
4107
|
-
async function
|
|
4108
|
-
let n =
|
|
4109
|
-
|
|
3910
|
+
async function Ln(e, t) {
|
|
3911
|
+
let n = zn(t);
|
|
3912
|
+
kn(e) ? await Rn(null, e.contents, n, Object.freeze([e])) === Pn && (e.contents = null) : await Rn(null, e, n, Object.freeze([]));
|
|
4110
3913
|
}
|
|
4111
|
-
|
|
4112
|
-
async function
|
|
4113
|
-
let i = await
|
|
4114
|
-
if (K(i) || U(i)) return
|
|
3914
|
+
Ln.BREAK = q, Ln.SKIP = Nn, Ln.REMOVE = Pn;
|
|
3915
|
+
async function Rn(e, t, n, r) {
|
|
3916
|
+
let i = await Bn(e, t, n, r);
|
|
3917
|
+
if (K(i) || U(i)) return Vn(e, r, i), Rn(e, i, n, r);
|
|
4115
3918
|
if (typeof i != "symbol") {
|
|
4116
3919
|
if (G(t)) {
|
|
4117
3920
|
r = Object.freeze(r.concat(t));
|
|
4118
3921
|
for (let e = 0; e < t.items.length; ++e) {
|
|
4119
|
-
let i = await
|
|
3922
|
+
let i = await Rn(e, t.items[e], n, r);
|
|
4120
3923
|
if (typeof i == "number") e = i - 1;
|
|
4121
3924
|
else if (i === q) return q;
|
|
4122
|
-
else i ===
|
|
3925
|
+
else i === Pn && (t.items.splice(e, 1), --e);
|
|
4123
3926
|
}
|
|
4124
3927
|
} else if (U(t)) {
|
|
4125
3928
|
r = Object.freeze(r.concat(t));
|
|
4126
|
-
let e = await
|
|
3929
|
+
let e = await Rn("key", t.key, n, r);
|
|
4127
3930
|
if (e === q) return q;
|
|
4128
|
-
e ===
|
|
4129
|
-
let i = await
|
|
3931
|
+
e === Pn && (t.key = null);
|
|
3932
|
+
let i = await Rn("value", t.value, n, r);
|
|
4130
3933
|
if (i === q) return q;
|
|
4131
|
-
i ===
|
|
3934
|
+
i === Pn && (t.value = null);
|
|
4132
3935
|
}
|
|
4133
3936
|
}
|
|
4134
3937
|
return i;
|
|
4135
3938
|
}
|
|
4136
|
-
function
|
|
3939
|
+
function zn(e) {
|
|
4137
3940
|
return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
|
|
4138
3941
|
Alias: e.Node,
|
|
4139
3942
|
Map: e.Node,
|
|
@@ -4148,34 +3951,34 @@ function Bn(e) {
|
|
|
4148
3951
|
Seq: e.Collection
|
|
4149
3952
|
}, e) : e;
|
|
4150
3953
|
}
|
|
4151
|
-
function
|
|
3954
|
+
function Bn(e, t, n, r) {
|
|
4152
3955
|
if (typeof n == "function") return n(e, t, r);
|
|
4153
|
-
if (
|
|
4154
|
-
if (
|
|
3956
|
+
if (An(t)) return n.Map?.(e, t, r);
|
|
3957
|
+
if (jn(t)) return n.Seq?.(e, t, r);
|
|
4155
3958
|
if (U(t)) return n.Pair?.(e, t, r);
|
|
4156
3959
|
if (W(t)) return n.Scalar?.(e, t, r);
|
|
4157
|
-
if (
|
|
3960
|
+
if (On(t)) return n.Alias?.(e, t, r);
|
|
4158
3961
|
}
|
|
4159
|
-
function
|
|
3962
|
+
function Vn(e, t, n) {
|
|
4160
3963
|
let r = t[t.length - 1];
|
|
4161
3964
|
if (G(r)) r.items[e] = n;
|
|
4162
3965
|
else if (U(r)) e === "key" ? r.key = n : r.value = n;
|
|
4163
|
-
else if (
|
|
3966
|
+
else if (kn(r)) r.contents = n;
|
|
4164
3967
|
else {
|
|
4165
|
-
let e =
|
|
3968
|
+
let e = On(r) ? "alias" : "scalar";
|
|
4166
3969
|
throw Error(`Cannot replace node with ${e} parent`);
|
|
4167
3970
|
}
|
|
4168
3971
|
}
|
|
4169
3972
|
//#endregion
|
|
4170
3973
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js
|
|
4171
|
-
var
|
|
3974
|
+
var Hn = {
|
|
4172
3975
|
"!": "%21",
|
|
4173
3976
|
",": "%2C",
|
|
4174
3977
|
"[": "%5B",
|
|
4175
3978
|
"]": "%5D",
|
|
4176
3979
|
"{": "%7B",
|
|
4177
3980
|
"}": "%7D"
|
|
4178
|
-
},
|
|
3981
|
+
}, Un = (e) => e.replace(/[!,[\]{}]/g, (e) => Hn[e]), Wn = class e {
|
|
4179
3982
|
constructor(t, n) {
|
|
4180
3983
|
this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
|
|
4181
3984
|
}
|
|
@@ -4238,14 +4041,14 @@ var Un = {
|
|
|
4238
4041
|
return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
|
|
4239
4042
|
}
|
|
4240
4043
|
tagString(e) {
|
|
4241
|
-
for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t +
|
|
4044
|
+
for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + Un(e.substring(n.length));
|
|
4242
4045
|
return e[0] === "!" ? e : `!<${e}>`;
|
|
4243
4046
|
}
|
|
4244
4047
|
toString(e) {
|
|
4245
4048
|
let t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags), r;
|
|
4246
4049
|
if (e && n.length > 0 && K(e.contents)) {
|
|
4247
4050
|
let t = {};
|
|
4248
|
-
|
|
4051
|
+
Fn(e.contents, (e, n) => {
|
|
4249
4052
|
K(n) && n.tag && (t[n.tag] = !0);
|
|
4250
4053
|
}), r = Object.keys(t);
|
|
4251
4054
|
} else r = [];
|
|
@@ -4253,37 +4056,37 @@ var Un = {
|
|
|
4253
4056
|
return t.join("\n");
|
|
4254
4057
|
}
|
|
4255
4058
|
};
|
|
4256
|
-
|
|
4059
|
+
Wn.defaultYaml = {
|
|
4257
4060
|
explicit: !1,
|
|
4258
4061
|
version: "1.2"
|
|
4259
|
-
},
|
|
4062
|
+
}, Wn.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
4260
4063
|
//#endregion
|
|
4261
4064
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js
|
|
4262
|
-
function
|
|
4065
|
+
function Gn(e) {
|
|
4263
4066
|
if (/[\x00-\x19\s,[\]{}]/.test(e)) {
|
|
4264
4067
|
let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
|
|
4265
4068
|
throw Error(t);
|
|
4266
4069
|
}
|
|
4267
4070
|
return !0;
|
|
4268
4071
|
}
|
|
4269
|
-
function
|
|
4072
|
+
function Kn(e) {
|
|
4270
4073
|
let t = /* @__PURE__ */ new Set();
|
|
4271
|
-
return
|
|
4074
|
+
return Fn(e, { Value(e, n) {
|
|
4272
4075
|
n.anchor && t.add(n.anchor);
|
|
4273
4076
|
} }), t;
|
|
4274
4077
|
}
|
|
4275
|
-
function
|
|
4078
|
+
function qn(e, t) {
|
|
4276
4079
|
for (let n = 1;; ++n) {
|
|
4277
4080
|
let r = `${e}${n}`;
|
|
4278
4081
|
if (!t.has(r)) return r;
|
|
4279
4082
|
}
|
|
4280
4083
|
}
|
|
4281
|
-
function
|
|
4084
|
+
function Jn(e, t) {
|
|
4282
4085
|
let n = [], r = /* @__PURE__ */ new Map(), i = null;
|
|
4283
4086
|
return {
|
|
4284
4087
|
onAnchor: (r) => {
|
|
4285
|
-
n.push(r), i ??=
|
|
4286
|
-
let a =
|
|
4088
|
+
n.push(r), i ??= Kn(e);
|
|
4089
|
+
let a = qn(t, i);
|
|
4287
4090
|
return i.add(a), a;
|
|
4288
4091
|
},
|
|
4289
4092
|
setAnchors: () => {
|
|
@@ -4301,22 +4104,22 @@ function Yn(e, t) {
|
|
|
4301
4104
|
}
|
|
4302
4105
|
//#endregion
|
|
4303
4106
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
4304
|
-
function
|
|
4107
|
+
function Yn(e, t, n, r) {
|
|
4305
4108
|
if (r && typeof r == "object") {
|
|
4306
4109
|
if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
|
|
4307
|
-
let n = r[t], i =
|
|
4110
|
+
let n = r[t], i = Yn(e, r, String(t), n);
|
|
4308
4111
|
i === void 0 ? delete r[t] : i !== n && (r[t] = i);
|
|
4309
4112
|
}
|
|
4310
4113
|
else if (r instanceof Map) for (let t of Array.from(r.keys())) {
|
|
4311
|
-
let n = r.get(t), i =
|
|
4114
|
+
let n = r.get(t), i = Yn(e, r, t, n);
|
|
4312
4115
|
i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
|
|
4313
4116
|
}
|
|
4314
4117
|
else if (r instanceof Set) for (let t of Array.from(r)) {
|
|
4315
|
-
let n =
|
|
4118
|
+
let n = Yn(e, r, t, t);
|
|
4316
4119
|
n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
|
|
4317
4120
|
}
|
|
4318
4121
|
else for (let [t, n] of Object.entries(r)) {
|
|
4319
|
-
let i =
|
|
4122
|
+
let i = Yn(e, r, t, n);
|
|
4320
4123
|
i === void 0 ? delete r[t] : i !== n && (r[t] = i);
|
|
4321
4124
|
}
|
|
4322
4125
|
}
|
|
@@ -4327,7 +4130,7 @@ function Xn(e, t, n, r) {
|
|
|
4327
4130
|
function J(e, t, n) {
|
|
4328
4131
|
if (Array.isArray(e)) return e.map((e, t) => J(e, String(t), n));
|
|
4329
4132
|
if (e && typeof e.toJSON == "function") {
|
|
4330
|
-
if (!n || !
|
|
4133
|
+
if (!n || !Mn(e)) return e.toJSON(t, n);
|
|
4331
4134
|
let r = {
|
|
4332
4135
|
aliasCount: 0,
|
|
4333
4136
|
count: 1,
|
|
@@ -4343,7 +4146,7 @@ function J(e, t, n) {
|
|
|
4343
4146
|
}
|
|
4344
4147
|
//#endregion
|
|
4345
4148
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js
|
|
4346
|
-
var
|
|
4149
|
+
var Xn = class {
|
|
4347
4150
|
constructor(e) {
|
|
4348
4151
|
Object.defineProperty(this, H, { value: e });
|
|
4349
4152
|
}
|
|
@@ -4352,7 +4155,7 @@ var Zn = class {
|
|
|
4352
4155
|
return this.range && (e.range = this.range.slice()), e;
|
|
4353
4156
|
}
|
|
4354
4157
|
toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: r, reviver: i } = {}) {
|
|
4355
|
-
if (!
|
|
4158
|
+
if (!kn(e)) throw TypeError("A document argument is required");
|
|
4356
4159
|
let a = {
|
|
4357
4160
|
anchors: /* @__PURE__ */ new Map(),
|
|
4358
4161
|
doc: e,
|
|
@@ -4362,19 +4165,19 @@ var Zn = class {
|
|
|
4362
4165
|
maxAliasCount: typeof n == "number" ? n : 100
|
|
4363
4166
|
}, o = J(this, "", a);
|
|
4364
4167
|
if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
|
|
4365
|
-
return typeof i == "function" ?
|
|
4168
|
+
return typeof i == "function" ? Yn(i, { "": o }, "", o) : o;
|
|
4366
4169
|
}
|
|
4367
|
-
},
|
|
4170
|
+
}, Zn = class extends Xn {
|
|
4368
4171
|
constructor(e) {
|
|
4369
|
-
super(
|
|
4172
|
+
super(Sn), this.source = e, Object.defineProperty(this, "tag", { set() {
|
|
4370
4173
|
throw Error("Alias nodes cannot have tags");
|
|
4371
4174
|
} });
|
|
4372
4175
|
}
|
|
4373
4176
|
resolve(e, t) {
|
|
4374
4177
|
if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
|
|
4375
4178
|
let n;
|
|
4376
|
-
t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [],
|
|
4377
|
-
(
|
|
4179
|
+
t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], Fn(e, { Node: (e, t) => {
|
|
4180
|
+
(On(t) || Mn(t)) && n.push(t);
|
|
4378
4181
|
} }), t && (t.aliasResolveCache = n));
|
|
4379
4182
|
let r;
|
|
4380
4183
|
for (let e of n) {
|
|
@@ -4393,13 +4196,13 @@ var Zn = class {
|
|
|
4393
4196
|
let o = n.get(a);
|
|
4394
4197
|
/* istanbul ignore if */
|
|
4395
4198
|
if (o ||= (J(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
|
|
4396
|
-
if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount =
|
|
4199
|
+
if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = Qn(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
|
|
4397
4200
|
return o.res;
|
|
4398
4201
|
}
|
|
4399
4202
|
toString(e, t, n) {
|
|
4400
4203
|
let r = `*${this.source}`;
|
|
4401
4204
|
if (e) {
|
|
4402
|
-
if (
|
|
4205
|
+
if (Gn(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
|
|
4403
4206
|
let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
4404
4207
|
throw Error(e);
|
|
4405
4208
|
}
|
|
@@ -4408,30 +4211,30 @@ var Zn = class {
|
|
|
4408
4211
|
return r;
|
|
4409
4212
|
}
|
|
4410
4213
|
};
|
|
4411
|
-
function
|
|
4412
|
-
if (
|
|
4214
|
+
function Qn(e, t, n) {
|
|
4215
|
+
if (On(t)) {
|
|
4413
4216
|
let r = t.resolve(e), i = n && r && n.get(r);
|
|
4414
4217
|
return i ? i.count * i.aliasCount : 0;
|
|
4415
4218
|
}
|
|
4416
4219
|
if (G(t)) {
|
|
4417
4220
|
let r = 0;
|
|
4418
4221
|
for (let i of t.items) {
|
|
4419
|
-
let t =
|
|
4222
|
+
let t = Qn(e, i, n);
|
|
4420
4223
|
t > r && (r = t);
|
|
4421
4224
|
}
|
|
4422
4225
|
return r;
|
|
4423
4226
|
}
|
|
4424
4227
|
if (U(t)) {
|
|
4425
|
-
let r =
|
|
4228
|
+
let r = Qn(e, t.key, n), i = Qn(e, t.value, n);
|
|
4426
4229
|
return Math.max(r, i);
|
|
4427
4230
|
}
|
|
4428
4231
|
return 1;
|
|
4429
4232
|
}
|
|
4430
4233
|
//#endregion
|
|
4431
4234
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
4432
|
-
var
|
|
4235
|
+
var $n = (e) => !e || typeof e != "function" && typeof e != "object", Y = class extends Xn {
|
|
4433
4236
|
constructor(e) {
|
|
4434
|
-
super(
|
|
4237
|
+
super(En), this.value = e;
|
|
4435
4238
|
}
|
|
4436
4239
|
toJSON(e, t) {
|
|
4437
4240
|
return t?.keep ? this.value : J(this.value, e, t);
|
|
@@ -4443,8 +4246,8 @@ var er = (e) => !e || typeof e != "function" && typeof e != "object", Y = class
|
|
|
4443
4246
|
Y.BLOCK_FOLDED = "BLOCK_FOLDED", Y.BLOCK_LITERAL = "BLOCK_LITERAL", Y.PLAIN = "PLAIN", Y.QUOTE_DOUBLE = "QUOTE_DOUBLE", Y.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
4444
4247
|
//#endregion
|
|
4445
4248
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js
|
|
4446
|
-
var
|
|
4447
|
-
function
|
|
4249
|
+
var er = "tag:yaml.org,2002:";
|
|
4250
|
+
function tr(e, t, n) {
|
|
4448
4251
|
if (t) {
|
|
4449
4252
|
let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
|
|
4450
4253
|
if (!r) throw Error(`Tag ${t} not found`);
|
|
@@ -4452,29 +4255,29 @@ function nr(e, t, n) {
|
|
|
4452
4255
|
}
|
|
4453
4256
|
return n.find((t) => t.identify?.(e) && !t.format);
|
|
4454
4257
|
}
|
|
4455
|
-
function
|
|
4456
|
-
if (
|
|
4258
|
+
function nr(e, t, n) {
|
|
4259
|
+
if (kn(e) && (e = e.contents), K(e)) return e;
|
|
4457
4260
|
if (U(e)) {
|
|
4458
|
-
let t = n.schema[
|
|
4261
|
+
let t = n.schema[wn].createNode?.(n.schema, null, n);
|
|
4459
4262
|
return t.items.push(e), t;
|
|
4460
4263
|
}
|
|
4461
4264
|
(e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
|
|
4462
4265
|
let { aliasDuplicateObjects: r, onAnchor: i, onTagObj: a, schema: o, sourceObjects: s } = n, c;
|
|
4463
4266
|
if (r && e && typeof e == "object") {
|
|
4464
|
-
if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new
|
|
4267
|
+
if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new Zn(c.anchor);
|
|
4465
4268
|
c = {
|
|
4466
4269
|
anchor: null,
|
|
4467
4270
|
node: null
|
|
4468
4271
|
}, s.set(e, c);
|
|
4469
4272
|
}
|
|
4470
|
-
t?.startsWith("!!") && (t =
|
|
4471
|
-
let l =
|
|
4273
|
+
t?.startsWith("!!") && (t = er + t.slice(2));
|
|
4274
|
+
let l = tr(e, t, o.tags);
|
|
4472
4275
|
if (!l) {
|
|
4473
4276
|
if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
|
|
4474
4277
|
let t = new Y(e);
|
|
4475
4278
|
return c && (c.node = t), t;
|
|
4476
4279
|
}
|
|
4477
|
-
l = e instanceof Map ? o[
|
|
4280
|
+
l = e instanceof Map ? o[wn] : Symbol.iterator in Object(e) ? o[Dn] : o[wn];
|
|
4478
4281
|
}
|
|
4479
4282
|
a && (a(l), delete n.onTagObj);
|
|
4480
4283
|
let u = l?.createNode ? l.createNode(n.schema, e, n) : typeof l?.nodeClass?.from == "function" ? l.nodeClass.from(n.schema, e, n) : new Y(e);
|
|
@@ -4482,7 +4285,7 @@ function rr(e, t, n) {
|
|
|
4482
4285
|
}
|
|
4483
4286
|
//#endregion
|
|
4484
4287
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js
|
|
4485
|
-
function
|
|
4288
|
+
function rr(e, t, n) {
|
|
4486
4289
|
let r = n;
|
|
4487
4290
|
for (let e = t.length - 1; e >= 0; --e) {
|
|
4488
4291
|
let n = t[e];
|
|
@@ -4491,7 +4294,7 @@ function ir(e, t, n) {
|
|
|
4491
4294
|
e[n] = r, r = e;
|
|
4492
4295
|
} else r = /* @__PURE__ */ new Map([[n, r]]);
|
|
4493
4296
|
}
|
|
4494
|
-
return
|
|
4297
|
+
return nr(r, void 0, {
|
|
4495
4298
|
aliasDuplicateObjects: !1,
|
|
4496
4299
|
keepUndefined: !1,
|
|
4497
4300
|
onAnchor: () => {
|
|
@@ -4501,7 +4304,7 @@ function ir(e, t, n) {
|
|
|
4501
4304
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
4502
4305
|
});
|
|
4503
4306
|
}
|
|
4504
|
-
var
|
|
4307
|
+
var ir = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, ar = class extends Xn {
|
|
4505
4308
|
constructor(e, t) {
|
|
4506
4309
|
super(e), Object.defineProperty(this, "schema", {
|
|
4507
4310
|
value: t,
|
|
@@ -4515,11 +4318,11 @@ var ar = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
|
|
|
4515
4318
|
return e && (t.schema = e), t.items = t.items.map((t) => K(t) || U(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
|
|
4516
4319
|
}
|
|
4517
4320
|
addIn(e, t) {
|
|
4518
|
-
if (
|
|
4321
|
+
if (ir(e)) this.add(t);
|
|
4519
4322
|
else {
|
|
4520
4323
|
let [n, ...r] = e, i = this.get(n, !0);
|
|
4521
4324
|
if (G(i)) i.addIn(r, t);
|
|
4522
|
-
else if (i === void 0 && this.schema) this.set(n,
|
|
4325
|
+
else if (i === void 0 && this.schema) this.set(n, rr(this.schema, r, t));
|
|
4523
4326
|
else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
|
|
4524
4327
|
}
|
|
4525
4328
|
}
|
|
@@ -4553,16 +4356,16 @@ var ar = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
|
|
|
4553
4356
|
else {
|
|
4554
4357
|
let e = this.get(n, !0);
|
|
4555
4358
|
if (G(e)) e.setIn(r, t);
|
|
4556
|
-
else if (e === void 0 && this.schema) this.set(n,
|
|
4359
|
+
else if (e === void 0 && this.schema) this.set(n, rr(this.schema, r, t));
|
|
4557
4360
|
else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
|
|
4558
4361
|
}
|
|
4559
4362
|
}
|
|
4560
|
-
},
|
|
4561
|
-
function
|
|
4363
|
+
}, or = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
|
|
4364
|
+
function sr(e, t) {
|
|
4562
4365
|
return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
|
|
4563
4366
|
}
|
|
4564
|
-
var
|
|
4565
|
-
function
|
|
4367
|
+
var cr = (e, t, n) => e.endsWith("\n") ? sr(n, t) : n.includes("\n") ? "\n" + sr(n, t) : (e.endsWith(" ") ? "" : " ") + n, lr = "flow", ur = "block", dr = "quoted";
|
|
4368
|
+
function fr(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
|
|
4566
4369
|
if (!i || i < 0) return e;
|
|
4567
4370
|
i < a && (a = 0);
|
|
4568
4371
|
let c = Math.max(1 + a, 1 + i - t.length);
|
|
@@ -4570,7 +4373,7 @@ function pr(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
|
|
|
4570
4373
|
let l = [], u = {}, d = i - t.length;
|
|
4571
4374
|
typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
|
|
4572
4375
|
let f, p, m = !1, h = -1, g = -1, _ = -1;
|
|
4573
|
-
n === "block" && (h =
|
|
4376
|
+
n === "block" && (h = pr(e, h, t.length), h !== -1 && (d = h + c));
|
|
4574
4377
|
for (let r; r = e[h += 1];) {
|
|
4575
4378
|
if (n === "quoted" && r === "\\") {
|
|
4576
4379
|
switch (g = h, e[h + 1]) {
|
|
@@ -4587,7 +4390,7 @@ function pr(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
|
|
|
4587
4390
|
}
|
|
4588
4391
|
_ = h;
|
|
4589
4392
|
}
|
|
4590
|
-
if (r === "\n") n === "block" && (h =
|
|
4393
|
+
if (r === "\n") n === "block" && (h = pr(e, h, t.length)), d = h + t.length + c, f = void 0;
|
|
4591
4394
|
else {
|
|
4592
4395
|
if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
|
|
4593
4396
|
let t = e[h + 1];
|
|
@@ -4614,7 +4417,7 @@ function pr(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
|
|
|
4614
4417
|
}
|
|
4615
4418
|
return v;
|
|
4616
4419
|
}
|
|
4617
|
-
function
|
|
4420
|
+
function pr(e, t, n) {
|
|
4618
4421
|
let r = t, i = t + 1, a = e[i];
|
|
4619
4422
|
for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
|
|
4620
4423
|
else {
|
|
@@ -4627,12 +4430,12 @@ function mr(e, t, n) {
|
|
|
4627
4430
|
}
|
|
4628
4431
|
//#endregion
|
|
4629
4432
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
4630
|
-
var
|
|
4433
|
+
var mr = (e, t) => ({
|
|
4631
4434
|
indentAtStart: t ? e.indent.length : e.indentAtStart,
|
|
4632
4435
|
lineWidth: e.options.lineWidth,
|
|
4633
4436
|
minContentWidth: e.options.minContentWidth
|
|
4634
|
-
}),
|
|
4635
|
-
function
|
|
4437
|
+
}), hr = (e) => /^(%|---|\.\.\.)/m.test(e);
|
|
4438
|
+
function gr(e, t, n) {
|
|
4636
4439
|
if (!t || t < 0) return !1;
|
|
4637
4440
|
let r = t - n, i = e.length;
|
|
4638
4441
|
if (i <= r) return !1;
|
|
@@ -4642,10 +4445,10 @@ function _r(e, t, n) {
|
|
|
4642
4445
|
}
|
|
4643
4446
|
return !0;
|
|
4644
4447
|
}
|
|
4645
|
-
function
|
|
4448
|
+
function _r(e, t) {
|
|
4646
4449
|
let n = JSON.stringify(e);
|
|
4647
4450
|
if (t.options.doubleQuotedAsJSON) return n;
|
|
4648
|
-
let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (
|
|
4451
|
+
let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (hr(e) ? " " : ""), o = "", s = 0;
|
|
4649
4452
|
for (let e = 0, t = n[e]; t; t = n[++e]) if (t === " " && n[e + 1] === "\\" && n[e + 2] === "n" && (o += n.slice(s, e) + "\\ ", e += 1, s = e, t = "\\"), t === "\\") switch (n[e + 1]) {
|
|
4650
4453
|
case "u":
|
|
4651
4454
|
{
|
|
@@ -4690,32 +4493,32 @@ function vr(e, t) {
|
|
|
4690
4493
|
break;
|
|
4691
4494
|
default: e += 1;
|
|
4692
4495
|
}
|
|
4693
|
-
return o = s ? o + n.slice(s) : n, r ? o :
|
|
4496
|
+
return o = s ? o + n.slice(s) : n, r ? o : fr(o, a, dr, mr(t, !1));
|
|
4694
4497
|
}
|
|
4695
|
-
function
|
|
4696
|
-
if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return
|
|
4697
|
-
let n = t.indent || (
|
|
4698
|
-
return t.implicitKey ? r :
|
|
4498
|
+
function vr(e, t) {
|
|
4499
|
+
if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return _r(e, t);
|
|
4500
|
+
let n = t.indent || (hr(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
|
|
4501
|
+
return t.implicitKey ? r : fr(r, n, lr, mr(t, !1));
|
|
4699
4502
|
}
|
|
4700
|
-
function
|
|
4503
|
+
function yr(e, t) {
|
|
4701
4504
|
let { singleQuote: n } = t.options, r;
|
|
4702
|
-
if (n === !1) r =
|
|
4505
|
+
if (n === !1) r = _r;
|
|
4703
4506
|
else {
|
|
4704
4507
|
let t = e.includes("\""), i = e.includes("'");
|
|
4705
|
-
r = t && !i ?
|
|
4508
|
+
r = t && !i ? vr : i && !t ? _r : n ? vr : _r;
|
|
4706
4509
|
}
|
|
4707
4510
|
return r(e, t);
|
|
4708
4511
|
}
|
|
4709
|
-
var
|
|
4512
|
+
var br;
|
|
4710
4513
|
try {
|
|
4711
|
-
|
|
4514
|
+
br = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
4712
4515
|
} catch {
|
|
4713
|
-
|
|
4516
|
+
br = /\n+(?!\n|$)/g;
|
|
4714
4517
|
}
|
|
4715
|
-
function
|
|
4518
|
+
function xr({ comment: e, type: t, value: n }, r, i, a) {
|
|
4716
4519
|
let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
|
|
4717
|
-
if (!o || /\n[\t ]+$/.test(n)) return
|
|
4718
|
-
let l = r.indent || (r.forceBlockIndent ||
|
|
4520
|
+
if (!o || /\n[\t ]+$/.test(n)) return yr(n, r);
|
|
4521
|
+
let l = r.indent || (r.forceBlockIndent || hr(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === Y.BLOCK_FOLDED ? !1 : t === Y.BLOCK_LITERAL || !gr(n, c, l.length);
|
|
4719
4522
|
if (!n) return u ? "|\n" : ">\n";
|
|
4720
4523
|
let d, f;
|
|
4721
4524
|
for (f = n.length; f > 0; --f) {
|
|
@@ -4723,7 +4526,7 @@ function Sr({ comment: e, type: t, value: n }, r, i, a) {
|
|
|
4723
4526
|
if (e !== "\n" && e !== " " && e !== " ") break;
|
|
4724
4527
|
}
|
|
4725
4528
|
let p = n.substring(f), m = p.indexOf("\n");
|
|
4726
|
-
m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(
|
|
4529
|
+
m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(br, `$&${l}`));
|
|
4727
4530
|
let h = !1, g, _ = -1;
|
|
4728
4531
|
for (g = 0; g < n.length; ++g) {
|
|
4729
4532
|
let e = n[g];
|
|
@@ -4735,41 +4538,41 @@ function Sr({ comment: e, type: t, value: n }, r, i, a) {
|
|
|
4735
4538
|
v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
|
|
4736
4539
|
let y = (h ? l ? "2" : "1" : "") + d;
|
|
4737
4540
|
if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
|
|
4738
|
-
let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a =
|
|
4541
|
+
let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = mr(r, !0);
|
|
4739
4542
|
o !== "folded" && t !== Y.BLOCK_FOLDED && (a.onOverflow = () => {
|
|
4740
4543
|
i = !0;
|
|
4741
4544
|
});
|
|
4742
|
-
let s =
|
|
4545
|
+
let s = fr(`${v}${e}${p}`, l, ur, a);
|
|
4743
4546
|
if (!i) return `>${y}\n${l}${s}`;
|
|
4744
4547
|
}
|
|
4745
4548
|
return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
|
|
4746
4549
|
}
|
|
4747
|
-
function
|
|
4550
|
+
function Sr(e, t, n, r) {
|
|
4748
4551
|
let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
|
|
4749
|
-
if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return
|
|
4750
|
-
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ?
|
|
4751
|
-
if (!s && !u && i !== Y.PLAIN && a.includes("\n")) return
|
|
4752
|
-
if (
|
|
4753
|
-
if (c === "") return t.forceBlockIndent = !0,
|
|
4754
|
-
if (s && c === l) return
|
|
4552
|
+
if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return yr(a, t);
|
|
4553
|
+
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? yr(a, t) : xr(e, t, n, r);
|
|
4554
|
+
if (!s && !u && i !== Y.PLAIN && a.includes("\n")) return xr(e, t, n, r);
|
|
4555
|
+
if (hr(a)) {
|
|
4556
|
+
if (c === "") return t.forceBlockIndent = !0, xr(e, t, n, r);
|
|
4557
|
+
if (s && c === l) return yr(a, t);
|
|
4755
4558
|
}
|
|
4756
4559
|
let d = a.replace(/\n+/g, `$&\n${c}`);
|
|
4757
4560
|
if (o) {
|
|
4758
4561
|
let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
|
|
4759
|
-
if (r.some(e) || n?.some(e)) return
|
|
4562
|
+
if (r.some(e) || n?.some(e)) return yr(a, t);
|
|
4760
4563
|
}
|
|
4761
|
-
return s ? d :
|
|
4564
|
+
return s ? d : fr(d, c, lr, mr(t, !1));
|
|
4762
4565
|
}
|
|
4763
|
-
function
|
|
4566
|
+
function Cr(e, t, n, r) {
|
|
4764
4567
|
let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
|
|
4765
4568
|
s !== Y.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = Y.QUOTE_DOUBLE);
|
|
4766
4569
|
let c = (e) => {
|
|
4767
4570
|
switch (e) {
|
|
4768
4571
|
case Y.BLOCK_FOLDED:
|
|
4769
|
-
case Y.BLOCK_LITERAL: return i || a ?
|
|
4770
|
-
case Y.QUOTE_DOUBLE: return
|
|
4771
|
-
case Y.QUOTE_SINGLE: return
|
|
4772
|
-
case Y.PLAIN: return
|
|
4572
|
+
case Y.BLOCK_LITERAL: return i || a ? yr(o.value, t) : xr(o, t, n, r);
|
|
4573
|
+
case Y.QUOTE_DOUBLE: return _r(o.value, t);
|
|
4574
|
+
case Y.QUOTE_SINGLE: return vr(o.value, t);
|
|
4575
|
+
case Y.PLAIN: return Sr(o, t, n, r);
|
|
4773
4576
|
default: return null;
|
|
4774
4577
|
}
|
|
4775
4578
|
}, l = c(s);
|
|
@@ -4781,10 +4584,10 @@ function wr(e, t, n, r) {
|
|
|
4781
4584
|
}
|
|
4782
4585
|
//#endregion
|
|
4783
4586
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js
|
|
4784
|
-
function
|
|
4587
|
+
function wr(e, t) {
|
|
4785
4588
|
let n = Object.assign({
|
|
4786
4589
|
blockQuote: !0,
|
|
4787
|
-
commentString:
|
|
4590
|
+
commentString: or,
|
|
4788
4591
|
defaultKeyType: null,
|
|
4789
4592
|
defaultStringType: "PLAIN",
|
|
4790
4593
|
directives: null,
|
|
@@ -4821,7 +4624,7 @@ function Tr(e, t) {
|
|
|
4821
4624
|
options: n
|
|
4822
4625
|
};
|
|
4823
4626
|
}
|
|
4824
|
-
function
|
|
4627
|
+
function Tr(e, t) {
|
|
4825
4628
|
if (t.tag) {
|
|
4826
4629
|
let n = e.filter((e) => e.tag === t.tag);
|
|
4827
4630
|
if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
|
|
@@ -4842,30 +4645,30 @@ function Er(e, t) {
|
|
|
4842
4645
|
}
|
|
4843
4646
|
return n;
|
|
4844
4647
|
}
|
|
4845
|
-
function
|
|
4648
|
+
function Er(e, t, { anchors: n, doc: r }) {
|
|
4846
4649
|
if (!r.directives) return "";
|
|
4847
4650
|
let i = [], a = (W(e) || G(e)) && e.anchor;
|
|
4848
|
-
a &&
|
|
4651
|
+
a && Gn(a) && (n.add(a), i.push(`&${a}`));
|
|
4849
4652
|
let o = e.tag ?? (t.default ? null : t.tag);
|
|
4850
4653
|
return o && i.push(r.directives.tagString(o)), i.join(" ");
|
|
4851
4654
|
}
|
|
4852
|
-
function
|
|
4655
|
+
function Dr(e, t, n, r) {
|
|
4853
4656
|
if (U(e)) return e.toString(t, n, r);
|
|
4854
|
-
if (
|
|
4657
|
+
if (On(e)) {
|
|
4855
4658
|
if (t.doc.directives) return e.toString(t);
|
|
4856
4659
|
if (t.resolvedAliases?.has(e)) throw TypeError("Cannot stringify circular structure without alias nodes");
|
|
4857
4660
|
t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
|
|
4858
4661
|
}
|
|
4859
4662
|
let i, a = K(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
|
|
4860
|
-
i ??=
|
|
4861
|
-
let o =
|
|
4663
|
+
i ??= Tr(t.doc.schema.tags, a);
|
|
4664
|
+
let o = Er(a, i, t);
|
|
4862
4665
|
o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
|
|
4863
|
-
let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : W(a) ?
|
|
4666
|
+
let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : W(a) ? Cr(a, t, n, r) : a.toString(t, n, r);
|
|
4864
4667
|
return o ? W(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
|
|
4865
4668
|
}
|
|
4866
4669
|
//#endregion
|
|
4867
4670
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
4868
|
-
function
|
|
4671
|
+
function Or({ key: e, value: t }, n, r, i) {
|
|
4869
4672
|
let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, f = K(e) && e.comment || null;
|
|
4870
4673
|
if (d) {
|
|
4871
4674
|
if (f) throw Error("With simple keys, key nodes cannot have comments");
|
|
@@ -4877,22 +4680,22 @@ function kr({ key: e, value: t }, n, r, i) {
|
|
|
4877
4680
|
implicitKey: !p && (d || !a),
|
|
4878
4681
|
indent: s + c
|
|
4879
4682
|
});
|
|
4880
|
-
let m = !1, h = !1, g =
|
|
4683
|
+
let m = !1, h = !1, g = Dr(e, n, () => m = !0, () => h = !0);
|
|
4881
4684
|
if (!p && !n.inFlow && g.length > 1024) {
|
|
4882
4685
|
if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
4883
4686
|
p = !0;
|
|
4884
4687
|
}
|
|
4885
4688
|
if (n.inFlow) {
|
|
4886
4689
|
if (a || t == null) return m && r && r(), g === "" ? "?" : p ? `? ${g}` : g;
|
|
4887
|
-
} else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g +=
|
|
4888
|
-
m && (f = null), p ? (f && (g +=
|
|
4690
|
+
} else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += cr(g, n.indent, l(f)) : h && i && i(), g;
|
|
4691
|
+
m && (f = null), p ? (f && (g += cr(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += cr(g, n.indent, l(f))));
|
|
4889
4692
|
let _, v, y;
|
|
4890
|
-
K(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && W(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p &&
|
|
4891
|
-
let ee = !1, b =
|
|
4693
|
+
K(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && W(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && jn(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
|
|
4694
|
+
let ee = !1, b = Dr(t, n, () => ee = !0, () => h = !0), x = " ";
|
|
4892
4695
|
if (f || _ || v) {
|
|
4893
4696
|
if (x = _ ? "\n" : "", v) {
|
|
4894
4697
|
let e = l(v);
|
|
4895
|
-
x += `\n${
|
|
4698
|
+
x += `\n${sr(e, n.indent)}`;
|
|
4896
4699
|
}
|
|
4897
4700
|
b === "" && !n.inFlow ? x === "\n" && y && (x = "\n\n") : x += `\n${n.indent}`;
|
|
4898
4701
|
} else if (!p && G(t)) {
|
|
@@ -4906,32 +4709,32 @@ function kr({ key: e, value: t }, n, r, i) {
|
|
|
4906
4709
|
t || (x = `\n${n.indent}`);
|
|
4907
4710
|
}
|
|
4908
4711
|
} else (b === "" || b[0] === "\n") && (x = "");
|
|
4909
|
-
return g += x + b, n.inFlow ? ee && r && r() : y && !ee ? g +=
|
|
4712
|
+
return g += x + b, n.inFlow ? ee && r && r() : y && !ee ? g += cr(g, n.indent, l(y)) : h && i && i(), g;
|
|
4910
4713
|
}
|
|
4911
4714
|
//#endregion
|
|
4912
4715
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js
|
|
4913
|
-
function
|
|
4716
|
+
function kr(e, t) {
|
|
4914
4717
|
(e === "debug" || e === "warn") && console.warn(t);
|
|
4915
4718
|
}
|
|
4916
4719
|
//#endregion
|
|
4917
4720
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
4918
|
-
var
|
|
4919
|
-
identify: (e) => e ===
|
|
4721
|
+
var Ar = "<<", jr = {
|
|
4722
|
+
identify: (e) => e === Ar || typeof e == "symbol" && e.description === Ar,
|
|
4920
4723
|
default: "key",
|
|
4921
4724
|
tag: "tag:yaml.org,2002:merge",
|
|
4922
4725
|
test: /^<<$/,
|
|
4923
|
-
resolve: () => Object.assign(new Y(Symbol(
|
|
4924
|
-
stringify: () =>
|
|
4925
|
-
},
|
|
4726
|
+
resolve: () => Object.assign(new Y(Symbol(Ar)), { addToJSMap: Nr }),
|
|
4727
|
+
stringify: () => Ar
|
|
4728
|
+
}, Mr = (e, t) => (jr.identify(t) || W(t) && (!t.type || t.type === Y.PLAIN) && jr.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === jr.tag && e.default);
|
|
4729
|
+
function Nr(e, t, n) {
|
|
4730
|
+
let r = Fr(e, n);
|
|
4731
|
+
if (jn(r)) for (let n of r.items) Pr(e, t, n);
|
|
4732
|
+
else if (Array.isArray(r)) for (let n of r) Pr(e, t, n);
|
|
4733
|
+
else Pr(e, t, r);
|
|
4734
|
+
}
|
|
4926
4735
|
function Pr(e, t, n) {
|
|
4927
|
-
let r =
|
|
4928
|
-
if (
|
|
4929
|
-
else if (Array.isArray(r)) for (let n of r) Fr(e, t, n);
|
|
4930
|
-
else Fr(e, t, r);
|
|
4931
|
-
}
|
|
4932
|
-
function Fr(e, t, n) {
|
|
4933
|
-
let r = Ir(e, n);
|
|
4934
|
-
if (!jn(r)) throw Error("Merge sources must be maps or map aliases");
|
|
4736
|
+
let r = Fr(e, n);
|
|
4737
|
+
if (!An(r)) throw Error("Merge sources must be maps or map aliases");
|
|
4935
4738
|
let i = r.toJSON(null, e, Map);
|
|
4936
4739
|
for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
|
|
4937
4740
|
value: n,
|
|
@@ -4941,20 +4744,20 @@ function Fr(e, t, n) {
|
|
|
4941
4744
|
});
|
|
4942
4745
|
return t;
|
|
4943
4746
|
}
|
|
4944
|
-
function
|
|
4945
|
-
return e &&
|
|
4747
|
+
function Fr(e, t) {
|
|
4748
|
+
return e && On(t) ? t.resolve(e.doc, e) : t;
|
|
4946
4749
|
}
|
|
4947
4750
|
//#endregion
|
|
4948
4751
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
4949
|
-
function
|
|
4752
|
+
function Ir(e, t, { key: n, value: r }) {
|
|
4950
4753
|
if (K(n) && n.addToJSMap) n.addToJSMap(e, t, r);
|
|
4951
|
-
else if (
|
|
4754
|
+
else if (Mr(e, n)) Nr(e, t, r);
|
|
4952
4755
|
else {
|
|
4953
4756
|
let i = J(n, "", e);
|
|
4954
4757
|
if (t instanceof Map) t.set(i, J(r, i, e));
|
|
4955
4758
|
else if (t instanceof Set) t.add(i);
|
|
4956
4759
|
else {
|
|
4957
|
-
let a =
|
|
4760
|
+
let a = Lr(n, i, e), o = J(r, a, e);
|
|
4958
4761
|
a in t ? Object.defineProperty(t, a, {
|
|
4959
4762
|
value: o,
|
|
4960
4763
|
writable: !0,
|
|
@@ -4965,18 +4768,18 @@ function Lr(e, t, { key: n, value: r }) {
|
|
|
4965
4768
|
}
|
|
4966
4769
|
return t;
|
|
4967
4770
|
}
|
|
4968
|
-
function
|
|
4771
|
+
function Lr(e, t, n) {
|
|
4969
4772
|
if (t === null) return "";
|
|
4970
4773
|
if (typeof t != "object") return String(t);
|
|
4971
4774
|
if (K(e) && n?.doc) {
|
|
4972
|
-
let t =
|
|
4775
|
+
let t = wr(n.doc, {});
|
|
4973
4776
|
t.anchors = /* @__PURE__ */ new Set();
|
|
4974
4777
|
for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
|
|
4975
4778
|
t.inFlow = !0, t.inStringifyKey = !0;
|
|
4976
4779
|
let r = e.toString(t);
|
|
4977
4780
|
if (!n.mapKeyWarned) {
|
|
4978
4781
|
let e = JSON.stringify(r);
|
|
4979
|
-
e.length > 40 && (e = e.substring(0, 36) + "...\""),
|
|
4782
|
+
e.length > 40 && (e = e.substring(0, 36) + "...\""), kr(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
|
|
4980
4783
|
}
|
|
4981
4784
|
return r;
|
|
4982
4785
|
}
|
|
@@ -4984,44 +4787,44 @@ function Rr(e, t, n) {
|
|
|
4984
4787
|
}
|
|
4985
4788
|
//#endregion
|
|
4986
4789
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js
|
|
4987
|
-
function
|
|
4988
|
-
return new X(
|
|
4790
|
+
function Rr(e, t, n) {
|
|
4791
|
+
return new X(nr(e, void 0, n), nr(t, void 0, n));
|
|
4989
4792
|
}
|
|
4990
4793
|
var X = class e {
|
|
4991
4794
|
constructor(e, t = null) {
|
|
4992
|
-
Object.defineProperty(this, H, { value:
|
|
4795
|
+
Object.defineProperty(this, H, { value: Tn }), this.key = e, this.value = t;
|
|
4993
4796
|
}
|
|
4994
4797
|
clone(t) {
|
|
4995
4798
|
let { key: n, value: r } = this;
|
|
4996
4799
|
return K(n) && (n = n.clone(t)), K(r) && (r = r.clone(t)), new e(n, r);
|
|
4997
4800
|
}
|
|
4998
4801
|
toJSON(e, t) {
|
|
4999
|
-
return
|
|
4802
|
+
return Ir(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
|
|
5000
4803
|
}
|
|
5001
4804
|
toString(e, t, n) {
|
|
5002
|
-
return e?.doc ?
|
|
4805
|
+
return e?.doc ? Or(this, e, t, n) : JSON.stringify(this);
|
|
5003
4806
|
}
|
|
5004
4807
|
};
|
|
5005
4808
|
//#endregion
|
|
5006
4809
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
5007
|
-
function
|
|
5008
|
-
return (t.inFlow ?? e.flow ?
|
|
4810
|
+
function zr(e, t, n) {
|
|
4811
|
+
return (t.inFlow ?? e.flow ? Vr : Br)(e, t, n);
|
|
5009
4812
|
}
|
|
5010
|
-
function
|
|
4813
|
+
function Br({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
|
|
5011
4814
|
let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
|
|
5012
4815
|
indent: a,
|
|
5013
4816
|
type: null
|
|
5014
4817
|
}), d = !1, f = [];
|
|
5015
4818
|
for (let e = 0; e < t.length; ++e) {
|
|
5016
4819
|
let i = t[e], o = null;
|
|
5017
|
-
if (K(i)) !d && i.spaceBefore && f.push(""),
|
|
4820
|
+
if (K(i)) !d && i.spaceBefore && f.push(""), Hr(n, f, i.commentBefore, d), i.comment && (o = i.comment);
|
|
5018
4821
|
else if (U(i)) {
|
|
5019
4822
|
let e = K(i.key) ? i.key : null;
|
|
5020
|
-
e && (!d && e.spaceBefore && f.push(""),
|
|
4823
|
+
e && (!d && e.spaceBefore && f.push(""), Hr(n, f, e.commentBefore, d));
|
|
5021
4824
|
}
|
|
5022
4825
|
d = !1;
|
|
5023
|
-
let s =
|
|
5024
|
-
o && (s +=
|
|
4826
|
+
let s = Dr(i, u, () => o = null, () => d = !0);
|
|
4827
|
+
o && (s += cr(s, a, l(o))), d && o && (d = !1), f.push(r + s);
|
|
5025
4828
|
}
|
|
5026
4829
|
let p;
|
|
5027
4830
|
if (f.length === 0) p = i.start + i.end;
|
|
@@ -5032,9 +4835,9 @@ function Vr({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
|
|
|
5032
4835
|
p += t ? `\n${c}${t}` : "\n";
|
|
5033
4836
|
}
|
|
5034
4837
|
}
|
|
5035
|
-
return e ? (p += "\n" +
|
|
4838
|
+
return e ? (p += "\n" + sr(l(e), c), s && s()) : d && o && o(), p;
|
|
5036
4839
|
}
|
|
5037
|
-
function
|
|
4840
|
+
function Vr({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
5038
4841
|
let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
|
|
5039
4842
|
r += a;
|
|
5040
4843
|
let c = Object.assign({}, t, {
|
|
@@ -5044,16 +4847,16 @@ function Hr({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
5044
4847
|
}), l = !1, u = 0, d = [];
|
|
5045
4848
|
for (let n = 0; n < e.length; ++n) {
|
|
5046
4849
|
let i = e[n], a = null;
|
|
5047
|
-
if (K(i)) i.spaceBefore && d.push(""),
|
|
4850
|
+
if (K(i)) i.spaceBefore && d.push(""), Hr(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
|
|
5048
4851
|
else if (U(i)) {
|
|
5049
4852
|
let e = K(i.key) ? i.key : null;
|
|
5050
|
-
e && (e.spaceBefore && d.push(""),
|
|
4853
|
+
e && (e.spaceBefore && d.push(""), Hr(t, d, e.commentBefore, !1), e.comment && (l = !0));
|
|
5051
4854
|
let n = K(i.value) ? i.value : null;
|
|
5052
4855
|
n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
|
|
5053
4856
|
}
|
|
5054
4857
|
a && (l = !0);
|
|
5055
|
-
let o =
|
|
5056
|
-
l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o +=
|
|
4858
|
+
let o = Dr(i, c, () => a = null);
|
|
4859
|
+
l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += cr(o, r, s(a))), d.push(o), u = d.length;
|
|
5057
4860
|
}
|
|
5058
4861
|
let { start: f, end: p } = n;
|
|
5059
4862
|
if (d.length === 0) return f + p;
|
|
@@ -5068,30 +4871,30 @@ function Hr({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
5068
4871
|
}
|
|
5069
4872
|
return `${f}${o}${d.join(" ")}${o}${p}`;
|
|
5070
4873
|
}
|
|
5071
|
-
function
|
|
4874
|
+
function Hr({ indent: e, options: { commentString: t } }, n, r, i) {
|
|
5072
4875
|
if (r && i && (r = r.replace(/^\n+/, "")), r) {
|
|
5073
|
-
let i =
|
|
4876
|
+
let i = sr(t(r), e);
|
|
5074
4877
|
n.push(i.trimStart());
|
|
5075
4878
|
}
|
|
5076
4879
|
}
|
|
5077
4880
|
//#endregion
|
|
5078
4881
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
5079
|
-
function
|
|
4882
|
+
function Ur(e, t) {
|
|
5080
4883
|
let n = W(t) ? t.value : t;
|
|
5081
4884
|
for (let r of e) if (U(r) && (r.key === t || r.key === n || W(r.key) && r.key.value === n)) return r;
|
|
5082
4885
|
}
|
|
5083
|
-
var Z = class extends
|
|
4886
|
+
var Z = class extends ar {
|
|
5084
4887
|
static get tagName() {
|
|
5085
4888
|
return "tag:yaml.org,2002:map";
|
|
5086
4889
|
}
|
|
5087
4890
|
constructor(e) {
|
|
5088
|
-
super(
|
|
4891
|
+
super(wn, e), this.items = [];
|
|
5089
4892
|
}
|
|
5090
4893
|
static from(e, t, n) {
|
|
5091
4894
|
let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
|
|
5092
4895
|
if (typeof i == "function") o = i.call(t, e, o);
|
|
5093
4896
|
else if (Array.isArray(i) && !i.includes(e)) return;
|
|
5094
|
-
(o !== void 0 || r) && a.items.push(
|
|
4897
|
+
(o !== void 0 || r) && a.items.push(Rr(e, o, n));
|
|
5095
4898
|
};
|
|
5096
4899
|
if (t instanceof Map) for (let [e, n] of t) o(e, n);
|
|
5097
4900
|
else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
|
|
@@ -5100,25 +4903,25 @@ var Z = class extends or {
|
|
|
5100
4903
|
add(e, t) {
|
|
5101
4904
|
let n;
|
|
5102
4905
|
n = U(e) ? e : !e || typeof e != "object" || !("key" in e) ? new X(e, e?.value) : new X(e.key, e.value);
|
|
5103
|
-
let r =
|
|
4906
|
+
let r = Ur(this.items, n.key), i = this.schema?.sortMapEntries;
|
|
5104
4907
|
if (r) {
|
|
5105
4908
|
if (!t) throw Error(`Key ${n.key} already set`);
|
|
5106
|
-
W(r.value) &&
|
|
4909
|
+
W(r.value) && $n(n.value) ? r.value.value = n.value : r.value = n.value;
|
|
5107
4910
|
} else if (i) {
|
|
5108
4911
|
let e = this.items.findIndex((e) => i(n, e) < 0);
|
|
5109
4912
|
e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
|
|
5110
4913
|
} else this.items.push(n);
|
|
5111
4914
|
}
|
|
5112
4915
|
delete(e) {
|
|
5113
|
-
let t =
|
|
4916
|
+
let t = Ur(this.items, e);
|
|
5114
4917
|
return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
|
|
5115
4918
|
}
|
|
5116
4919
|
get(e, t) {
|
|
5117
|
-
let n =
|
|
4920
|
+
let n = Ur(this.items, e)?.value;
|
|
5118
4921
|
return (!t && W(n) ? n.value : n) ?? void 0;
|
|
5119
4922
|
}
|
|
5120
4923
|
has(e) {
|
|
5121
|
-
return !!
|
|
4924
|
+
return !!Ur(this.items, e);
|
|
5122
4925
|
}
|
|
5123
4926
|
set(e, t) {
|
|
5124
4927
|
this.add(new X(e, t), !0);
|
|
@@ -5126,13 +4929,13 @@ var Z = class extends or {
|
|
|
5126
4929
|
toJSON(e, t, n) {
|
|
5127
4930
|
let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
5128
4931
|
t?.onCreate && t.onCreate(r);
|
|
5129
|
-
for (let e of this.items)
|
|
4932
|
+
for (let e of this.items) Ir(t, r, e);
|
|
5130
4933
|
return r;
|
|
5131
4934
|
}
|
|
5132
4935
|
toString(e, t, n) {
|
|
5133
4936
|
if (!e) return JSON.stringify(this);
|
|
5134
4937
|
for (let e of this.items) if (!U(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
|
|
5135
|
-
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })),
|
|
4938
|
+
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), zr(this, e, {
|
|
5136
4939
|
blockItemPrefix: "",
|
|
5137
4940
|
flowChars: {
|
|
5138
4941
|
start: "{",
|
|
@@ -5143,44 +4946,44 @@ var Z = class extends or {
|
|
|
5143
4946
|
onComment: t
|
|
5144
4947
|
});
|
|
5145
4948
|
}
|
|
5146
|
-
},
|
|
4949
|
+
}, Wr = {
|
|
5147
4950
|
collection: "map",
|
|
5148
4951
|
default: !0,
|
|
5149
4952
|
nodeClass: Z,
|
|
5150
4953
|
tag: "tag:yaml.org,2002:map",
|
|
5151
4954
|
resolve(e, t) {
|
|
5152
|
-
return
|
|
4955
|
+
return An(e) || t("Expected a mapping for this tag"), e;
|
|
5153
4956
|
},
|
|
5154
4957
|
createNode: (e, t, n) => Z.from(e, t, n)
|
|
5155
|
-
},
|
|
4958
|
+
}, Gr = class extends ar {
|
|
5156
4959
|
static get tagName() {
|
|
5157
4960
|
return "tag:yaml.org,2002:seq";
|
|
5158
4961
|
}
|
|
5159
4962
|
constructor(e) {
|
|
5160
|
-
super(
|
|
4963
|
+
super(Dn, e), this.items = [];
|
|
5161
4964
|
}
|
|
5162
4965
|
add(e) {
|
|
5163
4966
|
this.items.push(e);
|
|
5164
4967
|
}
|
|
5165
4968
|
delete(e) {
|
|
5166
|
-
let t =
|
|
4969
|
+
let t = Kr(e);
|
|
5167
4970
|
return typeof t == "number" && this.items.splice(t, 1).length > 0;
|
|
5168
4971
|
}
|
|
5169
4972
|
get(e, t) {
|
|
5170
|
-
let n =
|
|
4973
|
+
let n = Kr(e);
|
|
5171
4974
|
if (typeof n != "number") return;
|
|
5172
4975
|
let r = this.items[n];
|
|
5173
4976
|
return !t && W(r) ? r.value : r;
|
|
5174
4977
|
}
|
|
5175
4978
|
has(e) {
|
|
5176
|
-
let t =
|
|
4979
|
+
let t = Kr(e);
|
|
5177
4980
|
return typeof t == "number" && t < this.items.length;
|
|
5178
4981
|
}
|
|
5179
4982
|
set(e, t) {
|
|
5180
|
-
let n =
|
|
4983
|
+
let n = Kr(e);
|
|
5181
4984
|
if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
|
|
5182
4985
|
let r = this.items[n];
|
|
5183
|
-
W(r) &&
|
|
4986
|
+
W(r) && $n(t) ? r.value = t : this.items[n] = t;
|
|
5184
4987
|
}
|
|
5185
4988
|
toJSON(e, t) {
|
|
5186
4989
|
let n = [];
|
|
@@ -5190,7 +4993,7 @@ var Z = class extends or {
|
|
|
5190
4993
|
return n;
|
|
5191
4994
|
}
|
|
5192
4995
|
toString(e, t, n) {
|
|
5193
|
-
return e ?
|
|
4996
|
+
return e ? zr(this, e, {
|
|
5194
4997
|
blockItemPrefix: "- ",
|
|
5195
4998
|
flowChars: {
|
|
5196
4999
|
start: "[",
|
|
@@ -5210,51 +5013,51 @@ var Z = class extends or {
|
|
|
5210
5013
|
let n = t instanceof Set ? a : String(e++);
|
|
5211
5014
|
a = r.call(t, n, a);
|
|
5212
5015
|
}
|
|
5213
|
-
i.items.push(
|
|
5016
|
+
i.items.push(nr(a, void 0, n));
|
|
5214
5017
|
}
|
|
5215
5018
|
}
|
|
5216
5019
|
return i;
|
|
5217
5020
|
}
|
|
5218
5021
|
};
|
|
5219
|
-
function
|
|
5022
|
+
function Kr(e) {
|
|
5220
5023
|
let t = W(e) ? e.value : e;
|
|
5221
5024
|
return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
|
|
5222
5025
|
}
|
|
5223
5026
|
//#endregion
|
|
5224
5027
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js
|
|
5225
|
-
var
|
|
5028
|
+
var qr = {
|
|
5226
5029
|
collection: "seq",
|
|
5227
5030
|
default: !0,
|
|
5228
|
-
nodeClass:
|
|
5031
|
+
nodeClass: Gr,
|
|
5229
5032
|
tag: "tag:yaml.org,2002:seq",
|
|
5230
5033
|
resolve(e, t) {
|
|
5231
|
-
return
|
|
5034
|
+
return jn(e) || t("Expected a sequence for this tag"), e;
|
|
5232
5035
|
},
|
|
5233
|
-
createNode: (e, t, n) =>
|
|
5234
|
-
},
|
|
5036
|
+
createNode: (e, t, n) => Gr.from(e, t, n)
|
|
5037
|
+
}, Jr = {
|
|
5235
5038
|
identify: (e) => typeof e == "string",
|
|
5236
5039
|
default: !0,
|
|
5237
5040
|
tag: "tag:yaml.org,2002:str",
|
|
5238
5041
|
resolve: (e) => e,
|
|
5239
5042
|
stringify(e, t, n, r) {
|
|
5240
|
-
return t = Object.assign({ actualString: !0 }, t),
|
|
5043
|
+
return t = Object.assign({ actualString: !0 }, t), Cr(e, t, n, r);
|
|
5241
5044
|
}
|
|
5242
|
-
},
|
|
5045
|
+
}, Yr = {
|
|
5243
5046
|
identify: (e) => e == null,
|
|
5244
5047
|
createNode: () => new Y(null),
|
|
5245
5048
|
default: !0,
|
|
5246
5049
|
tag: "tag:yaml.org,2002:null",
|
|
5247
5050
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
5248
5051
|
resolve: () => new Y(null),
|
|
5249
|
-
stringify: ({ source: e }, t) => typeof e == "string" &&
|
|
5250
|
-
},
|
|
5052
|
+
stringify: ({ source: e }, t) => typeof e == "string" && Yr.test.test(e) ? e : t.options.nullStr
|
|
5053
|
+
}, Xr = {
|
|
5251
5054
|
identify: (e) => typeof e == "boolean",
|
|
5252
5055
|
default: !0,
|
|
5253
5056
|
tag: "tag:yaml.org,2002:bool",
|
|
5254
5057
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
5255
5058
|
resolve: (e) => new Y(e[0] === "t" || e[0] === "T"),
|
|
5256
5059
|
stringify({ source: e, value: t }, n) {
|
|
5257
|
-
return e &&
|
|
5060
|
+
return e && Xr.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
|
|
5258
5061
|
}
|
|
5259
5062
|
};
|
|
5260
5063
|
//#endregion
|
|
@@ -5274,14 +5077,14 @@ function Q({ format: e, minFractionDigits: t, tag: n, value: r }) {
|
|
|
5274
5077
|
}
|
|
5275
5078
|
//#endregion
|
|
5276
5079
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js
|
|
5277
|
-
var
|
|
5080
|
+
var Zr = {
|
|
5278
5081
|
identify: (e) => typeof e == "number",
|
|
5279
5082
|
default: !0,
|
|
5280
5083
|
tag: "tag:yaml.org,2002:float",
|
|
5281
5084
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
5282
5085
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
5283
5086
|
stringify: Q
|
|
5284
|
-
},
|
|
5087
|
+
}, Qr = {
|
|
5285
5088
|
identify: (e) => typeof e == "number",
|
|
5286
5089
|
default: !0,
|
|
5287
5090
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -5292,7 +5095,7 @@ var Qr = {
|
|
|
5292
5095
|
let t = Number(e.value);
|
|
5293
5096
|
return isFinite(t) ? t.toExponential() : Q(e);
|
|
5294
5097
|
}
|
|
5295
|
-
},
|
|
5098
|
+
}, $r = {
|
|
5296
5099
|
identify: (e) => typeof e == "number",
|
|
5297
5100
|
default: !0,
|
|
5298
5101
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -5302,59 +5105,59 @@ var Qr = {
|
|
|
5302
5105
|
return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
|
|
5303
5106
|
},
|
|
5304
5107
|
stringify: Q
|
|
5305
|
-
},
|
|
5306
|
-
function
|
|
5108
|
+
}, ei = (e) => typeof e == "bigint" || Number.isInteger(e), ti = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
|
|
5109
|
+
function ni(e, t, n) {
|
|
5307
5110
|
let { value: r } = e;
|
|
5308
|
-
return
|
|
5111
|
+
return ei(r) && r >= 0 ? n + r.toString(t) : Q(e);
|
|
5309
5112
|
}
|
|
5310
|
-
var
|
|
5311
|
-
identify: (e) =>
|
|
5113
|
+
var ri = {
|
|
5114
|
+
identify: (e) => ei(e) && e >= 0,
|
|
5312
5115
|
default: !0,
|
|
5313
5116
|
tag: "tag:yaml.org,2002:int",
|
|
5314
5117
|
format: "OCT",
|
|
5315
5118
|
test: /^0o[0-7]+$/,
|
|
5316
|
-
resolve: (e, t, n) =>
|
|
5317
|
-
stringify: (e) =>
|
|
5318
|
-
},
|
|
5319
|
-
identify:
|
|
5119
|
+
resolve: (e, t, n) => ti(e, 2, 8, n),
|
|
5120
|
+
stringify: (e) => ni(e, 8, "0o")
|
|
5121
|
+
}, ii = {
|
|
5122
|
+
identify: ei,
|
|
5320
5123
|
default: !0,
|
|
5321
5124
|
tag: "tag:yaml.org,2002:int",
|
|
5322
5125
|
test: /^[-+]?[0-9]+$/,
|
|
5323
|
-
resolve: (e, t, n) =>
|
|
5126
|
+
resolve: (e, t, n) => ti(e, 0, 10, n),
|
|
5324
5127
|
stringify: Q
|
|
5325
|
-
},
|
|
5326
|
-
identify: (e) =>
|
|
5128
|
+
}, ai = {
|
|
5129
|
+
identify: (e) => ei(e) && e >= 0,
|
|
5327
5130
|
default: !0,
|
|
5328
5131
|
tag: "tag:yaml.org,2002:int",
|
|
5329
5132
|
format: "HEX",
|
|
5330
5133
|
test: /^0x[0-9a-fA-F]+$/,
|
|
5331
|
-
resolve: (e, t, n) =>
|
|
5332
|
-
stringify: (e) =>
|
|
5333
|
-
},
|
|
5334
|
-
|
|
5134
|
+
resolve: (e, t, n) => ti(e, 2, 16, n),
|
|
5135
|
+
stringify: (e) => ni(e, 16, "0x")
|
|
5136
|
+
}, oi = [
|
|
5137
|
+
Wr,
|
|
5138
|
+
qr,
|
|
5335
5139
|
Jr,
|
|
5336
5140
|
Yr,
|
|
5337
5141
|
Xr,
|
|
5338
|
-
|
|
5142
|
+
ri,
|
|
5339
5143
|
ii,
|
|
5340
5144
|
ai,
|
|
5341
|
-
|
|
5145
|
+
Zr,
|
|
5342
5146
|
Qr,
|
|
5343
|
-
$r
|
|
5344
|
-
ei
|
|
5147
|
+
$r
|
|
5345
5148
|
];
|
|
5346
5149
|
//#endregion
|
|
5347
5150
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js
|
|
5348
|
-
function
|
|
5151
|
+
function si(e) {
|
|
5349
5152
|
return typeof e == "bigint" || Number.isInteger(e);
|
|
5350
5153
|
}
|
|
5351
|
-
var
|
|
5154
|
+
var ci = ({ value: e }) => JSON.stringify(e), li = [
|
|
5352
5155
|
{
|
|
5353
5156
|
identify: (e) => typeof e == "string",
|
|
5354
5157
|
default: !0,
|
|
5355
5158
|
tag: "tag:yaml.org,2002:str",
|
|
5356
5159
|
resolve: (e) => e,
|
|
5357
|
-
stringify:
|
|
5160
|
+
stringify: ci
|
|
5358
5161
|
},
|
|
5359
5162
|
{
|
|
5360
5163
|
identify: (e) => e == null,
|
|
@@ -5363,7 +5166,7 @@ var li = ({ value: e }) => JSON.stringify(e), ui = [
|
|
|
5363
5166
|
tag: "tag:yaml.org,2002:null",
|
|
5364
5167
|
test: /^null$/,
|
|
5365
5168
|
resolve: () => null,
|
|
5366
|
-
stringify:
|
|
5169
|
+
stringify: ci
|
|
5367
5170
|
},
|
|
5368
5171
|
{
|
|
5369
5172
|
identify: (e) => typeof e == "boolean",
|
|
@@ -5371,15 +5174,15 @@ var li = ({ value: e }) => JSON.stringify(e), ui = [
|
|
|
5371
5174
|
tag: "tag:yaml.org,2002:bool",
|
|
5372
5175
|
test: /^true$|^false$/,
|
|
5373
5176
|
resolve: (e) => e === "true",
|
|
5374
|
-
stringify:
|
|
5177
|
+
stringify: ci
|
|
5375
5178
|
},
|
|
5376
5179
|
{
|
|
5377
|
-
identify:
|
|
5180
|
+
identify: si,
|
|
5378
5181
|
default: !0,
|
|
5379
5182
|
tag: "tag:yaml.org,2002:int",
|
|
5380
5183
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
5381
5184
|
resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
|
|
5382
|
-
stringify: ({ value: e }) =>
|
|
5185
|
+
stringify: ({ value: e }) => si(e) ? e.toString() : JSON.stringify(e)
|
|
5383
5186
|
},
|
|
5384
5187
|
{
|
|
5385
5188
|
identify: (e) => typeof e == "number",
|
|
@@ -5387,16 +5190,16 @@ var li = ({ value: e }) => JSON.stringify(e), ui = [
|
|
|
5387
5190
|
tag: "tag:yaml.org,2002:float",
|
|
5388
5191
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
5389
5192
|
resolve: (e) => parseFloat(e),
|
|
5390
|
-
stringify:
|
|
5193
|
+
stringify: ci
|
|
5391
5194
|
}
|
|
5392
|
-
],
|
|
5195
|
+
], ui = [Wr, qr].concat(li, {
|
|
5393
5196
|
default: !0,
|
|
5394
5197
|
tag: "",
|
|
5395
5198
|
test: /^/,
|
|
5396
5199
|
resolve(e, t) {
|
|
5397
5200
|
return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
|
|
5398
5201
|
}
|
|
5399
|
-
}),
|
|
5202
|
+
}), di = {
|
|
5400
5203
|
identify: (e) => e instanceof Uint8Array,
|
|
5401
5204
|
default: !1,
|
|
5402
5205
|
tag: "tag:yaml.org,2002:binary",
|
|
@@ -5421,7 +5224,7 @@ var li = ({ value: e }) => JSON.stringify(e), ui = [
|
|
|
5421
5224
|
for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
|
|
5422
5225
|
s = i.join(t === Y.BLOCK_LITERAL ? "\n" : " ");
|
|
5423
5226
|
}
|
|
5424
|
-
return
|
|
5227
|
+
return Cr({
|
|
5425
5228
|
comment: e,
|
|
5426
5229
|
type: t,
|
|
5427
5230
|
value: s
|
|
@@ -5430,11 +5233,11 @@ var li = ({ value: e }) => JSON.stringify(e), ui = [
|
|
|
5430
5233
|
};
|
|
5431
5234
|
//#endregion
|
|
5432
5235
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
5433
|
-
function
|
|
5434
|
-
if (
|
|
5236
|
+
function fi(e, t) {
|
|
5237
|
+
if (jn(e)) for (let n = 0; n < e.items.length; ++n) {
|
|
5435
5238
|
let r = e.items[n];
|
|
5436
5239
|
if (!U(r)) {
|
|
5437
|
-
if (
|
|
5240
|
+
if (An(r)) {
|
|
5438
5241
|
r.items.length > 1 && t("Each pair must have its own sequence indicator");
|
|
5439
5242
|
let e = r.items[0] || new X(new Y(null));
|
|
5440
5243
|
if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
|
|
@@ -5449,8 +5252,8 @@ function pi(e, t) {
|
|
|
5449
5252
|
else t("Expected a sequence for this tag");
|
|
5450
5253
|
return e;
|
|
5451
5254
|
}
|
|
5452
|
-
function
|
|
5453
|
-
let { replacer: r } = n, i = new
|
|
5255
|
+
function pi(e, t, n) {
|
|
5256
|
+
let { replacer: r } = n, i = new Gr(e);
|
|
5454
5257
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
5455
5258
|
let a = 0;
|
|
5456
5259
|
if (t && Symbol.iterator in Object(t)) for (let e of t) {
|
|
@@ -5464,17 +5267,17 @@ function mi(e, t, n) {
|
|
|
5464
5267
|
if (t.length === 1) o = t[0], s = e[o];
|
|
5465
5268
|
else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
|
|
5466
5269
|
} else o = e;
|
|
5467
|
-
i.items.push(
|
|
5270
|
+
i.items.push(Rr(o, s, n));
|
|
5468
5271
|
}
|
|
5469
5272
|
return i;
|
|
5470
5273
|
}
|
|
5471
|
-
var
|
|
5274
|
+
var mi = {
|
|
5472
5275
|
collection: "seq",
|
|
5473
5276
|
default: !1,
|
|
5474
5277
|
tag: "tag:yaml.org,2002:pairs",
|
|
5475
|
-
resolve:
|
|
5476
|
-
createNode:
|
|
5477
|
-
},
|
|
5278
|
+
resolve: fi,
|
|
5279
|
+
createNode: pi
|
|
5280
|
+
}, hi = class e extends Gr {
|
|
5478
5281
|
constructor() {
|
|
5479
5282
|
super(), this.add = Z.prototype.add.bind(this), this.delete = Z.prototype.delete.bind(this), this.get = Z.prototype.get.bind(this), this.has = Z.prototype.has.bind(this), this.set = Z.prototype.set.bind(this), this.tag = e.tag;
|
|
5480
5283
|
}
|
|
@@ -5490,51 +5293,51 @@ var hi = {
|
|
|
5490
5293
|
return n;
|
|
5491
5294
|
}
|
|
5492
5295
|
static from(e, t, n) {
|
|
5493
|
-
let r =
|
|
5296
|
+
let r = pi(e, t, n), i = new this();
|
|
5494
5297
|
return i.items = r.items, i;
|
|
5495
5298
|
}
|
|
5496
5299
|
};
|
|
5497
|
-
|
|
5498
|
-
var
|
|
5300
|
+
hi.tag = "tag:yaml.org,2002:omap";
|
|
5301
|
+
var gi = {
|
|
5499
5302
|
collection: "seq",
|
|
5500
5303
|
identify: (e) => e instanceof Map,
|
|
5501
|
-
nodeClass:
|
|
5304
|
+
nodeClass: hi,
|
|
5502
5305
|
default: !1,
|
|
5503
5306
|
tag: "tag:yaml.org,2002:omap",
|
|
5504
5307
|
resolve(e, t) {
|
|
5505
|
-
let n =
|
|
5308
|
+
let n = fi(e, t), r = [];
|
|
5506
5309
|
for (let { key: e } of n.items) W(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
|
|
5507
|
-
return Object.assign(new
|
|
5310
|
+
return Object.assign(new hi(), n);
|
|
5508
5311
|
},
|
|
5509
|
-
createNode: (e, t, n) =>
|
|
5312
|
+
createNode: (e, t, n) => hi.from(e, t, n)
|
|
5510
5313
|
};
|
|
5511
5314
|
//#endregion
|
|
5512
5315
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
|
|
5513
|
-
function
|
|
5514
|
-
return t && (e ?
|
|
5316
|
+
function _i({ value: e, source: t }, n) {
|
|
5317
|
+
return t && (e ? vi : yi).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
|
|
5515
5318
|
}
|
|
5516
|
-
var
|
|
5319
|
+
var vi = {
|
|
5517
5320
|
identify: (e) => e === !0,
|
|
5518
5321
|
default: !0,
|
|
5519
5322
|
tag: "tag:yaml.org,2002:bool",
|
|
5520
5323
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
5521
5324
|
resolve: () => new Y(!0),
|
|
5522
|
-
stringify:
|
|
5523
|
-
},
|
|
5325
|
+
stringify: _i
|
|
5326
|
+
}, yi = {
|
|
5524
5327
|
identify: (e) => e === !1,
|
|
5525
5328
|
default: !0,
|
|
5526
5329
|
tag: "tag:yaml.org,2002:bool",
|
|
5527
5330
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
5528
5331
|
resolve: () => new Y(!1),
|
|
5529
|
-
stringify:
|
|
5530
|
-
},
|
|
5332
|
+
stringify: _i
|
|
5333
|
+
}, bi = {
|
|
5531
5334
|
identify: (e) => typeof e == "number",
|
|
5532
5335
|
default: !0,
|
|
5533
5336
|
tag: "tag:yaml.org,2002:float",
|
|
5534
5337
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
5535
5338
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
5536
5339
|
stringify: Q
|
|
5537
|
-
},
|
|
5340
|
+
}, xi = {
|
|
5538
5341
|
identify: (e) => typeof e == "number",
|
|
5539
5342
|
default: !0,
|
|
5540
5343
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -5545,7 +5348,7 @@ var yi = {
|
|
|
5545
5348
|
let t = Number(e.value);
|
|
5546
5349
|
return isFinite(t) ? t.toExponential() : Q(e);
|
|
5547
5350
|
}
|
|
5548
|
-
},
|
|
5351
|
+
}, Si = {
|
|
5549
5352
|
identify: (e) => typeof e == "number",
|
|
5550
5353
|
default: !0,
|
|
5551
5354
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -5559,8 +5362,8 @@ var yi = {
|
|
|
5559
5362
|
return t;
|
|
5560
5363
|
},
|
|
5561
5364
|
stringify: Q
|
|
5562
|
-
},
|
|
5563
|
-
function
|
|
5365
|
+
}, Ci = (e) => typeof e == "bigint" || Number.isInteger(e);
|
|
5366
|
+
function wi(e, t, n, { intAsBigInt: r }) {
|
|
5564
5367
|
let i = e[0];
|
|
5565
5368
|
if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
|
|
5566
5369
|
switch (n) {
|
|
@@ -5578,60 +5381,60 @@ function Ti(e, t, n, { intAsBigInt: r }) {
|
|
|
5578
5381
|
let a = parseInt(e, n);
|
|
5579
5382
|
return i === "-" ? -1 * a : a;
|
|
5580
5383
|
}
|
|
5581
|
-
function
|
|
5384
|
+
function Ti(e, t, n) {
|
|
5582
5385
|
let { value: r } = e;
|
|
5583
|
-
if (
|
|
5386
|
+
if (Ci(r)) {
|
|
5584
5387
|
let e = r.toString(t);
|
|
5585
5388
|
return r < 0 ? "-" + n + e.substr(1) : n + e;
|
|
5586
5389
|
}
|
|
5587
5390
|
return Q(e);
|
|
5588
5391
|
}
|
|
5589
|
-
var
|
|
5590
|
-
identify:
|
|
5392
|
+
var Ei = {
|
|
5393
|
+
identify: Ci,
|
|
5591
5394
|
default: !0,
|
|
5592
5395
|
tag: "tag:yaml.org,2002:int",
|
|
5593
5396
|
format: "BIN",
|
|
5594
5397
|
test: /^[-+]?0b[0-1_]+$/,
|
|
5595
|
-
resolve: (e, t, n) =>
|
|
5596
|
-
stringify: (e) =>
|
|
5597
|
-
},
|
|
5598
|
-
identify:
|
|
5398
|
+
resolve: (e, t, n) => wi(e, 2, 2, n),
|
|
5399
|
+
stringify: (e) => Ti(e, 2, "0b")
|
|
5400
|
+
}, Di = {
|
|
5401
|
+
identify: Ci,
|
|
5599
5402
|
default: !0,
|
|
5600
5403
|
tag: "tag:yaml.org,2002:int",
|
|
5601
5404
|
format: "OCT",
|
|
5602
5405
|
test: /^[-+]?0[0-7_]+$/,
|
|
5603
|
-
resolve: (e, t, n) =>
|
|
5604
|
-
stringify: (e) =>
|
|
5605
|
-
},
|
|
5606
|
-
identify:
|
|
5406
|
+
resolve: (e, t, n) => wi(e, 1, 8, n),
|
|
5407
|
+
stringify: (e) => Ti(e, 8, "0")
|
|
5408
|
+
}, Oi = {
|
|
5409
|
+
identify: Ci,
|
|
5607
5410
|
default: !0,
|
|
5608
5411
|
tag: "tag:yaml.org,2002:int",
|
|
5609
5412
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
5610
|
-
resolve: (e, t, n) =>
|
|
5413
|
+
resolve: (e, t, n) => wi(e, 0, 10, n),
|
|
5611
5414
|
stringify: Q
|
|
5612
|
-
},
|
|
5613
|
-
identify:
|
|
5415
|
+
}, ki = {
|
|
5416
|
+
identify: Ci,
|
|
5614
5417
|
default: !0,
|
|
5615
5418
|
tag: "tag:yaml.org,2002:int",
|
|
5616
5419
|
format: "HEX",
|
|
5617
5420
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
5618
|
-
resolve: (e, t, n) =>
|
|
5619
|
-
stringify: (e) =>
|
|
5620
|
-
},
|
|
5421
|
+
resolve: (e, t, n) => wi(e, 2, 16, n),
|
|
5422
|
+
stringify: (e) => Ti(e, 16, "0x")
|
|
5423
|
+
}, Ai = class e extends Z {
|
|
5621
5424
|
constructor(t) {
|
|
5622
5425
|
super(t), this.tag = e.tag;
|
|
5623
5426
|
}
|
|
5624
5427
|
add(e) {
|
|
5625
5428
|
let t;
|
|
5626
|
-
t = U(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new X(e.key, null) : new X(e, null),
|
|
5429
|
+
t = U(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new X(e.key, null) : new X(e, null), Ur(this.items, t.key) || this.items.push(t);
|
|
5627
5430
|
}
|
|
5628
5431
|
get(e, t) {
|
|
5629
|
-
let n =
|
|
5432
|
+
let n = Ur(this.items, e);
|
|
5630
5433
|
return !t && U(n) ? W(n.key) ? n.key.value : n.key : n;
|
|
5631
5434
|
}
|
|
5632
5435
|
set(e, t) {
|
|
5633
5436
|
if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
|
|
5634
|
-
let n =
|
|
5437
|
+
let n = Ur(this.items, e);
|
|
5635
5438
|
n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new X(e));
|
|
5636
5439
|
}
|
|
5637
5440
|
toJSON(e, t) {
|
|
@@ -5644,21 +5447,21 @@ var Di = {
|
|
|
5644
5447
|
}
|
|
5645
5448
|
static from(e, t, n) {
|
|
5646
5449
|
let { replacer: r } = n, i = new this(e);
|
|
5647
|
-
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(
|
|
5450
|
+
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Rr(e, null, n));
|
|
5648
5451
|
return i;
|
|
5649
5452
|
}
|
|
5650
5453
|
};
|
|
5651
|
-
|
|
5652
|
-
var
|
|
5454
|
+
Ai.tag = "tag:yaml.org,2002:set";
|
|
5455
|
+
var ji = {
|
|
5653
5456
|
collection: "map",
|
|
5654
5457
|
identify: (e) => e instanceof Set,
|
|
5655
|
-
nodeClass:
|
|
5458
|
+
nodeClass: Ai,
|
|
5656
5459
|
default: !1,
|
|
5657
5460
|
tag: "tag:yaml.org,2002:set",
|
|
5658
|
-
createNode: (e, t, n) =>
|
|
5461
|
+
createNode: (e, t, n) => Ai.from(e, t, n),
|
|
5659
5462
|
resolve(e, t) {
|
|
5660
|
-
if (
|
|
5661
|
-
if (e.hasAllNullValues(!0)) return Object.assign(new
|
|
5463
|
+
if (An(e)) {
|
|
5464
|
+
if (e.hasAllNullValues(!0)) return Object.assign(new Ai(), e);
|
|
5662
5465
|
t("Set items must all have null values");
|
|
5663
5466
|
} else t("Expected a mapping for this tag");
|
|
5664
5467
|
return e;
|
|
@@ -5666,11 +5469,11 @@ var Mi = {
|
|
|
5666
5469
|
};
|
|
5667
5470
|
//#endregion
|
|
5668
5471
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
5669
|
-
function
|
|
5472
|
+
function Mi(e, t) {
|
|
5670
5473
|
let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
|
|
5671
5474
|
return n === "-" ? i(-1) * a : a;
|
|
5672
5475
|
}
|
|
5673
|
-
function
|
|
5476
|
+
function Ni(e) {
|
|
5674
5477
|
let { value: t } = e, n = (e) => e;
|
|
5675
5478
|
if (typeof t == "bigint") n = (e) => BigInt(e);
|
|
5676
5479
|
else if (isNaN(t) || !isFinite(t)) return Q(e);
|
|
@@ -5679,114 +5482,114 @@ function Pi(e) {
|
|
|
5679
5482
|
let i = n(60), a = [t % i];
|
|
5680
5483
|
return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
|
|
5681
5484
|
}
|
|
5682
|
-
var
|
|
5485
|
+
var Pi = {
|
|
5683
5486
|
identify: (e) => typeof e == "bigint" || Number.isInteger(e),
|
|
5684
5487
|
default: !0,
|
|
5685
5488
|
tag: "tag:yaml.org,2002:int",
|
|
5686
5489
|
format: "TIME",
|
|
5687
5490
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
5688
|
-
resolve: (e, t, { intAsBigInt: n }) =>
|
|
5689
|
-
stringify:
|
|
5690
|
-
},
|
|
5491
|
+
resolve: (e, t, { intAsBigInt: n }) => Mi(e, n),
|
|
5492
|
+
stringify: Ni
|
|
5493
|
+
}, Fi = {
|
|
5691
5494
|
identify: (e) => typeof e == "number",
|
|
5692
5495
|
default: !0,
|
|
5693
5496
|
tag: "tag:yaml.org,2002:float",
|
|
5694
5497
|
format: "TIME",
|
|
5695
5498
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
5696
|
-
resolve: (e) =>
|
|
5697
|
-
stringify:
|
|
5698
|
-
},
|
|
5499
|
+
resolve: (e) => Mi(e, !1),
|
|
5500
|
+
stringify: Ni
|
|
5501
|
+
}, Ii = {
|
|
5699
5502
|
identify: (e) => e instanceof Date,
|
|
5700
5503
|
default: !0,
|
|
5701
5504
|
tag: "tag:yaml.org,2002:timestamp",
|
|
5702
5505
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
5703
5506
|
resolve(e) {
|
|
5704
|
-
let t = e.match(
|
|
5507
|
+
let t = e.match(Ii.test);
|
|
5705
5508
|
if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
5706
5509
|
let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
|
|
5707
5510
|
if (u && u !== "Z") {
|
|
5708
|
-
let e =
|
|
5511
|
+
let e = Mi(u, !1);
|
|
5709
5512
|
Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
|
|
5710
5513
|
}
|
|
5711
5514
|
return new Date(l);
|
|
5712
5515
|
},
|
|
5713
5516
|
stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
5714
|
-
},
|
|
5715
|
-
|
|
5517
|
+
}, Li = [
|
|
5518
|
+
Wr,
|
|
5519
|
+
qr,
|
|
5716
5520
|
Jr,
|
|
5717
5521
|
Yr,
|
|
5718
|
-
|
|
5522
|
+
vi,
|
|
5719
5523
|
yi,
|
|
5720
|
-
|
|
5524
|
+
Ei,
|
|
5721
5525
|
Di,
|
|
5722
5526
|
Oi,
|
|
5723
5527
|
ki,
|
|
5724
|
-
|
|
5528
|
+
bi,
|
|
5725
5529
|
xi,
|
|
5726
5530
|
Si,
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5531
|
+
di,
|
|
5532
|
+
jr,
|
|
5533
|
+
gi,
|
|
5534
|
+
mi,
|
|
5535
|
+
ji,
|
|
5536
|
+
Pi,
|
|
5733
5537
|
Fi,
|
|
5734
|
-
Ii
|
|
5735
|
-
|
|
5736
|
-
],
|
|
5737
|
-
["core", si],
|
|
5538
|
+
Ii
|
|
5539
|
+
], Ri = /* @__PURE__ */ new Map([
|
|
5540
|
+
["core", oi],
|
|
5738
5541
|
["failsafe", [
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5542
|
+
Wr,
|
|
5543
|
+
qr,
|
|
5544
|
+
Jr
|
|
5742
5545
|
]],
|
|
5743
|
-
["json",
|
|
5744
|
-
["yaml11",
|
|
5745
|
-
["yaml-1.1",
|
|
5746
|
-
]),
|
|
5747
|
-
binary:
|
|
5748
|
-
bool:
|
|
5749
|
-
float:
|
|
5750
|
-
floatExp:
|
|
5751
|
-
floatNaN:
|
|
5752
|
-
floatTime:
|
|
5753
|
-
int:
|
|
5754
|
-
intHex:
|
|
5755
|
-
intOct:
|
|
5756
|
-
intTime:
|
|
5757
|
-
map:
|
|
5758
|
-
merge:
|
|
5759
|
-
null:
|
|
5760
|
-
omap:
|
|
5761
|
-
pairs:
|
|
5762
|
-
seq:
|
|
5763
|
-
set:
|
|
5764
|
-
timestamp:
|
|
5765
|
-
},
|
|
5766
|
-
"tag:yaml.org,2002:binary":
|
|
5767
|
-
"tag:yaml.org,2002:merge":
|
|
5768
|
-
"tag:yaml.org,2002:omap":
|
|
5769
|
-
"tag:yaml.org,2002:pairs":
|
|
5770
|
-
"tag:yaml.org,2002:set":
|
|
5771
|
-
"tag:yaml.org,2002:timestamp":
|
|
5546
|
+
["json", ui],
|
|
5547
|
+
["yaml11", Li],
|
|
5548
|
+
["yaml-1.1", Li]
|
|
5549
|
+
]), zi = {
|
|
5550
|
+
binary: di,
|
|
5551
|
+
bool: Xr,
|
|
5552
|
+
float: $r,
|
|
5553
|
+
floatExp: Qr,
|
|
5554
|
+
floatNaN: Zr,
|
|
5555
|
+
floatTime: Fi,
|
|
5556
|
+
int: ii,
|
|
5557
|
+
intHex: ai,
|
|
5558
|
+
intOct: ri,
|
|
5559
|
+
intTime: Pi,
|
|
5560
|
+
map: Wr,
|
|
5561
|
+
merge: jr,
|
|
5562
|
+
null: Yr,
|
|
5563
|
+
omap: gi,
|
|
5564
|
+
pairs: mi,
|
|
5565
|
+
seq: qr,
|
|
5566
|
+
set: ji,
|
|
5567
|
+
timestamp: Ii
|
|
5568
|
+
}, Bi = {
|
|
5569
|
+
"tag:yaml.org,2002:binary": di,
|
|
5570
|
+
"tag:yaml.org,2002:merge": jr,
|
|
5571
|
+
"tag:yaml.org,2002:omap": gi,
|
|
5572
|
+
"tag:yaml.org,2002:pairs": mi,
|
|
5573
|
+
"tag:yaml.org,2002:set": ji,
|
|
5574
|
+
"tag:yaml.org,2002:timestamp": Ii
|
|
5772
5575
|
};
|
|
5773
|
-
function
|
|
5774
|
-
let r =
|
|
5775
|
-
if (r && !e) return n && !r.includes(
|
|
5576
|
+
function Vi(e, t, n) {
|
|
5577
|
+
let r = Ri.get(t);
|
|
5578
|
+
if (r && !e) return n && !r.includes(jr) ? r.concat(jr) : r.slice();
|
|
5776
5579
|
let i = r;
|
|
5777
5580
|
if (!i) {
|
|
5778
5581
|
if (Array.isArray(e)) i = [];
|
|
5779
5582
|
else {
|
|
5780
|
-
let e = Array.from(
|
|
5583
|
+
let e = Array.from(Ri.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
|
|
5781
5584
|
throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
|
|
5782
5585
|
}
|
|
5783
5586
|
}
|
|
5784
5587
|
if (Array.isArray(e)) for (let t of e) i = i.concat(t);
|
|
5785
5588
|
else typeof e == "function" && (i = e(i.slice()));
|
|
5786
|
-
return n && (i = i.concat(
|
|
5787
|
-
let n = typeof t == "string" ?
|
|
5589
|
+
return n && (i = i.concat(jr)), i.reduce((e, t) => {
|
|
5590
|
+
let n = typeof t == "string" ? zi[t] : t;
|
|
5788
5591
|
if (!n) {
|
|
5789
|
-
let e = JSON.stringify(t), n = Object.keys(
|
|
5592
|
+
let e = JSON.stringify(t), n = Object.keys(zi).map((e) => JSON.stringify(e)).join(", ");
|
|
5790
5593
|
throw Error(`Unknown custom tag ${e}; use one of ${n}`);
|
|
5791
5594
|
}
|
|
5792
5595
|
return e.includes(n) || e.push(n), e;
|
|
@@ -5794,9 +5597,9 @@ function Hi(e, t, n) {
|
|
|
5794
5597
|
}
|
|
5795
5598
|
//#endregion
|
|
5796
5599
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js
|
|
5797
|
-
var
|
|
5600
|
+
var Hi = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Ui = class e {
|
|
5798
5601
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
|
|
5799
|
-
this.compat = Array.isArray(e) ?
|
|
5602
|
+
this.compat = Array.isArray(e) ? Vi(e, "compat") : e ? Vi(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? Bi : {}, this.tags = Vi(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, wn, { value: Wr }), Object.defineProperty(this, En, { value: Jr }), Object.defineProperty(this, Dn, { value: qr }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Hi : null;
|
|
5800
5603
|
}
|
|
5801
5604
|
clone() {
|
|
5802
5605
|
let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
|
|
@@ -5805,47 +5608,47 @@ var Ui = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Wi = class e {
|
|
|
5805
5608
|
};
|
|
5806
5609
|
//#endregion
|
|
5807
5610
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
|
|
5808
|
-
function
|
|
5611
|
+
function Wi(e, t) {
|
|
5809
5612
|
let n = [], r = t.directives === !0;
|
|
5810
5613
|
if (t.directives !== !1 && e.directives) {
|
|
5811
5614
|
let t = e.directives.toString(e);
|
|
5812
5615
|
t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
|
|
5813
5616
|
}
|
|
5814
5617
|
r && n.push("---");
|
|
5815
|
-
let i =
|
|
5618
|
+
let i = wr(e, t), { commentString: a } = i.options;
|
|
5816
5619
|
if (e.commentBefore) {
|
|
5817
5620
|
n.length !== 1 && n.unshift("");
|
|
5818
5621
|
let t = a(e.commentBefore);
|
|
5819
|
-
n.unshift(
|
|
5622
|
+
n.unshift(sr(t, ""));
|
|
5820
5623
|
}
|
|
5821
5624
|
let o = !1, s = null;
|
|
5822
5625
|
if (e.contents) {
|
|
5823
5626
|
if (K(e.contents)) {
|
|
5824
5627
|
if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
|
|
5825
5628
|
let t = a(e.contents.commentBefore);
|
|
5826
|
-
n.push(
|
|
5629
|
+
n.push(sr(t, ""));
|
|
5827
5630
|
}
|
|
5828
5631
|
i.forceBlockIndent = !!e.comment, s = e.contents.comment;
|
|
5829
5632
|
}
|
|
5830
|
-
let t = s ? void 0 : () => o = !0, c =
|
|
5831
|
-
s && (c +=
|
|
5832
|
-
} else n.push(
|
|
5633
|
+
let t = s ? void 0 : () => o = !0, c = Dr(e.contents, i, () => s = null, t);
|
|
5634
|
+
s && (c += cr(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
|
|
5635
|
+
} else n.push(Dr(e.contents, i));
|
|
5833
5636
|
if (e.directives?.docEnd) {
|
|
5834
5637
|
if (e.comment) {
|
|
5835
5638
|
let t = a(e.comment);
|
|
5836
|
-
t.includes("\n") ? (n.push("..."), n.push(
|
|
5639
|
+
t.includes("\n") ? (n.push("..."), n.push(sr(t, ""))) : n.push(`... ${t}`);
|
|
5837
5640
|
} else n.push("...");
|
|
5838
5641
|
} else {
|
|
5839
5642
|
let t = e.comment;
|
|
5840
|
-
t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(
|
|
5643
|
+
t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(sr(a(t), "")));
|
|
5841
5644
|
}
|
|
5842
5645
|
return n.join("\n") + "\n";
|
|
5843
5646
|
}
|
|
5844
5647
|
//#endregion
|
|
5845
5648
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js
|
|
5846
|
-
var
|
|
5649
|
+
var Gi = class e {
|
|
5847
5650
|
constructor(e, t, n) {
|
|
5848
|
-
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, H, { value:
|
|
5651
|
+
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, H, { value: Cn });
|
|
5849
5652
|
let r = null;
|
|
5850
5653
|
typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t, t = void 0);
|
|
5851
5654
|
let i = Object.assign({
|
|
@@ -5860,24 +5663,24 @@ var Ki = class e {
|
|
|
5860
5663
|
}, n);
|
|
5861
5664
|
this.options = i;
|
|
5862
5665
|
let { version: a } = i;
|
|
5863
|
-
n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new
|
|
5666
|
+
n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new Wn({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
|
|
5864
5667
|
}
|
|
5865
5668
|
clone() {
|
|
5866
|
-
let t = Object.create(e.prototype, { [H]: { value:
|
|
5669
|
+
let t = Object.create(e.prototype, { [H]: { value: Cn } });
|
|
5867
5670
|
return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = K(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
|
|
5868
5671
|
}
|
|
5869
5672
|
add(e) {
|
|
5870
|
-
|
|
5673
|
+
Ki(this.contents) && this.contents.add(e);
|
|
5871
5674
|
}
|
|
5872
5675
|
addIn(e, t) {
|
|
5873
|
-
|
|
5676
|
+
Ki(this.contents) && this.contents.addIn(e, t);
|
|
5874
5677
|
}
|
|
5875
5678
|
createAlias(e, t) {
|
|
5876
5679
|
if (!e.anchor) {
|
|
5877
|
-
let n =
|
|
5878
|
-
e.anchor = !t || n.has(t) ?
|
|
5680
|
+
let n = Kn(this);
|
|
5681
|
+
e.anchor = !t || n.has(t) ? qn(t || "a", n) : t;
|
|
5879
5682
|
}
|
|
5880
|
-
return new
|
|
5683
|
+
return new Zn(e.anchor);
|
|
5881
5684
|
}
|
|
5882
5685
|
createNode(e, t, n) {
|
|
5883
5686
|
let r;
|
|
@@ -5886,7 +5689,7 @@ var Ki = class e {
|
|
|
5886
5689
|
let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
|
|
5887
5690
|
e.length > 0 && (t = t.concat(e)), r = t;
|
|
5888
5691
|
} else n === void 0 && t && (n = t, t = void 0);
|
|
5889
|
-
let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } =
|
|
5692
|
+
let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = Jn(this, a || "a"), p = {
|
|
5890
5693
|
aliasDuplicateObjects: i ?? !0,
|
|
5891
5694
|
keepUndefined: s ?? !1,
|
|
5892
5695
|
onAnchor: u,
|
|
@@ -5894,49 +5697,49 @@ var Ki = class e {
|
|
|
5894
5697
|
replacer: r,
|
|
5895
5698
|
schema: this.schema,
|
|
5896
5699
|
sourceObjects: f
|
|
5897
|
-
}, m =
|
|
5700
|
+
}, m = nr(e, l, p);
|
|
5898
5701
|
return o && G(m) && (m.flow = !0), d(), m;
|
|
5899
5702
|
}
|
|
5900
5703
|
createPair(e, t, n = {}) {
|
|
5901
5704
|
return new X(this.createNode(e, null, n), this.createNode(t, null, n));
|
|
5902
5705
|
}
|
|
5903
5706
|
delete(e) {
|
|
5904
|
-
return
|
|
5707
|
+
return Ki(this.contents) ? this.contents.delete(e) : !1;
|
|
5905
5708
|
}
|
|
5906
5709
|
deleteIn(e) {
|
|
5907
|
-
return
|
|
5710
|
+
return ir(e) ? this.contents != null && (this.contents = null, !0) : Ki(this.contents) ? this.contents.deleteIn(e) : !1;
|
|
5908
5711
|
}
|
|
5909
5712
|
get(e, t) {
|
|
5910
5713
|
return G(this.contents) ? this.contents.get(e, t) : void 0;
|
|
5911
5714
|
}
|
|
5912
5715
|
getIn(e, t) {
|
|
5913
|
-
return
|
|
5716
|
+
return ir(e) ? !t && W(this.contents) ? this.contents.value : this.contents : G(this.contents) ? this.contents.getIn(e, t) : void 0;
|
|
5914
5717
|
}
|
|
5915
5718
|
has(e) {
|
|
5916
5719
|
return G(this.contents) ? this.contents.has(e) : !1;
|
|
5917
5720
|
}
|
|
5918
5721
|
hasIn(e) {
|
|
5919
|
-
return
|
|
5722
|
+
return ir(e) ? this.contents !== void 0 : G(this.contents) ? this.contents.hasIn(e) : !1;
|
|
5920
5723
|
}
|
|
5921
5724
|
set(e, t) {
|
|
5922
|
-
this.contents == null ? this.contents =
|
|
5725
|
+
this.contents == null ? this.contents = rr(this.schema, [e], t) : Ki(this.contents) && this.contents.set(e, t);
|
|
5923
5726
|
}
|
|
5924
5727
|
setIn(e, t) {
|
|
5925
|
-
|
|
5728
|
+
ir(e) ? this.contents = t : this.contents == null ? this.contents = rr(this.schema, Array.from(e), t) : Ki(this.contents) && this.contents.setIn(e, t);
|
|
5926
5729
|
}
|
|
5927
5730
|
setSchema(e, t = {}) {
|
|
5928
5731
|
typeof e == "number" && (e = String(e));
|
|
5929
5732
|
let n;
|
|
5930
5733
|
switch (e) {
|
|
5931
5734
|
case "1.1":
|
|
5932
|
-
this.directives ? this.directives.yaml.version = "1.1" : this.directives = new
|
|
5735
|
+
this.directives ? this.directives.yaml.version = "1.1" : this.directives = new Wn({ version: "1.1" }), n = {
|
|
5933
5736
|
resolveKnownTags: !1,
|
|
5934
5737
|
schema: "yaml-1.1"
|
|
5935
5738
|
};
|
|
5936
5739
|
break;
|
|
5937
5740
|
case "1.2":
|
|
5938
5741
|
case "next":
|
|
5939
|
-
this.directives ? this.directives.yaml.version = e : this.directives = new
|
|
5742
|
+
this.directives ? this.directives.yaml.version = e : this.directives = new Wn({ version: e }), n = {
|
|
5940
5743
|
resolveKnownTags: !0,
|
|
5941
5744
|
schema: "core"
|
|
5942
5745
|
};
|
|
@@ -5950,7 +5753,7 @@ var Ki = class e {
|
|
|
5950
5753
|
}
|
|
5951
5754
|
}
|
|
5952
5755
|
if (t.schema instanceof Object) this.schema = t.schema;
|
|
5953
|
-
else if (n) this.schema = new
|
|
5756
|
+
else if (n) this.schema = new Ui(Object.assign(n, t));
|
|
5954
5757
|
else throw Error("With a null YAML version, the { schema: Schema } option is required");
|
|
5955
5758
|
}
|
|
5956
5759
|
toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
|
|
@@ -5963,7 +5766,7 @@ var Ki = class e {
|
|
|
5963
5766
|
maxAliasCount: typeof r == "number" ? r : 100
|
|
5964
5767
|
}, s = J(this.contents, t ?? "", o);
|
|
5965
5768
|
if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
|
|
5966
|
-
return typeof a == "function" ?
|
|
5769
|
+
return typeof a == "function" ? Yn(a, { "": s }, "", s) : s;
|
|
5967
5770
|
}
|
|
5968
5771
|
toJSON(e, t) {
|
|
5969
5772
|
return this.toJS({
|
|
@@ -5979,28 +5782,28 @@ var Ki = class e {
|
|
|
5979
5782
|
let t = JSON.stringify(e.indent);
|
|
5980
5783
|
throw Error(`"indent" option must be a positive integer, not ${t}`);
|
|
5981
5784
|
}
|
|
5982
|
-
return
|
|
5785
|
+
return Wi(this, e);
|
|
5983
5786
|
}
|
|
5984
5787
|
};
|
|
5985
|
-
function
|
|
5788
|
+
function Ki(e) {
|
|
5986
5789
|
if (G(e)) return !0;
|
|
5987
5790
|
throw Error("Expected a YAML collection as document contents");
|
|
5988
5791
|
}
|
|
5989
5792
|
//#endregion
|
|
5990
5793
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js
|
|
5991
|
-
var
|
|
5794
|
+
var qi = class extends Error {
|
|
5992
5795
|
constructor(e, t, n, r) {
|
|
5993
5796
|
super(), this.name = e, this.code = n, this.message = r, this.pos = t;
|
|
5994
5797
|
}
|
|
5995
|
-
},
|
|
5798
|
+
}, Ji = class extends qi {
|
|
5996
5799
|
constructor(e, t, n) {
|
|
5997
5800
|
super("YAMLParseError", e, t, n);
|
|
5998
5801
|
}
|
|
5999
|
-
},
|
|
5802
|
+
}, Yi = class extends qi {
|
|
6000
5803
|
constructor(e, t, n) {
|
|
6001
5804
|
super("YAMLWarning", e, t, n);
|
|
6002
5805
|
}
|
|
6003
|
-
},
|
|
5806
|
+
}, Xi = (e, t) => (n) => {
|
|
6004
5807
|
if (n.pos[0] === -1) return;
|
|
6005
5808
|
n.linePos = n.pos.map((e) => t.linePos(e));
|
|
6006
5809
|
let { line: r, col: i } = n.linePos[0];
|
|
@@ -6023,7 +5826,7 @@ var Ji = class extends Error {
|
|
|
6023
5826
|
};
|
|
6024
5827
|
//#endregion
|
|
6025
5828
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js
|
|
6026
|
-
function
|
|
5829
|
+
function Zi(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
|
|
6027
5830
|
let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, ee = null, b = null;
|
|
6028
5831
|
for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
|
|
6029
5832
|
case "space":
|
|
@@ -6069,7 +5872,7 @@ function Qi(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIn
|
|
|
6069
5872
|
}
|
|
6070
5873
|
//#endregion
|
|
6071
5874
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js
|
|
6072
|
-
function
|
|
5875
|
+
function Qi(e) {
|
|
6073
5876
|
if (!e) return null;
|
|
6074
5877
|
switch (e.type) {
|
|
6075
5878
|
case "alias":
|
|
@@ -6087,7 +5890,7 @@ function $i(e) {
|
|
|
6087
5890
|
if (t.sep) {
|
|
6088
5891
|
for (let e of t.sep) if (e.type === "newline") return !0;
|
|
6089
5892
|
}
|
|
6090
|
-
if (
|
|
5893
|
+
if (Qi(t.key) || Qi(t.value)) return !0;
|
|
6091
5894
|
}
|
|
6092
5895
|
return !1;
|
|
6093
5896
|
default: return !0;
|
|
@@ -6095,15 +5898,15 @@ function $i(e) {
|
|
|
6095
5898
|
}
|
|
6096
5899
|
//#endregion
|
|
6097
5900
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
|
|
6098
|
-
function
|
|
5901
|
+
function $i(e, t, n) {
|
|
6099
5902
|
if (t?.type === "flow-collection") {
|
|
6100
5903
|
let r = t.end[0];
|
|
6101
|
-
r.indent === e && (r.source === "]" || r.source === "}") &&
|
|
5904
|
+
r.indent === e && (r.source === "]" || r.source === "}") && Qi(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
6102
5905
|
}
|
|
6103
5906
|
}
|
|
6104
5907
|
//#endregion
|
|
6105
5908
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js
|
|
6106
|
-
function
|
|
5909
|
+
function ea(e, t, n) {
|
|
6107
5910
|
let { uniqueKeys: r } = e.options;
|
|
6108
5911
|
if (r === !1) return !1;
|
|
6109
5912
|
let i = typeof r == "function" ? r : (e, t) => e === t || W(e) && W(t) && e.value === t.value;
|
|
@@ -6111,13 +5914,13 @@ function ta(e, t, n) {
|
|
|
6111
5914
|
}
|
|
6112
5915
|
//#endregion
|
|
6113
5916
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js
|
|
6114
|
-
var
|
|
6115
|
-
function
|
|
5917
|
+
var ta = "All mapping items must start at the same column";
|
|
5918
|
+
function na({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
6116
5919
|
let o = new ((a?.nodeClass) ?? Z)(n.schema);
|
|
6117
5920
|
n.atRoot &&= !1;
|
|
6118
5921
|
let s = r.offset, c = null;
|
|
6119
5922
|
for (let a of r.items) {
|
|
6120
|
-
let { start: l, key: u, sep: d, value: f } = a, p =
|
|
5923
|
+
let { start: l, key: u, sep: d, value: f } = a, p = Zi(l, {
|
|
6121
5924
|
indicator: "explicit-key-ind",
|
|
6122
5925
|
next: u ?? d?.[0],
|
|
6123
5926
|
offset: s,
|
|
@@ -6126,16 +5929,16 @@ function ra({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6126
5929
|
startOnNewline: !0
|
|
6127
5930
|
}), m = !p.found;
|
|
6128
5931
|
if (m) {
|
|
6129
|
-
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT",
|
|
5932
|
+
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", ta)), !p.anchor && !p.tag && !d) {
|
|
6130
5933
|
c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
|
|
6131
5934
|
continue;
|
|
6132
5935
|
}
|
|
6133
|
-
(p.newlineAfterProp ||
|
|
6134
|
-
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT",
|
|
5936
|
+
(p.newlineAfterProp || Qi(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
5937
|
+
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT", ta);
|
|
6135
5938
|
n.atKey = !0;
|
|
6136
5939
|
let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
|
|
6137
|
-
n.schema.compat &&
|
|
6138
|
-
let _ =
|
|
5940
|
+
n.schema.compat && $i(r.indent, u, i), n.atKey = !1, ea(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
|
|
5941
|
+
let _ = Zi(d ?? [], {
|
|
6139
5942
|
indicator: "map-value-ind",
|
|
6140
5943
|
next: f,
|
|
6141
5944
|
offset: g.range[2],
|
|
@@ -6146,7 +5949,7 @@ function ra({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6146
5949
|
if (s = _.end, _.found) {
|
|
6147
5950
|
m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
6148
5951
|
let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
|
|
6149
|
-
n.schema.compat &&
|
|
5952
|
+
n.schema.compat && $i(r.indent, f, i), s = c.range[2];
|
|
6150
5953
|
let l = new X(g, c);
|
|
6151
5954
|
n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
|
|
6152
5955
|
} else {
|
|
@@ -6163,12 +5966,12 @@ function ra({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6163
5966
|
}
|
|
6164
5967
|
//#endregion
|
|
6165
5968
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
|
|
6166
|
-
function
|
|
6167
|
-
let o = new ((a?.nodeClass) ??
|
|
5969
|
+
function ra({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
5970
|
+
let o = new ((a?.nodeClass) ?? Gr)(n.schema);
|
|
6168
5971
|
n.atRoot &&= !1, n.atKey &&= !1;
|
|
6169
5972
|
let s = r.offset, c = null;
|
|
6170
5973
|
for (let { start: a, value: l } of r.items) {
|
|
6171
|
-
let u =
|
|
5974
|
+
let u = Zi(a, {
|
|
6172
5975
|
indicator: "seq-item-ind",
|
|
6173
5976
|
next: l,
|
|
6174
5977
|
offset: s,
|
|
@@ -6184,7 +5987,7 @@ function ia({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6184
5987
|
}
|
|
6185
5988
|
}
|
|
6186
5989
|
let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
|
|
6187
|
-
n.schema.compat &&
|
|
5990
|
+
n.schema.compat && $i(r.indent, l, i), s = d.range[2], o.items.push(d);
|
|
6188
5991
|
}
|
|
6189
5992
|
return o.range = [
|
|
6190
5993
|
r.offset,
|
|
@@ -6194,7 +5997,7 @@ function ia({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6194
5997
|
}
|
|
6195
5998
|
//#endregion
|
|
6196
5999
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js
|
|
6197
|
-
function
|
|
6000
|
+
function ia(e, t, n, r) {
|
|
6198
6001
|
let i = "";
|
|
6199
6002
|
if (e) {
|
|
6200
6003
|
let a = !1, o = "";
|
|
@@ -6225,15 +6028,15 @@ function aa(e, t, n, r) {
|
|
|
6225
6028
|
}
|
|
6226
6029
|
//#endregion
|
|
6227
6030
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
|
|
6228
|
-
var
|
|
6229
|
-
function
|
|
6230
|
-
let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? Z :
|
|
6031
|
+
var aa = "Block collections are not allowed within flow collections", oa = (e) => e && (e.type === "block-map" || e.type === "block-seq");
|
|
6032
|
+
function sa({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
6033
|
+
let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? Z : Gr))(n.schema);
|
|
6231
6034
|
c.flow = !0;
|
|
6232
6035
|
let l = n.atRoot;
|
|
6233
6036
|
l && (n.atRoot = !1), n.atKey &&= !1;
|
|
6234
6037
|
let u = r.offset + r.start.source.length;
|
|
6235
6038
|
for (let a = 0; a < r.items.length; ++a) {
|
|
6236
|
-
let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h =
|
|
6039
|
+
let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = Zi(d, {
|
|
6237
6040
|
flow: s,
|
|
6238
6041
|
indicator: "explicit-key-ind",
|
|
6239
6042
|
next: f ?? p?.[0],
|
|
@@ -6247,7 +6050,7 @@ function ca({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6247
6050
|
a === 0 && h.comma ? i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(h.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), h.comment && (c.comment ? c.comment += "\n" + h.comment : c.comment = h.comment), u = h.end;
|
|
6248
6051
|
continue;
|
|
6249
6052
|
}
|
|
6250
|
-
!o && n.options.strict &&
|
|
6053
|
+
!o && n.options.strict && Qi(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
6251
6054
|
}
|
|
6252
6055
|
if (a === 0) h.comma && i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
|
|
6253
6056
|
else if (h.comma || i(h.start, "MISSING_CHAR", `Missing , between ${s} items`), h.comment) {
|
|
@@ -6267,12 +6070,12 @@ function ca({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6267
6070
|
}
|
|
6268
6071
|
if (!o && !p && !h.found) {
|
|
6269
6072
|
let r = m ? e(n, m, h, i) : t(n, h.end, p, null, h, i);
|
|
6270
|
-
c.items.push(r), u = r.range[2],
|
|
6073
|
+
c.items.push(r), u = r.range[2], oa(m) && i(r.range, "BLOCK_IN_FLOW", aa);
|
|
6271
6074
|
} else {
|
|
6272
6075
|
n.atKey = !0;
|
|
6273
6076
|
let a = h.end, g = f ? e(n, f, h, i) : t(n, a, d, null, h, i);
|
|
6274
|
-
|
|
6275
|
-
let _ =
|
|
6077
|
+
oa(f) && i(g.range, "BLOCK_IN_FLOW", aa), n.atKey = !1;
|
|
6078
|
+
let _ = Zi(p ?? [], {
|
|
6276
6079
|
flow: s,
|
|
6277
6080
|
indicator: "map-value-ind",
|
|
6278
6081
|
next: m,
|
|
@@ -6294,11 +6097,11 @@ function ca({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6294
6097
|
}
|
|
6295
6098
|
} else m && ("source" in m && m.source?.[0] === ":" ? i(m, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
|
|
6296
6099
|
let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
|
|
6297
|
-
v ?
|
|
6100
|
+
v ? oa(m) && i(v.range, "BLOCK_IN_FLOW", aa) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
|
|
6298
6101
|
let y = new X(g, v);
|
|
6299
6102
|
if (n.options.keepSourceTokens && (y.srcToken = l), o) {
|
|
6300
6103
|
let e = c;
|
|
6301
|
-
|
|
6104
|
+
ea(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
|
|
6302
6105
|
} else {
|
|
6303
6106
|
let e = new Z(n.schema);
|
|
6304
6107
|
e.flow = !0, e.items.push(y);
|
|
@@ -6319,7 +6122,7 @@ function ca({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6319
6122
|
i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), f && f.source.length !== 1 && p.unshift(f);
|
|
6320
6123
|
}
|
|
6321
6124
|
if (p.length > 0) {
|
|
6322
|
-
let e =
|
|
6125
|
+
let e = ia(p, m, n.options.strict, i);
|
|
6323
6126
|
e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
|
|
6324
6127
|
r.offset,
|
|
6325
6128
|
m,
|
|
@@ -6334,31 +6137,31 @@ function ca({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
6334
6137
|
}
|
|
6335
6138
|
//#endregion
|
|
6336
6139
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js
|
|
6337
|
-
function
|
|
6338
|
-
let o = n.type === "block-map" ?
|
|
6140
|
+
function ca(e, t, n, r, i, a) {
|
|
6141
|
+
let o = n.type === "block-map" ? na(e, t, n, r, a) : n.type === "block-seq" ? ra(e, t, n, r, a) : sa(e, t, n, r, a), s = o.constructor;
|
|
6339
6142
|
return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
|
|
6340
6143
|
}
|
|
6341
|
-
function
|
|
6144
|
+
function la(e, t, n, r, i) {
|
|
6342
6145
|
let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
|
|
6343
6146
|
if (n.type === "block-seq") {
|
|
6344
6147
|
let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
|
|
6345
6148
|
n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
6346
6149
|
}
|
|
6347
6150
|
let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
|
|
6348
|
-
if (!a || !o || o === "!" || o === Z.tagName && s === "map" || o ===
|
|
6151
|
+
if (!a || !o || o === "!" || o === Z.tagName && s === "map" || o === Gr.tagName && s === "seq") return ca(e, t, n, i, o);
|
|
6349
6152
|
let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
|
|
6350
6153
|
if (!c) {
|
|
6351
6154
|
let r = t.schema.knownTags[o];
|
|
6352
6155
|
if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
|
|
6353
|
-
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0),
|
|
6156
|
+
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), ca(e, t, n, i, o);
|
|
6354
6157
|
}
|
|
6355
|
-
let l =
|
|
6158
|
+
let l = ca(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = K(u) ? u : new Y(u);
|
|
6356
6159
|
return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
|
|
6357
6160
|
}
|
|
6358
6161
|
//#endregion
|
|
6359
6162
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
|
|
6360
|
-
function
|
|
6361
|
-
let r = t.offset, i =
|
|
6163
|
+
function ua(e, t, n) {
|
|
6164
|
+
let r = t.offset, i = da(t, e.options.strict, n);
|
|
6362
6165
|
if (!i) return {
|
|
6363
6166
|
value: "",
|
|
6364
6167
|
type: null,
|
|
@@ -6369,7 +6172,7 @@ function da(e, t, n) {
|
|
|
6369
6172
|
r
|
|
6370
6173
|
]
|
|
6371
6174
|
};
|
|
6372
|
-
let a = i.mode === ">" ? Y.BLOCK_FOLDED : Y.BLOCK_LITERAL, o = t.source ?
|
|
6175
|
+
let a = i.mode === ">" ? Y.BLOCK_FOLDED : Y.BLOCK_LITERAL, o = t.source ? fa(t.source) : [], s = o.length;
|
|
6373
6176
|
for (let e = o.length - 1; e >= 0; --e) {
|
|
6374
6177
|
let t = o[e][1];
|
|
6375
6178
|
if (t === "" || t === "\r") s = e;
|
|
@@ -6432,7 +6235,7 @@ function da(e, t, n) {
|
|
|
6432
6235
|
]
|
|
6433
6236
|
};
|
|
6434
6237
|
}
|
|
6435
|
-
function
|
|
6238
|
+
function da({ offset: e, props: t }, n, r) {
|
|
6436
6239
|
/* istanbul ignore if should not happen */
|
|
6437
6240
|
if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
6438
6241
|
let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
|
|
@@ -6475,24 +6278,24 @@ function fa({ offset: e, props: t }, n, r) {
|
|
|
6475
6278
|
length: d
|
|
6476
6279
|
};
|
|
6477
6280
|
}
|
|
6478
|
-
function
|
|
6281
|
+
function fa(e) {
|
|
6479
6282
|
let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
|
|
6480
6283
|
for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
|
|
6481
6284
|
return i;
|
|
6482
6285
|
}
|
|
6483
6286
|
//#endregion
|
|
6484
6287
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
|
|
6485
|
-
function
|
|
6288
|
+
function pa(e, t, n) {
|
|
6486
6289
|
let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
|
|
6487
6290
|
switch (i) {
|
|
6488
6291
|
case "scalar":
|
|
6489
|
-
s = Y.PLAIN, c =
|
|
6292
|
+
s = Y.PLAIN, c = ma(a, l);
|
|
6490
6293
|
break;
|
|
6491
6294
|
case "single-quoted-scalar":
|
|
6492
|
-
s = Y.QUOTE_SINGLE, c =
|
|
6295
|
+
s = Y.QUOTE_SINGLE, c = ha(a, l);
|
|
6493
6296
|
break;
|
|
6494
6297
|
case "double-quoted-scalar":
|
|
6495
|
-
s = Y.QUOTE_DOUBLE, c =
|
|
6298
|
+
s = Y.QUOTE_DOUBLE, c = _a(a, l);
|
|
6496
6299
|
break;
|
|
6497
6300
|
/* istanbul ignore next should not happen */
|
|
6498
6301
|
default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
|
|
@@ -6506,7 +6309,7 @@ function ma(e, t, n) {
|
|
|
6506
6309
|
]
|
|
6507
6310
|
};
|
|
6508
6311
|
}
|
|
6509
|
-
let u = r + a.length, d =
|
|
6312
|
+
let u = r + a.length, d = ia(o, u, t, n);
|
|
6510
6313
|
return {
|
|
6511
6314
|
value: c,
|
|
6512
6315
|
type: s,
|
|
@@ -6518,7 +6321,7 @@ function ma(e, t, n) {
|
|
|
6518
6321
|
]
|
|
6519
6322
|
};
|
|
6520
6323
|
}
|
|
6521
|
-
function
|
|
6324
|
+
function ma(e, t) {
|
|
6522
6325
|
let n = "";
|
|
6523
6326
|
switch (e[0]) {
|
|
6524
6327
|
/* istanbul ignore next should not happen */
|
|
@@ -6538,12 +6341,12 @@ function ha(e, t) {
|
|
|
6538
6341
|
case "@":
|
|
6539
6342
|
case "`": n = `reserved character ${e[0]}`;
|
|
6540
6343
|
}
|
|
6541
|
-
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`),
|
|
6344
|
+
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), ga(e);
|
|
6542
6345
|
}
|
|
6543
|
-
function
|
|
6544
|
-
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"),
|
|
6346
|
+
function ha(e, t) {
|
|
6347
|
+
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), ga(e.slice(1, -1)).replace(/''/g, "'");
|
|
6545
6348
|
}
|
|
6546
|
-
function
|
|
6349
|
+
function ga(e) {
|
|
6547
6350
|
let t, n;
|
|
6548
6351
|
try {
|
|
6549
6352
|
t = /* @__PURE__ */ RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
@@ -6557,22 +6360,22 @@ function _a(e) {
|
|
|
6557
6360
|
let s = /[ \t]*(.*)/sy;
|
|
6558
6361
|
return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
|
|
6559
6362
|
}
|
|
6560
|
-
function
|
|
6363
|
+
function _a(e, t) {
|
|
6561
6364
|
let n = "";
|
|
6562
6365
|
for (let r = 1; r < e.length - 1; ++r) {
|
|
6563
6366
|
let i = e[r];
|
|
6564
6367
|
if (i !== "\r" || e[r + 1] !== "\n") {
|
|
6565
6368
|
if (i === "\n") {
|
|
6566
|
-
let { fold: t, offset: i } =
|
|
6369
|
+
let { fold: t, offset: i } = va(e, r);
|
|
6567
6370
|
n += t, r = i;
|
|
6568
6371
|
} else if (i === "\\") {
|
|
6569
|
-
let i = e[++r], a =
|
|
6372
|
+
let i = e[++r], a = ya[i];
|
|
6570
6373
|
if (a) n += a;
|
|
6571
6374
|
else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
6572
6375
|
else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
6573
6376
|
else if (i === "x" || i === "u" || i === "U") {
|
|
6574
6377
|
let a = i === "x" ? 2 : i === "u" ? 4 : 8;
|
|
6575
|
-
n +=
|
|
6378
|
+
n += ba(e, r + 1, a, t), r += a;
|
|
6576
6379
|
} else {
|
|
6577
6380
|
let i = e.substr(r - 1, 2);
|
|
6578
6381
|
t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
|
|
@@ -6586,7 +6389,7 @@ function va(e, t) {
|
|
|
6586
6389
|
}
|
|
6587
6390
|
return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
|
|
6588
6391
|
}
|
|
6589
|
-
function
|
|
6392
|
+
function va(e, t) {
|
|
6590
6393
|
let n = "", r = e[t + 1];
|
|
6591
6394
|
for (; (r === " " || r === " " || r === "\n" || r === "\r") && (r !== "\r" || e[t + 2] === "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
|
|
6592
6395
|
return n ||= " ", {
|
|
@@ -6594,7 +6397,7 @@ function ya(e, t) {
|
|
|
6594
6397
|
offset: t
|
|
6595
6398
|
};
|
|
6596
6399
|
}
|
|
6597
|
-
var
|
|
6400
|
+
var ya = {
|
|
6598
6401
|
0: "\0",
|
|
6599
6402
|
a: "\x07",
|
|
6600
6403
|
b: "\b",
|
|
@@ -6614,7 +6417,7 @@ var ba = {
|
|
|
6614
6417
|
"\\": "\\",
|
|
6615
6418
|
" ": " "
|
|
6616
6419
|
};
|
|
6617
|
-
function
|
|
6420
|
+
function ba(e, t, n, r) {
|
|
6618
6421
|
let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
|
|
6619
6422
|
try {
|
|
6620
6423
|
return String.fromCodePoint(a);
|
|
@@ -6625,9 +6428,9 @@ function xa(e, t, n, r) {
|
|
|
6625
6428
|
}
|
|
6626
6429
|
//#endregion
|
|
6627
6430
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js
|
|
6628
|
-
function
|
|
6629
|
-
let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ?
|
|
6630
|
-
l = e.options.stringKeys && e.atKey ? e.schema[
|
|
6431
|
+
function xa(e, t, n, r) {
|
|
6432
|
+
let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? ua(e, t, r) : pa(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
|
|
6433
|
+
l = e.options.stringKeys && e.atKey ? e.schema[En] : c ? Sa(e.schema, i, c, n, r) : t.type === "scalar" ? Ca(e, i, t, r) : e.schema[En];
|
|
6631
6434
|
let u;
|
|
6632
6435
|
try {
|
|
6633
6436
|
let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
|
|
@@ -6638,8 +6441,8 @@ function Sa(e, t, n, r) {
|
|
|
6638
6441
|
}
|
|
6639
6442
|
return u.range = s, u.source = i, a && (u.type = a), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
|
|
6640
6443
|
}
|
|
6641
|
-
function
|
|
6642
|
-
if (n === "!") return e[
|
|
6444
|
+
function Sa(e, t, n, r, i) {
|
|
6445
|
+
if (n === "!") return e[En];
|
|
6643
6446
|
let a = [];
|
|
6644
6447
|
for (let t of e.tags) if (!t.collection && t.tag === n) {
|
|
6645
6448
|
if (t.default && t.test) a.push(t);
|
|
@@ -6650,19 +6453,19 @@ function Ca(e, t, n, r, i) {
|
|
|
6650
6453
|
return o && !o.collection ? (e.tags.push(Object.assign({}, o, {
|
|
6651
6454
|
default: !1,
|
|
6652
6455
|
test: void 0
|
|
6653
|
-
})), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[
|
|
6456
|
+
})), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[En]);
|
|
6654
6457
|
}
|
|
6655
|
-
function
|
|
6656
|
-
let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[
|
|
6458
|
+
function Ca({ atKey: e, directives: t, schema: n }, r, i, a) {
|
|
6459
|
+
let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[En];
|
|
6657
6460
|
if (n.compat) {
|
|
6658
|
-
let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[
|
|
6461
|
+
let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[En];
|
|
6659
6462
|
o.tag !== e.tag && a(i, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`, !0);
|
|
6660
6463
|
}
|
|
6661
6464
|
return o;
|
|
6662
6465
|
}
|
|
6663
6466
|
//#endregion
|
|
6664
6467
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
|
|
6665
|
-
function
|
|
6468
|
+
function wa(e, t, n) {
|
|
6666
6469
|
if (t) {
|
|
6667
6470
|
n ??= t.length;
|
|
6668
6471
|
for (let r = n - 1; r >= 0; --r) {
|
|
@@ -6682,48 +6485,48 @@ function Ta(e, t, n) {
|
|
|
6682
6485
|
}
|
|
6683
6486
|
//#endregion
|
|
6684
6487
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js
|
|
6685
|
-
var
|
|
6686
|
-
composeNode:
|
|
6687
|
-
composeEmptyNode:
|
|
6488
|
+
var Ta = {
|
|
6489
|
+
composeNode: Ea,
|
|
6490
|
+
composeEmptyNode: Da
|
|
6688
6491
|
};
|
|
6689
|
-
function
|
|
6492
|
+
function Ea(e, t, n, r) {
|
|
6690
6493
|
let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
|
|
6691
6494
|
switch (t.type) {
|
|
6692
6495
|
case "alias":
|
|
6693
|
-
l =
|
|
6496
|
+
l = Oa(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
6694
6497
|
break;
|
|
6695
6498
|
case "scalar":
|
|
6696
6499
|
case "single-quoted-scalar":
|
|
6697
6500
|
case "double-quoted-scalar":
|
|
6698
6501
|
case "block-scalar":
|
|
6699
|
-
l =
|
|
6502
|
+
l = xa(e, t, c, r), s && (l.anchor = s.source.substring(1));
|
|
6700
6503
|
break;
|
|
6701
6504
|
case "block-map":
|
|
6702
6505
|
case "block-seq":
|
|
6703
6506
|
case "flow-collection":
|
|
6704
6507
|
try {
|
|
6705
|
-
l =
|
|
6508
|
+
l = la(Ta, e, t, n, r), s && (l.anchor = s.source.substring(1));
|
|
6706
6509
|
} catch (e) {
|
|
6707
6510
|
r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
|
|
6708
6511
|
}
|
|
6709
6512
|
break;
|
|
6710
6513
|
default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
|
|
6711
6514
|
}
|
|
6712
|
-
return l ??=
|
|
6515
|
+
return l ??= Da(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!W(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
|
|
6713
6516
|
}
|
|
6714
|
-
function
|
|
6715
|
-
let u =
|
|
6517
|
+
function Da(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
|
|
6518
|
+
let u = xa(e, {
|
|
6716
6519
|
type: "scalar",
|
|
6717
|
-
offset:
|
|
6520
|
+
offset: wa(t, n, r),
|
|
6718
6521
|
indent: -1,
|
|
6719
6522
|
source: ""
|
|
6720
6523
|
}, s, l);
|
|
6721
6524
|
return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
|
|
6722
6525
|
}
|
|
6723
|
-
function
|
|
6724
|
-
let a = new
|
|
6526
|
+
function Oa({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
6527
|
+
let a = new Zn(n.substring(1));
|
|
6725
6528
|
a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
|
|
6726
|
-
let o = t + n.length, s =
|
|
6529
|
+
let o = t + n.length, s = ia(r, o, e.strict, i);
|
|
6727
6530
|
return a.range = [
|
|
6728
6531
|
t,
|
|
6729
6532
|
o,
|
|
@@ -6732,14 +6535,14 @@ function ka({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
|
6732
6535
|
}
|
|
6733
6536
|
//#endregion
|
|
6734
6537
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js
|
|
6735
|
-
function
|
|
6736
|
-
let s = new
|
|
6538
|
+
function ka(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
6539
|
+
let s = new Gi(void 0, Object.assign({ _directives: t }, e)), c = {
|
|
6737
6540
|
atKey: !1,
|
|
6738
6541
|
atRoot: !0,
|
|
6739
6542
|
directives: s.directives,
|
|
6740
6543
|
options: s.options,
|
|
6741
6544
|
schema: s.schema
|
|
6742
|
-
}, l =
|
|
6545
|
+
}, l = Zi(r, {
|
|
6743
6546
|
indicator: "doc-start",
|
|
6744
6547
|
next: i ?? a?.[0],
|
|
6745
6548
|
offset: n,
|
|
@@ -6747,8 +6550,8 @@ function Aa(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
6747
6550
|
parentIndent: 0,
|
|
6748
6551
|
startOnNewline: !0
|
|
6749
6552
|
});
|
|
6750
|
-
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ?
|
|
6751
|
-
let u = s.contents.range[2], d =
|
|
6553
|
+
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Ea(c, i, l, o) : Da(c, l.end, r, null, l, o);
|
|
6554
|
+
let u = s.contents.range[2], d = ia(a, u, !1, o);
|
|
6752
6555
|
return d.comment && (s.comment = d.comment), s.range = [
|
|
6753
6556
|
n,
|
|
6754
6557
|
u,
|
|
@@ -6757,13 +6560,13 @@ function Aa(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
6757
6560
|
}
|
|
6758
6561
|
//#endregion
|
|
6759
6562
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js
|
|
6760
|
-
function
|
|
6563
|
+
function Aa(e) {
|
|
6761
6564
|
if (typeof e == "number") return [e, e + 1];
|
|
6762
6565
|
if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
|
|
6763
6566
|
let { offset: t, source: n } = e;
|
|
6764
6567
|
return [t, t + (typeof n == "string" ? n.length : 1)];
|
|
6765
6568
|
}
|
|
6766
|
-
function
|
|
6569
|
+
function ja(e) {
|
|
6767
6570
|
let t = "", n = !1, r = !1;
|
|
6768
6571
|
for (let i = 0; i < e.length; ++i) {
|
|
6769
6572
|
let a = e[i];
|
|
@@ -6782,15 +6585,15 @@ function Ma(e) {
|
|
|
6782
6585
|
afterEmptyLine: r
|
|
6783
6586
|
};
|
|
6784
6587
|
}
|
|
6785
|
-
var
|
|
6588
|
+
var Ma = class {
|
|
6786
6589
|
constructor(e = {}) {
|
|
6787
6590
|
this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
|
|
6788
|
-
let i =
|
|
6789
|
-
r ? this.warnings.push(new
|
|
6790
|
-
}, this.directives = new
|
|
6591
|
+
let i = Aa(e);
|
|
6592
|
+
r ? this.warnings.push(new Yi(i, t, n)) : this.errors.push(new Ji(i, t, n));
|
|
6593
|
+
}, this.directives = new Wn({ version: e.version || "1.2" }), this.options = e;
|
|
6791
6594
|
}
|
|
6792
6595
|
decorate(e, t) {
|
|
6793
|
-
let { comment: n, afterEmptyLine: r } =
|
|
6596
|
+
let { comment: n, afterEmptyLine: r } = ja(this.prelude);
|
|
6794
6597
|
if (n) {
|
|
6795
6598
|
let i = e.contents;
|
|
6796
6599
|
if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
|
|
@@ -6813,7 +6616,7 @@ var Na = class {
|
|
|
6813
6616
|
}
|
|
6814
6617
|
streamInfo() {
|
|
6815
6618
|
return {
|
|
6816
|
-
comment:
|
|
6619
|
+
comment: ja(this.prelude).comment,
|
|
6817
6620
|
directives: this.directives,
|
|
6818
6621
|
errors: this.errors,
|
|
6819
6622
|
warnings: this.warnings
|
|
@@ -6827,12 +6630,12 @@ var Na = class {
|
|
|
6827
6630
|
switch (e.type) {
|
|
6828
6631
|
case "directive":
|
|
6829
6632
|
this.directives.add(e.source, (t, n, r) => {
|
|
6830
|
-
let i =
|
|
6633
|
+
let i = Aa(e);
|
|
6831
6634
|
i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
|
|
6832
6635
|
}), this.prelude.push(e.source), this.atDirectives = !0;
|
|
6833
6636
|
break;
|
|
6834
6637
|
case "document": {
|
|
6835
|
-
let t =
|
|
6638
|
+
let t = ka(this.options, this.directives, e, this.onError);
|
|
6836
6639
|
this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
|
|
6837
6640
|
break;
|
|
6838
6641
|
}
|
|
@@ -6843,17 +6646,17 @@ var Na = class {
|
|
|
6843
6646
|
this.prelude.push(e.source);
|
|
6844
6647
|
break;
|
|
6845
6648
|
case "error": {
|
|
6846
|
-
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new
|
|
6649
|
+
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new Ji(Aa(e), "UNEXPECTED_TOKEN", t);
|
|
6847
6650
|
this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
|
|
6848
6651
|
break;
|
|
6849
6652
|
}
|
|
6850
6653
|
case "doc-end": {
|
|
6851
6654
|
if (!this.doc) {
|
|
6852
|
-
this.errors.push(new
|
|
6655
|
+
this.errors.push(new Ji(Aa(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
|
|
6853
6656
|
break;
|
|
6854
6657
|
}
|
|
6855
6658
|
this.doc.directives.docEnd = !0;
|
|
6856
|
-
let t =
|
|
6659
|
+
let t = ia(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
|
|
6857
6660
|
if (this.decorate(this.doc, !0), t.comment) {
|
|
6858
6661
|
let e = this.doc.comment;
|
|
6859
6662
|
this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
|
|
@@ -6861,13 +6664,13 @@ var Na = class {
|
|
|
6861
6664
|
this.doc.range[2] = t.offset;
|
|
6862
6665
|
break;
|
|
6863
6666
|
}
|
|
6864
|
-
default: this.errors.push(new
|
|
6667
|
+
default: this.errors.push(new Ji(Aa(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
|
|
6865
6668
|
}
|
|
6866
6669
|
}
|
|
6867
6670
|
*end(e = !1, t = -1) {
|
|
6868
6671
|
if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
|
|
6869
6672
|
else if (e) {
|
|
6870
|
-
let e = new
|
|
6673
|
+
let e = new Gi(void 0, Object.assign({ _directives: this.directives }, this.options));
|
|
6871
6674
|
this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
|
|
6872
6675
|
0,
|
|
6873
6676
|
t,
|
|
@@ -6878,24 +6681,24 @@ var Na = class {
|
|
|
6878
6681
|
};
|
|
6879
6682
|
//#endregion
|
|
6880
6683
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js
|
|
6881
|
-
function
|
|
6684
|
+
function Na(e, t = !0, n) {
|
|
6882
6685
|
if (e) {
|
|
6883
6686
|
let r = (e, t, r) => {
|
|
6884
6687
|
let i = typeof e == "number" ? e : Array.isArray(e) ? e[0] : e.offset;
|
|
6885
6688
|
if (n) n(i, t, r);
|
|
6886
|
-
else throw new
|
|
6689
|
+
else throw new Ji([i, i + 1], t, r);
|
|
6887
6690
|
};
|
|
6888
6691
|
switch (e.type) {
|
|
6889
6692
|
case "scalar":
|
|
6890
6693
|
case "single-quoted-scalar":
|
|
6891
|
-
case "double-quoted-scalar": return
|
|
6892
|
-
case "block-scalar": return
|
|
6694
|
+
case "double-quoted-scalar": return pa(e, t, r);
|
|
6695
|
+
case "block-scalar": return ua({ options: { strict: t } }, e, r);
|
|
6893
6696
|
}
|
|
6894
6697
|
}
|
|
6895
6698
|
return null;
|
|
6896
6699
|
}
|
|
6897
|
-
function
|
|
6898
|
-
let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s =
|
|
6700
|
+
function Pa(e, t) {
|
|
6701
|
+
let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Cr({
|
|
6899
6702
|
type: o,
|
|
6900
6703
|
value: e
|
|
6901
6704
|
}, {
|
|
@@ -6921,7 +6724,7 @@ function Fa(e, t) {
|
|
|
6921
6724
|
indent: r,
|
|
6922
6725
|
source: t
|
|
6923
6726
|
}];
|
|
6924
|
-
return
|
|
6727
|
+
return La(i, c) || i.push({
|
|
6925
6728
|
type: "newline",
|
|
6926
6729
|
offset: -1,
|
|
6927
6730
|
indent: r,
|
|
@@ -6957,7 +6760,7 @@ function Fa(e, t) {
|
|
|
6957
6760
|
};
|
|
6958
6761
|
}
|
|
6959
6762
|
}
|
|
6960
|
-
function
|
|
6763
|
+
function Fa(e, t, n = {}) {
|
|
6961
6764
|
let { afterKey: r = !1, implicitKey: i = !1, inFlow: a = !1, type: o } = n, s = "indent" in e ? e.indent : null;
|
|
6962
6765
|
if (r && typeof s == "number" && (s += 2), !o) switch (e.type) {
|
|
6963
6766
|
case "single-quoted-scalar":
|
|
@@ -6974,7 +6777,7 @@ function Ia(e, t, n = {}) {
|
|
|
6974
6777
|
}
|
|
6975
6778
|
default: o = "PLAIN";
|
|
6976
6779
|
}
|
|
6977
|
-
let c =
|
|
6780
|
+
let c = Cr({
|
|
6978
6781
|
type: o,
|
|
6979
6782
|
value: t
|
|
6980
6783
|
}, {
|
|
@@ -6989,18 +6792,18 @@ function Ia(e, t, n = {}) {
|
|
|
6989
6792
|
switch (c[0]) {
|
|
6990
6793
|
case "|":
|
|
6991
6794
|
case ">":
|
|
6992
|
-
|
|
6795
|
+
Ia(e, c);
|
|
6993
6796
|
break;
|
|
6994
6797
|
case "\"":
|
|
6995
|
-
|
|
6798
|
+
Ra(e, c, "double-quoted-scalar");
|
|
6996
6799
|
break;
|
|
6997
6800
|
case "'":
|
|
6998
|
-
|
|
6801
|
+
Ra(e, c, "single-quoted-scalar");
|
|
6999
6802
|
break;
|
|
7000
|
-
default:
|
|
6803
|
+
default: Ra(e, c, "scalar");
|
|
7001
6804
|
}
|
|
7002
6805
|
}
|
|
7003
|
-
function
|
|
6806
|
+
function Ia(e, t) {
|
|
7004
6807
|
let n = t.indexOf("\n"), r = t.substring(0, n), i = t.substring(n + 1) + "\n";
|
|
7005
6808
|
if (e.type === "block-scalar") {
|
|
7006
6809
|
let t = e.props[0];
|
|
@@ -7013,7 +6816,7 @@ function La(e, t) {
|
|
|
7013
6816
|
indent: n,
|
|
7014
6817
|
source: r
|
|
7015
6818
|
}];
|
|
7016
|
-
|
|
6819
|
+
La(a, "end" in e ? e.end : void 0) || a.push({
|
|
7017
6820
|
type: "newline",
|
|
7018
6821
|
offset: -1,
|
|
7019
6822
|
indent: n,
|
|
@@ -7028,7 +6831,7 @@ function La(e, t) {
|
|
|
7028
6831
|
});
|
|
7029
6832
|
}
|
|
7030
6833
|
}
|
|
7031
|
-
function
|
|
6834
|
+
function La(e, t) {
|
|
7032
6835
|
if (t) for (let n of t) switch (n.type) {
|
|
7033
6836
|
case "space":
|
|
7034
6837
|
case "comment":
|
|
@@ -7038,7 +6841,7 @@ function Ra(e, t) {
|
|
|
7038
6841
|
}
|
|
7039
6842
|
return !1;
|
|
7040
6843
|
}
|
|
7041
|
-
function
|
|
6844
|
+
function Ra(e, t, n) {
|
|
7042
6845
|
switch (e.type) {
|
|
7043
6846
|
case "scalar":
|
|
7044
6847
|
case "double-quoted-scalar":
|
|
@@ -7085,28 +6888,28 @@ function za(e, t, n) {
|
|
|
7085
6888
|
}
|
|
7086
6889
|
//#endregion
|
|
7087
6890
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-stringify.js
|
|
7088
|
-
var
|
|
7089
|
-
function
|
|
6891
|
+
var za = (e) => "type" in e ? Ba(e) : Va(e);
|
|
6892
|
+
function Ba(e) {
|
|
7090
6893
|
switch (e.type) {
|
|
7091
6894
|
case "block-scalar": {
|
|
7092
6895
|
let t = "";
|
|
7093
|
-
for (let n of e.props) t +=
|
|
6896
|
+
for (let n of e.props) t += Ba(n);
|
|
7094
6897
|
return t + e.source;
|
|
7095
6898
|
}
|
|
7096
6899
|
case "block-map":
|
|
7097
6900
|
case "block-seq": {
|
|
7098
6901
|
let t = "";
|
|
7099
|
-
for (let n of e.items) t +=
|
|
6902
|
+
for (let n of e.items) t += Va(n);
|
|
7100
6903
|
return t;
|
|
7101
6904
|
}
|
|
7102
6905
|
case "flow-collection": {
|
|
7103
6906
|
let t = e.start.source;
|
|
7104
|
-
for (let n of e.items) t +=
|
|
6907
|
+
for (let n of e.items) t += Va(n);
|
|
7105
6908
|
for (let n of e.end) t += n.source;
|
|
7106
6909
|
return t;
|
|
7107
6910
|
}
|
|
7108
6911
|
case "document": {
|
|
7109
|
-
let t =
|
|
6912
|
+
let t = Va(e);
|
|
7110
6913
|
if (e.end) for (let n of e.end) t += n.source;
|
|
7111
6914
|
return t;
|
|
7112
6915
|
}
|
|
@@ -7117,22 +6920,22 @@ function Va(e) {
|
|
|
7117
6920
|
}
|
|
7118
6921
|
}
|
|
7119
6922
|
}
|
|
7120
|
-
function
|
|
6923
|
+
function Va({ start: e, key: t, sep: n, value: r }) {
|
|
7121
6924
|
let i = "";
|
|
7122
6925
|
for (let t of e) i += t.source;
|
|
7123
|
-
if (t && (i +=
|
|
7124
|
-
return r && (i +=
|
|
6926
|
+
if (t && (i += Ba(t)), n) for (let e of n) i += e.source;
|
|
6927
|
+
return r && (i += Ba(r)), i;
|
|
7125
6928
|
}
|
|
7126
6929
|
//#endregion
|
|
7127
6930
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
7128
|
-
var
|
|
7129
|
-
function
|
|
6931
|
+
var Ha = Symbol("break visit"), Ua = Symbol("skip children"), Wa = Symbol("remove item");
|
|
6932
|
+
function Ga(e, t) {
|
|
7130
6933
|
"type" in e && e.type === "document" && (e = {
|
|
7131
6934
|
start: e.start,
|
|
7132
6935
|
value: e.value
|
|
7133
|
-
}),
|
|
6936
|
+
}), Ka(Object.freeze([]), e, t);
|
|
7134
6937
|
}
|
|
7135
|
-
|
|
6938
|
+
Ga.BREAK = Ha, Ga.SKIP = Ua, Ga.REMOVE = Wa, Ga.itemAtPath = (e, t) => {
|
|
7136
6939
|
let n = e;
|
|
7137
6940
|
for (let [e, r] of t) {
|
|
7138
6941
|
let t = n?.[e];
|
|
@@ -7140,22 +6943,22 @@ Ka.BREAK = Ua, Ka.SKIP = Wa, Ka.REMOVE = Ga, Ka.itemAtPath = (e, t) => {
|
|
|
7140
6943
|
else return;
|
|
7141
6944
|
}
|
|
7142
6945
|
return n;
|
|
7143
|
-
},
|
|
7144
|
-
let n =
|
|
6946
|
+
}, Ga.parentCollection = (e, t) => {
|
|
6947
|
+
let n = Ga.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
|
|
7145
6948
|
if (i && "items" in i) return i;
|
|
7146
6949
|
throw Error("Parent collection not found");
|
|
7147
6950
|
};
|
|
7148
|
-
function
|
|
6951
|
+
function Ka(e, t, n) {
|
|
7149
6952
|
let r = n(t, e);
|
|
7150
6953
|
if (typeof r == "symbol") return r;
|
|
7151
6954
|
for (let i of ["key", "value"]) {
|
|
7152
6955
|
let a = t[i];
|
|
7153
6956
|
if (a && "items" in a) {
|
|
7154
6957
|
for (let t = 0; t < a.items.length; ++t) {
|
|
7155
|
-
let r =
|
|
6958
|
+
let r = Ka(Object.freeze(e.concat([[i, t]])), a.items[t], n);
|
|
7156
6959
|
if (typeof r == "number") t = r - 1;
|
|
7157
|
-
else if (r ===
|
|
7158
|
-
else r ===
|
|
6960
|
+
else if (r === Ha) return Ha;
|
|
6961
|
+
else r === Wa && (a.items.splice(t, 1), --t);
|
|
7159
6962
|
}
|
|
7160
6963
|
typeof r == "function" && i === "key" && (r = r(t, e));
|
|
7161
6964
|
}
|
|
@@ -7164,23 +6967,23 @@ function qa(e, t, n) {
|
|
|
7164
6967
|
}
|
|
7165
6968
|
//#endregion
|
|
7166
6969
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js
|
|
7167
|
-
var
|
|
6970
|
+
var qa = /* @__PURE__ */ ee({
|
|
7168
6971
|
BOM: () => "",
|
|
7169
6972
|
DOCUMENT: () => "",
|
|
7170
6973
|
FLOW_END: () => "",
|
|
7171
6974
|
SCALAR: () => "",
|
|
7172
|
-
createScalarToken: () =>
|
|
7173
|
-
isCollection: () =>
|
|
7174
|
-
isScalar: () =>
|
|
7175
|
-
prettyToken: () =>
|
|
7176
|
-
resolveAsScalar: () =>
|
|
7177
|
-
setScalarValue: () =>
|
|
7178
|
-
stringify: () =>
|
|
7179
|
-
tokenType: () =>
|
|
7180
|
-
visit: () =>
|
|
7181
|
-
}),
|
|
6975
|
+
createScalarToken: () => Pa,
|
|
6976
|
+
isCollection: () => Ja,
|
|
6977
|
+
isScalar: () => Ya,
|
|
6978
|
+
prettyToken: () => Xa,
|
|
6979
|
+
resolveAsScalar: () => Na,
|
|
6980
|
+
setScalarValue: () => Fa,
|
|
6981
|
+
stringify: () => za,
|
|
6982
|
+
tokenType: () => Za,
|
|
6983
|
+
visit: () => Ga
|
|
6984
|
+
}), Ja = (e) => !!e && "items" in e, Ya = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
|
|
7182
6985
|
/* istanbul ignore next */
|
|
7183
|
-
function
|
|
6986
|
+
function Xa(e) {
|
|
7184
6987
|
switch (e) {
|
|
7185
6988
|
case "": return "<BOM>";
|
|
7186
6989
|
case "": return "<DOC>";
|
|
@@ -7189,7 +6992,7 @@ function Za(e) {
|
|
|
7189
6992
|
default: return JSON.stringify(e);
|
|
7190
6993
|
}
|
|
7191
6994
|
}
|
|
7192
|
-
function
|
|
6995
|
+
function Za(e) {
|
|
7193
6996
|
switch (e) {
|
|
7194
6997
|
case "": return "byte-order-mark";
|
|
7195
6998
|
case "": return "doc-mode";
|
|
@@ -7226,7 +7029,7 @@ function Qa(e) {
|
|
|
7226
7029
|
}
|
|
7227
7030
|
//#endregion
|
|
7228
7031
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js
|
|
7229
|
-
function
|
|
7032
|
+
function Qa(e) {
|
|
7230
7033
|
switch (e) {
|
|
7231
7034
|
case void 0:
|
|
7232
7035
|
case " ":
|
|
@@ -7236,7 +7039,7 @@ function $a(e) {
|
|
|
7236
7039
|
default: return !1;
|
|
7237
7040
|
}
|
|
7238
7041
|
}
|
|
7239
|
-
var
|
|
7042
|
+
var $a = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), eo = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), to = /* @__PURE__ */ new Set(",[]{}"), no = /* @__PURE__ */ new Set(" ,[]{}\n\r "), ro = (e) => !e || no.has(e), io = class {
|
|
7240
7043
|
constructor() {
|
|
7241
7044
|
this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
|
|
7242
7045
|
}
|
|
@@ -7270,7 +7073,7 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7270
7073
|
}
|
|
7271
7074
|
if (t === "-" || t === ".") {
|
|
7272
7075
|
let t = this.buffer.substr(e, 3);
|
|
7273
|
-
if ((t === "---" || t === "...") &&
|
|
7076
|
+
if ((t === "---" || t === "...") && Qa(this.buffer[e + 3])) return -1;
|
|
7274
7077
|
}
|
|
7275
7078
|
return e;
|
|
7276
7079
|
}
|
|
@@ -7332,14 +7135,14 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7332
7135
|
if (e === "-" || e === ".") {
|
|
7333
7136
|
if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
|
|
7334
7137
|
let e = this.peek(3);
|
|
7335
|
-
if ((e === "---" || e === "...") &&
|
|
7138
|
+
if ((e === "---" || e === "...") && Qa(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
|
|
7336
7139
|
}
|
|
7337
|
-
return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue &&
|
|
7140
|
+
return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !Qa(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
|
|
7338
7141
|
}
|
|
7339
7142
|
*parseBlockStart() {
|
|
7340
7143
|
let [e, t] = this.peek(2);
|
|
7341
7144
|
if (!t && !this.atEnd) return this.setNext("block-start");
|
|
7342
|
-
if ((e === "-" || e === "?" || e === ":") &&
|
|
7145
|
+
if ((e === "-" || e === "?" || e === ":") && Qa(t)) {
|
|
7343
7146
|
let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
|
|
7344
7147
|
return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
|
|
7345
7148
|
}
|
|
@@ -7357,7 +7160,7 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7357
7160
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
|
|
7358
7161
|
case "}":
|
|
7359
7162
|
case "]": return yield* this.pushCount(1), "doc";
|
|
7360
|
-
case "*": return yield* this.pushUntil(
|
|
7163
|
+
case "*": return yield* this.pushUntil(ro), "doc";
|
|
7361
7164
|
case "\"":
|
|
7362
7165
|
case "'": return yield* this.parseQuotedScalar();
|
|
7363
7166
|
case "|":
|
|
@@ -7372,7 +7175,7 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7372
7175
|
while (e + t > 0);
|
|
7373
7176
|
let r = this.getLine();
|
|
7374
7177
|
if (r === null) return this.setNext("flow");
|
|
7375
|
-
if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) &&
|
|
7178
|
+
if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && Qa(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
|
|
7376
7179
|
let i = 0;
|
|
7377
7180
|
for (; r[i] === ",";) i += yield* this.pushCount(1), i += yield* this.pushSpaces(!0), this.flowKey = !1;
|
|
7378
7181
|
switch (i += yield* this.pushIndicators(), r[i]) {
|
|
@@ -7382,12 +7185,12 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7382
7185
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
|
|
7383
7186
|
case "}":
|
|
7384
7187
|
case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
|
|
7385
|
-
case "*": return yield* this.pushUntil(
|
|
7188
|
+
case "*": return yield* this.pushUntil(ro), "flow";
|
|
7386
7189
|
case "\"":
|
|
7387
7190
|
case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
|
|
7388
7191
|
case ":": {
|
|
7389
7192
|
let e = this.charAt(1);
|
|
7390
|
-
if (this.flowKey ||
|
|
7193
|
+
if (this.flowKey || Qa(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
|
|
7391
7194
|
}
|
|
7392
7195
|
default: return this.flowKey = !1, yield* this.parsePlainScalar();
|
|
7393
7196
|
}
|
|
@@ -7425,7 +7228,7 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7425
7228
|
else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
|
|
7426
7229
|
else if (t !== "-") break;
|
|
7427
7230
|
}
|
|
7428
|
-
return yield* this.pushUntil((e) =>
|
|
7231
|
+
return yield* this.pushUntil((e) => Qa(e) || e === "#");
|
|
7429
7232
|
}
|
|
7430
7233
|
*parseBlockScalar() {
|
|
7431
7234
|
let e = this.pos - 1, t = 0, n;
|
|
@@ -7475,18 +7278,18 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7475
7278
|
let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
|
|
7476
7279
|
for (; r = this.buffer[++n];) if (r === ":") {
|
|
7477
7280
|
let r = this.buffer[n + 1];
|
|
7478
|
-
if (
|
|
7281
|
+
if (Qa(r) || e && to.has(r)) break;
|
|
7479
7282
|
t = n;
|
|
7480
|
-
} else if (
|
|
7283
|
+
} else if (Qa(r)) {
|
|
7481
7284
|
let i = this.buffer[n + 1];
|
|
7482
|
-
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e &&
|
|
7285
|
+
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && to.has(i)) break;
|
|
7483
7286
|
if (r === "\n") {
|
|
7484
7287
|
let e = this.continueScalar(n + 1);
|
|
7485
7288
|
if (e === -1) break;
|
|
7486
7289
|
n = Math.max(n, e - 2);
|
|
7487
7290
|
}
|
|
7488
7291
|
} else {
|
|
7489
|
-
if (e &&
|
|
7292
|
+
if (e && to.has(r)) break;
|
|
7490
7293
|
t = n;
|
|
7491
7294
|
}
|
|
7492
7295
|
return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
|
|
@@ -7506,13 +7309,13 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7506
7309
|
e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
|
|
7507
7310
|
continue loop;
|
|
7508
7311
|
case "&":
|
|
7509
|
-
e += yield* this.pushUntil(
|
|
7312
|
+
e += yield* this.pushUntil(ro), e += yield* this.pushSpaces(!0);
|
|
7510
7313
|
continue loop;
|
|
7511
7314
|
case "-":
|
|
7512
7315
|
case "?":
|
|
7513
7316
|
case ":": {
|
|
7514
7317
|
let t = this.flowLevel > 0, n = this.charAt(1);
|
|
7515
|
-
if (
|
|
7318
|
+
if (Qa(n) || t && to.has(n)) {
|
|
7516
7319
|
t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
|
|
7517
7320
|
continue loop;
|
|
7518
7321
|
}
|
|
@@ -7525,13 +7328,13 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7525
7328
|
*pushTag() {
|
|
7526
7329
|
if (this.charAt(1) === "<") {
|
|
7527
7330
|
let e = this.pos + 2, t = this.buffer[e];
|
|
7528
|
-
for (;
|
|
7331
|
+
for (; !Qa(t) && t !== ">";) t = this.buffer[++e];
|
|
7529
7332
|
return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
|
|
7530
7333
|
}
|
|
7531
7334
|
{
|
|
7532
7335
|
let e = this.pos + 1, t = this.buffer[e];
|
|
7533
|
-
for (; t;) if (
|
|
7534
|
-
else if (t === "%" &&
|
|
7336
|
+
for (; t;) if (eo.has(t)) t = this.buffer[++e];
|
|
7337
|
+
else if (t === "%" && $a.has(this.buffer[e + 1]) && $a.has(this.buffer[e + 2])) t = this.buffer[e += 3];
|
|
7535
7338
|
else break;
|
|
7536
7339
|
return yield* this.pushToIndex(e, !1);
|
|
7537
7340
|
}
|
|
@@ -7553,7 +7356,7 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7553
7356
|
for (; !e(n);) n = this.buffer[++t];
|
|
7554
7357
|
return yield* this.pushToIndex(t, !1);
|
|
7555
7358
|
}
|
|
7556
|
-
},
|
|
7359
|
+
}, ao = class {
|
|
7557
7360
|
constructor() {
|
|
7558
7361
|
this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
|
|
7559
7362
|
let t = 0, n = this.lineStarts.length;
|
|
@@ -7579,11 +7382,11 @@ var eo = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), to = /* @__PURE__ */
|
|
|
7579
7382
|
};
|
|
7580
7383
|
//#endregion
|
|
7581
7384
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js
|
|
7582
|
-
function
|
|
7385
|
+
function oo(e, t) {
|
|
7583
7386
|
for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
|
|
7584
7387
|
return !1;
|
|
7585
7388
|
}
|
|
7586
|
-
function
|
|
7389
|
+
function so(e) {
|
|
7587
7390
|
for (let t = 0; t < e.length; ++t) switch (e[t].type) {
|
|
7588
7391
|
case "space":
|
|
7589
7392
|
case "comment":
|
|
@@ -7592,7 +7395,7 @@ function co(e) {
|
|
|
7592
7395
|
}
|
|
7593
7396
|
return -1;
|
|
7594
7397
|
}
|
|
7595
|
-
function
|
|
7398
|
+
function co(e) {
|
|
7596
7399
|
switch (e?.type) {
|
|
7597
7400
|
case "alias":
|
|
7598
7401
|
case "scalar":
|
|
@@ -7602,7 +7405,7 @@ function lo(e) {
|
|
|
7602
7405
|
default: return !1;
|
|
7603
7406
|
}
|
|
7604
7407
|
}
|
|
7605
|
-
function
|
|
7408
|
+
function lo(e) {
|
|
7606
7409
|
switch (e.type) {
|
|
7607
7410
|
case "document": return e.start;
|
|
7608
7411
|
case "block-map": {
|
|
@@ -7614,7 +7417,7 @@ function uo(e) {
|
|
|
7614
7417
|
default: return [];
|
|
7615
7418
|
}
|
|
7616
7419
|
}
|
|
7617
|
-
function
|
|
7420
|
+
function uo(e) {
|
|
7618
7421
|
if (e.length === 0) return [];
|
|
7619
7422
|
let t = e.length;
|
|
7620
7423
|
loop: for (; --t >= 0;) switch (e[t].type) {
|
|
@@ -7627,16 +7430,16 @@ function fo(e) {
|
|
|
7627
7430
|
for (; e[++t]?.type === "space";);
|
|
7628
7431
|
return e.splice(t, e.length);
|
|
7629
7432
|
}
|
|
7630
|
-
function
|
|
7433
|
+
function fo(e, t) {
|
|
7631
7434
|
if (t.length < 1e5) Array.prototype.push.apply(e, t);
|
|
7632
7435
|
else for (let n = 0; n < t.length; ++n) e.push(t[n]);
|
|
7633
7436
|
}
|
|
7634
|
-
function
|
|
7635
|
-
if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !
|
|
7437
|
+
function po(e) {
|
|
7438
|
+
if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !oo(t.start, "explicit-key-ind") && !oo(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, co(t.value) ? t.value.end ? fo(t.value.end, t.sep) : t.value.end = t.sep : fo(t.start, t.sep), delete t.sep);
|
|
7636
7439
|
}
|
|
7637
|
-
var
|
|
7440
|
+
var mo = class {
|
|
7638
7441
|
constructor(e) {
|
|
7639
|
-
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new
|
|
7442
|
+
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new io(), this.onNewLine = e;
|
|
7640
7443
|
}
|
|
7641
7444
|
*parse(e, t = !1) {
|
|
7642
7445
|
this.onNewLine && this.offset === 0 && this.onNewLine(0);
|
|
@@ -7648,7 +7451,7 @@ var ho = class {
|
|
|
7648
7451
|
this.atScalar = !1, yield* this.step(), this.offset += e.length;
|
|
7649
7452
|
return;
|
|
7650
7453
|
}
|
|
7651
|
-
let t =
|
|
7454
|
+
let t = Za(e);
|
|
7652
7455
|
if (!t) {
|
|
7653
7456
|
let t = `Not a YAML token: ${e}`;
|
|
7654
7457
|
yield* this.pop({
|
|
@@ -7731,7 +7534,7 @@ var ho = class {
|
|
|
7731
7534
|
else if (this.stack.length === 0) yield t;
|
|
7732
7535
|
else {
|
|
7733
7536
|
let e = this.peek(1);
|
|
7734
|
-
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" &&
|
|
7537
|
+
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && po(t), e.type) {
|
|
7735
7538
|
case "document":
|
|
7736
7539
|
e.value = t;
|
|
7737
7540
|
break;
|
|
@@ -7783,7 +7586,7 @@ var ho = class {
|
|
|
7783
7586
|
}
|
|
7784
7587
|
if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
7785
7588
|
let n = t.items[t.items.length - 1];
|
|
7786
|
-
n && !n.sep && !n.value && n.start.length > 0 &&
|
|
7589
|
+
n && !n.sep && !n.value && n.start.length > 0 && so(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
|
|
7787
7590
|
}
|
|
7788
7591
|
}
|
|
7789
7592
|
}
|
|
@@ -7824,7 +7627,7 @@ var ho = class {
|
|
|
7824
7627
|
if (e.value) return yield* this.lineEnd(e);
|
|
7825
7628
|
switch (this.type) {
|
|
7826
7629
|
case "doc-start":
|
|
7827
|
-
|
|
7630
|
+
so(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
|
|
7828
7631
|
return;
|
|
7829
7632
|
case "anchor":
|
|
7830
7633
|
case "tag":
|
|
@@ -7844,7 +7647,7 @@ var ho = class {
|
|
|
7844
7647
|
}
|
|
7845
7648
|
*scalar(e) {
|
|
7846
7649
|
if (this.type === "map-value-ind") {
|
|
7847
|
-
let t =
|
|
7650
|
+
let t = uo(lo(this.peek(2))), n;
|
|
7848
7651
|
e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
|
|
7849
7652
|
let r = {
|
|
7850
7653
|
type: "block-map",
|
|
@@ -7894,7 +7697,7 @@ var ho = class {
|
|
|
7894
7697
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
7895
7698
|
let n = e.items[e.items.length - 2]?.value?.end;
|
|
7896
7699
|
if (Array.isArray(n)) {
|
|
7897
|
-
|
|
7700
|
+
fo(n, t.start), n.push(this.sourceToken), e.items.pop();
|
|
7898
7701
|
return;
|
|
7899
7702
|
}
|
|
7900
7703
|
}
|
|
@@ -7943,12 +7746,12 @@ var ho = class {
|
|
|
7943
7746
|
case "map-value-ind":
|
|
7944
7747
|
if (t.explicitKey) {
|
|
7945
7748
|
if (!t.sep) {
|
|
7946
|
-
if (
|
|
7749
|
+
if (oo(t.start, "newline")) Object.assign(t, {
|
|
7947
7750
|
key: null,
|
|
7948
7751
|
sep: [this.sourceToken]
|
|
7949
7752
|
});
|
|
7950
7753
|
else {
|
|
7951
|
-
let e =
|
|
7754
|
+
let e = uo(t.start);
|
|
7952
7755
|
this.stack.push({
|
|
7953
7756
|
type: "block-map",
|
|
7954
7757
|
offset: this.offset,
|
|
@@ -7965,7 +7768,7 @@ var ho = class {
|
|
|
7965
7768
|
key: null,
|
|
7966
7769
|
sep: [this.sourceToken]
|
|
7967
7770
|
});
|
|
7968
|
-
else if (
|
|
7771
|
+
else if (oo(t.sep, "map-value-ind")) this.stack.push({
|
|
7969
7772
|
type: "block-map",
|
|
7970
7773
|
offset: this.offset,
|
|
7971
7774
|
indent: this.indent,
|
|
@@ -7975,8 +7778,8 @@ var ho = class {
|
|
|
7975
7778
|
sep: [this.sourceToken]
|
|
7976
7779
|
}]
|
|
7977
7780
|
});
|
|
7978
|
-
else if (
|
|
7979
|
-
let e =
|
|
7781
|
+
else if (co(t.key) && !oo(t.sep, "newline")) {
|
|
7782
|
+
let e = uo(t.start), n = t.key, r = t.sep;
|
|
7980
7783
|
r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
|
|
7981
7784
|
type: "block-map",
|
|
7982
7785
|
offset: this.offset,
|
|
@@ -7992,7 +7795,7 @@ var ho = class {
|
|
|
7992
7795
|
start: i,
|
|
7993
7796
|
key: null,
|
|
7994
7797
|
sep: [this.sourceToken]
|
|
7995
|
-
}) :
|
|
7798
|
+
}) : oo(t.sep, "map-value-ind") ? this.stack.push({
|
|
7996
7799
|
type: "block-map",
|
|
7997
7800
|
offset: this.offset,
|
|
7998
7801
|
indent: this.indent,
|
|
@@ -8026,7 +7829,7 @@ var ho = class {
|
|
|
8026
7829
|
let r = this.startBlockValue(e);
|
|
8027
7830
|
if (r) {
|
|
8028
7831
|
if (r.type === "block-seq") {
|
|
8029
|
-
if (!t.explicitKey && t.sep && !
|
|
7832
|
+
if (!t.explicitKey && t.sep && !oo(t.sep, "newline")) {
|
|
8030
7833
|
yield* this.pop({
|
|
8031
7834
|
type: "error",
|
|
8032
7835
|
offset: this.offset,
|
|
@@ -8060,7 +7863,7 @@ var ho = class {
|
|
|
8060
7863
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
8061
7864
|
let n = e.items[e.items.length - 2]?.value?.end;
|
|
8062
7865
|
if (Array.isArray(n)) {
|
|
8063
|
-
|
|
7866
|
+
fo(n, t.start), n.push(this.sourceToken), e.items.pop();
|
|
8064
7867
|
return;
|
|
8065
7868
|
}
|
|
8066
7869
|
}
|
|
@@ -8074,7 +7877,7 @@ var ho = class {
|
|
|
8074
7877
|
return;
|
|
8075
7878
|
case "seq-item-ind":
|
|
8076
7879
|
if (this.indent !== e.indent) break;
|
|
8077
|
-
t.value ||
|
|
7880
|
+
t.value || oo(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
|
|
8078
7881
|
return;
|
|
8079
7882
|
}
|
|
8080
7883
|
if (this.indent > e.indent) {
|
|
@@ -8143,8 +7946,8 @@ var ho = class {
|
|
|
8143
7946
|
let t = this.peek(2);
|
|
8144
7947
|
if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
|
|
8145
7948
|
else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
|
|
8146
|
-
let n =
|
|
8147
|
-
|
|
7949
|
+
let n = uo(lo(t));
|
|
7950
|
+
po(e);
|
|
8148
7951
|
let r = e.end.splice(1, e.end.length);
|
|
8149
7952
|
r.push(this.sourceToken);
|
|
8150
7953
|
let i = {
|
|
@@ -8203,7 +8006,7 @@ var ho = class {
|
|
|
8203
8006
|
};
|
|
8204
8007
|
case "explicit-key-ind": {
|
|
8205
8008
|
this.onKeyLine = !0;
|
|
8206
|
-
let t =
|
|
8009
|
+
let t = uo(lo(e));
|
|
8207
8010
|
return t.push(this.sourceToken), {
|
|
8208
8011
|
type: "block-map",
|
|
8209
8012
|
offset: this.offset,
|
|
@@ -8216,7 +8019,7 @@ var ho = class {
|
|
|
8216
8019
|
}
|
|
8217
8020
|
case "map-value-ind": {
|
|
8218
8021
|
this.onKeyLine = !0;
|
|
8219
|
-
let t =
|
|
8022
|
+
let t = uo(lo(e));
|
|
8220
8023
|
return {
|
|
8221
8024
|
type: "block-map",
|
|
8222
8025
|
offset: this.offset,
|
|
@@ -8254,39 +8057,39 @@ var ho = class {
|
|
|
8254
8057
|
};
|
|
8255
8058
|
//#endregion
|
|
8256
8059
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js
|
|
8257
|
-
function
|
|
8060
|
+
function ho(e) {
|
|
8258
8061
|
let t = e.prettyErrors !== !1;
|
|
8259
8062
|
return {
|
|
8260
|
-
lineCounter: e.lineCounter || t && new
|
|
8063
|
+
lineCounter: e.lineCounter || t && new ao() || null,
|
|
8261
8064
|
prettyErrors: t
|
|
8262
8065
|
};
|
|
8263
8066
|
}
|
|
8264
|
-
function
|
|
8265
|
-
let { lineCounter: n, prettyErrors: r } =
|
|
8266
|
-
if (r && n) for (let t of o) t.errors.forEach(
|
|
8067
|
+
function go(e, t = {}) {
|
|
8068
|
+
let { lineCounter: n, prettyErrors: r } = ho(t), i = new mo(n?.addNewLine), a = new Ma(t), o = Array.from(a.compose(i.parse(e)));
|
|
8069
|
+
if (r && n) for (let t of o) t.errors.forEach(Xi(e, n)), t.warnings.forEach(Xi(e, n));
|
|
8267
8070
|
return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
|
|
8268
8071
|
}
|
|
8269
|
-
function
|
|
8270
|
-
let { lineCounter: n, prettyErrors: r } =
|
|
8072
|
+
function _o(e, t = {}) {
|
|
8073
|
+
let { lineCounter: n, prettyErrors: r } = ho(t), i = new mo(n?.addNewLine), a = new Ma(t), o = null;
|
|
8271
8074
|
for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
|
|
8272
8075
|
else if (o.options.logLevel !== "silent") {
|
|
8273
|
-
o.errors.push(new
|
|
8076
|
+
o.errors.push(new Ji(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
8274
8077
|
break;
|
|
8275
8078
|
}
|
|
8276
|
-
return r && n && (o.errors.forEach(
|
|
8079
|
+
return r && n && (o.errors.forEach(Xi(e, n)), o.warnings.forEach(Xi(e, n))), o;
|
|
8277
8080
|
}
|
|
8278
|
-
function
|
|
8081
|
+
function vo(e, t, n) {
|
|
8279
8082
|
let r;
|
|
8280
8083
|
typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
|
|
8281
|
-
let i =
|
|
8084
|
+
let i = _o(e, n);
|
|
8282
8085
|
if (!i) return null;
|
|
8283
|
-
if (i.warnings.forEach((e) =>
|
|
8086
|
+
if (i.warnings.forEach((e) => kr(i.options.logLevel, e)), i.errors.length > 0) {
|
|
8284
8087
|
if (i.options.logLevel !== "silent") throw i.errors[0];
|
|
8285
8088
|
i.errors = [];
|
|
8286
8089
|
}
|
|
8287
8090
|
return i.toJS(Object.assign({ reviver: r }, n));
|
|
8288
8091
|
}
|
|
8289
|
-
function
|
|
8092
|
+
function yo(e, t, n) {
|
|
8290
8093
|
let r = null;
|
|
8291
8094
|
if (typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t), typeof n == "string" && (n = n.length), typeof n == "number") {
|
|
8292
8095
|
let e = Math.round(n);
|
|
@@ -8296,72 +8099,72 @@ function bo(e, t, n) {
|
|
|
8296
8099
|
let { keepUndefined: e } = n ?? t ?? {};
|
|
8297
8100
|
if (!e) return;
|
|
8298
8101
|
}
|
|
8299
|
-
return
|
|
8102
|
+
return kn(e) && !r ? e.toString(n) : new Gi(e, r, n).toString(n);
|
|
8300
8103
|
}
|
|
8301
8104
|
//#endregion
|
|
8302
8105
|
//#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js
|
|
8303
|
-
var
|
|
8304
|
-
Alias: () =>
|
|
8305
|
-
CST: () =>
|
|
8306
|
-
Composer: () =>
|
|
8307
|
-
Document: () =>
|
|
8308
|
-
Lexer: () =>
|
|
8309
|
-
LineCounter: () =>
|
|
8106
|
+
var bo = /* @__PURE__ */ ee({
|
|
8107
|
+
Alias: () => Zn,
|
|
8108
|
+
CST: () => qa,
|
|
8109
|
+
Composer: () => Ma,
|
|
8110
|
+
Document: () => Gi,
|
|
8111
|
+
Lexer: () => io,
|
|
8112
|
+
LineCounter: () => ao,
|
|
8310
8113
|
Pair: () => X,
|
|
8311
|
-
Parser: () =>
|
|
8114
|
+
Parser: () => mo,
|
|
8312
8115
|
Scalar: () => Y,
|
|
8313
|
-
Schema: () =>
|
|
8314
|
-
YAMLError: () =>
|
|
8116
|
+
Schema: () => Ui,
|
|
8117
|
+
YAMLError: () => qi,
|
|
8315
8118
|
YAMLMap: () => Z,
|
|
8316
|
-
YAMLParseError: () =>
|
|
8317
|
-
YAMLSeq: () =>
|
|
8318
|
-
YAMLWarning: () =>
|
|
8319
|
-
isAlias: () =>
|
|
8119
|
+
YAMLParseError: () => Ji,
|
|
8120
|
+
YAMLSeq: () => Gr,
|
|
8121
|
+
YAMLWarning: () => Yi,
|
|
8122
|
+
isAlias: () => On,
|
|
8320
8123
|
isCollection: () => G,
|
|
8321
|
-
isDocument: () =>
|
|
8322
|
-
isMap: () =>
|
|
8124
|
+
isDocument: () => kn,
|
|
8125
|
+
isMap: () => An,
|
|
8323
8126
|
isNode: () => K,
|
|
8324
8127
|
isPair: () => U,
|
|
8325
8128
|
isScalar: () => W,
|
|
8326
|
-
isSeq: () =>
|
|
8327
|
-
parse: () =>
|
|
8328
|
-
parseAllDocuments: () =>
|
|
8329
|
-
parseDocument: () =>
|
|
8330
|
-
stringify: () =>
|
|
8331
|
-
visit: () =>
|
|
8332
|
-
visitAsync: () =>
|
|
8333
|
-
}),
|
|
8129
|
+
isSeq: () => jn,
|
|
8130
|
+
parse: () => vo,
|
|
8131
|
+
parseAllDocuments: () => go,
|
|
8132
|
+
parseDocument: () => _o,
|
|
8133
|
+
stringify: () => yo,
|
|
8134
|
+
visit: () => Fn,
|
|
8135
|
+
visitAsync: () => Ln
|
|
8136
|
+
}), xo = class {
|
|
8334
8137
|
baseDir;
|
|
8335
8138
|
maxDepth;
|
|
8336
8139
|
constructor(e, t = 5) {
|
|
8337
|
-
this.baseDir =
|
|
8140
|
+
this.baseDir = f.resolve(e), this.maxDepth = t;
|
|
8338
8141
|
}
|
|
8339
8142
|
resolve(t, n = /* @__PURE__ */ new Set(), r = 0) {
|
|
8340
8143
|
if (r > this.maxDepth) throw Error(`Max include depth of ${this.maxDepth} exceeded at ${t}`);
|
|
8341
|
-
let i =
|
|
8144
|
+
let i = f.resolve(this.baseDir, t);
|
|
8342
8145
|
if (!i.startsWith(this.baseDir)) throw Error(`Security Violation: Include path '${t}' is outside workspace directory.`);
|
|
8343
8146
|
if (n.has(i)) {
|
|
8344
8147
|
let e = Array.from(n).concat(i).join(" -> ");
|
|
8345
8148
|
throw Error(`Circular 'includes' dependency detected: ${e}`);
|
|
8346
8149
|
}
|
|
8347
8150
|
if (n.add(i), !e.existsSync(i)) throw Error(`Included workflow partial not found: ${t}`);
|
|
8348
|
-
let
|
|
8349
|
-
if (Array.isArray(
|
|
8350
|
-
for (let e of
|
|
8151
|
+
let a = e.readFileSync(i, "utf-8"), o = bo.parse(a);
|
|
8152
|
+
if (Array.isArray(o.includes)) {
|
|
8153
|
+
for (let e of o.includes) {
|
|
8351
8154
|
let t = this.resolve(e, new Set(n), r + 1);
|
|
8352
|
-
|
|
8155
|
+
o.steps = [...t.steps || [], ...o.steps || []], o.env = {
|
|
8353
8156
|
...t.env,
|
|
8354
|
-
...
|
|
8157
|
+
...o.env
|
|
8355
8158
|
};
|
|
8356
8159
|
}
|
|
8357
|
-
delete
|
|
8160
|
+
delete o.includes;
|
|
8358
8161
|
}
|
|
8359
|
-
return
|
|
8162
|
+
return o;
|
|
8360
8163
|
}
|
|
8361
8164
|
};
|
|
8362
8165
|
//#endregion
|
|
8363
8166
|
//#region src/parser/matrix-expander.ts
|
|
8364
|
-
function
|
|
8167
|
+
function So(e) {
|
|
8365
8168
|
if (!e.strategy?.matrix || Object.keys(e.strategy.matrix).length === 0) return [e];
|
|
8366
8169
|
let t = e.strategy.matrix;
|
|
8367
8170
|
return Object.keys(t).reduce((e, n) => {
|
|
@@ -8388,16 +8191,16 @@ function Co(e) {
|
|
|
8388
8191
|
}
|
|
8389
8192
|
//#endregion
|
|
8390
8193
|
//#region src/parser/yaml-loader.ts
|
|
8391
|
-
var
|
|
8194
|
+
var Co = class e {
|
|
8392
8195
|
static async from(t) {
|
|
8393
|
-
let n =
|
|
8196
|
+
let n = p(t) ? h("/", t) : m(process.cwd(), h("/", t)), r = (await g(n, { withFileTypes: !0 })).filter((e) => e.isFile() && (e.name.endsWith(".yml") || e.name.endsWith(".yaml"))).map((e) => m(n, e.name)), i = [], a = new xo(t);
|
|
8394
8197
|
for (let t of r) i.push(...await e.loadFile(t, a));
|
|
8395
8198
|
return i;
|
|
8396
8199
|
}
|
|
8397
8200
|
static loadFile(e, t) {
|
|
8398
8201
|
let n = [];
|
|
8399
8202
|
try {
|
|
8400
|
-
let r =
|
|
8203
|
+
let r = So(t.resolve(e));
|
|
8401
8204
|
for (let t of r) {
|
|
8402
8205
|
if (typeof t.on != "object") {
|
|
8403
8206
|
console.error(`on: not defined in ${e}! Ignoring this workflow.`);
|
|
@@ -8405,7 +8208,7 @@ var wo = class e {
|
|
|
8405
8208
|
}
|
|
8406
8209
|
let r = Object.keys(t.on)[0] || "generic";
|
|
8407
8210
|
n.push({
|
|
8408
|
-
id: (t.id || t.name)?.toLowerCase().replace(/[^a-z0-9]/g, "-") ??
|
|
8211
|
+
id: (t.id || t.name)?.toLowerCase().replace(/[^a-z0-9]/g, "-") ?? d(),
|
|
8409
8212
|
name: t.name,
|
|
8410
8213
|
on: {
|
|
8411
8214
|
provider: r,
|
|
@@ -8421,6 +8224,206 @@ var wo = class e {
|
|
|
8421
8224
|
}
|
|
8422
8225
|
return n;
|
|
8423
8226
|
}
|
|
8227
|
+
}, wo = class e {
|
|
8228
|
+
server;
|
|
8229
|
+
preprocessors = /* @__PURE__ */ new Map();
|
|
8230
|
+
workflows = [];
|
|
8231
|
+
queue;
|
|
8232
|
+
secrets;
|
|
8233
|
+
adminToken;
|
|
8234
|
+
static async withPort(t) {
|
|
8235
|
+
let { port: n, ...r } = t;
|
|
8236
|
+
return new e(r).listen(n);
|
|
8237
|
+
}
|
|
8238
|
+
constructor(e) {
|
|
8239
|
+
this.queue = e.queue, this.secrets = e.secrets, this.adminToken = e.adminToken, Co.from(e.config.workflows).then((t) => {
|
|
8240
|
+
this.workflows = t, console.log(`ā
Loaded ${t.length} workflow(s) from ${e.config.workflows}`);
|
|
8241
|
+
}), this.registerPreprocessor(new pn()), this.server = c.createServer((e, t) => this.handleRequest(e, t));
|
|
8242
|
+
}
|
|
8243
|
+
registerPreprocessor(e) {
|
|
8244
|
+
this.preprocessors.set(e.name, e);
|
|
8245
|
+
}
|
|
8246
|
+
async handleRequest(e, t) {
|
|
8247
|
+
let n = new l(e.url || "/", `${e.headers["x-forwarded-proto"] || "http"}://${e.headers["x-forwarded-host"] || e.headers.host}`);
|
|
8248
|
+
if (e.method === "GET" && (n.pathname === "/runs" || n.pathname === "/")) return this.renderDashboard(t);
|
|
8249
|
+
if (e.method === "GET" && n.pathname.startsWith("/runs/")) {
|
|
8250
|
+
let e = n.pathname.replace("/runs/", "");
|
|
8251
|
+
return this.renderRunDetails(e, t);
|
|
8252
|
+
}
|
|
8253
|
+
if (e.method === "POST" && n.pathname === "/admin/reload-secrets") return this.handleSecretReload(e, t);
|
|
8254
|
+
if (e.method === "POST" && n.pathname.startsWith("/webhooks/")) {
|
|
8255
|
+
let r = n.pathname.replace("/webhooks/", "");
|
|
8256
|
+
return this.handleWebhook(r, e, t);
|
|
8257
|
+
}
|
|
8258
|
+
t.writeHead(404, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Endpoint not found" }));
|
|
8259
|
+
}
|
|
8260
|
+
async handleWebhook(e, t, n) {
|
|
8261
|
+
try {
|
|
8262
|
+
let { rawBuffer: r, headers: i } = await this.readRequest(t, n);
|
|
8263
|
+
if (n.headersSent || !r) return;
|
|
8264
|
+
let { isValid: a, inputs: o } = this.preprocess(e, i, r);
|
|
8265
|
+
if (!a) {
|
|
8266
|
+
n.writeHead(401, { "Content-Type": "application/json" }), n.end(JSON.stringify({ error: "Invalid HMAC signature or authentication failed" }));
|
|
8267
|
+
return;
|
|
8268
|
+
}
|
|
8269
|
+
let s = this.matchWorkflows(e, o);
|
|
8270
|
+
n.writeHead(202, { "Content-Type": "application/json" }), n.end(JSON.stringify({
|
|
8271
|
+
message: "Webhook processed",
|
|
8272
|
+
triggeredWorkflows: s
|
|
8273
|
+
}));
|
|
8274
|
+
} catch (e) {
|
|
8275
|
+
console.error("ā Webhook Ingress Error:", e), n.writeHead(500, { "Content-Type": "application/json" }), n.end(JSON.stringify({
|
|
8276
|
+
error: "Internal Ingress Error",
|
|
8277
|
+
details: e.message
|
|
8278
|
+
}));
|
|
8279
|
+
}
|
|
8280
|
+
}
|
|
8281
|
+
async readRequest(e, t) {
|
|
8282
|
+
let n = [], r = 0;
|
|
8283
|
+
for await (let i of e) {
|
|
8284
|
+
if (r += i.length, r > 5242880) return t.writeHead(413, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Payload size exceeds limit" })), {
|
|
8285
|
+
rawBuffer: null,
|
|
8286
|
+
headers: {}
|
|
8287
|
+
};
|
|
8288
|
+
n.push(typeof i == "string" ? Buffer.from(i) : i);
|
|
8289
|
+
}
|
|
8290
|
+
return {
|
|
8291
|
+
rawBuffer: Buffer.concat(n),
|
|
8292
|
+
headers: Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e.toLowerCase(), Array.isArray(t) ? t[0] : t || ""]))
|
|
8293
|
+
};
|
|
8294
|
+
}
|
|
8295
|
+
preprocess(e, t, n) {
|
|
8296
|
+
let r = this.secrets.get(`${e.toUpperCase()}_WEBHOOK_SECRET`), i = this.preprocessors.get(e);
|
|
8297
|
+
try {
|
|
8298
|
+
if (i) {
|
|
8299
|
+
let { inputs: e, isValid: a } = i.parse(t, n, r);
|
|
8300
|
+
return {
|
|
8301
|
+
inputs: e,
|
|
8302
|
+
isValid: a
|
|
8303
|
+
};
|
|
8304
|
+
}
|
|
8305
|
+
return {
|
|
8306
|
+
isValid: !0,
|
|
8307
|
+
inputs: JSON.parse(n.toString("utf-8"))
|
|
8308
|
+
};
|
|
8309
|
+
} catch {
|
|
8310
|
+
return {
|
|
8311
|
+
isValid: !1,
|
|
8312
|
+
inputs: null
|
|
8313
|
+
};
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
async matchWorkflows(e, t) {
|
|
8317
|
+
let n = [];
|
|
8318
|
+
for (let r of this.workflows) {
|
|
8319
|
+
if (r.on.provider !== e) continue;
|
|
8320
|
+
if (r.on.if) try {
|
|
8321
|
+
if (!fn.evaluateCondition(r.on.if, { inputs: t })) {
|
|
8322
|
+
console.log(`ā© Skipped ${r.id} based on condition: ${r.on.if}`, { inputs: t });
|
|
8323
|
+
continue;
|
|
8324
|
+
}
|
|
8325
|
+
} catch (e) {
|
|
8326
|
+
console.error(`ā ļø Condition evaluation error in workflow [${r.id}]:`, e.message);
|
|
8327
|
+
continue;
|
|
8328
|
+
}
|
|
8329
|
+
let i;
|
|
8330
|
+
r.concurrency?.group && (i = await fn.evaluateValue(r.concurrency.group, { inputs: t }));
|
|
8331
|
+
let a = {
|
|
8332
|
+
workflowId: r.id,
|
|
8333
|
+
env: r.env,
|
|
8334
|
+
steps: r.steps,
|
|
8335
|
+
inputs: t
|
|
8336
|
+
};
|
|
8337
|
+
await this.queue.enqueue(r.id, a, i), n.push(r.id);
|
|
8338
|
+
}
|
|
8339
|
+
return n;
|
|
8340
|
+
}
|
|
8341
|
+
async handleSecretReload(e, t) {
|
|
8342
|
+
if (e.headers.authorization !== `Bearer ${this.adminToken}`) return t.writeHead(403, { "Content-Type": "application/json" }), t.end(JSON.stringify({ error: "Unauthorized" }));
|
|
8343
|
+
this.secrets.reload(), console.log("š SecretStore reloaded successfully without downtime!"), t.writeHead(200, { "Content-Type": "application/json" }), t.end(JSON.stringify({ message: "Secrets reloaded successfully" }));
|
|
8344
|
+
}
|
|
8345
|
+
async renderDashboard(e) {
|
|
8346
|
+
let t = (await this.queue.listJobs(500)).map((e) => {
|
|
8347
|
+
let t = e.status === "success" ? "bg-emerald-500/10 text-emerald-400" : e.status === "failed" ? "bg-rose-500/10 text-rose-400" : e.status === "running" ? "bg-indigo-500/10 text-indigo-400 animate-pulse" : "bg-gray-500/10 text-gray-400";
|
|
8348
|
+
return `
|
|
8349
|
+
<tr class="border-b border-gray-800 hover:bg-gray-900/50 transition">
|
|
8350
|
+
<td class="py-3 px-4 font-mono text-indigo-400"><a href="/runs/${e.id}" class="hover:underline">#${e.id}</a></td>
|
|
8351
|
+
<td class="py-3 px-4 font-medium text-white">${e.workflow_id}</td>
|
|
8352
|
+
<td class="py-3 px-4">
|
|
8353
|
+
<span class="px-2.5 py-0.5 rounded-full text-xs font-semibold ${t}">${e.status.toUpperCase()}</span>
|
|
8354
|
+
</td>
|
|
8355
|
+
<td class="py-3 px-4 text-xs font-mono text-gray-400">${e.worker_id || "-"}</td>
|
|
8356
|
+
<td class="py-3 px-4 text-xs text-gray-400">${e.created_at}</td>
|
|
8357
|
+
<td class="py-3 px-4 text-right">
|
|
8358
|
+
<a href="/runs/${e.id}" class="text-xs bg-gray-800 hover:bg-gray-700 text-gray-200 px-3 py-1 rounded border border-gray-700">View Trace ā</a>
|
|
8359
|
+
</td>
|
|
8360
|
+
</tr>
|
|
8361
|
+
`;
|
|
8362
|
+
}).join(""), n = `<!DOCTYPE html>
|
|
8363
|
+
<html lang="en" class="dark">
|
|
8364
|
+
<head>
|
|
8365
|
+
<meta charset="UTF-8">
|
|
8366
|
+
<meta http-equiv="refresh" content="10"> <!-- Auto-refreshes every 10s -->
|
|
8367
|
+
<title>Workflow Engine Dashboard</title>
|
|
8368
|
+
<script src="https://cdn.tailwindcss.com"><\/script>
|
|
8369
|
+
</head>
|
|
8370
|
+
<body class="bg-gray-950 text-gray-100 min-h-screen p-6 font-sans">
|
|
8371
|
+
<div class="max-w-6xl mx-auto space-y-6">
|
|
8372
|
+
<div class="flex items-center justify-between border-b border-gray-800 pb-4">
|
|
8373
|
+
<div>
|
|
8374
|
+
<h1 class="text-2xl font-bold text-white">āļø Runner Engine Status</h1>
|
|
8375
|
+
<p class="text-xs text-gray-400">Live Job Queue & Execution Traces</p>
|
|
8376
|
+
</div>
|
|
8377
|
+
<span class="text-xs font-mono bg-emerald-500/10 text-emerald-400 px-3 py-1 rounded-full border border-emerald-500/20">
|
|
8378
|
+
ā System Operational
|
|
8379
|
+
</span>
|
|
8380
|
+
</div>
|
|
8381
|
+
|
|
8382
|
+
<div class="bg-gray-900 border border-gray-800 rounded-xl overflow-hidden">
|
|
8383
|
+
<table class="w-full text-left text-sm">
|
|
8384
|
+
<thead class="bg-gray-800/50 text-gray-400 text-xs uppercase font-mono border-b border-gray-800">
|
|
8385
|
+
<tr>
|
|
8386
|
+
<th class="py-3 px-4">Job ID</th>
|
|
8387
|
+
<th class="py-3 px-4">Workflow</th>
|
|
8388
|
+
<th class="py-3 px-4">Status</th>
|
|
8389
|
+
<th class="py-3 px-4">Worker</th>
|
|
8390
|
+
<th class="py-3 px-4">Created At</th>
|
|
8391
|
+
<th class="py-3 px-4 text-right">Action</th>
|
|
8392
|
+
</tr>
|
|
8393
|
+
</thead>
|
|
8394
|
+
<tbody>${t.length ? t : "<tr><td colspan=\"6\" class=\"p-6 text-center text-gray-500\">No jobs recorded yet.</td></tr>"}</tbody>
|
|
8395
|
+
</table>
|
|
8396
|
+
</div>
|
|
8397
|
+
</div>
|
|
8398
|
+
</body>
|
|
8399
|
+
</html>`, r = this.secrets.redactText(n);
|
|
8400
|
+
e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(r);
|
|
8401
|
+
}
|
|
8402
|
+
async renderRunDetails(e, t) {
|
|
8403
|
+
let n = await this.queue.getJob(e);
|
|
8404
|
+
if (!n || !n.report) return t.writeHead(404, { "Content-Type": "text/html; charset=utf-8" }), t.end("<h1>404 - Report Not Found</h1>");
|
|
8405
|
+
let r = JSON.parse(n.report), i = await this.queue.getJobLogs(e);
|
|
8406
|
+
r.steps = r.steps.map((e) => ({
|
|
8407
|
+
...e,
|
|
8408
|
+
logContent: i[e.id] || ""
|
|
8409
|
+
}));
|
|
8410
|
+
let a = new xn({ outputDir: "" }).generateHtml(r), o = this.secrets.redactText(a);
|
|
8411
|
+
t.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), t.end(o);
|
|
8412
|
+
}
|
|
8413
|
+
listen(e) {
|
|
8414
|
+
return new Promise((t) => {
|
|
8415
|
+
this.server.listen(e, process.env.RUNNER_HOST || "0.0.0.0", () => {
|
|
8416
|
+
console.log(`š Webhook Ingress Server running on port ${e}`), t(this);
|
|
8417
|
+
});
|
|
8418
|
+
});
|
|
8419
|
+
}
|
|
8420
|
+
async stop() {
|
|
8421
|
+
return new Promise((e) => {
|
|
8422
|
+
this.server.close(() => {
|
|
8423
|
+
console.log("š Webhook Ingress Server stopped listening."), e();
|
|
8424
|
+
});
|
|
8425
|
+
});
|
|
8426
|
+
}
|
|
8424
8427
|
}, To = process.env.DATABASE_URL, Eo = [];
|
|
8425
8428
|
async function Do(e, t, n, r = Eo) {
|
|
8426
8429
|
let i, a, o = 1;
|
|
@@ -8518,7 +8521,7 @@ var Po = class {
|
|
|
8518
8521
|
for (let [e, t] of Object.entries(process.env)) e.startsWith("SECRET_") && t && this.secrets.set(e.replace("SECRET_", ""), t);
|
|
8519
8522
|
if (this.envFilePath && t(this.envFilePath)) {
|
|
8520
8523
|
console.log("Found .env at " + this.envFilePath);
|
|
8521
|
-
let e =
|
|
8524
|
+
let e = o(n(this.envFilePath, "utf8"));
|
|
8522
8525
|
for (let [t, n] of Object.entries(e)) this.secrets.set(t, n || "");
|
|
8523
8526
|
}
|
|
8524
8527
|
}
|
|
@@ -8533,7 +8536,7 @@ var Po = class {
|
|
|
8533
8536
|
for (let n of t) e = e.replaceAll(n, "** masked **");
|
|
8534
8537
|
return e;
|
|
8535
8538
|
}
|
|
8536
|
-
}, Io =
|
|
8539
|
+
}, Io = s(_), Lo = class {
|
|
8537
8540
|
name = "systemd";
|
|
8538
8541
|
async isSupported() {
|
|
8539
8542
|
try {
|
|
@@ -8543,9 +8546,9 @@ var Po = class {
|
|
|
8543
8546
|
}
|
|
8544
8547
|
}
|
|
8545
8548
|
async execute(t) {
|
|
8546
|
-
let n = null, r = Date.now(), i =
|
|
8549
|
+
let n = null, r = Date.now(), i = f.join(t.workspacePath, ".logs"), a = f.join(i, `step-${t.stepId}.log`), o = f.join(t.workspacePath, "wd");
|
|
8547
8550
|
try {
|
|
8548
|
-
e.mkdirSync(i, { recursive: !0 }), e.mkdirSync(
|
|
8551
|
+
e.mkdirSync(i, { recursive: !0 }), e.mkdirSync(o, { recursive: !0 }), e.chmodSync(o, 511), n = e.openSync(a, "a");
|
|
8549
8552
|
} catch (e) {
|
|
8550
8553
|
return {
|
|
8551
8554
|
done: Promise.resolve({
|
|
@@ -8557,29 +8560,29 @@ var Po = class {
|
|
|
8557
8560
|
logFilePath: ""
|
|
8558
8561
|
};
|
|
8559
8562
|
}
|
|
8560
|
-
let
|
|
8561
|
-
`--unit=${
|
|
8563
|
+
let s = `workflow-${t.jobId}-${t.stepId}`.replace(/[^a-zA-Z0-9_-]/g, "_"), c = [
|
|
8564
|
+
`--unit=${s}`,
|
|
8562
8565
|
"--wait",
|
|
8563
8566
|
"--pipe",
|
|
8564
8567
|
"--collect",
|
|
8565
8568
|
"-p",
|
|
8566
8569
|
"RemainAfterExit=no",
|
|
8567
|
-
`--working-directory=${
|
|
8570
|
+
`--working-directory=${o}`
|
|
8568
8571
|
];
|
|
8569
|
-
if (t.env) for (let [e, n] of Object.entries(t.env))
|
|
8570
|
-
if (
|
|
8572
|
+
if (t.env) for (let [e, n] of Object.entries(t.env)) c.push(`--setenv=${e}=${n}`);
|
|
8573
|
+
if (c.push(`--setenv=PATH=${t.env?.PATH || process.env.PATH}`), t.timeoutMs) {
|
|
8571
8574
|
let e = Math.ceil(t.timeoutMs / 1e3);
|
|
8572
|
-
|
|
8575
|
+
c.push(`--property=RuntimeMaxSec=${e}`);
|
|
8573
8576
|
}
|
|
8574
|
-
let
|
|
8575
|
-
|
|
8577
|
+
let l;
|
|
8578
|
+
l = t.image ? [
|
|
8576
8579
|
"docker",
|
|
8577
8580
|
"run",
|
|
8578
8581
|
"--rm",
|
|
8579
8582
|
"--init",
|
|
8580
|
-
`--name=${
|
|
8583
|
+
`--name=${s}`,
|
|
8581
8584
|
"-v",
|
|
8582
|
-
`${
|
|
8585
|
+
`${o}:/workspace`,
|
|
8583
8586
|
"-w",
|
|
8584
8587
|
"/workspace",
|
|
8585
8588
|
t.image,
|
|
@@ -8592,16 +8595,16 @@ var Po = class {
|
|
|
8592
8595
|
"-c",
|
|
8593
8596
|
t.command
|
|
8594
8597
|
], process.env.DEBUG && console.log("$ systemd-run", [
|
|
8595
|
-
...
|
|
8598
|
+
...c,
|
|
8596
8599
|
"--",
|
|
8597
|
-
...
|
|
8600
|
+
...l
|
|
8598
8601
|
].join(" "));
|
|
8599
|
-
let
|
|
8602
|
+
let u;
|
|
8600
8603
|
try {
|
|
8601
|
-
|
|
8602
|
-
...
|
|
8604
|
+
u = v("systemd-run", [
|
|
8605
|
+
...c,
|
|
8603
8606
|
"--",
|
|
8604
|
-
...
|
|
8607
|
+
...l
|
|
8605
8608
|
], { stdio: [
|
|
8606
8609
|
"ignore",
|
|
8607
8610
|
n,
|
|
@@ -8618,10 +8621,10 @@ var Po = class {
|
|
|
8618
8621
|
error: /* @__PURE__ */ Error(`Failed to spawn systemd-run: ${t.message}`)
|
|
8619
8622
|
}),
|
|
8620
8623
|
cancel: async () => {},
|
|
8621
|
-
logFilePath:
|
|
8624
|
+
logFilePath: a
|
|
8622
8625
|
};
|
|
8623
8626
|
}
|
|
8624
|
-
let
|
|
8627
|
+
let d = !1;
|
|
8625
8628
|
return {
|
|
8626
8629
|
done: new Promise((t) => {
|
|
8627
8630
|
let i = !1, a = (r) => {
|
|
@@ -8633,14 +8636,14 @@ var Po = class {
|
|
|
8633
8636
|
t(r);
|
|
8634
8637
|
}
|
|
8635
8638
|
};
|
|
8636
|
-
|
|
8637
|
-
let n = e === null ? t ?
|
|
8639
|
+
u.on("close", (e, t) => {
|
|
8640
|
+
let n = e === null ? t ? d ? 130 : 1 : 0 : e;
|
|
8638
8641
|
console.log("close [exitCode, code, signal]", n, e, t), a({
|
|
8639
8642
|
exitCode: n,
|
|
8640
8643
|
durationMs: Date.now() - r,
|
|
8641
|
-
error:
|
|
8644
|
+
error: d ? /* @__PURE__ */ Error("Step cancelled by user or systemd timeout") : void 0
|
|
8642
8645
|
});
|
|
8643
|
-
}),
|
|
8646
|
+
}), u.on("error", (e) => {
|
|
8644
8647
|
console.log("error [exitCode, error]", 1, e), a({
|
|
8645
8648
|
exitCode: 1,
|
|
8646
8649
|
durationMs: Date.now() - r,
|
|
@@ -8649,12 +8652,12 @@ var Po = class {
|
|
|
8649
8652
|
});
|
|
8650
8653
|
}),
|
|
8651
8654
|
cancel: async () => {
|
|
8652
|
-
|
|
8655
|
+
d = !0;
|
|
8653
8656
|
try {
|
|
8654
|
-
t.image && await Io(`docker stop -t 2 ${
|
|
8657
|
+
t.image && await Io(`docker stop -t 2 ${s}`).catch(() => {}), await Io(`systemctl stop ${s}.service`).catch(() => {});
|
|
8655
8658
|
} catch {}
|
|
8656
8659
|
},
|
|
8657
|
-
logFilePath:
|
|
8660
|
+
logFilePath: a
|
|
8658
8661
|
};
|
|
8659
8662
|
}
|
|
8660
8663
|
}, Ro = class {
|
|
@@ -8663,9 +8666,9 @@ var Po = class {
|
|
|
8663
8666
|
return !0;
|
|
8664
8667
|
}
|
|
8665
8668
|
async execute(t) {
|
|
8666
|
-
let n = null, r = Date.now(), i =
|
|
8669
|
+
let n = null, r = Date.now(), i = f.join(t.workspacePath, ".logs"), a = f.join(i, `step-${t.stepId}.log`), o = f.join(t.workspacePath, "wd");
|
|
8667
8670
|
try {
|
|
8668
|
-
e.mkdirSync(i, { recursive: !0 }), e.mkdirSync(
|
|
8671
|
+
e.mkdirSync(i, { recursive: !0 }), e.mkdirSync(o, { recursive: !0 }), e.chmodSync(o, 511), n = e.openSync(a, "a");
|
|
8669
8672
|
} catch (e) {
|
|
8670
8673
|
return {
|
|
8671
8674
|
done: Promise.resolve({
|
|
@@ -8677,13 +8680,13 @@ var Po = class {
|
|
|
8677
8680
|
logFilePath: ""
|
|
8678
8681
|
};
|
|
8679
8682
|
}
|
|
8680
|
-
let
|
|
8681
|
-
t.image ? (
|
|
8683
|
+
let s, c;
|
|
8684
|
+
t.image ? (s = "docker", c = [
|
|
8682
8685
|
"run",
|
|
8683
8686
|
"--rm",
|
|
8684
8687
|
"--init",
|
|
8685
8688
|
"-v",
|
|
8686
|
-
`${
|
|
8689
|
+
`${o}:/workspace`,
|
|
8687
8690
|
"-w",
|
|
8688
8691
|
"/workspace",
|
|
8689
8692
|
"--entrypoint",
|
|
@@ -8691,15 +8694,15 @@ var Po = class {
|
|
|
8691
8694
|
t.image,
|
|
8692
8695
|
"-c",
|
|
8693
8696
|
t.command
|
|
8694
|
-
]) : (
|
|
8697
|
+
]) : (s = process.env.SHELL || "sh", c = [
|
|
8695
8698
|
"-e",
|
|
8696
8699
|
"-c",
|
|
8697
8700
|
t.command
|
|
8698
|
-
]), process.env.DEBUG && console.log("$ " +
|
|
8699
|
-
let
|
|
8701
|
+
]), process.env.DEBUG && console.log("$ " + s, c.join(" "));
|
|
8702
|
+
let l;
|
|
8700
8703
|
try {
|
|
8701
|
-
|
|
8702
|
-
cwd:
|
|
8704
|
+
l = v(s, c, {
|
|
8705
|
+
cwd: o,
|
|
8703
8706
|
env: {
|
|
8704
8707
|
...process.env,
|
|
8705
8708
|
...t.env
|
|
@@ -8722,30 +8725,30 @@ var Po = class {
|
|
|
8722
8725
|
error: /* @__PURE__ */ Error(`Failed to spawn process: ${t.message}`)
|
|
8723
8726
|
}),
|
|
8724
8727
|
cancel: async () => {},
|
|
8725
|
-
logFilePath:
|
|
8728
|
+
logFilePath: a
|
|
8726
8729
|
};
|
|
8727
8730
|
}
|
|
8728
|
-
let
|
|
8731
|
+
let u = !1, d = null;
|
|
8729
8732
|
return {
|
|
8730
8733
|
done: new Promise((i) => {
|
|
8731
8734
|
let a = !1, o = (t) => {
|
|
8732
8735
|
if (!a) {
|
|
8733
|
-
a = !0,
|
|
8736
|
+
a = !0, d && clearTimeout(d);
|
|
8734
8737
|
try {
|
|
8735
8738
|
e.closeSync(n);
|
|
8736
8739
|
} catch {}
|
|
8737
8740
|
i(t);
|
|
8738
8741
|
}
|
|
8739
8742
|
};
|
|
8740
|
-
t.timeoutMs && (
|
|
8741
|
-
|
|
8742
|
-
}, t.timeoutMs),
|
|
8743
|
+
t.timeoutMs && (d = setTimeout(() => {
|
|
8744
|
+
u = !0, this.killProcessGroup(l);
|
|
8745
|
+
}, t.timeoutMs), d.unref()), l.on("close", (e) => {
|
|
8743
8746
|
o({
|
|
8744
|
-
exitCode: e ?? (
|
|
8747
|
+
exitCode: e ?? (u ? 130 : 1),
|
|
8745
8748
|
durationMs: Date.now() - r,
|
|
8746
|
-
error:
|
|
8749
|
+
error: u ? /* @__PURE__ */ Error("Step timed out or was cancelled by user") : void 0
|
|
8747
8750
|
});
|
|
8748
|
-
}),
|
|
8751
|
+
}), l.on("error", (e) => {
|
|
8749
8752
|
o({
|
|
8750
8753
|
exitCode: 1,
|
|
8751
8754
|
durationMs: Date.now() - r,
|
|
@@ -8754,9 +8757,9 @@ var Po = class {
|
|
|
8754
8757
|
});
|
|
8755
8758
|
}),
|
|
8756
8759
|
cancel: async () => {
|
|
8757
|
-
|
|
8760
|
+
u = !0, this.killProcessGroup(l);
|
|
8758
8761
|
},
|
|
8759
|
-
logFilePath:
|
|
8762
|
+
logFilePath: a
|
|
8760
8763
|
};
|
|
8761
8764
|
}
|
|
8762
8765
|
killProcessGroup(e) {
|
|
@@ -8776,26 +8779,46 @@ async function zo() {
|
|
|
8776
8779
|
return await e.isSupported() ? (console.log("ā” Selected Execution Driver: Systemd (cgroups enabled)"), e) : (console.log("š¦ Selected Execution Driver: Standard Process (Fallback)"), new Ro());
|
|
8777
8780
|
}
|
|
8778
8781
|
//#endregion
|
|
8782
|
+
//#region src/signals.ts
|
|
8783
|
+
async function Bo(e) {
|
|
8784
|
+
let t = !1;
|
|
8785
|
+
async function n(n) {
|
|
8786
|
+
if (!t) {
|
|
8787
|
+
t = !0, console.log(`\nš Received ${n}. Initiating graceful shutdown...`), setTimeout(() => {
|
|
8788
|
+
console.error("ā ļø Graceful shutdown timed out after 10s. Forcing exit!"), process.exit(1);
|
|
8789
|
+
}, 1e4).unref();
|
|
8790
|
+
try {
|
|
8791
|
+
Vo.isStopping = !0, e.length > 0 && (console.log("āļø Waiting for active worker jobs to drain..."), await Promise.allSettled(e)), console.log("⨠Engine stopped cleanly. Goodbye!"), process.exit(0);
|
|
8792
|
+
} catch (e) {
|
|
8793
|
+
console.error("ā Error during graceful shutdown:", e.message), process.exit(1);
|
|
8794
|
+
}
|
|
8795
|
+
}
|
|
8796
|
+
}
|
|
8797
|
+
process.on("SIGINT", () => n("SIGINT")), process.on("SIGTERM", () => n("SIGTERM"));
|
|
8798
|
+
}
|
|
8799
|
+
//#endregion
|
|
8779
8800
|
//#region src/worker.ts
|
|
8780
|
-
var
|
|
8781
|
-
function
|
|
8782
|
-
|
|
8801
|
+
var Vo = { isStopping: !1 };
|
|
8802
|
+
function Ho(e, t, n, r) {
|
|
8803
|
+
Vo.isStopping = !1;
|
|
8804
|
+
let i = Array.from({ length: e }, (e, i) => Uo(`worker-${i + 1}`, t, n, r));
|
|
8805
|
+
return Bo(i), i;
|
|
8783
8806
|
}
|
|
8784
|
-
async function
|
|
8807
|
+
async function Uo(e, t, n, r) {
|
|
8785
8808
|
let i = await zo();
|
|
8786
|
-
for (console.log(`[${e}] š Worker started. Driver: ${i.name}`); !
|
|
8809
|
+
for (console.log(`[${e}] š Worker started. Driver: ${i.name}`); !Vo.isStopping;) try {
|
|
8787
8810
|
let a = await t.claimNextJob();
|
|
8788
8811
|
if (!a) {
|
|
8789
8812
|
await new Promise((e) => setTimeout(e, 2e3));
|
|
8790
8813
|
continue;
|
|
8791
8814
|
}
|
|
8792
|
-
await
|
|
8815
|
+
await Wo(e, a, t, n, r, i);
|
|
8793
8816
|
} catch (t) {
|
|
8794
8817
|
console.error(`[${e}] ā ļø Worker execution loop error:`, t), await new Promise((e) => setTimeout(e, 5e3));
|
|
8795
8818
|
}
|
|
8796
8819
|
console.log(`[${e}] š Worker loop stopped cleanly.`);
|
|
8797
8820
|
}
|
|
8798
|
-
async function
|
|
8821
|
+
async function Wo(e, t, n, r, i, a) {
|
|
8799
8822
|
console.log(`\n[${e}] š¦ Claimed Job #${t.id} (Workflow: ${t.workflow_id})`);
|
|
8800
8823
|
let o = typeof t.payload == "string" ? JSON.parse(t.payload) : t.payload, s = o.steps || [], c = o.inputs || {}, l = Date.now(), u = {
|
|
8801
8824
|
inputs: c,
|
|
@@ -8803,10 +8826,10 @@ async function Uo(e, t, n, r, i, a) {
|
|
|
8803
8826
|
secrets: r.getAll(),
|
|
8804
8827
|
steps: {}
|
|
8805
8828
|
};
|
|
8806
|
-
o.env && Object.assign(u.env, await
|
|
8829
|
+
o.env && Object.assign(u.env, await qo(o.env, u));
|
|
8807
8830
|
let d = [], f = !1, p = !1;
|
|
8808
8831
|
for (let r = 0; r < s.length; r++) {
|
|
8809
|
-
let o = s[r], c = await
|
|
8832
|
+
let o = s[r], c = await Go({
|
|
8810
8833
|
workerId: e,
|
|
8811
8834
|
jobId: t.id,
|
|
8812
8835
|
step: o,
|
|
@@ -8826,26 +8849,26 @@ async function Uo(e, t, n, r, i, a) {
|
|
|
8826
8849
|
break;
|
|
8827
8850
|
}
|
|
8828
8851
|
}
|
|
8829
|
-
f && d.length < s.length &&
|
|
8852
|
+
f && d.length < s.length && Yo(s, d.length, d);
|
|
8830
8853
|
let m = p ? "cancelled" : f ? "failed" : "success";
|
|
8831
8854
|
await n.finishJob(t.id, m), console.log(`[${e}] ā
Job #${t.id} completed as: ${m}`);
|
|
8832
|
-
let h =
|
|
8833
|
-
await n.saveReport(t.id, h), await
|
|
8855
|
+
let h = Xo(t, m, l, c, u.env, d, o);
|
|
8856
|
+
await n.saveReport(t.id, h), await Zo(e, i.reporters, h);
|
|
8834
8857
|
}
|
|
8835
|
-
async function
|
|
8858
|
+
async function Go(e) {
|
|
8836
8859
|
let { workerId: t, step: n, stepIndex: r, totalSteps: i } = e, a = n.id || `step-${r}`, o = n.name || a;
|
|
8837
|
-
return console.log(`[${t}] ā¶ļø Running step ${r + 1}/${i}: ${o}`), n.eval ?
|
|
8860
|
+
return console.log(`[${t}] ā¶ļø Running step ${r + 1}/${i}: ${o}`), n.eval ? Ko({
|
|
8838
8861
|
...e,
|
|
8839
8862
|
stepId: a,
|
|
8840
8863
|
stepName: o,
|
|
8841
8864
|
evalExpr: n.eval
|
|
8842
|
-
}) :
|
|
8865
|
+
}) : Jo({
|
|
8843
8866
|
...e,
|
|
8844
8867
|
stepId: a,
|
|
8845
8868
|
stepName: o
|
|
8846
8869
|
});
|
|
8847
8870
|
}
|
|
8848
|
-
async function
|
|
8871
|
+
async function Ko(e) {
|
|
8849
8872
|
let { queue: t, jobId: n, stepId: r, stepName: i, evalExpr: a, executionContext: o } = e, s = Date.now();
|
|
8850
8873
|
try {
|
|
8851
8874
|
let e = await fn.evaluateExpression(a, o);
|
|
@@ -8889,13 +8912,13 @@ async function Go(e) {
|
|
|
8889
8912
|
};
|
|
8890
8913
|
}
|
|
8891
8914
|
}
|
|
8892
|
-
async function
|
|
8915
|
+
async function qo(e, t) {
|
|
8893
8916
|
let n = {};
|
|
8894
8917
|
if (e) for (let [r, i] of Object.entries(e)) n[r] = String(await fn.evaluateValue(i, t));
|
|
8895
8918
|
return n;
|
|
8896
8919
|
}
|
|
8897
|
-
async function
|
|
8898
|
-
let { workerId: n, jobId: r, step: i, stepId: a, stepName: o, executionContext: s, driver: c, queue: l, config: u } = t, d = await
|
|
8920
|
+
async function Jo(t) {
|
|
8921
|
+
let { workerId: n, jobId: r, step: i, stepId: a, stepName: o, executionContext: s, driver: c, queue: l, config: u } = t, d = await qo(i.env, s), f = {
|
|
8899
8922
|
jobId: r.toString(),
|
|
8900
8923
|
stepId: a,
|
|
8901
8924
|
workspacePath: `${u.storagePath}/job-${r}`,
|
|
@@ -8935,7 +8958,7 @@ async function qo(t) {
|
|
|
8935
8958
|
}
|
|
8936
8959
|
};
|
|
8937
8960
|
}
|
|
8938
|
-
function
|
|
8961
|
+
function Yo(e, t, n) {
|
|
8939
8962
|
for (let r = t; r < e.length; r++) {
|
|
8940
8963
|
let t = e[r], i = t.id || `step-${r}`;
|
|
8941
8964
|
n.push({
|
|
@@ -8949,7 +8972,7 @@ function Jo(e, t, n) {
|
|
|
8949
8972
|
});
|
|
8950
8973
|
}
|
|
8951
8974
|
}
|
|
8952
|
-
function
|
|
8975
|
+
function Xo(e, t, n, r, i, a, o) {
|
|
8953
8976
|
return {
|
|
8954
8977
|
jobId: e.id.toString(),
|
|
8955
8978
|
workflowName: e.workflow_id,
|
|
@@ -8967,7 +8990,7 @@ function Yo(e, t, n, r, i, a, o) {
|
|
|
8967
8990
|
})
|
|
8968
8991
|
};
|
|
8969
8992
|
}
|
|
8970
|
-
async function
|
|
8993
|
+
async function Zo(e, t = [], n) {
|
|
8971
8994
|
!Array.isArray(t) || t.length === 0 || (console.log(`[${e}] š¢ Dispatching execution report to ${t.length} reporter(s)...`), await Promise.allSettled(t.map(async (t) => {
|
|
8972
8995
|
try {
|
|
8973
8996
|
await t.report(n);
|
|
@@ -8977,8 +9000,34 @@ async function Xo(e, t = [], n) {
|
|
|
8977
9000
|
})));
|
|
8978
9001
|
}
|
|
8979
9002
|
//#endregion
|
|
9003
|
+
//#region src/config.ts
|
|
9004
|
+
async function Qo(e) {
|
|
9005
|
+
let n = {
|
|
9006
|
+
port: Number(e.port),
|
|
9007
|
+
database: e.database,
|
|
9008
|
+
workflows: e.workflows,
|
|
9009
|
+
workers: e.workers ? Number(e.workers) : void 0
|
|
9010
|
+
}, r = {}, a = h(e.config);
|
|
9011
|
+
t(a) && i(a).isFile() && (r = (await import(a)).default || {});
|
|
9012
|
+
let o = $o(r, n);
|
|
9013
|
+
return t(o.workflows) ? (No(o.database), o) : (console.warn(`ā ļø Warning: Workflows directory '${o.workflows}' not found.`), null);
|
|
9014
|
+
}
|
|
9015
|
+
function $o(e, t) {
|
|
9016
|
+
let n = process.env;
|
|
9017
|
+
return {
|
|
9018
|
+
port: Number(e.port || t.port || n.PORT || 11235),
|
|
9019
|
+
adminToken: e.adminToken ?? n.RUNNER_ADMIN_SECRET ?? "",
|
|
9020
|
+
database: e.database ?? t.database ?? n.RUNNER_DATABASE_URL ?? "",
|
|
9021
|
+
workflows: e.workflows ?? t.workflows ?? n.RUNNER_WORKFLOWS ?? "on/",
|
|
9022
|
+
workers: Number(e.workers ?? t.workers ?? n.RUNNER_WORKERS ?? 5),
|
|
9023
|
+
storagePath: e.storagePath ?? n.RUNNER_TMP ?? "/tmp/workspaces",
|
|
9024
|
+
env: e.env ?? {},
|
|
9025
|
+
reporters: e.reporters ?? []
|
|
9026
|
+
};
|
|
9027
|
+
}
|
|
9028
|
+
//#endregion
|
|
8980
9029
|
//#region src/reporters/json-file.reporter.ts
|
|
8981
|
-
var
|
|
9030
|
+
var es = class {
|
|
8982
9031
|
name = "json-file";
|
|
8983
9032
|
outputDir;
|
|
8984
9033
|
constructor(e) {
|
|
@@ -8986,10 +9035,10 @@ var Zo = class {
|
|
|
8986
9035
|
}
|
|
8987
9036
|
async report(t) {
|
|
8988
9037
|
e.mkdirSync(this.outputDir, { recursive: !0 });
|
|
8989
|
-
let n =
|
|
9038
|
+
let n = f.join(this.outputDir, `run-${t.jobId}.json`);
|
|
8990
9039
|
e.writeFileSync(n, JSON.stringify(t, null, 2), "utf-8"), console.log(`š Execution report saved to: ${n}`);
|
|
8991
9040
|
}
|
|
8992
|
-
},
|
|
9041
|
+
}, ts = class {
|
|
8993
9042
|
name = "slack";
|
|
8994
9043
|
webhookUrl = "";
|
|
8995
9044
|
token = "";
|
|
@@ -9013,7 +9062,7 @@ var Zo = class {
|
|
|
9013
9062
|
})
|
|
9014
9063
|
});
|
|
9015
9064
|
}
|
|
9016
|
-
},
|
|
9065
|
+
}, { values: ns, positionals: rs } = a({
|
|
9017
9066
|
allowPositionals: !0,
|
|
9018
9067
|
options: {
|
|
9019
9068
|
config: {
|
|
@@ -9043,26 +9092,15 @@ var Zo = class {
|
|
|
9043
9092
|
}
|
|
9044
9093
|
}
|
|
9045
9094
|
});
|
|
9046
|
-
function
|
|
9095
|
+
function is() {
|
|
9047
9096
|
console.log("\nš Runner CLI š\n\nUsage:\n npx -y @cloud-cli/on <command> [options]\n pnpm dlx -y @cloud-cli/on <command> [options]\n\nCommands:\n start Runs both Webhook Ingress Server and Workers (Default)\n start-server Runs Webhook Ingress Server only (API Gateway mode)\n start-workers Runs Worker Polling loops only (Scalable Worker mode)\n validate Parses and validates workflow YAML files without running\n\nOptions:\n -c, --config Path to runner.config.mjs (default: ./runner.config.mjs, env: RUNNER_CONFIG_PATH)\n -d, --database SQLite Database URL (env: RUNNER_DATABASE_URL)\n -w, --workflows Path to where your workflows are defined (default: on/, env: RUNNER_WORKFLOWS_PATH)\n -p, --port Port for Webhook Ingress Server (default: 11235, env: PORT)\n -k, --workers Number of worker thread loops to spawn (default: 5, env: RUNNER_WORKERS)\n -h, --help Show this help message\n ");
|
|
9048
9097
|
}
|
|
9049
|
-
|
|
9050
|
-
async function is() {
|
|
9051
|
-
let e = {
|
|
9052
|
-
port: Number(ts.port),
|
|
9053
|
-
database: ts.database,
|
|
9054
|
-
workflows: ts.workflows,
|
|
9055
|
-
workers: ts.workers ? Number(ts.workers) : void 0
|
|
9056
|
-
}, n = {}, r = c(ts.config);
|
|
9057
|
-
t(r) && i(r).isFile() && (n = (await import(r)).default || {});
|
|
9058
|
-
let a = ss(n, e);
|
|
9059
|
-
return t(a.workflows) ? (No(a.database), a) : (console.warn(`ā ļø Warning: Workflows directory '${a.workflows}' not found.`), null);
|
|
9060
|
-
}
|
|
9098
|
+
ns.help && (is(), process.exit(0));
|
|
9061
9099
|
function as(e) {
|
|
9062
9100
|
console.log("š Validating Workflows in:", e.workflows);
|
|
9063
|
-
let t = new
|
|
9101
|
+
let t = new xo(e.workflows), n = r(e.workflows).filter((e) => e.endsWith(".yml") || e.endsWith(".yaml"));
|
|
9064
9102
|
for (let e of n) {
|
|
9065
|
-
let n =
|
|
9103
|
+
let n = So(t.resolve(e));
|
|
9066
9104
|
console.log(` ā
${e} -> Valid! (${n.length} job matrix variant(s) generated)`);
|
|
9067
9105
|
}
|
|
9068
9106
|
}
|
|
@@ -9073,34 +9111,8 @@ async function os() {
|
|
|
9073
9111
|
queue: t
|
|
9074
9112
|
};
|
|
9075
9113
|
}
|
|
9076
|
-
function ss(
|
|
9077
|
-
let
|
|
9078
|
-
return {
|
|
9079
|
-
port: Number(e.port || t.port || n.PORT || 11235),
|
|
9080
|
-
adminToken: e.adminToken ?? n.RUNNER_ADMIN_SECRET ?? "",
|
|
9081
|
-
database: e.database ?? t.database ?? n.RUNNER_DATABASE_URL ?? "",
|
|
9082
|
-
workflows: e.workflows ?? t.workflows ?? n.RUNNER_WORKFLOWS ?? "on/",
|
|
9083
|
-
workers: Number(e.workers ?? t.workers ?? n.RUNNER_WORKERS ?? 5),
|
|
9084
|
-
storagePath: e.storagePath ?? n.RUNNER_TMP ?? "/tmp/workspaces",
|
|
9085
|
-
env: e.env ?? {},
|
|
9086
|
-
reporters: e.reporters ?? []
|
|
9087
|
-
};
|
|
9088
|
-
}
|
|
9089
|
-
var cs = !1, ls = async (e) => {
|
|
9090
|
-
if (!cs) {
|
|
9091
|
-
cs = !0, console.log(`\nš Received ${e}. Initiating graceful shutdown...`), setTimeout(() => {
|
|
9092
|
-
console.error("ā ļø Graceful shutdown timed out after 10s. Forcing exit!"), process.exit(1);
|
|
9093
|
-
}, 1e4).unref();
|
|
9094
|
-
try {
|
|
9095
|
-
$o && await $o.stop(), Bo.isStopping = !0, es.length > 0 && (console.log("āļø Waiting for active worker jobs to drain..."), await Promise.allSettled(es)), console.log("⨠Engine stopped cleanly. Goodbye!"), process.exit(0);
|
|
9096
|
-
} catch (e) {
|
|
9097
|
-
console.error("ā Error during graceful shutdown:", e.message), process.exit(1);
|
|
9098
|
-
}
|
|
9099
|
-
}
|
|
9100
|
-
};
|
|
9101
|
-
process.on("SIGINT", () => ls("SIGINT")), process.on("SIGTERM", () => ls("SIGTERM"));
|
|
9102
|
-
async function us() {
|
|
9103
|
-
let e = ns[0] || "start", t = await is();
|
|
9114
|
+
async function ss() {
|
|
9115
|
+
let e = rs[0] || "start", t = await Qo(ns);
|
|
9104
9116
|
switch (t || process.exit(1), e) {
|
|
9105
9117
|
case "validate":
|
|
9106
9118
|
as(t);
|
|
@@ -9108,11 +9120,11 @@ async function us() {
|
|
|
9108
9120
|
case "start-server": {
|
|
9109
9121
|
console.log("š Starting Ingress Gateway...");
|
|
9110
9122
|
let { queue: e, secrets: n } = await os();
|
|
9111
|
-
|
|
9123
|
+
await wo.withPort({
|
|
9124
|
+
config: t,
|
|
9112
9125
|
queue: e,
|
|
9113
9126
|
secrets: n,
|
|
9114
9127
|
adminToken: t.adminToken,
|
|
9115
|
-
workflows: [],
|
|
9116
9128
|
port: t.port
|
|
9117
9129
|
});
|
|
9118
9130
|
break;
|
|
@@ -9120,24 +9132,12 @@ async function us() {
|
|
|
9120
9132
|
case "start-workers": {
|
|
9121
9133
|
console.log(`āļø Starting ${t.workers} Worker Loop(s)...`);
|
|
9122
9134
|
let { queue: e, secrets: n } = await os();
|
|
9123
|
-
|
|
9124
|
-
break;
|
|
9125
|
-
}
|
|
9126
|
-
case "start": {
|
|
9127
|
-
console.log("š Starting Full Runner Engine (Ingress + Workers)...");
|
|
9128
|
-
let e = await wo.from(t.workflows), { queue: n, secrets: r } = await os();
|
|
9129
|
-
$o = await Sn.withPort({
|
|
9130
|
-
queue: n,
|
|
9131
|
-
secrets: r,
|
|
9132
|
-
adminToken: t.adminToken,
|
|
9133
|
-
workflows: e,
|
|
9134
|
-
port: t.port
|
|
9135
|
-
}), es = Vo(t.workers, n, r, t);
|
|
9135
|
+
Ho(t.workers, e, n, t);
|
|
9136
9136
|
break;
|
|
9137
9137
|
}
|
|
9138
|
-
default: console.error(`ā Unknown command: '${e}'`),
|
|
9138
|
+
default: console.error(`ā Unknown command: '${e}'`), is(), process.exit(1);
|
|
9139
9139
|
}
|
|
9140
9140
|
}
|
|
9141
|
-
|
|
9141
|
+
ss().catch(console.error);
|
|
9142
9142
|
//#endregion
|
|
9143
|
-
export { xn as HtmlReporter,
|
|
9143
|
+
export { xn as HtmlReporter, es as JsonFileReporter, ts as SlackReporter };
|