@scarn/sdk 0.8.19 → 0.8.21
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/auth/api-token-cache.d.ts +24 -0
- package/dist/auth/api-token-source.d.ts +39 -0
- package/dist/auth/authenticated-fetch.d.ts +10 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.js +20 -0
- package/dist/automations/index.js +6 -6
- package/dist/{chunk-pqtd0hr7.js → chunk-08gcnrzh.js} +2 -2
- package/dist/{chunk-2tmrw253.js → chunk-0he2dx5n.js} +5 -5
- package/dist/{chunk-aknfw08j.js → chunk-59arcerk.js} +16 -13
- package/dist/{chunk-61jf8b6s.js → chunk-5dny5jg1.js} +11 -1
- package/dist/{chunk-46wmsgv7.js → chunk-5say64w8.js} +1 -1
- package/dist/{chunk-9we3vqsv.js → chunk-6p340dd4.js} +2 -2
- package/dist/{chunk-19brnwkp.js → chunk-8hsk6f6b.js} +1 -1
- package/dist/{chunk-098740f7.js → chunk-8kzaxz52.js} +1 -1
- package/dist/{chunk-mmy80pec.js → chunk-8tmsvkmj.js} +5 -5
- package/dist/{chunk-e0pt5x0e.js → chunk-aph2js2v.js} +5 -5
- package/dist/chunk-azss2d1n.js +1036 -0
- package/dist/{chunk-t1dq2c2s.js → chunk-gasw078g.js} +5 -5
- package/dist/{chunk-0c60x3v8.js → chunk-h1v6w1fh.js} +5 -5
- package/dist/{chunk-tvjcfh6s.js → chunk-k57h6qke.js} +8 -5
- package/dist/{chunk-x0hjhqrf.js → chunk-mp2rqtcj.js} +1 -1
- package/dist/{chunk-aemxz9r7.js → chunk-mrzn5tq4.js} +1 -1
- package/dist/{chunk-qgkx89eg.js → chunk-nkm31g10.js} +3 -3
- package/dist/{chunk-833ef6dg.js → chunk-p74r4y6j.js} +14 -14
- package/dist/{chunk-p1fs73bd.js → chunk-pwyj6qf3.js} +2 -2
- package/dist/{chunk-evb3hw48.js → chunk-qt81x1pm.js} +7 -4
- package/dist/{chunk-mzj1j0p5.js → chunk-r3sbp2wn.js} +3 -3
- package/dist/{chunk-rphfy0fj.js → chunk-vsp708vw.js} +1 -1
- package/dist/{chunk-yf15kdte.js → chunk-xhpp6qz8.js} +96 -96
- package/dist/{chunk-jj9pezwb.js → chunk-xqfj56m9.js} +43 -3
- package/dist/{chunk-y34zsgsw.js → chunk-y7ac1t9c.js} +1 -1
- package/dist/{chunk-3zp2qtf8.js → chunk-y81cr6tp.js} +38 -14
- package/dist/{chunk-ymywp5ht.js → chunk-zxzvketc.js} +5 -5
- package/dist/client.d.ts +5 -1
- package/dist/client.js +2 -2
- package/dist/connectors/index.js +4 -4
- package/dist/contracts/artifacts.js +2 -2
- package/dist/contracts/automation-document/index.js +3 -3
- package/dist/contracts/pipeline-document/index.js +5 -3
- package/dist/contracts/pipeline-document/routes.d.ts +9 -0
- package/dist/contracts/pipeline-document/schema.d.ts +40 -1
- package/dist/contracts/step-artifact-submissions.js +2 -2
- package/dist/contracts/work-item-changes.js +1 -1
- package/dist/create-api-client.d.ts +11 -0
- package/dist/defaults/index.js +32 -871
- package/dist/defaults/load-push-defaults.d.ts +11 -4
- package/dist/defaults/project-ref.d.ts +2 -4
- package/dist/definitions/automations/automations-client.d.ts +2 -1
- package/dist/definitions/automations/index.js +3 -3
- package/dist/definitions/environments/environments-client.d.ts +2 -1
- package/dist/definitions/environments/index.js +10 -10
- package/dist/definitions/pipelines/index.js +3 -3
- package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +2 -1
- package/dist/definitions/steps/index.js +14 -14
- package/dist/definitions/steps/step-definitions-client.d.ts +2 -1
- package/dist/definitions/validation/index.js +10 -10
- package/dist/devcontainer-config-path.js +2 -2
- package/dist/env-vars.js +2 -2
- package/dist/environment.js +7 -7
- 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/health-checks.js +2 -2
- package/dist/index.js +23 -23
- package/dist/managed-runtimes.js +2 -2
- package/dist/opencode-mcp.js +3 -3
- package/dist/pipelines/index.d.ts +1 -1
- package/dist/pipelines/index.js +6 -6
- package/dist/pipelines/model.d.ts +10 -4
- package/dist/pipelines/types.d.ts +13 -1
- package/dist/push/index.js +43 -42
- package/dist/push/push-from-directory.d.ts +6 -1
- package/dist/repo-config.js +2 -2
- package/dist/resolve-environment.js +8 -8
- package/dist/task-plane-client.d.ts +6 -0
- package/package.json +6 -2
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-6tra3gw8.js";
|
|
5
5
|
import {
|
|
6
6
|
environmentNameSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-aph2js2v.js";
|
|
8
8
|
import {
|
|
9
9
|
devcontainerConfigPathSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-8kzaxz52.js";
|
|
11
11
|
import {
|
|
12
12
|
MANAGED_RUNTIME_IDS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5say64w8.js";
|
|
14
14
|
import {
|
|
15
15
|
connectorIdsSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-nkm31g10.js";
|
|
17
17
|
import {
|
|
18
18
|
containsInputToken
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-mrzn5tq4.js";
|
|
20
20
|
|
|
21
21
|
// src/definitions/steps/prompt-template.ts
|
|
22
22
|
function createPromptInputProxy(path = []) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
repoConfigInputSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-vsp708vw.js";
|
|
5
5
|
import {
|
|
6
6
|
environmentNameSchema,
|
|
7
7
|
environmentRuntimeSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-aph2js2v.js";
|
|
9
9
|
import {
|
|
10
10
|
devcontainerConfigPathSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-8kzaxz52.js";
|
|
12
12
|
import {
|
|
13
13
|
envVarsSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-mrzn5tq4.js";
|
|
15
15
|
import {
|
|
16
16
|
findArtifactMarkers
|
|
17
17
|
} from "./chunk-ngy1fdcx.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
EMBEDDABLE_ARTIFACT_EXTENSIONS,
|
|
20
20
|
artifactPlatforms,
|
|
21
21
|
findArtifactFields
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-8hsk6f6b.js";
|
|
23
23
|
|
|
24
24
|
// src/definitions/validation/validate-artifacts.ts
|
|
25
25
|
function checkArtifactFields(steps) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ScarnClient,
|
|
4
4
|
TaskRuns,
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
createApiClient
|
|
6
|
+
} from "./chunk-y81cr6tp.js";
|
|
7
7
|
// src/task-plane-client.ts
|
|
8
8
|
function unwrap(result) {
|
|
9
9
|
if (result.error)
|
|
@@ -11,7 +11,10 @@ function unwrap(result) {
|
|
|
11
11
|
return result.data;
|
|
12
12
|
}
|
|
13
13
|
function createTaskPlaneClient(baseUrl, options) {
|
|
14
|
-
const client =
|
|
14
|
+
const client = createApiClient(baseUrl, {
|
|
15
|
+
headers: options?.headers,
|
|
16
|
+
fetch: options?.fetch
|
|
17
|
+
});
|
|
15
18
|
const requestHeaders = options?.requestHeaders;
|
|
16
19
|
if (requestHeaders) {
|
|
17
20
|
client.interceptors.request.use(async (request) => {
|
|
@@ -130,8 +133,8 @@ var buildTaskPlaneClient = (taskRuns) => {
|
|
|
130
133
|
};
|
|
131
134
|
|
|
132
135
|
// src/client.ts
|
|
133
|
-
function createScarnClient(baseUrl) {
|
|
134
|
-
const client =
|
|
136
|
+
function createScarnClient(baseUrl, options) {
|
|
137
|
+
const client = createApiClient(baseUrl, { fetch: options?.fetch });
|
|
135
138
|
return new ScarnClient({ client });
|
|
136
139
|
}
|
|
137
140
|
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
collectEnvPlaceholderNames,
|
|
4
4
|
isEnvPlaceholderValue,
|
|
5
5
|
openCodeResolvedMcpServerConfigSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-08gcnrzh.js";
|
|
7
7
|
import {
|
|
8
8
|
ENV_VAR_NAME_PATTERN
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-mrzn5tq4.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_external
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-xhpp6qz8.js";
|
|
13
13
|
|
|
14
14
|
// src/connectors/catalog.ts
|
|
15
15
|
var connectorAuthValues = ["none", "apiKey"];
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
stepHealthChecksInputSchema,
|
|
4
4
|
toolHealthCheckSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-y7ac1t9c.js";
|
|
6
6
|
import {
|
|
7
7
|
Runtime,
|
|
8
8
|
compileEnvironment,
|
|
9
9
|
createPromptInputProxy,
|
|
10
10
|
createPromptTemplateContext,
|
|
11
11
|
knownEnvironmentVars
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-gasw078g.js";
|
|
13
13
|
import {
|
|
14
14
|
isEnvironmentHandle
|
|
15
15
|
} from "./chunk-6tra3gw8.js";
|
|
@@ -17,40 +17,40 @@ import {
|
|
|
17
17
|
makeHandle,
|
|
18
18
|
stepCall,
|
|
19
19
|
stepNode
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-xqfj56m9.js";
|
|
21
21
|
import {
|
|
22
22
|
describeBaseBranchEnvProblem,
|
|
23
23
|
findBaseBranchEnvProblems,
|
|
24
24
|
repoConfigInputSchema
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-vsp708vw.js";
|
|
26
26
|
import {
|
|
27
27
|
DEFAULT_CODE_STEP_RUNTIME_ID
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5say64w8.js";
|
|
29
29
|
import {
|
|
30
30
|
connectorMcpCollisionMessage,
|
|
31
31
|
findConnectorMcpCollisions
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-nkm31g10.js";
|
|
33
33
|
import {
|
|
34
34
|
collectEnvPlaceholderNames,
|
|
35
35
|
isEnvPlaceholderValue,
|
|
36
36
|
openCodeMcpLocalConfigSchema,
|
|
37
37
|
openCodeMcpRefConfigSchema,
|
|
38
38
|
openCodeMcpRemoteConfigSchema
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-08gcnrzh.js";
|
|
40
40
|
import {
|
|
41
41
|
ENV_VAR_NAME_PATTERN,
|
|
42
42
|
isReservedEnvVarName
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-mrzn5tq4.js";
|
|
44
44
|
import {
|
|
45
45
|
StepDefinitions,
|
|
46
|
-
|
|
47
|
-
} from "./chunk-
|
|
46
|
+
createApiClient
|
|
47
|
+
} from "./chunk-y81cr6tp.js";
|
|
48
48
|
import {
|
|
49
49
|
buildArtifactMarker
|
|
50
50
|
} from "./chunk-ngy1fdcx.js";
|
|
51
51
|
import {
|
|
52
52
|
ARTIFACT_SCHEMA_KEYWORD
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-8hsk6f6b.js";
|
|
54
54
|
import {
|
|
55
55
|
BUILT_IN_ERRORS
|
|
56
56
|
} from "./chunk-01nfqm18.js";
|
|
@@ -313,7 +313,7 @@ import {
|
|
|
313
313
|
withParser,
|
|
314
314
|
xid,
|
|
315
315
|
xor
|
|
316
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-xhpp6qz8.js";
|
|
317
317
|
import {
|
|
318
318
|
__export
|
|
319
319
|
} from "./chunk-y64skrwp.js";
|
|
@@ -1255,8 +1255,8 @@ function codeStep(config2) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
// src/definitions/steps/step-definitions-client.ts
|
|
1257
1257
|
var ANY_OBJECT_SCHEMA = { type: "object" };
|
|
1258
|
-
function createStepDefinitionsClient(baseUrl) {
|
|
1259
|
-
const client =
|
|
1258
|
+
function createStepDefinitionsClient(baseUrl, options) {
|
|
1259
|
+
const client = createApiClient(baseUrl, { fetch: options?.fetch });
|
|
1260
1260
|
return buildStepDefinitionsClient(new StepDefinitions({ client }));
|
|
1261
1261
|
}
|
|
1262
1262
|
var buildStepDefinitionsClient = (stepDefinitions) => {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
MATCH_MODES,
|
|
4
4
|
argValueSchema,
|
|
5
5
|
conditionSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-qt81x1pm.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_external
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-xhpp6qz8.js";
|
|
10
10
|
|
|
11
11
|
// src/contracts/automation-document/schema.ts
|
|
12
12
|
var AUTOMATION_SCOPES = ["workItem", "project"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
exports_external
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-xhpp6qz8.js";
|
|
5
5
|
|
|
6
6
|
// src/contracts/pipeline-document/conditions/operators.ts
|
|
7
7
|
var COMPARISON_OPERATORS = [
|
|
@@ -177,7 +177,9 @@ var routeShape = {
|
|
|
177
177
|
pipeline: exports_external.string().min(1).optional(),
|
|
178
178
|
args: exports_external.record(exports_external.string().min(1), argValueSchema).optional(),
|
|
179
179
|
each: eachSchema.optional(),
|
|
180
|
-
partial: exports_external.literal(true).optional()
|
|
180
|
+
partial: exports_external.literal(true).optional(),
|
|
181
|
+
label: exports_external.string().min(1).max(80).optional(),
|
|
182
|
+
overridable: exports_external.literal(true).optional()
|
|
181
183
|
};
|
|
182
184
|
function noPartialWithEach(route, ctx) {
|
|
183
185
|
if (route.each !== undefined && route.partial !== undefined) {
|
|
@@ -190,12 +192,13 @@ function noPartialWithEach(route, ctx) {
|
|
|
190
192
|
}
|
|
191
193
|
var routeSchema = exports_external.strictObject(routeShape).superRefine(noPartialWithEach);
|
|
192
194
|
var otherwiseSchema = exports_external.strictObject(routeShape).omit({ when: true }).superRefine(noPartialWithEach);
|
|
193
|
-
var startSchema = exports_external.strictObject(routeShape).omit({ partial: true });
|
|
195
|
+
var startSchema = exports_external.strictObject(routeShape).omit({ partial: true, label: true, overridable: true });
|
|
194
196
|
var MATCH_MODES = ["first", "all"];
|
|
195
197
|
var nextSchema = exports_external.strictObject({
|
|
196
198
|
match: exports_external.enum(MATCH_MODES).optional(),
|
|
197
199
|
routes: exports_external.array(routeSchema).min(1),
|
|
198
|
-
otherwise: otherwiseSchema.optional()
|
|
200
|
+
otherwise: otherwiseSchema.optional(),
|
|
201
|
+
overridable: exports_external.literal(true).optional()
|
|
199
202
|
});
|
|
200
203
|
var retrySchema = exports_external.strictObject({
|
|
201
204
|
on: exports_external.array(exports_external.string().min(1)).min(1),
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
EnvironmentNotFound,
|
|
6
6
|
environmentNameSchema,
|
|
7
7
|
inlineEnvironmentReadSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-aph2js2v.js";
|
|
9
9
|
import {
|
|
10
10
|
ConnectorVarsMissing,
|
|
11
11
|
findMissingConnectorVars
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-nkm31g10.js";
|
|
13
13
|
import {
|
|
14
14
|
exports_external
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-xhpp6qz8.js";
|
|
16
16
|
|
|
17
17
|
// src/resolve-environment.ts
|
|
18
18
|
var DEVCONTAINER_DISCOVERY_PATHS = [
|