@scarn/sdk 0.8.15 → 0.8.18
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 +4 -4
- package/dist/{chunk-4ggr8af6.js → chunk-098740f7.js} +1 -1
- package/dist/{chunk-1yb2h6t9.js → chunk-0c60x3v8.js} +53 -61
- package/dist/{chunk-y2pv8d6a.js → chunk-19brnwkp.js} +1 -1
- package/dist/{chunk-b8hxjwag.js → chunk-2tmrw253.js} +2 -2
- package/dist/{chunk-z25n32z0.js → chunk-3zp2qtf8.js} +88 -9
- package/dist/{chunk-k4y5qt4y.js → chunk-46wmsgv7.js} +1 -1
- package/dist/{chunk-ar6hcj1r.js → chunk-6tra3gw8.js} +7 -1
- package/dist/{chunk-zf4gwg0p.js → chunk-833ef6dg.js} +170 -269
- package/dist/{chunk-11hbmexe.js → chunk-9we3vqsv.js} +1 -1
- package/dist/{chunk-5zsavw98.js → chunk-aemxz9r7.js} +19 -3
- package/dist/{chunk-43y7tfn4.js → chunk-aknfw08j.js} +1 -1
- package/dist/chunk-e0pt5x0e.js +167 -0
- package/dist/{chunk-cnxaagfj.js → chunk-evb3hw48.js} +1 -1
- package/dist/chunk-mmy80pec.js +64 -0
- package/dist/chunk-mzj1j0p5.js +116 -0
- package/dist/{chunk-76d1bwwz.js → chunk-p1fs73bd.js} +2 -2
- package/dist/{chunk-e1h021kq.js → chunk-pqtd0hr7.js} +13 -3
- package/dist/chunk-qgkx89eg.js +210 -0
- package/dist/chunk-rphfy0fj.js +167 -0
- package/dist/chunk-t1dq2c2s.js +224 -0
- package/dist/{chunk-7bpy3w3z.js → chunk-tvjcfh6s.js} +5 -1
- package/dist/{chunk-63f90zky.js → chunk-y34zsgsw.js} +1 -1
- package/dist/{chunk-skzxcba3.js → chunk-yf15kdte.js} +7087 -1944
- package/dist/{chunk-efs789y2.js → chunk-ymywp5ht.js} +2 -2
- package/dist/client.js +8 -2
- package/dist/connectors/catalog.d.ts +49 -0
- package/dist/connectors/index.d.ts +45 -0
- package/dist/connectors/index.js +41 -0
- package/dist/contracts/artifacts.js +2 -2
- package/dist/contracts/automation-document/index.js +3 -3
- package/dist/contracts/pipeline-document/index.js +2 -2
- package/dist/contracts/step-artifact-submissions.js +2 -2
- package/dist/contracts/work-item-changes.js +1 -1
- package/dist/defaults/index.js +2 -2
- package/dist/definitions/automations/index.js +3 -3
- package/dist/definitions/environments/define-environment.d.ts +39 -0
- package/dist/definitions/environments/environments-client.d.ts +50 -0
- package/dist/definitions/environments/index.d.ts +6 -0
- package/dist/definitions/environments/index.js +97 -0
- package/dist/definitions/pipelines/index.js +3 -3
- package/dist/definitions/steps/compile-mcps.d.ts +8 -12
- package/dist/definitions/steps/define-code-step.d.ts +18 -11
- package/dist/definitions/steps/define-step.d.ts +14 -25
- package/dist/definitions/steps/env.d.ts +30 -8
- package/dist/definitions/steps/index.js +35 -18
- package/dist/definitions/steps/mcp-server-config.d.ts +19 -9
- package/dist/definitions/steps/repo.d.ts +56 -28
- package/dist/definitions/steps/runtime.d.ts +54 -39
- package/dist/definitions/steps/step-definitions-client.d.ts +222 -63
- package/dist/definitions/steps/step-handle.d.ts +8 -1
- package/dist/definitions/validation/index.js +10 -7
- package/dist/definitions/validation/validate-repo.d.ts +3 -7
- package/dist/definitions/validation/validate-runtime.d.ts +2 -7
- package/dist/devcontainer-config-path.js +2 -2
- package/dist/env-vars.d.ts +57 -1
- package/dist/env-vars.js +8 -2
- package/dist/environment.d.ts +564 -0
- package/dist/environment.js +46 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/sdk.gen.d.ts +35 -10
- package/dist/generated/types.gen.d.ts +2151 -188
- package/dist/health-checks.d.ts +3 -3
- package/dist/health-checks.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +100 -34
- package/dist/managed-runtimes.js +2 -2
- package/dist/opencode-mcp.d.ts +75 -4
- package/dist/opencode-mcp.js +3 -2
- package/dist/pipelines/index.js +3 -3
- package/dist/push/code-step-lookup.d.ts +6 -0
- package/dist/push/code-step-lookup.js +3 -1
- package/dist/push/collect-definitions.d.ts +13 -0
- package/dist/push/index.js +132 -20
- package/dist/push/push-from-directory.d.ts +11 -2
- package/dist/repo-config.d.ts +88 -30
- package/dist/repo-config.js +22 -6
- package/dist/resolve-environment.d.ts +19 -0
- package/dist/resolve-environment.js +19 -0
- package/dist/task-plane-client.d.ts +139 -22
- package/package.json +17 -1
- package/dist/chunk-xzx08r6y.js +0 -103
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
defineAutomation,
|
|
5
5
|
onEvent,
|
|
6
6
|
skip
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-9we3vqsv.js";
|
|
8
8
|
import"../chunk-x0hjhqrf.js";
|
|
9
|
-
import"../chunk-
|
|
9
|
+
import"../chunk-p1fs73bd.js";
|
|
10
10
|
import"../chunk-61jf8b6s.js";
|
|
11
|
-
import"../chunk-
|
|
11
|
+
import"../chunk-evb3hw48.js";
|
|
12
12
|
import"../chunk-y11p1q7r.js";
|
|
13
13
|
import"../chunk-01nfqm18.js";
|
|
14
|
-
import"../chunk-
|
|
14
|
+
import"../chunk-yf15kdte.js";
|
|
15
15
|
import"../chunk-y64skrwp.js";
|
|
16
16
|
export {
|
|
17
17
|
attach,
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
repoConfigInputSchema
|
|
4
|
+
} from "./chunk-rphfy0fj.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
environmentNameSchema,
|
|
7
|
+
environmentRuntimeSchema
|
|
8
|
+
} from "./chunk-e0pt5x0e.js";
|
|
8
9
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "./chunk-k4y5qt4y.js";
|
|
10
|
+
devcontainerConfigPathSchema
|
|
11
|
+
} from "./chunk-098740f7.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-xzx08r6y.js";
|
|
13
|
+
envVarsSchema
|
|
14
|
+
} from "./chunk-aemxz9r7.js";
|
|
16
15
|
import {
|
|
17
16
|
findArtifactMarkers
|
|
18
17
|
} from "./chunk-ngy1fdcx.js";
|
|
@@ -20,7 +19,7 @@ import {
|
|
|
20
19
|
EMBEDDABLE_ARTIFACT_EXTENSIONS,
|
|
21
20
|
artifactPlatforms,
|
|
22
21
|
findArtifactFields
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-19brnwkp.js";
|
|
24
23
|
|
|
25
24
|
// src/definitions/validation/validate-artifacts.ts
|
|
26
25
|
function checkArtifactFields(steps) {
|
|
@@ -112,16 +111,17 @@ function checkArtifactMarkers(steps, stepsByKey) {
|
|
|
112
111
|
function checkEnv(steps) {
|
|
113
112
|
const issues = [];
|
|
114
113
|
for (const step of steps) {
|
|
115
|
-
|
|
114
|
+
const envJson = step.environment?.kind === "inline" ? step.environment.envJson : null;
|
|
115
|
+
if (!envJson)
|
|
116
116
|
continue;
|
|
117
117
|
issues.push(...checkEnvMcpOwners(step));
|
|
118
118
|
issues.push(...checkEnvApplies(step));
|
|
119
|
-
const result = envVarsSchema.safeParse(
|
|
119
|
+
const result = envVarsSchema.safeParse(envJson);
|
|
120
120
|
if (result.success)
|
|
121
121
|
continue;
|
|
122
122
|
for (const issue of result.error.issues) {
|
|
123
123
|
const [index, ...field] = issue.path;
|
|
124
|
-
const entry = typeof index === "number" ?
|
|
124
|
+
const entry = typeof index === "number" ? envJson[index] : undefined;
|
|
125
125
|
const where = typeof index === "number" && entry ? `Step "${step.key}" env var #${String(index + 1)} ("${entry.name}")` : `Step "${step.key}" env`;
|
|
126
126
|
const fieldLabel = field.length > 0 ? ` ${field.map(String).join(".")}` : "";
|
|
127
127
|
issues.push({
|
|
@@ -137,7 +137,7 @@ function checkEnvMcpOwners(step) {
|
|
|
137
137
|
const serverKeys = Object.keys(step.opencodeMcpJson ?? {}).sort();
|
|
138
138
|
const serverKeySet = new Set(serverKeys);
|
|
139
139
|
const issues = [];
|
|
140
|
-
(step.envJson ?? []).forEach((entry, index) => {
|
|
140
|
+
(step.environment?.kind === "inline" ? step.environment.envJson ?? [] : []).forEach((entry, index) => {
|
|
141
141
|
if (entry.source !== "inherit" || entry.mcp === undefined)
|
|
142
142
|
return;
|
|
143
143
|
if (serverKeySet.has(entry.mcp))
|
|
@@ -152,16 +152,19 @@ function checkEnvMcpOwners(step) {
|
|
|
152
152
|
}
|
|
153
153
|
function checkEnvApplies(step) {
|
|
154
154
|
const issues = [];
|
|
155
|
-
(step.
|
|
155
|
+
if (step.environment?.kind !== "inline")
|
|
156
|
+
return issues;
|
|
157
|
+
const environment = step.environment;
|
|
158
|
+
(environment.envJson ?? []).forEach((entry, index) => {
|
|
156
159
|
const applies = entry.applies ?? "agent";
|
|
157
160
|
if (applies === "agent")
|
|
158
161
|
return;
|
|
159
162
|
const where = `Step "${step.key}" env var #${String(index + 1)} ("${entry.name}") applies "${applies}"`;
|
|
160
|
-
if (
|
|
163
|
+
if (environment.runtime?.kind === "host") {
|
|
161
164
|
issues.push({
|
|
162
165
|
check: "env-var-applies",
|
|
163
166
|
severity: "error",
|
|
164
|
-
message: `${where}: setup variables reach devcontainer up, but the step runs on the host
|
|
167
|
+
message: `${where}: setup variables reach devcontainer up, but the step runs on the host with no container to set up. Use applies "agent" or Runtime.devcontainer().`
|
|
165
168
|
});
|
|
166
169
|
}
|
|
167
170
|
if (entry.source === "inherit" && entry.mcp !== undefined) {
|
|
@@ -192,17 +195,7 @@ function checkRepo(steps) {
|
|
|
192
195
|
message: `${where}${field ? ` ${field}` : ""}: ${issue.message}`
|
|
193
196
|
});
|
|
194
197
|
}
|
|
195
|
-
continue;
|
|
196
198
|
}
|
|
197
|
-
const executionMode = step.executionMode ?? "workspace";
|
|
198
|
-
const mismatch = repoRuntimeMismatch(executionMode, parsed.data.mode);
|
|
199
|
-
if (mismatch === null)
|
|
200
|
-
continue;
|
|
201
|
-
issues.push({
|
|
202
|
-
check: "repo",
|
|
203
|
-
severity: "error",
|
|
204
|
-
message: `${where} "${parsed.data.mode}" cannot be used with executionMode "${executionMode}": ${mismatch}.`
|
|
205
|
-
});
|
|
206
199
|
}
|
|
207
200
|
return issues;
|
|
208
201
|
}
|
|
@@ -211,57 +204,56 @@ function checkRepo(steps) {
|
|
|
211
204
|
function checkRuntime(steps) {
|
|
212
205
|
const issues = [];
|
|
213
206
|
for (const step of steps) {
|
|
214
|
-
if (step.kind === "
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
207
|
+
if (step.environment?.kind === "named") {
|
|
208
|
+
const result2 = environmentNameSchema.safeParse(step.environment.name);
|
|
209
|
+
if (!result2.success) {
|
|
210
|
+
for (const issue of result2.error.issues) {
|
|
211
|
+
issues.push({
|
|
212
|
+
check: "runtime",
|
|
213
|
+
severity: "error",
|
|
214
|
+
message: `Step "${step.key}" environment.name: ${issue.message}`
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
continue;
|
|
220
219
|
}
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
if (step.environment?.kind !== "inline")
|
|
221
|
+
continue;
|
|
222
|
+
const runtime = step.environment.runtime;
|
|
223
|
+
if (runtime === undefined)
|
|
223
224
|
continue;
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
if (runtime.kind !== "devcontainer" && "config" in runtime) {
|
|
226
|
+
const config = devcontainerConfigPathSchema.safeParse(runtime.config);
|
|
227
|
+
if (!config.success) {
|
|
228
|
+
for (const issue of config.error.issues) {
|
|
229
|
+
issues.push({
|
|
230
|
+
check: "runtime",
|
|
231
|
+
severity: "error",
|
|
232
|
+
message: `Step "${step.key}" environment.runtime.config: ${issue.message}`
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (step.kind === "code" && runtime.kind === "host") {
|
|
226
238
|
issues.push({
|
|
227
239
|
check: "runtime",
|
|
228
240
|
severity: "error",
|
|
229
|
-
message:
|
|
241
|
+
message: `Step "${step.key}": code steps need a container, so Runtime.host() is not supported for codeStep. Use Runtime.managed.<id>() or Runtime.devcontainer(), or drop the runtime.`
|
|
230
242
|
});
|
|
231
243
|
}
|
|
232
|
-
const result =
|
|
244
|
+
const result = environmentRuntimeSchema.safeParse(runtime);
|
|
233
245
|
if (result.success)
|
|
234
246
|
continue;
|
|
235
247
|
for (const issue of result.error.issues) {
|
|
236
248
|
issues.push({
|
|
237
249
|
check: "runtime",
|
|
238
250
|
severity: "error",
|
|
239
|
-
message:
|
|
251
|
+
message: `Step "${step.key}" environment.runtime${issue.path.length ? `.${issue.path.map(String).join(".")}` : ""}: ${issue.message}`
|
|
240
252
|
});
|
|
241
253
|
}
|
|
242
254
|
}
|
|
243
255
|
return issues;
|
|
244
256
|
}
|
|
245
|
-
function checkManagedRuntime(step) {
|
|
246
|
-
if (step.managedRuntime == null)
|
|
247
|
-
return [];
|
|
248
|
-
const where = `Step "${step.key}" managedRuntime "${step.managedRuntime}"`;
|
|
249
|
-
const problems = [];
|
|
250
|
-
if (!isManagedRuntimeId(step.managedRuntime)) {
|
|
251
|
-
problems.push(`unknown managed runtime; expected one of ${MANAGED_RUNTIME_IDS.join(", ")}`);
|
|
252
|
-
}
|
|
253
|
-
if (step.executionMode === "no_workspace") {
|
|
254
|
-
problems.push('a managed runtime needs a workspace, but the step runs on the host (executionMode "no_workspace")');
|
|
255
|
-
}
|
|
256
|
-
if (step.devcontainerConfigPath != null) {
|
|
257
|
-
problems.push("cannot be combined with devcontainerConfigPath. Use either Runtime.managed.<id>() or Runtime.devcontainer({ config })");
|
|
258
|
-
}
|
|
259
|
-
return problems.map((problem) => ({
|
|
260
|
-
check: "runtime",
|
|
261
|
-
severity: "error",
|
|
262
|
-
message: `${where}: ${problem}.`
|
|
263
|
-
}));
|
|
264
|
-
}
|
|
265
257
|
|
|
266
258
|
// src/definitions/validation/validate-definition-specs.ts
|
|
267
259
|
function checkHealthChecks(steps) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Automations,
|
|
4
4
|
createClient
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3zp2qtf8.js";
|
|
6
6
|
import {
|
|
7
7
|
exports_external
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-yf15kdte.js";
|
|
9
9
|
|
|
10
10
|
// src/definitions/automations/automations-client.ts
|
|
11
11
|
var automationDocumentIssueSchema = exports_external.object({
|
|
@@ -826,28 +826,28 @@ class HeyApiRegistry {
|
|
|
826
826
|
}
|
|
827
827
|
|
|
828
828
|
class Api extends HeyApiClient {
|
|
829
|
-
"
|
|
829
|
+
"*ApiAuth*"(options) {
|
|
830
830
|
return (options?.client ?? this.client).delete({ url: "/api/auth/*", ...options });
|
|
831
831
|
}
|
|
832
|
-
"
|
|
832
|
+
"*ApiAuth*2"(options) {
|
|
833
833
|
return (options?.client ?? this.client).get({ url: "/api/auth/*", ...options });
|
|
834
834
|
}
|
|
835
|
-
"
|
|
835
|
+
"*ApiAuth*3"(options) {
|
|
836
836
|
return (options?.client ?? this.client).head({ url: "/api/auth/*", ...options });
|
|
837
837
|
}
|
|
838
|
-
"
|
|
838
|
+
"*ApiAuth*4"(options) {
|
|
839
839
|
return (options?.client ?? this.client).options({ url: "/api/auth/*", ...options });
|
|
840
840
|
}
|
|
841
|
-
"
|
|
841
|
+
"*ApiAuth*5"(options) {
|
|
842
842
|
return (options?.client ?? this.client).patch({ url: "/api/auth/*", ...options });
|
|
843
843
|
}
|
|
844
|
-
"
|
|
844
|
+
"*ApiAuth*6"(options) {
|
|
845
845
|
return (options?.client ?? this.client).post({ url: "/api/auth/*", ...options });
|
|
846
846
|
}
|
|
847
|
-
"
|
|
847
|
+
"*ApiAuth*7"(options) {
|
|
848
848
|
return (options?.client ?? this.client).put({ url: "/api/auth/*", ...options });
|
|
849
849
|
}
|
|
850
|
-
"
|
|
850
|
+
"*ApiAuth*8"(options) {
|
|
851
851
|
return (options?.client ?? this.client).trace({ url: "/api/auth/*", ...options });
|
|
852
852
|
}
|
|
853
853
|
}
|
|
@@ -1164,6 +1164,16 @@ class TaskRuns extends HeyApiClient {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
1167
|
+
resolveTaskRunEnvironment(options) {
|
|
1168
|
+
return (options.client ?? this.client).post({
|
|
1169
|
+
url: "/api/task-runs/{taskRunId}/environment",
|
|
1170
|
+
...options,
|
|
1171
|
+
headers: {
|
|
1172
|
+
"Content-Type": "application/json",
|
|
1173
|
+
...options.headers
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1167
1177
|
}
|
|
1168
1178
|
|
|
1169
1179
|
class PipelineDefinitions extends HeyApiClient {
|
|
@@ -1768,6 +1778,63 @@ class Secrets extends HeyApiClient {
|
|
|
1768
1778
|
}
|
|
1769
1779
|
}
|
|
1770
1780
|
|
|
1781
|
+
class ProjectSecrets extends HeyApiClient {
|
|
1782
|
+
listProjectSecrets(options) {
|
|
1783
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/secrets", ...options });
|
|
1784
|
+
}
|
|
1785
|
+
createProjectSecret(options) {
|
|
1786
|
+
return (options.client ?? this.client).post({
|
|
1787
|
+
url: "/api/projects/{projectId}/secrets",
|
|
1788
|
+
...options,
|
|
1789
|
+
headers: {
|
|
1790
|
+
"Content-Type": "application/json",
|
|
1791
|
+
...options.headers
|
|
1792
|
+
}
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
deleteProjectSecret(options) {
|
|
1796
|
+
return (options.client ?? this.client).delete({ url: "/api/projects/{projectId}/secrets/{secretId}", ...options });
|
|
1797
|
+
}
|
|
1798
|
+
updateProjectSecret(options) {
|
|
1799
|
+
return (options.client ?? this.client).patch({
|
|
1800
|
+
url: "/api/projects/{projectId}/secrets/{secretId}",
|
|
1801
|
+
...options,
|
|
1802
|
+
headers: {
|
|
1803
|
+
"Content-Type": "application/json",
|
|
1804
|
+
...options.headers
|
|
1805
|
+
}
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
class Environments extends HeyApiClient {
|
|
1811
|
+
listEnvironments(options) {
|
|
1812
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/environments", ...options });
|
|
1813
|
+
}
|
|
1814
|
+
deleteEnvironment(options) {
|
|
1815
|
+
return (options.client ?? this.client).delete({ url: "/api/projects/{projectId}/environments/{name}", ...options });
|
|
1816
|
+
}
|
|
1817
|
+
getEnvironment(options) {
|
|
1818
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/environments/{name}", ...options });
|
|
1819
|
+
}
|
|
1820
|
+
publishEnvironmentVersion(options) {
|
|
1821
|
+
return (options.client ?? this.client).put({
|
|
1822
|
+
url: "/api/projects/{projectId}/environments/{name}",
|
|
1823
|
+
...options,
|
|
1824
|
+
headers: {
|
|
1825
|
+
"Content-Type": "application/json",
|
|
1826
|
+
...options.headers
|
|
1827
|
+
}
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
class Connectors extends HeyApiClient {
|
|
1833
|
+
listConnectors(options) {
|
|
1834
|
+
return (options?.client ?? this.client).get({ url: "/api/connectors", ...options });
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1771
1838
|
class ScarnClient extends HeyApiClient {
|
|
1772
1839
|
static __registry = new HeyApiRegistry;
|
|
1773
1840
|
constructor(args) {
|
|
@@ -1866,6 +1933,18 @@ class ScarnClient extends HeyApiClient {
|
|
|
1866
1933
|
get secrets() {
|
|
1867
1934
|
return this._secrets ??= new Secrets({ client: this.client });
|
|
1868
1935
|
}
|
|
1936
|
+
_projectSecrets;
|
|
1937
|
+
get projectSecrets() {
|
|
1938
|
+
return this._projectSecrets ??= new ProjectSecrets({ client: this.client });
|
|
1939
|
+
}
|
|
1940
|
+
_environments;
|
|
1941
|
+
get environments() {
|
|
1942
|
+
return this._environments ??= new Environments({ client: this.client });
|
|
1943
|
+
}
|
|
1944
|
+
_connectors;
|
|
1945
|
+
get connectors() {
|
|
1946
|
+
return this._connectors ??= new Connectors({ client: this.client });
|
|
1947
|
+
}
|
|
1869
1948
|
}
|
|
1870
1949
|
|
|
1871
|
-
export { createClient, Api, Projects, StepDefinitions, Tasks, TaskRuns, PipelineDefinitions, Automations, PipelineExecutions, WorkItems, Conversations, WorkItemComments, WorkItemCommentDrafts, WorkItemBlocks, ProjectArtifacts, UserNotifications, Inbox, NotificationRules, ProjectIntegrations, GitHubIntegrations, ProjectInvites, Billing, Username, Secrets, ScarnClient };
|
|
1950
|
+
export { createClient, Api, Projects, StepDefinitions, Tasks, TaskRuns, PipelineDefinitions, Automations, PipelineExecutions, WorkItems, Conversations, WorkItemComments, WorkItemCommentDrafts, WorkItemBlocks, ProjectArtifacts, UserNotifications, Inbox, NotificationRules, ProjectIntegrations, GitHubIntegrations, ProjectInvites, Billing, Username, Secrets, ProjectSecrets, Environments, Connectors, ScarnClient };
|
|
@@ -8,6 +8,12 @@ function isStepDefinitionSpec(value) {
|
|
|
8
8
|
const obj = value;
|
|
9
9
|
return typeof obj["key"] === "string" && typeof obj["name"] === "string" && typeof obj["version"] === "number" && (obj["kind"] === "user_defined" || obj["kind"] === "code");
|
|
10
10
|
}
|
|
11
|
+
function isEnvironmentHandle(value) {
|
|
12
|
+
if (typeof value !== "object" || value === null)
|
|
13
|
+
return false;
|
|
14
|
+
const obj = value;
|
|
15
|
+
return obj["kind"] === "environment" && typeof obj["name"] === "string" && typeof obj["content"] === "object" && obj["content"] !== null;
|
|
16
|
+
}
|
|
11
17
|
function stepsInModule(mod) {
|
|
12
18
|
const found = new Set;
|
|
13
19
|
for (const [exportName, value] of Object.entries(mod)) {
|
|
@@ -32,4 +38,4 @@ function findCodeStepInModule(mod, key) {
|
|
|
32
38
|
return fns.values().next().value;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
export { isStepDefinitionSpec, stepsInModule, findCodeStepInModule };
|
|
41
|
+
export { isStepDefinitionSpec, isEnvironmentHandle, stepsInModule, findCodeStepInModule };
|