@scarn/sdk 0.8.19 → 0.8.20
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/automations/index.js +5 -5
- package/dist/{chunk-61jf8b6s.js → chunk-5dny5jg1.js} +11 -1
- package/dist/{chunk-ymywp5ht.js → chunk-91f5gm5z.js} +1 -1
- package/dist/{chunk-p1fs73bd.js → chunk-a56zc4s5.js} +1 -1
- package/dist/{chunk-evb3hw48.js → chunk-b9ja6ss5.js} +6 -3
- package/dist/{chunk-2tmrw253.js → chunk-g4j5cfpc.js} +1 -1
- package/dist/{chunk-9we3vqsv.js → chunk-habmdf89.js} +2 -2
- package/dist/{chunk-x0hjhqrf.js → chunk-mp2rqtcj.js} +1 -1
- package/dist/{chunk-mmy80pec.js → chunk-n3ywwx7n.js} +1 -1
- package/dist/{chunk-3zp2qtf8.js → chunk-rq5k7m33.js} +10 -0
- package/dist/{chunk-tvjcfh6s.js → chunk-tr3v83cn.js} +1 -1
- package/dist/{chunk-jj9pezwb.js → chunk-xqfj56m9.js} +43 -3
- package/dist/{chunk-833ef6dg.js → chunk-yq0sf8sb.js} +2 -2
- package/dist/{chunk-aknfw08j.js → chunk-z4smq8qd.js} +15 -12
- package/dist/client.js +2 -2
- package/dist/contracts/automation-document/index.js +2 -2
- package/dist/contracts/pipeline-document/index.js +4 -2
- package/dist/contracts/pipeline-document/routes.d.ts +9 -0
- package/dist/contracts/pipeline-document/schema.d.ts +40 -1
- package/dist/defaults/index.js +2 -2
- package/dist/definitions/automations/index.js +2 -2
- package/dist/definitions/environments/index.js +2 -2
- package/dist/definitions/pipelines/index.js +2 -2
- package/dist/definitions/steps/index.js +3 -3
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +5 -1
- package/dist/generated/types.gen.d.ts +298 -0
- package/dist/index.js +11 -11
- package/dist/pipelines/index.d.ts +1 -1
- package/dist/pipelines/index.js +5 -5
- package/dist/pipelines/model.d.ts +10 -4
- package/dist/pipelines/types.d.ts +13 -1
- package/dist/push/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
WORK_ITEM_TOP_LEVEL_FIELDS,
|
|
20
20
|
createPipelineDefinitionsClient,
|
|
21
21
|
resolveWorkItemFieldPath
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-91f5gm5z.js";
|
|
23
23
|
import {
|
|
24
24
|
after,
|
|
25
25
|
all,
|
|
@@ -55,21 +55,21 @@ import {
|
|
|
55
55
|
sum,
|
|
56
56
|
workItem,
|
|
57
57
|
workItemField
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-z4smq8qd.js";
|
|
59
59
|
import {
|
|
60
60
|
attach,
|
|
61
61
|
defineAutomation,
|
|
62
62
|
onEvent,
|
|
63
63
|
skip
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import"./chunk-
|
|
66
|
-
import"./chunk-
|
|
64
|
+
} from "./chunk-habmdf89.js";
|
|
65
|
+
import"./chunk-mp2rqtcj.js";
|
|
66
|
+
import"./chunk-a56zc4s5.js";
|
|
67
67
|
import {
|
|
68
68
|
createScarnClient,
|
|
69
69
|
createTaskPlaneClient
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import"./chunk-
|
|
72
|
-
import"./chunk-
|
|
70
|
+
} from "./chunk-tr3v83cn.js";
|
|
71
|
+
import"./chunk-5dny5jg1.js";
|
|
72
|
+
import"./chunk-b9ja6ss5.js";
|
|
73
73
|
import {
|
|
74
74
|
ARTIFACT_BRAND,
|
|
75
75
|
Artifact,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
stepEnvironmentHandle,
|
|
100
100
|
toStepHandle,
|
|
101
101
|
toStepSpec
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-yq0sf8sb.js";
|
|
103
103
|
import"./chunk-y34zsgsw.js";
|
|
104
104
|
import {
|
|
105
105
|
Env,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
renderPromptTemplate
|
|
116
116
|
} from "./chunk-t1dq2c2s.js";
|
|
117
117
|
import"./chunk-6tra3gw8.js";
|
|
118
|
-
import"./chunk-
|
|
118
|
+
import"./chunk-xqfj56m9.js";
|
|
119
119
|
import {
|
|
120
120
|
PipelineBuildError,
|
|
121
121
|
formatIssue
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
WorkItemCommentDrafts,
|
|
187
187
|
WorkItemComments,
|
|
188
188
|
WorkItems
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-rq5k7m33.js";
|
|
190
190
|
import {
|
|
191
191
|
ARTIFACT_MARKER_SCHEME,
|
|
192
192
|
buildArtifactMarker,
|
|
@@ -13,6 +13,6 @@ export { PipelineBuildError, formatIssue } from "./errors";
|
|
|
13
13
|
export type { BuildIssue } from "./errors";
|
|
14
14
|
export type { SourceSite } from "./source";
|
|
15
15
|
export type { Arg, Args, ErrorValue, JsonLiteral, Literal, Placeholder, Ref, UntypedPlaceholder, } from "./ref-types";
|
|
16
|
-
export type { BuiltInError, CatchContext, ConversationResult, DecisionResult, EachOptions, EachTarget, FlowChain, Mergeable, NextContext, NextOptions, NextRoute, NodeHandle, PartialTarget, PipelineStep, ReplyInput, ReplyResult, StepSettings, Target, Terminal, WaitError, WaitHandle, WaitSettings, } from "./types";
|
|
16
|
+
export type { BuiltInError, CatchContext, ConversationResult, DecisionResult, EachOptions, EachTarget, FlowChain, Mergeable, NextContext, NextOptions, NextRoute, NodeHandle, OtherwiseRoute, PartialTarget, PipelineStep, ReplyInput, ReplyResult, StepSettings, Target, Terminal, WaitError, WaitHandle, WaitSettings, } from "./types";
|
|
17
17
|
export type { StepRef } from "../definitions/steps/step-ref";
|
|
18
18
|
export type { Catch, Condition as ConditionJson, DecisionAction, DecisionBody, ListArg, JsonSchema, JsonValue, PipelineDocument, PipelineNode, StepCatalog, Next, Otherwise, Route, StepContract, ToleratedFailures, } from "../contracts/pipeline-document";
|
package/dist/pipelines/index.js
CHANGED
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
sum,
|
|
35
35
|
workItem,
|
|
36
36
|
workItemField
|
|
37
|
-
} from "../chunk-
|
|
38
|
-
import"../chunk-
|
|
39
|
-
import"../chunk-
|
|
40
|
-
import"../chunk-
|
|
41
|
-
import"../chunk-
|
|
37
|
+
} from "../chunk-z4smq8qd.js";
|
|
38
|
+
import"../chunk-mp2rqtcj.js";
|
|
39
|
+
import"../chunk-5dny5jg1.js";
|
|
40
|
+
import"../chunk-b9ja6ss5.js";
|
|
41
|
+
import"../chunk-xqfj56m9.js";
|
|
42
42
|
import {
|
|
43
43
|
PipelineBuildError,
|
|
44
44
|
formatIssue
|
|
@@ -77,15 +77,21 @@ export interface CatchData {
|
|
|
77
77
|
readonly target: TargetSpec;
|
|
78
78
|
readonly site: SourceSite | null;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
/** A route's target with its `label` and `overridable` flag. */
|
|
81
|
+
export interface OtherwiseData {
|
|
82
82
|
readonly target: TargetSpec;
|
|
83
|
+
readonly label: string | undefined;
|
|
84
|
+
readonly overridable: true | undefined;
|
|
85
|
+
}
|
|
86
|
+
export interface RouteData extends OtherwiseData {
|
|
87
|
+
readonly when: ((r: object) => object) | undefined;
|
|
83
88
|
}
|
|
84
|
-
/** The `.next(...)` call: its routes, `otherwise`,
|
|
89
|
+
/** The `.next(...)` call: its routes, `otherwise`, match mode and `overridable`. */
|
|
85
90
|
export interface NextData {
|
|
86
91
|
readonly match: "first" | "all" | undefined;
|
|
87
92
|
readonly routes: readonly RouteData[];
|
|
88
|
-
readonly otherwise:
|
|
93
|
+
readonly otherwise: OtherwiseData | undefined;
|
|
94
|
+
readonly overridable: true | undefined;
|
|
89
95
|
readonly site: SourceSite | null;
|
|
90
96
|
}
|
|
91
97
|
export interface ChainData {
|
|
@@ -83,6 +83,16 @@ export type TargetArg<C, T> = T | ((r: C) => T);
|
|
|
83
83
|
export interface NextRoute<C> {
|
|
84
84
|
when?: (r: C) => Condition;
|
|
85
85
|
to: TargetArg<C, NextTarget>;
|
|
86
|
+
/** Names the route for the people and tools that pick it; unique within one `.next(...)`. */
|
|
87
|
+
label?: string;
|
|
88
|
+
/** Lets a person overrule a visit onto this route. */
|
|
89
|
+
overridable?: true;
|
|
90
|
+
}
|
|
91
|
+
/** `otherwise` with a `label` or `overridable`. */
|
|
92
|
+
export interface OtherwiseRoute<C> {
|
|
93
|
+
to: TargetArg<C, NextTarget>;
|
|
94
|
+
label?: string;
|
|
95
|
+
overridable?: true;
|
|
86
96
|
}
|
|
87
97
|
/**
|
|
88
98
|
* The routes of `.next(...)`. In `"first"` mode (the default) the first
|
|
@@ -93,7 +103,9 @@ export interface NextOptions<C> {
|
|
|
93
103
|
match?: "first" | "all";
|
|
94
104
|
routes: readonly [NextRoute<C>, ...NextRoute<C>[]];
|
|
95
105
|
/** Taken when no route with a `when` matched. With nothing taken, the path ends there. */
|
|
96
|
-
otherwise?: TargetArg<C, NextTarget>;
|
|
106
|
+
otherwise?: TargetArg<C, NextTarget> | OtherwiseRoute<C>;
|
|
107
|
+
/** Makes every route overridable, except routes without `when` in `"all"` mode. */
|
|
108
|
+
overridable?: true;
|
|
97
109
|
}
|
|
98
110
|
export interface Routable<C, Out> {
|
|
99
111
|
/** Where to go next: one target, or routes with conditions. Ends the chain. */
|
package/dist/push/index.js
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
EnvironmentsApiError,
|
|
4
4
|
createEnvironmentsClient
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-n3ywwx7n.js";
|
|
6
6
|
import {
|
|
7
7
|
AutomationsApiError,
|
|
8
8
|
createAutomationsClient
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-g4j5cfpc.js";
|
|
10
10
|
import {
|
|
11
11
|
assertValidDefinitionSpecs
|
|
12
12
|
} from "../chunk-0c60x3v8.js";
|
|
13
13
|
import {
|
|
14
14
|
PipelineDefinitionsApiError,
|
|
15
15
|
createPipelineDefinitionsClient
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-91f5gm5z.js";
|
|
17
17
|
import {
|
|
18
18
|
createStepDefinitionsClient,
|
|
19
19
|
stepEnvironmentHandle,
|
|
20
20
|
toStepSpec
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-yq0sf8sb.js";
|
|
22
22
|
import"../chunk-y34zsgsw.js";
|
|
23
23
|
import"../chunk-t1dq2c2s.js";
|
|
24
24
|
import {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
isStepDefinitionSpec,
|
|
27
27
|
stepsInModule
|
|
28
28
|
} from "../chunk-6tra3gw8.js";
|
|
29
|
-
import"../chunk-
|
|
29
|
+
import"../chunk-xqfj56m9.js";
|
|
30
30
|
import"../chunk-y11p1q7r.js";
|
|
31
31
|
import"../chunk-rphfy0fj.js";
|
|
32
32
|
import"../chunk-e0pt5x0e.js";
|
|
@@ -35,7 +35,7 @@ import"../chunk-46wmsgv7.js";
|
|
|
35
35
|
import"../chunk-qgkx89eg.js";
|
|
36
36
|
import"../chunk-pqtd0hr7.js";
|
|
37
37
|
import"../chunk-aemxz9r7.js";
|
|
38
|
-
import"../chunk-
|
|
38
|
+
import"../chunk-rq5k7m33.js";
|
|
39
39
|
import"../chunk-ngy1fdcx.js";
|
|
40
40
|
import"../chunk-19brnwkp.js";
|
|
41
41
|
import"../chunk-01nfqm18.js";
|