@scarn/sdk 0.0.0 → 0.8.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-4361gxk0.js → chunk-0y2fy5en.js} +7 -7
- package/dist/{chunk-91p9vzcs.js → chunk-3ctaaseb.js} +405 -402
- package/dist/{chunk-9s07v9r1.js → chunk-4ggr8af6.js} +8 -8
- package/dist/chunk-5zsavw98.js +91 -0
- package/dist/chunk-63f90zky.js +39 -0
- package/dist/{chunk-tfm5hjzm.js → chunk-700xe701.js} +9 -9
- package/dist/{chunk-njd6npf0.js → chunk-ar6hcj1r.js} +6 -6
- package/dist/chunk-cdanncng.js +74 -0
- package/dist/chunk-dp86pa6m.js +68 -0
- package/dist/chunk-e1h021kq.js +86 -0
- package/dist/{chunk-ny07ncb9.js → chunk-gds7w7zh.js} +35 -35
- package/dist/chunk-k4y5qt4y.js +14 -0
- package/dist/{chunk-eg1hcvhb.js → chunk-mz53r914.js} +16 -16
- package/dist/{chunk-631ffb6r.js → chunk-ngy1fdcx.js} +10 -10
- package/dist/chunk-p7yrcmqm.js +322 -0
- package/dist/{chunk-h9yxx0hd.js → chunk-rt9tq4j6.js} +7 -7
- package/dist/{chunk-dnn39qt4.js → chunk-skzxcba3.js} +2960 -2217
- package/dist/{chunk-ynk2bjae.js → chunk-vfeytkqx.js} +89 -88
- package/dist/{chunk-56e4kp0a.js → chunk-y2pv8d6a.js} +19 -19
- package/dist/chunk-y64skrwp.js +17 -0
- package/dist/{chunk-rq3q8vg7.js → chunk-yjtaq94c.js} +69 -69
- package/dist/{chunk-qpw5wt1p.js → chunk-zm72ksz0.js} +26 -27
- package/dist/client.js +53 -52
- package/dist/contracts/artifact-markers.js +12 -11
- package/dist/contracts/artifacts.js +23 -21
- package/dist/contracts/pipeline-document/index.js +94 -92
- package/dist/contracts/step-artifact-submissions.js +17 -20
- package/dist/defaults/index.js +140 -139
- package/dist/definitions/pipelines/index.js +22 -20
- package/dist/definitions/steps/index.js +70 -67
- package/dist/definitions/validation/index.js +15 -13
- package/dist/devcontainer-config-path.js +11 -9
- package/dist/env-vars.js +33 -31
- package/dist/eslint.js +2 -0
- package/dist/generated/types.gen.d.ts +7 -0
- package/dist/git-url/git-repo-identity.js +2 -0
- package/dist/health-checks.js +17 -15
- package/dist/index.js +280 -277
- package/dist/jsonc.js +8 -7
- package/dist/managed-runtimes.js +11 -9
- package/dist/opencode-mcp.js +27 -25
- package/dist/pipelines/index.js +78 -75
- package/dist/push/code-step-lookup.js +8 -7
- package/dist/push/index.js +51 -52
- package/dist/repo-config.js +21 -19
- package/dist/scarn-config-parser.js +6 -5
- package/package.json +1 -1
- package/dist/chunk-4vehh3dq.js +0 -333
- package/dist/chunk-5mmj03ah.js +0 -1074
- package/dist/chunk-b21233rt.js +0 -78
- package/dist/chunk-g0rdnn0r.js +0 -95
- package/dist/chunk-p6kc9wq8.js +0 -97
- package/dist/chunk-s0gap8r8.js +0 -14
- package/dist/chunk-zpqyjgb4.js +0 -49
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/generated/core/bodySerializer.gen.ts
|
|
3
|
-
var jsonBodySerializer = {
|
|
4
|
-
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
5
|
-
};
|
|
6
|
-
// src/generated/core/params.gen.ts
|
|
7
|
-
var extraPrefixesMap = {
|
|
8
|
-
$body_: "body",
|
|
9
|
-
$headers_: "headers",
|
|
10
|
-
$path_: "path",
|
|
11
|
-
$query_: "query"
|
|
12
|
-
};
|
|
13
|
-
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
14
2
|
// src/generated/core/serverSentEvents.gen.ts
|
|
15
3
|
var createSseClient = ({
|
|
16
4
|
onRequest,
|
|
@@ -192,16 +180,16 @@ var serializeArrayParam = ({
|
|
|
192
180
|
value
|
|
193
181
|
}) => {
|
|
194
182
|
if (!explode) {
|
|
195
|
-
const
|
|
183
|
+
const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
196
184
|
switch (style) {
|
|
197
185
|
case "label":
|
|
198
|
-
return `.${
|
|
186
|
+
return `.${joinedValues2}`;
|
|
199
187
|
case "matrix":
|
|
200
|
-
return `;${name}=${
|
|
188
|
+
return `;${name}=${joinedValues2}`;
|
|
201
189
|
case "simple":
|
|
202
|
-
return
|
|
190
|
+
return joinedValues2;
|
|
203
191
|
default:
|
|
204
|
-
return `${name}=${
|
|
192
|
+
return `${name}=${joinedValues2}`;
|
|
205
193
|
}
|
|
206
194
|
}
|
|
207
195
|
const separator = separatorArrayExplode(style);
|
|
@@ -250,16 +238,16 @@ var serializeObjectParam = ({
|
|
|
250
238
|
allowReserved ? v : encodeURIComponent(v)
|
|
251
239
|
];
|
|
252
240
|
});
|
|
253
|
-
const
|
|
241
|
+
const joinedValues2 = values.join(",");
|
|
254
242
|
switch (style) {
|
|
255
243
|
case "form":
|
|
256
|
-
return `${name}=${
|
|
244
|
+
return `${name}=${joinedValues2}`;
|
|
257
245
|
case "label":
|
|
258
|
-
return `.${
|
|
246
|
+
return `.${joinedValues2}`;
|
|
259
247
|
case "matrix":
|
|
260
|
-
return `;${name}=${
|
|
248
|
+
return `;${name}=${joinedValues2}`;
|
|
261
249
|
default:
|
|
262
|
-
return
|
|
250
|
+
return joinedValues2;
|
|
263
251
|
}
|
|
264
252
|
}
|
|
265
253
|
const separator = separatorObjectExplode(style);
|
|
@@ -375,6 +363,11 @@ var getAuthToken = async (auth, callback) => {
|
|
|
375
363
|
return token;
|
|
376
364
|
};
|
|
377
365
|
|
|
366
|
+
// src/generated/core/bodySerializer.gen.ts
|
|
367
|
+
var jsonBodySerializer = {
|
|
368
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
369
|
+
};
|
|
370
|
+
|
|
378
371
|
// src/generated/client/utils.gen.ts
|
|
379
372
|
var createQuerySerializer = ({
|
|
380
373
|
parameters = {},
|
|
@@ -596,8 +589,8 @@ var createConfig = (override = {}) => ({
|
|
|
596
589
|
var createClient = (config = {}) => {
|
|
597
590
|
let _config = mergeConfigs(createConfig(), config);
|
|
598
591
|
const getConfig = () => ({ ..._config });
|
|
599
|
-
const setConfig = (
|
|
600
|
-
_config = mergeConfigs(_config,
|
|
592
|
+
const setConfig = (config2) => {
|
|
593
|
+
_config = mergeConfigs(_config, config2);
|
|
601
594
|
return getConfig();
|
|
602
595
|
};
|
|
603
596
|
const interceptors = createInterceptors();
|
|
@@ -634,40 +627,40 @@ var createClient = (config = {}) => {
|
|
|
634
627
|
...opts,
|
|
635
628
|
body: getValidRequestBody(opts)
|
|
636
629
|
};
|
|
637
|
-
let
|
|
630
|
+
let request2 = new Request(url, requestInit);
|
|
638
631
|
for (const fn of interceptors.request.fns) {
|
|
639
632
|
if (fn) {
|
|
640
|
-
|
|
633
|
+
request2 = await fn(request2, opts);
|
|
641
634
|
}
|
|
642
635
|
}
|
|
643
636
|
const _fetch = opts.fetch;
|
|
644
637
|
let response;
|
|
645
638
|
try {
|
|
646
|
-
response = await _fetch(
|
|
647
|
-
} catch (
|
|
648
|
-
let
|
|
639
|
+
response = await _fetch(request2);
|
|
640
|
+
} catch (error2) {
|
|
641
|
+
let finalError2 = error2;
|
|
649
642
|
for (const fn of interceptors.error.fns) {
|
|
650
643
|
if (fn) {
|
|
651
|
-
|
|
644
|
+
finalError2 = await fn(error2, undefined, request2, opts);
|
|
652
645
|
}
|
|
653
646
|
}
|
|
654
|
-
|
|
647
|
+
finalError2 = finalError2 || {};
|
|
655
648
|
if (opts.throwOnError) {
|
|
656
|
-
throw
|
|
649
|
+
throw finalError2;
|
|
657
650
|
}
|
|
658
651
|
return opts.responseStyle === "data" ? undefined : {
|
|
659
|
-
error:
|
|
660
|
-
request,
|
|
652
|
+
error: finalError2,
|
|
653
|
+
request: request2,
|
|
661
654
|
response: undefined
|
|
662
655
|
};
|
|
663
656
|
}
|
|
664
657
|
for (const fn of interceptors.response.fns) {
|
|
665
658
|
if (fn) {
|
|
666
|
-
response = await fn(response,
|
|
659
|
+
response = await fn(response, request2, opts);
|
|
667
660
|
}
|
|
668
661
|
}
|
|
669
662
|
const result = {
|
|
670
|
-
request,
|
|
663
|
+
request: request2,
|
|
671
664
|
response
|
|
672
665
|
};
|
|
673
666
|
if (response.ok) {
|
|
@@ -737,7 +730,7 @@ var createClient = (config = {}) => {
|
|
|
737
730
|
let finalError = error;
|
|
738
731
|
for (const fn of interceptors.error.fns) {
|
|
739
732
|
if (fn) {
|
|
740
|
-
finalError = await fn(error, response,
|
|
733
|
+
finalError = await fn(error, response, request2, opts);
|
|
741
734
|
}
|
|
742
735
|
}
|
|
743
736
|
finalError = finalError || {};
|
|
@@ -757,14 +750,14 @@ var createClient = (config = {}) => {
|
|
|
757
750
|
body: opts.body,
|
|
758
751
|
headers: opts.headers,
|
|
759
752
|
method,
|
|
760
|
-
onRequest: async (
|
|
761
|
-
let
|
|
753
|
+
onRequest: async (url2, init) => {
|
|
754
|
+
let request2 = new Request(url2, init);
|
|
762
755
|
for (const fn of interceptors.request.fns) {
|
|
763
756
|
if (fn) {
|
|
764
|
-
|
|
757
|
+
request2 = await fn(request2, opts);
|
|
765
758
|
}
|
|
766
759
|
}
|
|
767
|
-
return
|
|
760
|
+
return request2;
|
|
768
761
|
},
|
|
769
762
|
serializedBody: getValidRequestBody(opts),
|
|
770
763
|
url
|
|
@@ -798,6 +791,14 @@ var createClient = (config = {}) => {
|
|
|
798
791
|
trace: makeMethodFn("TRACE")
|
|
799
792
|
};
|
|
800
793
|
};
|
|
794
|
+
// src/generated/core/params.gen.ts
|
|
795
|
+
var extraPrefixesMap = {
|
|
796
|
+
$body_: "body",
|
|
797
|
+
$headers_: "headers",
|
|
798
|
+
$path_: "path",
|
|
799
|
+
$query_: "query"
|
|
800
|
+
};
|
|
801
|
+
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
801
802
|
// src/generated/client.gen.ts
|
|
802
803
|
var client = createClient(createConfig());
|
|
803
804
|
|
|
@@ -824,7 +825,7 @@ class HeyApiRegistry {
|
|
|
824
825
|
}
|
|
825
826
|
}
|
|
826
827
|
|
|
827
|
-
class
|
|
828
|
+
class Api extends HeyApiClient {
|
|
828
829
|
"allApiAuth*"(options) {
|
|
829
830
|
return (options?.client ?? this.client).delete({ url: "/api/auth/*", ...options });
|
|
830
831
|
}
|
|
@@ -851,7 +852,7 @@ class Api2 extends HeyApiClient {
|
|
|
851
852
|
}
|
|
852
853
|
}
|
|
853
854
|
|
|
854
|
-
class
|
|
855
|
+
class Projects extends HeyApiClient {
|
|
855
856
|
resolveProjectBySlug(options) {
|
|
856
857
|
return (options.client ?? this.client).get({ url: "/api/projects/resolve", ...options });
|
|
857
858
|
}
|
|
@@ -912,7 +913,7 @@ class Projects2 extends HeyApiClient {
|
|
|
912
913
|
}
|
|
913
914
|
}
|
|
914
915
|
|
|
915
|
-
class
|
|
916
|
+
class StepDefinitions extends HeyApiClient {
|
|
916
917
|
listStepDefinitions(options) {
|
|
917
918
|
return (options.client ?? this.client).get({ url: "/api/step-definitions", ...options });
|
|
918
919
|
}
|
|
@@ -944,7 +945,7 @@ class StepDefinitions2 extends HeyApiClient {
|
|
|
944
945
|
}
|
|
945
946
|
}
|
|
946
947
|
|
|
947
|
-
class
|
|
948
|
+
class Tasks extends HeyApiClient {
|
|
948
949
|
createTask(options) {
|
|
949
950
|
return (options.client ?? this.client).post({
|
|
950
951
|
url: "/api/tasks",
|
|
@@ -963,7 +964,7 @@ class Tasks2 extends HeyApiClient {
|
|
|
963
964
|
}
|
|
964
965
|
}
|
|
965
966
|
|
|
966
|
-
class
|
|
967
|
+
class TaskRuns extends HeyApiClient {
|
|
967
968
|
claimTaskRuns(options) {
|
|
968
969
|
return (options.client ?? this.client).post({
|
|
969
970
|
url: "/api/task-runs/claims",
|
|
@@ -1090,7 +1091,7 @@ class TaskRuns2 extends HeyApiClient {
|
|
|
1090
1091
|
}
|
|
1091
1092
|
}
|
|
1092
1093
|
|
|
1093
|
-
class
|
|
1094
|
+
class PipelineDefinitions extends HeyApiClient {
|
|
1094
1095
|
createPipelineDefinition(options) {
|
|
1095
1096
|
return (options.client ?? this.client).post({
|
|
1096
1097
|
url: "/api/pipeline-definitions",
|
|
@@ -1134,7 +1135,7 @@ class PipelineDefinitions2 extends HeyApiClient {
|
|
|
1134
1135
|
}
|
|
1135
1136
|
}
|
|
1136
1137
|
|
|
1137
|
-
class
|
|
1138
|
+
class PipelineExecutions extends HeyApiClient {
|
|
1138
1139
|
listPipelineExecutions(options) {
|
|
1139
1140
|
return (options.client ?? this.client).get({ url: "/api/pipeline-executions", ...options });
|
|
1140
1141
|
}
|
|
@@ -1198,7 +1199,7 @@ class PipelineExecutions2 extends HeyApiClient {
|
|
|
1198
1199
|
}
|
|
1199
1200
|
}
|
|
1200
1201
|
|
|
1201
|
-
class
|
|
1202
|
+
class WorkItems extends HeyApiClient {
|
|
1202
1203
|
listWorkItemQuestions(options) {
|
|
1203
1204
|
return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/questions", ...options });
|
|
1204
1205
|
}
|
|
@@ -1283,7 +1284,7 @@ class WorkItems2 extends HeyApiClient {
|
|
|
1283
1284
|
}
|
|
1284
1285
|
}
|
|
1285
1286
|
|
|
1286
|
-
class
|
|
1287
|
+
class Conversations extends HeyApiClient {
|
|
1287
1288
|
getConversation(options) {
|
|
1288
1289
|
return (options.client ?? this.client).get({ url: "/api/conversations/{conversationId}", ...options });
|
|
1289
1290
|
}
|
|
@@ -1308,7 +1309,7 @@ class Conversations2 extends HeyApiClient {
|
|
|
1308
1309
|
}
|
|
1309
1310
|
}
|
|
1310
1311
|
|
|
1311
|
-
class
|
|
1312
|
+
class WorkItemComments extends HeyApiClient {
|
|
1312
1313
|
listWorkItemComments(options) {
|
|
1313
1314
|
return (options.client ?? this.client).get({ url: "/api/work-item-comments", ...options });
|
|
1314
1315
|
}
|
|
@@ -1347,7 +1348,7 @@ class WorkItemComments2 extends HeyApiClient {
|
|
|
1347
1348
|
}
|
|
1348
1349
|
}
|
|
1349
1350
|
|
|
1350
|
-
class
|
|
1351
|
+
class WorkItemCommentDrafts extends HeyApiClient {
|
|
1351
1352
|
listPendingCommentDrafts(options) {
|
|
1352
1353
|
return (options.client ?? this.client).get({ url: "/api/work-item-comment-drafts", ...options });
|
|
1353
1354
|
}
|
|
@@ -1366,7 +1367,7 @@ class WorkItemCommentDrafts2 extends HeyApiClient {
|
|
|
1366
1367
|
}
|
|
1367
1368
|
}
|
|
1368
1369
|
|
|
1369
|
-
class
|
|
1370
|
+
class WorkItemBlocks extends HeyApiClient {
|
|
1370
1371
|
listWorkItemBlocks(options) {
|
|
1371
1372
|
return (options.client ?? this.client).get({ url: "/api/work-item-blocks", ...options });
|
|
1372
1373
|
}
|
|
@@ -1385,7 +1386,7 @@ class WorkItemBlocks2 extends HeyApiClient {
|
|
|
1385
1386
|
}
|
|
1386
1387
|
}
|
|
1387
1388
|
|
|
1388
|
-
class
|
|
1389
|
+
class ProjectArtifacts extends HeyApiClient {
|
|
1389
1390
|
listProjectArtifacts(options) {
|
|
1390
1391
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/artifacts", ...options });
|
|
1391
1392
|
}
|
|
@@ -1407,7 +1408,7 @@ class ProjectArtifacts2 extends HeyApiClient {
|
|
|
1407
1408
|
}
|
|
1408
1409
|
}
|
|
1409
1410
|
|
|
1410
|
-
class
|
|
1411
|
+
class UserNotifications extends HeyApiClient {
|
|
1411
1412
|
listUserNotifications(options) {
|
|
1412
1413
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
|
|
1413
1414
|
}
|
|
@@ -1429,7 +1430,7 @@ class UserNotifications2 extends HeyApiClient {
|
|
|
1429
1430
|
}
|
|
1430
1431
|
}
|
|
1431
1432
|
|
|
1432
|
-
class
|
|
1433
|
+
class NotificationRules extends HeyApiClient {
|
|
1433
1434
|
listNotificationRules(options) {
|
|
1434
1435
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
|
|
1435
1436
|
}
|
|
@@ -1445,7 +1446,7 @@ class NotificationRules2 extends HeyApiClient {
|
|
|
1445
1446
|
}
|
|
1446
1447
|
}
|
|
1447
1448
|
|
|
1448
|
-
class
|
|
1449
|
+
class StepDefinitionTemplates extends HeyApiClient {
|
|
1449
1450
|
listStepDefinitionTemplates(options) {
|
|
1450
1451
|
return (options?.client ?? this.client).get({ url: "/api/step-definition-templates", ...options });
|
|
1451
1452
|
}
|
|
@@ -1464,7 +1465,7 @@ class StepDefinitionTemplates2 extends HeyApiClient {
|
|
|
1464
1465
|
}
|
|
1465
1466
|
}
|
|
1466
1467
|
|
|
1467
|
-
class
|
|
1468
|
+
class ProjectIntegrations extends HeyApiClient {
|
|
1468
1469
|
listProjectIntegrations(options) {
|
|
1469
1470
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/integrations", ...options });
|
|
1470
1471
|
}
|
|
@@ -1493,7 +1494,7 @@ class ProjectIntegrations2 extends HeyApiClient {
|
|
|
1493
1494
|
}
|
|
1494
1495
|
}
|
|
1495
1496
|
|
|
1496
|
-
class
|
|
1497
|
+
class GitHubIntegrations extends HeyApiClient {
|
|
1497
1498
|
beginGitHubAppInstall(options) {
|
|
1498
1499
|
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
1499
1500
|
}
|
|
@@ -1511,7 +1512,7 @@ class GitHubIntegrations2 extends HeyApiClient {
|
|
|
1511
1512
|
}
|
|
1512
1513
|
}
|
|
1513
1514
|
|
|
1514
|
-
class
|
|
1515
|
+
class ProjectInvites extends HeyApiClient {
|
|
1515
1516
|
getProjectInviteByToken(options) {
|
|
1516
1517
|
return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
|
|
1517
1518
|
}
|
|
@@ -1536,13 +1537,13 @@ class ProjectInvites2 extends HeyApiClient {
|
|
|
1536
1537
|
}
|
|
1537
1538
|
}
|
|
1538
1539
|
|
|
1539
|
-
class
|
|
1540
|
+
class Billing extends HeyApiClient {
|
|
1540
1541
|
getOrgUsage(options) {
|
|
1541
1542
|
return (options.client ?? this.client).get({ url: "/api/orgs/{orgId}/usage", ...options });
|
|
1542
1543
|
}
|
|
1543
1544
|
}
|
|
1544
1545
|
|
|
1545
|
-
class
|
|
1546
|
+
class Username extends HeyApiClient {
|
|
1546
1547
|
checkUsernameAvailable(options) {
|
|
1547
1548
|
return (options.client ?? this.client).get({ url: "/api/username/available", ...options });
|
|
1548
1549
|
}
|
|
@@ -1558,7 +1559,7 @@ class Username2 extends HeyApiClient {
|
|
|
1558
1559
|
}
|
|
1559
1560
|
}
|
|
1560
1561
|
|
|
1561
|
-
class
|
|
1562
|
+
class Secrets extends HeyApiClient {
|
|
1562
1563
|
listMySecrets(options) {
|
|
1563
1564
|
return (options?.client ?? this.client).get({ url: "/api/me/secrets", ...options });
|
|
1564
1565
|
}
|
|
@@ -1587,100 +1588,100 @@ class Secrets2 extends HeyApiClient {
|
|
|
1587
1588
|
}
|
|
1588
1589
|
}
|
|
1589
1590
|
|
|
1590
|
-
class
|
|
1591
|
+
class ScarnClient extends HeyApiClient {
|
|
1591
1592
|
static __registry = new HeyApiRegistry;
|
|
1592
1593
|
constructor(args) {
|
|
1593
1594
|
super(args);
|
|
1594
|
-
|
|
1595
|
+
ScarnClient.__registry.set(this, args?.key);
|
|
1595
1596
|
}
|
|
1596
1597
|
_api;
|
|
1597
1598
|
get api() {
|
|
1598
|
-
return this._api ??= new
|
|
1599
|
+
return this._api ??= new Api({ client: this.client });
|
|
1599
1600
|
}
|
|
1600
1601
|
_projects;
|
|
1601
1602
|
get projects() {
|
|
1602
|
-
return this._projects ??= new
|
|
1603
|
+
return this._projects ??= new Projects({ client: this.client });
|
|
1603
1604
|
}
|
|
1604
1605
|
_stepDefinitions;
|
|
1605
1606
|
get stepDefinitions() {
|
|
1606
|
-
return this._stepDefinitions ??= new
|
|
1607
|
+
return this._stepDefinitions ??= new StepDefinitions({ client: this.client });
|
|
1607
1608
|
}
|
|
1608
1609
|
_tasks;
|
|
1609
1610
|
get tasks() {
|
|
1610
|
-
return this._tasks ??= new
|
|
1611
|
+
return this._tasks ??= new Tasks({ client: this.client });
|
|
1611
1612
|
}
|
|
1612
1613
|
_taskRuns;
|
|
1613
1614
|
get taskRuns() {
|
|
1614
|
-
return this._taskRuns ??= new
|
|
1615
|
+
return this._taskRuns ??= new TaskRuns({ client: this.client });
|
|
1615
1616
|
}
|
|
1616
1617
|
_pipelineDefinitions;
|
|
1617
1618
|
get pipelineDefinitions() {
|
|
1618
|
-
return this._pipelineDefinitions ??= new
|
|
1619
|
+
return this._pipelineDefinitions ??= new PipelineDefinitions({ client: this.client });
|
|
1619
1620
|
}
|
|
1620
1621
|
_pipelineExecutions;
|
|
1621
1622
|
get pipelineExecutions() {
|
|
1622
|
-
return this._pipelineExecutions ??= new
|
|
1623
|
+
return this._pipelineExecutions ??= new PipelineExecutions({ client: this.client });
|
|
1623
1624
|
}
|
|
1624
1625
|
_workItems;
|
|
1625
1626
|
get workItems() {
|
|
1626
|
-
return this._workItems ??= new
|
|
1627
|
+
return this._workItems ??= new WorkItems({ client: this.client });
|
|
1627
1628
|
}
|
|
1628
1629
|
_conversations;
|
|
1629
1630
|
get conversations() {
|
|
1630
|
-
return this._conversations ??= new
|
|
1631
|
+
return this._conversations ??= new Conversations({ client: this.client });
|
|
1631
1632
|
}
|
|
1632
1633
|
_workItemComments;
|
|
1633
1634
|
get workItemComments() {
|
|
1634
|
-
return this._workItemComments ??= new
|
|
1635
|
+
return this._workItemComments ??= new WorkItemComments({ client: this.client });
|
|
1635
1636
|
}
|
|
1636
1637
|
_workItemCommentDrafts;
|
|
1637
1638
|
get workItemCommentDrafts() {
|
|
1638
|
-
return this._workItemCommentDrafts ??= new
|
|
1639
|
+
return this._workItemCommentDrafts ??= new WorkItemCommentDrafts({ client: this.client });
|
|
1639
1640
|
}
|
|
1640
1641
|
_workItemBlocks;
|
|
1641
1642
|
get workItemBlocks() {
|
|
1642
|
-
return this._workItemBlocks ??= new
|
|
1643
|
+
return this._workItemBlocks ??= new WorkItemBlocks({ client: this.client });
|
|
1643
1644
|
}
|
|
1644
1645
|
_projectArtifacts;
|
|
1645
1646
|
get projectArtifacts() {
|
|
1646
|
-
return this._projectArtifacts ??= new
|
|
1647
|
+
return this._projectArtifacts ??= new ProjectArtifacts({ client: this.client });
|
|
1647
1648
|
}
|
|
1648
1649
|
_userNotifications;
|
|
1649
1650
|
get userNotifications() {
|
|
1650
|
-
return this._userNotifications ??= new
|
|
1651
|
+
return this._userNotifications ??= new UserNotifications({ client: this.client });
|
|
1651
1652
|
}
|
|
1652
1653
|
_notificationRules;
|
|
1653
1654
|
get notificationRules() {
|
|
1654
|
-
return this._notificationRules ??= new
|
|
1655
|
+
return this._notificationRules ??= new NotificationRules({ client: this.client });
|
|
1655
1656
|
}
|
|
1656
1657
|
_stepDefinitionTemplates;
|
|
1657
1658
|
get stepDefinitionTemplates() {
|
|
1658
|
-
return this._stepDefinitionTemplates ??= new
|
|
1659
|
+
return this._stepDefinitionTemplates ??= new StepDefinitionTemplates({ client: this.client });
|
|
1659
1660
|
}
|
|
1660
1661
|
_projectIntegrations;
|
|
1661
1662
|
get projectIntegrations() {
|
|
1662
|
-
return this._projectIntegrations ??= new
|
|
1663
|
+
return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
|
|
1663
1664
|
}
|
|
1664
1665
|
_gitHubIntegrations;
|
|
1665
1666
|
get gitHubIntegrations() {
|
|
1666
|
-
return this._gitHubIntegrations ??= new
|
|
1667
|
+
return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
|
|
1667
1668
|
}
|
|
1668
1669
|
_projectInvites;
|
|
1669
1670
|
get projectInvites() {
|
|
1670
|
-
return this._projectInvites ??= new
|
|
1671
|
+
return this._projectInvites ??= new ProjectInvites({ client: this.client });
|
|
1671
1672
|
}
|
|
1672
1673
|
_billing;
|
|
1673
1674
|
get billing() {
|
|
1674
|
-
return this._billing ??= new
|
|
1675
|
+
return this._billing ??= new Billing({ client: this.client });
|
|
1675
1676
|
}
|
|
1676
1677
|
_username;
|
|
1677
1678
|
get username() {
|
|
1678
|
-
return this._username ??= new
|
|
1679
|
+
return this._username ??= new Username({ client: this.client });
|
|
1679
1680
|
}
|
|
1680
1681
|
_secrets;
|
|
1681
1682
|
get secrets() {
|
|
1682
|
-
return this._secrets ??= new
|
|
1683
|
+
return this._secrets ??= new Secrets({ client: this.client });
|
|
1683
1684
|
}
|
|
1684
1685
|
}
|
|
1685
1686
|
|
|
1686
|
-
export { createClient,
|
|
1687
|
+
export { createClient, Api, Projects, StepDefinitions, Tasks, TaskRuns, PipelineDefinitions, PipelineExecutions, WorkItems, Conversations, WorkItemComments, WorkItemCommentDrafts, WorkItemBlocks, ProjectArtifacts, UserNotifications, NotificationRules, StepDefinitionTemplates, ProjectIntegrations, GitHubIntegrations, ProjectInvites, Billing, Username, Secrets, ScarnClient };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
exports_external
|
|
4
|
+
} from "./chunk-skzxcba3.js";
|
|
5
5
|
|
|
6
6
|
// src/contracts/artifacts.ts
|
|
7
|
-
var
|
|
7
|
+
var artifactKindSchema = exports_external.enum([
|
|
8
8
|
"generic",
|
|
9
9
|
"playwright-trace",
|
|
10
10
|
"video",
|
|
11
11
|
"image"
|
|
12
12
|
]);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
13
|
+
var ARTIFACT_SCHEMA_KEYWORD = "x-scarn-artifact";
|
|
14
|
+
var artifactPlatforms = ["github", "jira", "bitbucket"];
|
|
15
|
+
var EMBEDDABLE_ARTIFACT_EXTENSIONS = {
|
|
16
16
|
jira: [".png", ".gif", ".mp4", ".webm"],
|
|
17
17
|
github: [],
|
|
18
18
|
bitbucket: []
|
|
19
19
|
};
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function isEmbeddableArtifactExtension(platform, extension) {
|
|
21
|
+
return EMBEDDABLE_ARTIFACT_EXTENSIONS[platform].includes(extension.toLowerCase());
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function artifactFileExtension(fileName) {
|
|
24
24
|
const base = fileName.slice(fileName.lastIndexOf("/") + 1);
|
|
25
25
|
const dot = base.lastIndexOf(".");
|
|
26
26
|
if (dot <= 0)
|
|
27
27
|
return "";
|
|
28
28
|
return base.slice(dot).toLowerCase();
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function artifactAcceptsFile(accept, fileName) {
|
|
31
31
|
if (accept.length === 0)
|
|
32
32
|
return true;
|
|
33
|
-
return accept.includes(
|
|
33
|
+
return accept.includes(artifactFileExtension(fileName));
|
|
34
34
|
}
|
|
35
35
|
function asRecord(node) {
|
|
36
36
|
return typeof node === "object" ? node : null;
|
|
@@ -44,9 +44,9 @@ function schemaBranches(record, keyword) {
|
|
|
44
44
|
return [];
|
|
45
45
|
return value.filter((entry) => typeof entry === "boolean" || typeof entry === "object" && entry !== null && !Array.isArray(entry));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function readArtifactKeyword(node) {
|
|
48
48
|
const record = asRecord(node);
|
|
49
|
-
const keyword = asRecord(record?.[
|
|
49
|
+
const keyword = asRecord(record?.[ARTIFACT_SCHEMA_KEYWORD]);
|
|
50
50
|
if (!keyword)
|
|
51
51
|
return null;
|
|
52
52
|
const accept = keyword["accept"];
|
|
@@ -58,8 +58,8 @@ function readDescription(node) {
|
|
|
58
58
|
const description = asRecord(node)?.["description"];
|
|
59
59
|
return typeof description === "string" ? description : null;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const direct =
|
|
61
|
+
function matchArtifactNode(node) {
|
|
62
|
+
const direct = readArtifactKeyword(node);
|
|
63
63
|
if (direct) {
|
|
64
64
|
const types = asRecord(node)?.["type"];
|
|
65
65
|
return {
|
|
@@ -77,7 +77,7 @@ function matchArtifactNode2(node) {
|
|
|
77
77
|
const [only] = nonNull;
|
|
78
78
|
if (!only || nonNull.length !== 1 || branches.length !== 2)
|
|
79
79
|
continue;
|
|
80
|
-
const inner =
|
|
80
|
+
const inner = readArtifactKeyword(only);
|
|
81
81
|
if (!inner)
|
|
82
82
|
continue;
|
|
83
83
|
return {
|
|
@@ -104,7 +104,7 @@ function resolveLocalRef(root, ref) {
|
|
|
104
104
|
}
|
|
105
105
|
return typeof current === "object" && current !== null ? current : null;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function findArtifactFields(schema) {
|
|
108
108
|
if (schema === null || schema === undefined)
|
|
109
109
|
return [];
|
|
110
110
|
const root = schema;
|
|
@@ -122,7 +122,7 @@ function findArtifactFields2(schema) {
|
|
|
122
122
|
visit(target, path, inArray, hops + 1);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
const match = path ?
|
|
125
|
+
const match = path ? matchArtifactNode(node) : null;
|
|
126
126
|
if (match) {
|
|
127
127
|
if (!fields.has(path)) {
|
|
128
128
|
fields.set(path, {
|
|
@@ -159,4 +159,4 @@ function findArtifactFields2(schema) {
|
|
|
159
159
|
return [...fields.values()];
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
export {
|
|
162
|
+
export { artifactKindSchema, ARTIFACT_SCHEMA_KEYWORD, artifactPlatforms, EMBEDDABLE_ARTIFACT_EXTENSIONS, isEmbeddableArtifactExtension, artifactFileExtension, artifactAcceptsFile, readArtifactKeyword, matchArtifactNode, findArtifactFields };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { __export };
|