@minnovate/shadow-publisher 0.14.1 → 0.15.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-publisher",
|
|
3
3
|
"displayName": "Git Publisher",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"description": "Publish an app folder's Git history to the serverless Git publishing backend and keep it updated (\"publish my app\", \"update my app\", \"fetch the engineered version\").",
|
|
6
6
|
"author": { "name": "git-publisher project" },
|
|
7
7
|
"keywords": ["git", "publish", "deploy", "serverless"]
|
package/dist/publisher.cjs
CHANGED
|
@@ -5417,6 +5417,16 @@ function ending(stages) {
|
|
|
5417
5417
|
return "stopped";
|
|
5418
5418
|
}
|
|
5419
5419
|
var POLL_INTERVAL_MS = 5e3;
|
|
5420
|
+
var MAX_REASON = 1e3;
|
|
5421
|
+
function settled(run2, stages, end) {
|
|
5422
|
+
const runId = isRecord(run2) && typeof run2["runId"] === "string" ? run2["runId"] : null;
|
|
5423
|
+
const failedAt = stages.find((s) => s.state === "failed")?.word ?? null;
|
|
5424
|
+
return { kind: "settled", ending: end, failedAt, stages, runId, reason: reasonOf(run2, end) };
|
|
5425
|
+
}
|
|
5426
|
+
function reasonOf(run2, end) {
|
|
5427
|
+
const summary = isRecord(run2) ? run2["summary"] : null;
|
|
5428
|
+
return end === "failed" && typeof summary === "string" && summary.trim() !== "" ? summary.trim().slice(0, MAX_REASON) : null;
|
|
5429
|
+
}
|
|
5420
5430
|
var FOLLOW_TIMEOUT_MS = 15 * 6e4;
|
|
5421
5431
|
async function followRun(input, opts) {
|
|
5422
5432
|
const portal = new PortalSession(opts);
|
|
@@ -5469,8 +5479,7 @@ async function followRun(input, opts) {
|
|
|
5469
5479
|
}
|
|
5470
5480
|
const end = ending(read2.stages);
|
|
5471
5481
|
if (end !== null) {
|
|
5472
|
-
|
|
5473
|
-
return { kind: "settled", ending: end, failedAt: read2.stages.find((s) => s.state === "failed")?.word ?? null, stages: read2.stages, runId };
|
|
5482
|
+
return settled(run2.run, read2.stages, end);
|
|
5474
5483
|
}
|
|
5475
5484
|
if (opts.untilChange === true && moved && answered) {
|
|
5476
5485
|
return { kind: "moving", stages: read2.stages };
|
|
@@ -7153,7 +7162,7 @@ function progressHint(r, portal, answerable = false) {
|
|
|
7153
7162
|
case "not-deployed":
|
|
7154
7163
|
return "Published and checked; this organisation does not deploy automatically.";
|
|
7155
7164
|
case "failed":
|
|
7156
|
-
return inPortal(portal, `It stopped at "${r.failedAt ?? "a step"}"
|
|
7165
|
+
return inPortal(portal, `It stopped at "${r.failedAt ?? "a step"}".${r.reason === null ? "" : ` ${r.reason}`}`, r.reason === null ? "See why" : "See it");
|
|
7157
7166
|
case "stopped":
|
|
7158
7167
|
return "A newer publication replaced this one before it went live.";
|
|
7159
7168
|
}
|