@lace-cloud/canvas 0.22.0 → 0.23.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/{chunk-WNBCPSQJ.mjs → chunk-GV2FO3E2.mjs} +25 -24
- package/dist/{chunk-WNBCPSQJ.mjs.map → chunk-GV2FO3E2.mjs.map} +1 -1
- package/dist/engine/index.cjs +24 -23
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.mts +2 -2
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.mjs +1 -1
- package/dist/index.cjs +24 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{mapping-DpFUMDvW.d.mts → mapping-B2QFbLmE.d.mts} +52 -38
- package/dist/{mapping-DpFUMDvW.d.ts → mapping-B2QFbLmE.d.ts} +52 -38
- package/package.json +3 -3
package/dist/engine/index.cjs
CHANGED
|
@@ -12489,27 +12489,25 @@ var stackPreviewSchema = import_zod.z.object({
|
|
|
12489
12489
|
bound: import_zod.z.number().optional()
|
|
12490
12490
|
})
|
|
12491
12491
|
});
|
|
12492
|
-
var
|
|
12492
|
+
var gateChangeRequestSchema = import_zod.z.object({
|
|
12493
12493
|
id: import_zod.z.string(),
|
|
12494
|
-
orgId: import_zod.z.string(),
|
|
12495
|
-
teamId: import_zod.z.string(),
|
|
12496
|
-
runId: import_zod.z.string(),
|
|
12497
|
-
bindingId: import_zod.z.string().nullable(),
|
|
12498
|
-
invocationId: import_zod.z.string().nullable(),
|
|
12499
12494
|
state: import_zod.z.string(),
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12495
|
+
requirements: import_zod.z.array(
|
|
12496
|
+
import_zod.z.object({
|
|
12497
|
+
id: import_zod.z.string(),
|
|
12498
|
+
state: import_zod.z.string(),
|
|
12499
|
+
decidedBy: import_zod.z.enum(["lace", "ecm"])
|
|
12500
|
+
})
|
|
12501
|
+
),
|
|
12502
|
+
records: import_zod.z.array(
|
|
12503
|
+
import_zod.z.object({
|
|
12504
|
+
externalSystemId: import_zod.z.string(),
|
|
12505
|
+
kind: import_zod.z.string(),
|
|
12506
|
+
externalRef: import_zod.z.string().nullable(),
|
|
12507
|
+
externalUrl: import_zod.z.string().nullable(),
|
|
12508
|
+
state: import_zod.z.string().nullable()
|
|
12509
|
+
})
|
|
12510
|
+
)
|
|
12513
12511
|
});
|
|
12514
12512
|
var runEventSchema = import_zod.z.discriminatedUnion("type", [
|
|
12515
12513
|
import_zod.z.object({ type: import_zod.z.literal("log"), text: import_zod.z.string() }),
|
|
@@ -12517,8 +12515,11 @@ var runEventSchema = import_zod.z.discriminatedUnion("type", [
|
|
|
12517
12515
|
import_zod.z.object({
|
|
12518
12516
|
type: import_zod.z.literal("gate"),
|
|
12519
12517
|
resolution: import_zod.z.object({ mode: import_zod.z.string(), reason: import_zod.z.string().optional() }),
|
|
12520
|
-
changeRequest:
|
|
12521
|
-
})
|
|
12518
|
+
changeRequest: gateChangeRequestSchema.nullable()
|
|
12519
|
+
}).refine(
|
|
12520
|
+
(gate) => gate.resolution.mode === "awaiting_approval" === (gate.changeRequest !== null),
|
|
12521
|
+
{ message: "a gate event carries a change request exactly when it holds the Run" }
|
|
12522
|
+
),
|
|
12522
12523
|
import_zod.z.object({
|
|
12523
12524
|
type: import_zod.z.literal("result"),
|
|
12524
12525
|
run: runSchema,
|
|
@@ -13449,10 +13450,10 @@ function reduceRun(prev, token, event) {
|
|
|
13449
13450
|
const lastLog = event.type === "log" ? event.text : carried?.lastLog ?? null;
|
|
13450
13451
|
const phases = event.type === "phase" ? withPhase(carried?.phases ?? [], event.name) : carried?.phases ?? [];
|
|
13451
13452
|
const submitted = carried?.submitted || event.type === "phase" && event.name === "submit";
|
|
13452
|
-
if (event.type === "gate" && event.
|
|
13453
|
+
if (event.type === "gate" && event.changeRequest !== null) {
|
|
13453
13454
|
return {
|
|
13454
13455
|
token,
|
|
13455
|
-
outcome: { kind: "awaiting-approval",
|
|
13456
|
+
outcome: { kind: "awaiting-approval", changeRequest: event.changeRequest },
|
|
13456
13457
|
lastLog,
|
|
13457
13458
|
submitted,
|
|
13458
13459
|
phases: closePhases(phases)
|