@cloud-cli/on 1.6.5 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/on.js +53 -36
- package/dist/server.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/on.js
CHANGED
|
@@ -8326,8 +8326,7 @@ var To = class e {
|
|
|
8326
8326
|
for (let n of this.workflows) {
|
|
8327
8327
|
if (n.on.provider !== e) continue;
|
|
8328
8328
|
if (n.on.if) try {
|
|
8329
|
-
|
|
8330
|
-
if (process.env.DEBUG && console.log("shouldRun", typeof e, e), !e) {
|
|
8329
|
+
if (!await mn.evaluateConditions(n.on.if, { inputs: t })) {
|
|
8331
8330
|
console.log(`⏩ Skipped ${n.id} based on conditions: ${n.on.if}`, { inputs: t });
|
|
8332
8331
|
continue;
|
|
8333
8332
|
}
|
|
@@ -8356,23 +8355,27 @@ var To = class e {
|
|
|
8356
8355
|
failed: "bg-rose-500/10 text-rose-400",
|
|
8357
8356
|
running: "bg-indigo-500/10 text-indigo-400 animate-pulse",
|
|
8358
8357
|
_: "bg-gray-500/10 text-gray-400"
|
|
8359
|
-
}, r =
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
<
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8358
|
+
}, r = (e) => {
|
|
8359
|
+
switch (e) {
|
|
8360
|
+
case "success": return "bg-emerald-400";
|
|
8361
|
+
case "failed": return "bg-rose-400";
|
|
8362
|
+
case "running": return "bg-indigo-400 animate-pulse";
|
|
8363
|
+
default: return "bg-gray-500";
|
|
8364
|
+
}
|
|
8365
|
+
}, i = t.map((e) => `
|
|
8366
|
+
<div class="py-3 px-4 block md:hidden bg-gray-900/60">
|
|
8367
|
+
<div class="flex items-center justify-between gap-2 mb-1">
|
|
8368
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
8369
|
+
<span class="w-2.5 h-2.5 rounded-full ${r(e.status)} flex-shrink-0"></span>
|
|
8370
|
+
<span class="font-medium text-white truncate">${e.workflow_id}</span>
|
|
8371
|
+
</div>
|
|
8372
|
+
<a href="/runs/${e.id}" class="shrink-0 text-xs bg-gray-800 hover:bg-gray-700 text-gray-300 px-2.5 py-1 rounded border border-gray-700 whitespace-nowrap">Trace</a>
|
|
8373
|
+
</div>
|
|
8374
|
+
<div class="flex items-center gap-2 text-xs text-gray-400 pl-[18px]">
|
|
8375
|
+
#${e.id}
|
|
8376
|
+
</div>
|
|
8377
|
+
</div>
|
|
8378
|
+
`).join(""), a = `<!DOCTYPE html>
|
|
8376
8379
|
<html lang="en" class="dark">
|
|
8377
8380
|
<head>
|
|
8378
8381
|
<meta charset="UTF-8">
|
|
@@ -8392,25 +8395,43 @@ var To = class e {
|
|
|
8392
8395
|
</span>
|
|
8393
8396
|
</div>
|
|
8394
8397
|
|
|
8395
|
-
<div class="bg-gray-900 border border-gray-800 rounded-xl overflow-hidden">
|
|
8398
|
+
<div class="bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hidden md:block">
|
|
8396
8399
|
<table class="w-full text-left text-sm">
|
|
8397
8400
|
<thead class="bg-gray-800/50 text-gray-400 text-xs uppercase font-mono border-b border-gray-800">
|
|
8398
8401
|
<tr>
|
|
8399
8402
|
<th class="py-3 px-4">Job ID</th>
|
|
8400
8403
|
<th class="py-3 px-4">Workflow</th>
|
|
8401
8404
|
<th class="py-3 px-4">Status</th>
|
|
8402
|
-
<th class="py-3 px-4">Worker</th>
|
|
8403
|
-
<th class="py-3 px-4">Created At</th>
|
|
8404
|
-
<th class="py-3 px-4 text-right">Action</th>
|
|
8405
|
+
<th class="py-3 px-4 hidden xl:table-cell">Worker</th>
|
|
8406
|
+
<th class="py-3 px-4 hidden lg:table-cell">Created At</th>
|
|
8407
|
+
<th class="py-3 px-4 text-right hidden md:table-cell">Action</th>
|
|
8405
8408
|
</tr>
|
|
8406
8409
|
</thead>
|
|
8407
|
-
<tbody>${
|
|
8410
|
+
<tbody>${t.map((e) => {
|
|
8411
|
+
let t = n[e.status] || n._;
|
|
8412
|
+
return `
|
|
8413
|
+
<tr class="border-b border-gray-800 hover:bg-gray-900/50 transition">
|
|
8414
|
+
<td class="py-3 px-4 font-mono text-indigo-400"><a href="/runs/${e.id}" class="hover:underline">#${e.id}</a></td>
|
|
8415
|
+
<td class="py-3 px-4 font-medium text-white">${e.workflow_id}</td>
|
|
8416
|
+
<td class="py-3 px-4">
|
|
8417
|
+
<span class="px-2.5 py-0.5 rounded-full text-xs font-semibold ${t}">${e.status?.toUpperCase() ?? "?"}</span>
|
|
8418
|
+
</td>
|
|
8419
|
+
<td class="py-3 px-4 hidden xl:table-cell text-xs font-mono text-gray-400">${e.worker_id || "-"}</td>
|
|
8420
|
+
<td class="py-3 px-4 hidden lg:table-cell text-xs text-gray-400">${e.created_at}</td>
|
|
8421
|
+
<td class="py-3 px-4 text-right whitespace-nowrap hidden md:table-cell">
|
|
8422
|
+
<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>
|
|
8423
|
+
</td>
|
|
8424
|
+
</tr>
|
|
8425
|
+
`;
|
|
8426
|
+
}).join("")}</tbody>
|
|
8408
8427
|
</table>
|
|
8409
8428
|
</div>
|
|
8429
|
+
|
|
8430
|
+
<div class="md:hidden divide-y divide-gray-800">${i || "<div class=\"p-6 text-center text-gray-500\">No jobs recorded yet.</div>"}</div>
|
|
8410
8431
|
</div>
|
|
8411
8432
|
</body>
|
|
8412
|
-
</html>`,
|
|
8413
|
-
e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(
|
|
8433
|
+
</html>`, o = this.secrets.redactText(a);
|
|
8434
|
+
e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(o);
|
|
8414
8435
|
}
|
|
8415
8436
|
async renderRunDetails(e, t) {
|
|
8416
8437
|
let n = await this.queue.getJob(e);
|
|
@@ -8902,16 +8923,12 @@ async function Jo(e) {
|
|
|
8902
8923
|
}
|
|
8903
8924
|
async function Yo(e) {
|
|
8904
8925
|
let { step: t, stepIndex: n } = e, r = t.id || `step-${n}`, i = t.name || r;
|
|
8905
|
-
if (t.if) {
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
report: null
|
|
8912
|
-
};
|
|
8913
|
-
}
|
|
8914
|
-
return t.eval ? Xo({
|
|
8926
|
+
return t.if && !await mn.evaluateConditions(t.if, e.executionContext) ? (Uo && console.log(`⏩ Skipped step ${t.id} based on condition: ${t.if}`, e.executionContext), {
|
|
8927
|
+
failed: !1,
|
|
8928
|
+
cancelled: !1,
|
|
8929
|
+
skipped: !0,
|
|
8930
|
+
report: null
|
|
8931
|
+
}) : t.eval ? Xo({
|
|
8915
8932
|
...e,
|
|
8916
8933
|
stepId: r,
|
|
8917
8934
|
stepName: i,
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,mBAAmB,EACnB,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAGpB,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAAS;WAEd,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;gBAK1D,OAAO,EAAE,oBAAoB;IAczC,oBAAoB,CAAC,YAAY,EAAE,mBAAmB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