@caelo-cms/provisioning 0.11.6 → 0.11.7
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/agent-db.js +57 -5
- package/package.json +2 -2
package/dist/agent-db.js
CHANGED
|
@@ -9358,6 +9358,36 @@ var revertPageInput = object({
|
|
|
9358
9358
|
pageId: string2().uuid(),
|
|
9359
9359
|
snapshotId: string2().uuid()
|
|
9360
9360
|
}).strict();
|
|
9361
|
+
// ../shared/src/stage-status.ts
|
|
9362
|
+
var stagePhaseSchema = _enum([
|
|
9363
|
+
"queued",
|
|
9364
|
+
"preparing",
|
|
9365
|
+
"building",
|
|
9366
|
+
"publishing",
|
|
9367
|
+
"succeeded",
|
|
9368
|
+
"failed"
|
|
9369
|
+
]);
|
|
9370
|
+
var stageEtaBasisSchema = _enum(["this_run_rate", "last_successful_run"]);
|
|
9371
|
+
var stageEtaSchema = object({
|
|
9372
|
+
remainingMs: number2().int().nonnegative(),
|
|
9373
|
+
basis: stageEtaBasisSchema,
|
|
9374
|
+
includesPublish: boolean2()
|
|
9375
|
+
});
|
|
9376
|
+
var stageStatusRunSchema = object({
|
|
9377
|
+
runId: string2(),
|
|
9378
|
+
targetName: string2(),
|
|
9379
|
+
status: _enum(["queued", "running", "succeeded", "failed"]),
|
|
9380
|
+
phase: stagePhaseSchema,
|
|
9381
|
+
pagesDone: number2().int().nonnegative().nullable(),
|
|
9382
|
+
pagesTotal: number2().int().nonnegative().nullable(),
|
|
9383
|
+
startedAt: string2(),
|
|
9384
|
+
finishedAt: string2().nullable(),
|
|
9385
|
+
elapsedMs: number2().int().nonnegative(),
|
|
9386
|
+
error: string2().nullable(),
|
|
9387
|
+
failedPhase: string2().nullable(),
|
|
9388
|
+
eta: stageEtaSchema.nullable(),
|
|
9389
|
+
etaUnavailable: string2().nullable()
|
|
9390
|
+
});
|
|
9361
9391
|
// ../shared/src/staging-gate.ts
|
|
9362
9392
|
var STAGING_SESSION_TTL_SECONDS = 12 * 60 * 60;
|
|
9363
9393
|
var ENCODER = new TextEncoder;
|
|
@@ -18827,6 +18857,11 @@ function extractPgFields(error) {
|
|
|
18827
18857
|
out.column = column;
|
|
18828
18858
|
if (detail)
|
|
18829
18859
|
out.detail = detail;
|
|
18860
|
+
const message = typeof e.message === "string" ? e.message : "";
|
|
18861
|
+
if (code === "57014" && message.includes("statement timeout"))
|
|
18862
|
+
out.timeout = "statement";
|
|
18863
|
+
if (code === "55P03" && message.includes("lock timeout"))
|
|
18864
|
+
out.timeout = "lock";
|
|
18830
18865
|
return out;
|
|
18831
18866
|
}
|
|
18832
18867
|
current = e.cause;
|
|
@@ -18883,6 +18918,8 @@ function defineOperation(def) {
|
|
|
18883
18918
|
}
|
|
18884
18919
|
|
|
18885
18920
|
// ../query-api/src/pg-failure.ts
|
|
18921
|
+
var DATABASE_STATEMENT_TIMEOUT_SECONDS = 60;
|
|
18922
|
+
var DATABASE_LOCK_TIMEOUT_SECONDS = 15;
|
|
18886
18923
|
function parseKey(detail) {
|
|
18887
18924
|
if (!detail)
|
|
18888
18925
|
return null;
|
|
@@ -18936,12 +18973,27 @@ function describePgFailure(fields) {
|
|
|
18936
18973
|
return { message: "a text value is longer than allowed \u2014 shorten it", internal: false };
|
|
18937
18974
|
case "22003":
|
|
18938
18975
|
return { message: "a number is out of range", internal: false };
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18976
|
+
case "57014":
|
|
18977
|
+
if (fields.timeout === "statement") {
|
|
18978
|
+
return {
|
|
18979
|
+
message: `timed out after ${DATABASE_STATEMENT_TIMEOUT_SECONDS} s (the database's statement timeout) \u2014 a defect in Caelo, reported automatically`,
|
|
18980
|
+
internal: true
|
|
18981
|
+
};
|
|
18982
|
+
}
|
|
18983
|
+
break;
|
|
18984
|
+
case "55P03":
|
|
18985
|
+
if (fields.timeout === "lock") {
|
|
18986
|
+
return {
|
|
18987
|
+
message: `waited ${DATABASE_LOCK_TIMEOUT_SECONDS} s for a row another change holds \u2014 try the call again once that change finished`,
|
|
18988
|
+
internal: false
|
|
18989
|
+
};
|
|
18990
|
+
}
|
|
18991
|
+
break;
|
|
18944
18992
|
}
|
|
18993
|
+
return {
|
|
18994
|
+
message: "a database error the call cannot fix \u2014 a defect in Caelo, reported automatically",
|
|
18995
|
+
internal: true
|
|
18996
|
+
};
|
|
18945
18997
|
}
|
|
18946
18998
|
function rlsDenialMessage(operation, access) {
|
|
18947
18999
|
return `permission denied: ${operation} may not ${access} that row as the current actor ` + "(it is not visible on this chat's branch, or belongs to another actor or plugin). " + "Check the ids against the matching list tool; if they are right, the change needs a human with the permission.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caelo-cms/provisioning",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"description": "Pulumi-driven provisioning for Caelo CMS — `bunx @caelo-cms/provisioning --provider <self-hosted|gcp|aws|azure>` brings up a TLS-served install with Postgres + storage + secrets manager + the admin + the API gateway.",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"prepublishOnly": "tsc -b --force && bun build ../platform-updater/src/agent-db.ts --target=bun --outfile=dist/agent-db.js && tsc --project stacks/gcp/tsconfig.json && tsc --project stacks/gcp-firebase/tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@caelo-cms/shared": "^0.11.
|
|
43
|
+
"@caelo-cms/shared": "^0.11.7",
|
|
44
44
|
"@clack/prompts": "1.8.1",
|
|
45
45
|
"@pulumi/command": "^1",
|
|
46
46
|
"@pulumi/gcp": "^10",
|