@levr-one/cli 0.10.20 → 0.10.22
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/{addHandler-r0Yw1vu-.js → addHandler-DUulKXOX.js} +68 -68
- package/dist/appendHandler-u-NvHPDW.js +80 -0
- package/dist/artifact-upload-CF2iXUiR.js +296 -0
- package/dist/attachHandler-DgVCvhz7.js +151 -0
- package/dist/cli.js +237 -17
- package/dist/connect-DX41Im8c.js +36 -0
- package/dist/{currentHandler-BBHqC26D.js → currentHandler-B_sWXNeW.js} +1 -1
- package/dist/{importHandler-DAXXM42X.js → importHandler-CUUroX_n.js} +8 -8
- package/dist/{listHandler-qFOGgW2z.js → listHandler-CB_9cISi.js} +5 -5
- package/dist/{loginHandler-DMjKtKj5.js → loginHandler-DSznhtmk.js} +5 -10
- package/dist/{logoutHandler-BFutKash.js → logoutHandler-TSQlZGpU.js} +2 -2
- package/dist/{pushHandler-C7nxljuh.js → pushHandler-Q9Cbo2HC.js} +142 -9
- package/dist/{resolve-token-DbQsmn03.js → resolve-token-7xb7kG7h.js} +2 -2
- package/dist/{resolve-workspace--4K7N4VU.js → resolve-workspace-B3Gz3-Vh.js} +2 -2
- package/dist/{runHandler-gaYkPS79.js → runHandler-DmRAoyJc.js} +8 -8
- package/dist/{sdk-client-vQsoMCez.js → sdk-client-CTvYVr7D.js} +310 -70
- package/dist/{selectHandler-CPeH8ILF.js → selectHandler-CdOVuuTa.js} +5 -5
- package/dist/sleep-BpJ39Ypm.js +7 -0
- package/dist/{statusHandler-WkN652yu.js → statusHandler-p6CmwgjS.js} +3 -3
- package/dist/{token-refresh-Cu5RpkLJ.js → token-refresh-DeusLK8H.js} +1 -1
- package/package.json +1 -1
- /package/dist/{env-CHeKHu5S.js → env-CdwyPHGV.js} +0 -0
- /package/dist/{workspace-store-DDOxnut1.js → workspace-store-CnrxyYRB.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getApiUrl, getPatToken, readCredentials } from "./env-
|
|
2
|
-
import { isTokenExpired, refreshToken } from "./token-refresh-
|
|
1
|
+
import { getApiUrl, getPatToken, readCredentials } from "./env-CdwyPHGV.js";
|
|
2
|
+
import { isTokenExpired, refreshToken } from "./token-refresh-DeusLK8H.js";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/resolve-token.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { authGetSitesV1 } from "./sdk-client-
|
|
2
|
-
import { clearWorkspace, loadWorkspace, saveWorkspace } from "./workspace-store-
|
|
1
|
+
import { authGetSitesV1 } from "./sdk-client-CTvYVr7D.js";
|
|
2
|
+
import { clearWorkspace, loadWorkspace, saveWorkspace } from "./workspace-store-CnrxyYRB.js";
|
|
3
3
|
|
|
4
4
|
//#region src/workspace/resolve-workspace.ts
|
|
5
5
|
async function fetchSites() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
1
|
+
import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-CTvYVr7D.js";
|
|
2
|
+
import "./env-CdwyPHGV.js";
|
|
3
|
+
import "./token-refresh-DeusLK8H.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-7xb7kG7h.js";
|
|
5
|
+
import "./workspace-store-CnrxyYRB.js";
|
|
6
|
+
import { resolveWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
|
-
import { constants } from "node:os";
|
|
8
|
+
import { constants as constants$1 } from "node:os";
|
|
9
9
|
import { spawnSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/gates/gate-runner.ts
|
|
@@ -115,7 +115,7 @@ const runInShell = (command) => {
|
|
|
115
115
|
});
|
|
116
116
|
const stderr = (r.stderr ?? "") + (r.error ? `\n[runner] ${r.error.message}` : "") + (r.signal ? `\n[runner] killed by ${r.signal}` : "");
|
|
117
117
|
const killed = r.error !== void 0 || r.signal !== null;
|
|
118
|
-
const signalNumber = r.signal ? constants.signals[r.signal] : void 0;
|
|
118
|
+
const signalNumber = r.signal ? constants$1.signals[r.signal] : void 0;
|
|
119
119
|
return {
|
|
120
120
|
exitCode: killed ? typeof signalNumber === "number" ? 128 + signalNumber : 126 : r.status ?? 126,
|
|
121
121
|
stdout: r.stdout ?? "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getApiUrl } from "./env-
|
|
1
|
+
import { getApiUrl } from "./env-CdwyPHGV.js";
|
|
2
2
|
import { z } from "zod/v3";
|
|
3
3
|
|
|
4
4
|
//#region ../sdk/dist/gen/_common/zod.js
|
|
@@ -2530,6 +2530,124 @@ const zArtifactSyncGetArtifactsV1Data = z.object({
|
|
|
2530
2530
|
url: z.literal("/v1/cde/artifacts")
|
|
2531
2531
|
});
|
|
2532
2532
|
|
|
2533
|
+
//#endregion
|
|
2534
|
+
//#region ../sdk/dist/gen/attachment-upload/functions.js
|
|
2535
|
+
/**
|
|
2536
|
+
* Uploads one file (multipart/form-data, at most 50 MiB) and attaches it to the entity named by related_type and related_id. related_id is a UUID, or a human identifier (ENG-42, TC-5, TR-3) for issue, test and run. For an automation_run_result target, kind and attempt_index say what the artifact is and which earlier attempt it belongs to, and an identical upload (same result, attempt, content and name) returns the existing attachment with HTTP 200 instead of storing it again. Send the text fields before the file part.
|
|
2537
|
+
*/
|
|
2538
|
+
const attachmentUploadUploadV1 = (options) => {
|
|
2539
|
+
return (options?.client ?? client).post({
|
|
2540
|
+
security: [{
|
|
2541
|
+
scheme: "bearer",
|
|
2542
|
+
type: "http"
|
|
2543
|
+
}],
|
|
2544
|
+
url: "/v1/attachment/upload",
|
|
2545
|
+
bodySerializer: (body) => {
|
|
2546
|
+
const fd = new FormData();
|
|
2547
|
+
if (body && typeof body === "object") for (const [k, v] of Object.entries(body)) {
|
|
2548
|
+
if (v == null) continue;
|
|
2549
|
+
fd.append(k, v instanceof Blob ? v : String(v));
|
|
2550
|
+
}
|
|
2551
|
+
return fd;
|
|
2552
|
+
},
|
|
2553
|
+
...options
|
|
2554
|
+
});
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
//#endregion
|
|
2558
|
+
//#region ../sdk/dist/gen/attachment-upload/zod.js
|
|
2559
|
+
const zAttachmentUploadUploadV1Body = z.object({
|
|
2560
|
+
related_type: z.enum([
|
|
2561
|
+
"test",
|
|
2562
|
+
"step",
|
|
2563
|
+
"folder",
|
|
2564
|
+
"plan",
|
|
2565
|
+
"defect",
|
|
2566
|
+
"requirement",
|
|
2567
|
+
"run_result",
|
|
2568
|
+
"run_result_step",
|
|
2569
|
+
"import_job",
|
|
2570
|
+
"run",
|
|
2571
|
+
"issue",
|
|
2572
|
+
"project",
|
|
2573
|
+
"initiative",
|
|
2574
|
+
"cycle",
|
|
2575
|
+
"staged",
|
|
2576
|
+
"data_set",
|
|
2577
|
+
"run_result_variant",
|
|
2578
|
+
"research_step",
|
|
2579
|
+
"project_update",
|
|
2580
|
+
"automation_run_result",
|
|
2581
|
+
"unlinked"
|
|
2582
|
+
]).describe(""),
|
|
2583
|
+
related_id: z.string().optional().describe(""),
|
|
2584
|
+
kind: z.enum([
|
|
2585
|
+
"screenshot",
|
|
2586
|
+
"video",
|
|
2587
|
+
"trace",
|
|
2588
|
+
"stdout_log",
|
|
2589
|
+
"stderr_log",
|
|
2590
|
+
"har",
|
|
2591
|
+
"report",
|
|
2592
|
+
"attachment",
|
|
2593
|
+
"other"
|
|
2594
|
+
]).optional().describe(""),
|
|
2595
|
+
attempt_index: z.number().optional().describe(""),
|
|
2596
|
+
is_public: z.boolean().optional().describe(""),
|
|
2597
|
+
file: z.instanceof(Blob).describe("")
|
|
2598
|
+
});
|
|
2599
|
+
const zUploadAttachmentResponseDto = z.object({
|
|
2600
|
+
id: z.string().describe(""),
|
|
2601
|
+
url: z.string().nullable().describe(""),
|
|
2602
|
+
private_url: z.string().nullable().describe(""),
|
|
2603
|
+
original_file_name: z.string().describe(""),
|
|
2604
|
+
mime_type: z.string().nullable().describe(""),
|
|
2605
|
+
size: z.number().nullable().describe(""),
|
|
2606
|
+
is_public: z.boolean().describe(""),
|
|
2607
|
+
created_at: z.string().describe(""),
|
|
2608
|
+
related_type: z.enum([
|
|
2609
|
+
"test",
|
|
2610
|
+
"step",
|
|
2611
|
+
"folder",
|
|
2612
|
+
"plan",
|
|
2613
|
+
"defect",
|
|
2614
|
+
"requirement",
|
|
2615
|
+
"run_result",
|
|
2616
|
+
"run_result_step",
|
|
2617
|
+
"import_job",
|
|
2618
|
+
"run",
|
|
2619
|
+
"issue",
|
|
2620
|
+
"project",
|
|
2621
|
+
"initiative",
|
|
2622
|
+
"cycle",
|
|
2623
|
+
"staged",
|
|
2624
|
+
"data_set",
|
|
2625
|
+
"run_result_variant",
|
|
2626
|
+
"research_step",
|
|
2627
|
+
"project_update",
|
|
2628
|
+
"automation_run_result",
|
|
2629
|
+
"unlinked"
|
|
2630
|
+
]).describe(""),
|
|
2631
|
+
target_id: z.string().nullable().describe(""),
|
|
2632
|
+
kind: z.enum([
|
|
2633
|
+
"screenshot",
|
|
2634
|
+
"video",
|
|
2635
|
+
"trace",
|
|
2636
|
+
"stdout_log",
|
|
2637
|
+
"stderr_log",
|
|
2638
|
+
"har",
|
|
2639
|
+
"report",
|
|
2640
|
+
"attachment",
|
|
2641
|
+
"other"
|
|
2642
|
+
]).nullable().describe(""),
|
|
2643
|
+
attempt_index: z.number().nullable().describe(""),
|
|
2644
|
+
deduplicated: z.boolean().describe("")
|
|
2645
|
+
});
|
|
2646
|
+
const zAttachmentUploadUploadV1Data = z.object({
|
|
2647
|
+
body: zAttachmentUploadUploadV1Body,
|
|
2648
|
+
url: z.literal("/v1/attachment/upload")
|
|
2649
|
+
});
|
|
2650
|
+
|
|
2533
2651
|
//#endregion
|
|
2534
2652
|
//#region ../sdk/dist/gen/auth/functions.js
|
|
2535
2653
|
const authGetProfileV1 = (options) => {
|
|
@@ -9025,6 +9143,22 @@ const zCommentFolderRestoreV1Data = z.object({
|
|
|
9025
9143
|
url: z.literal("/v1/comment-folder/{id}/restore")
|
|
9026
9144
|
});
|
|
9027
9145
|
|
|
9146
|
+
//#endregion
|
|
9147
|
+
//#region ../sdk/dist/gen/comment-issue/functions.js
|
|
9148
|
+
/**
|
|
9149
|
+
* Create a new comment_issue
|
|
9150
|
+
*/
|
|
9151
|
+
const commentIssueCreateV1 = (options) => {
|
|
9152
|
+
return (options?.client ?? client).post({
|
|
9153
|
+
security: [{
|
|
9154
|
+
scheme: "bearer",
|
|
9155
|
+
type: "http"
|
|
9156
|
+
}],
|
|
9157
|
+
url: "/v1/comment-issue",
|
|
9158
|
+
...options
|
|
9159
|
+
});
|
|
9160
|
+
};
|
|
9161
|
+
|
|
9028
9162
|
//#endregion
|
|
9029
9163
|
//#region ../sdk/dist/gen/comment-issue/zod.js
|
|
9030
9164
|
const zCreateCommentIssueDto = z.object({
|
|
@@ -9155,6 +9289,22 @@ const zCommentIssueRestoreV1Data = z.object({
|
|
|
9155
9289
|
url: z.literal("/v1/comment-issue/{id}/restore")
|
|
9156
9290
|
});
|
|
9157
9291
|
|
|
9292
|
+
//#endregion
|
|
9293
|
+
//#region ../sdk/dist/gen/comment-run/functions.js
|
|
9294
|
+
/**
|
|
9295
|
+
* Create a new comment_run
|
|
9296
|
+
*/
|
|
9297
|
+
const commentRunCreateV1 = (options) => {
|
|
9298
|
+
return (options?.client ?? client).post({
|
|
9299
|
+
security: [{
|
|
9300
|
+
scheme: "bearer",
|
|
9301
|
+
type: "http"
|
|
9302
|
+
}],
|
|
9303
|
+
url: "/v1/comment-run",
|
|
9304
|
+
...options
|
|
9305
|
+
});
|
|
9306
|
+
};
|
|
9307
|
+
|
|
9158
9308
|
//#endregion
|
|
9159
9309
|
//#region ../sdk/dist/gen/comment-run/zod.js
|
|
9160
9310
|
const zCreateCommentRunDto = z.object({
|
|
@@ -9545,6 +9695,22 @@ const zCommentRunResultVariantRestoreV1Data = z.object({
|
|
|
9545
9695
|
url: z.literal("/v1/comment-run-result-variant/{id}/restore")
|
|
9546
9696
|
});
|
|
9547
9697
|
|
|
9698
|
+
//#endregion
|
|
9699
|
+
//#region ../sdk/dist/gen/comment-test/functions.js
|
|
9700
|
+
/**
|
|
9701
|
+
* Create a new comment_test
|
|
9702
|
+
*/
|
|
9703
|
+
const commentTestCreateV1 = (options) => {
|
|
9704
|
+
return (options?.client ?? client).post({
|
|
9705
|
+
security: [{
|
|
9706
|
+
scheme: "bearer",
|
|
9707
|
+
type: "http"
|
|
9708
|
+
}],
|
|
9709
|
+
url: "/v1/comment-test",
|
|
9710
|
+
...options
|
|
9711
|
+
});
|
|
9712
|
+
};
|
|
9713
|
+
|
|
9548
9714
|
//#endregion
|
|
9549
9715
|
//#region ../sdk/dist/gen/comment-test/zod.js
|
|
9550
9716
|
const zCommentTestBulkOperationDto = z.object({
|
|
@@ -14942,7 +15108,8 @@ const zImportCreateV1Body = z.object({
|
|
|
14942
15108
|
run_name: z.string().max(250).optional().describe(""),
|
|
14943
15109
|
automation_source: z.string().max(100).optional().describe(""),
|
|
14944
15110
|
automation_source_id: z.string().optional().describe(""),
|
|
14945
|
-
import_metadata: z.string().optional().describe("")
|
|
15111
|
+
import_metadata: z.string().optional().describe(""),
|
|
15112
|
+
include_results: z.boolean().optional().describe("")
|
|
14946
15113
|
});
|
|
14947
15114
|
const zImportResponseDto = z.object({
|
|
14948
15115
|
id: z.string().describe(""),
|
|
@@ -14987,6 +15154,32 @@ const zImportResponseDto = z.object({
|
|
|
14987
15154
|
count: z.number().describe(""),
|
|
14988
15155
|
details: z.array(z.string()).optional().describe(""),
|
|
14989
15156
|
truncated: z.boolean().optional().describe("")
|
|
15157
|
+
})).optional().describe(""),
|
|
15158
|
+
results: z.array(z.object({
|
|
15159
|
+
id: z.string().describe(""),
|
|
15160
|
+
name: z.string().describe(""),
|
|
15161
|
+
suite: z.string().nullable().describe(""),
|
|
15162
|
+
classname: z.string().nullable().describe(""),
|
|
15163
|
+
status: z.string().describe(""),
|
|
15164
|
+
test_key: z.string().describe(""),
|
|
15165
|
+
attempts: z.number().describe(""),
|
|
15166
|
+
attachments: z.array(z.object({
|
|
15167
|
+
path: z.string().nullable().describe(""),
|
|
15168
|
+
name: z.string().nullable().describe(""),
|
|
15169
|
+
kind: z.enum([
|
|
15170
|
+
"screenshot",
|
|
15171
|
+
"video",
|
|
15172
|
+
"trace",
|
|
15173
|
+
"stdout_log",
|
|
15174
|
+
"stderr_log",
|
|
15175
|
+
"har",
|
|
15176
|
+
"report",
|
|
15177
|
+
"attachment",
|
|
15178
|
+
"other"
|
|
15179
|
+
]).describe(""),
|
|
15180
|
+
attempt_index: z.number().nullable().describe(""),
|
|
15181
|
+
stored: z.boolean().describe("")
|
|
15182
|
+
})).describe("")
|
|
14990
15183
|
})).optional().describe("")
|
|
14991
15184
|
}).optional().describe(""),
|
|
14992
15185
|
error: z.object({
|
|
@@ -24302,6 +24495,22 @@ const zRoleYamlUpdateRoleFromYamlV1Data = z.object({
|
|
|
24302
24495
|
url: z.literal("/v1/role/{id}/yaml")
|
|
24303
24496
|
});
|
|
24304
24497
|
|
|
24498
|
+
//#endregion
|
|
24499
|
+
//#region ../sdk/dist/gen/run-api/functions.js
|
|
24500
|
+
/**
|
|
24501
|
+
* Update a run_result_variant addressed by its id alone: status, actual_result, append_actual_result (server-side append) or timing fields. The run and run result are resolved from the variant in your workspace. Triggers the rollup cascade to run_result and run.
|
|
24502
|
+
*/
|
|
24503
|
+
const runApiUpdateRunResultVariantByIdV1 = (options) => {
|
|
24504
|
+
return (options?.client ?? client).patch({
|
|
24505
|
+
security: [{
|
|
24506
|
+
scheme: "bearer",
|
|
24507
|
+
type: "http"
|
|
24508
|
+
}],
|
|
24509
|
+
url: "/v1/run/run-result-variant/{runResultVariantId}",
|
|
24510
|
+
...options
|
|
24511
|
+
});
|
|
24512
|
+
};
|
|
24513
|
+
|
|
24305
24514
|
//#endregion
|
|
24306
24515
|
//#region ../sdk/dist/gen/run-api/zod.js
|
|
24307
24516
|
const zRunApiSplitCreateRunsV1Body = z.object({
|
|
@@ -24433,6 +24642,49 @@ const zUpdateRunDto = z.object({
|
|
|
24433
24642
|
sequence: z.string().max(255).optional(),
|
|
24434
24643
|
parent_run_id: z.unknown().optional()
|
|
24435
24644
|
});
|
|
24645
|
+
const zUpdateRunResultVariantDto = z.object({
|
|
24646
|
+
status_id: z.string().optional(),
|
|
24647
|
+
actual_result: z.string().nullable(),
|
|
24648
|
+
append_actual_result: z.string().optional(),
|
|
24649
|
+
started_at: z.unknown(),
|
|
24650
|
+
ended_at: z.unknown(),
|
|
24651
|
+
duration_ms: z.number().nullable()
|
|
24652
|
+
});
|
|
24653
|
+
const zRunResultVariantNodeDto = z.object({
|
|
24654
|
+
type: z.enum(["run_result_variant"]),
|
|
24655
|
+
id: z.string(),
|
|
24656
|
+
run_id: z.string(),
|
|
24657
|
+
run_result_id: z.string(),
|
|
24658
|
+
status_id: z.string(),
|
|
24659
|
+
environment_id: z.string().nullable(),
|
|
24660
|
+
data_set_row_id: z.string().nullable(),
|
|
24661
|
+
sequence: z.string(),
|
|
24662
|
+
actual_result: z.string().nullable(),
|
|
24663
|
+
started_at: z.unknown(),
|
|
24664
|
+
ended_at: z.unknown(),
|
|
24665
|
+
duration_ms: z.number().nullable(),
|
|
24666
|
+
environment_snapshot: z.record(z.string(), z.unknown()).nullable(),
|
|
24667
|
+
data_set_row_snapshot: z.record(z.string(), z.unknown()).nullable(),
|
|
24668
|
+
data: z.record(z.string(), z.unknown()).nullable(),
|
|
24669
|
+
source: z.record(z.string(), z.unknown()).nullable(),
|
|
24670
|
+
created_at: z.unknown(),
|
|
24671
|
+
updated_at: z.unknown(),
|
|
24672
|
+
created_by: z.string(),
|
|
24673
|
+
updated_by: z.string(),
|
|
24674
|
+
epoch: z.number(),
|
|
24675
|
+
status: z.object({
|
|
24676
|
+
id: z.string(),
|
|
24677
|
+
name: z.string(),
|
|
24678
|
+
key: z.number(),
|
|
24679
|
+
color: z.string().nullable()
|
|
24680
|
+
}).optional(),
|
|
24681
|
+
environment: z.object({
|
|
24682
|
+
id: z.string(),
|
|
24683
|
+
name: z.string(),
|
|
24684
|
+
key: z.number(),
|
|
24685
|
+
description: z.string().nullable()
|
|
24686
|
+
}).optional()
|
|
24687
|
+
});
|
|
24436
24688
|
const zRunWithContentDto = z.object({
|
|
24437
24689
|
type: z.enum(["run"]),
|
|
24438
24690
|
id: z.string(),
|
|
@@ -24613,49 +24865,6 @@ const zBulkSetRunResultStatusDto = z.object({
|
|
|
24613
24865
|
run_result_ids: z.array(z.string()),
|
|
24614
24866
|
status_id: z.string()
|
|
24615
24867
|
});
|
|
24616
|
-
const zRunResultVariantNodeDto = z.object({
|
|
24617
|
-
type: z.enum(["run_result_variant"]),
|
|
24618
|
-
id: z.string(),
|
|
24619
|
-
run_id: z.string(),
|
|
24620
|
-
run_result_id: z.string(),
|
|
24621
|
-
status_id: z.string(),
|
|
24622
|
-
environment_id: z.string().nullable(),
|
|
24623
|
-
data_set_row_id: z.string().nullable(),
|
|
24624
|
-
sequence: z.string(),
|
|
24625
|
-
actual_result: z.string().nullable(),
|
|
24626
|
-
started_at: z.unknown(),
|
|
24627
|
-
ended_at: z.unknown(),
|
|
24628
|
-
duration_ms: z.number().nullable(),
|
|
24629
|
-
environment_snapshot: z.record(z.string(), z.unknown()).nullable(),
|
|
24630
|
-
data_set_row_snapshot: z.record(z.string(), z.unknown()).nullable(),
|
|
24631
|
-
data: z.record(z.string(), z.unknown()).nullable(),
|
|
24632
|
-
source: z.record(z.string(), z.unknown()).nullable(),
|
|
24633
|
-
created_at: z.unknown(),
|
|
24634
|
-
updated_at: z.unknown(),
|
|
24635
|
-
created_by: z.string(),
|
|
24636
|
-
updated_by: z.string(),
|
|
24637
|
-
epoch: z.number(),
|
|
24638
|
-
status: z.object({
|
|
24639
|
-
id: z.string(),
|
|
24640
|
-
name: z.string(),
|
|
24641
|
-
key: z.number(),
|
|
24642
|
-
color: z.string().nullable()
|
|
24643
|
-
}).optional(),
|
|
24644
|
-
environment: z.object({
|
|
24645
|
-
id: z.string(),
|
|
24646
|
-
name: z.string(),
|
|
24647
|
-
key: z.number(),
|
|
24648
|
-
description: z.string().nullable()
|
|
24649
|
-
}).optional()
|
|
24650
|
-
});
|
|
24651
|
-
const zUpdateRunResultVariantDto = z.object({
|
|
24652
|
-
status_id: z.string().optional(),
|
|
24653
|
-
actual_result: z.string().nullable(),
|
|
24654
|
-
append_actual_result: z.string().optional(),
|
|
24655
|
-
started_at: z.unknown(),
|
|
24656
|
-
ended_at: z.unknown(),
|
|
24657
|
-
duration_ms: z.number().nullable()
|
|
24658
|
-
});
|
|
24659
24868
|
const zUpdateExecutionStepDto = z.object({
|
|
24660
24869
|
status_id: z.string().optional(),
|
|
24661
24870
|
result: z.string().nullable(),
|
|
@@ -24762,6 +24971,11 @@ const zRunApiSplitCreateRunsV1Data = z.object({
|
|
|
24762
24971
|
body: zRunApiSplitCreateRunsV1Body,
|
|
24763
24972
|
url: z.literal("/v1/run/split")
|
|
24764
24973
|
});
|
|
24974
|
+
const zRunApiUpdateRunResultVariantByIdV1Data = z.object({
|
|
24975
|
+
body: zUpdateRunResultVariantDto,
|
|
24976
|
+
path: z.object({ "runResultVariantId": z.string() }),
|
|
24977
|
+
url: z.literal("/v1/run/run-result-variant/{runResultVariantId}")
|
|
24978
|
+
});
|
|
24765
24979
|
const zRunApiBatchUpdateRunResultVariantsV1Data = z.object({
|
|
24766
24980
|
body: zRunApiBatchUpdateRunResultVariantsV1Body,
|
|
24767
24981
|
url: z.literal("/v1/run/run-result-variant/batch")
|
|
@@ -30010,15 +30224,6 @@ const zFormattedImprovementsDto = z.object({
|
|
|
30010
30224
|
improvement_ids: z.array(z.string()).describe(""),
|
|
30011
30225
|
count: z.number().describe("")
|
|
30012
30226
|
});
|
|
30013
|
-
const zRecordOutcomeDto = z.object({
|
|
30014
|
-
improvement_ids: z.array(z.string()).describe(""),
|
|
30015
|
-
outcome: z.enum([
|
|
30016
|
-
"applied",
|
|
30017
|
-
"helped",
|
|
30018
|
-
"ignored",
|
|
30019
|
-
"overridden"
|
|
30020
|
-
]).describe("")
|
|
30021
|
-
});
|
|
30022
30227
|
const zCreateInjectionDto = z.object({
|
|
30023
30228
|
session_id: z.string().optional().describe(""),
|
|
30024
30229
|
content: z.string().describe(""),
|
|
@@ -30069,7 +30274,6 @@ const zUnifiedChatCaptureV1Data = z.object({
|
|
|
30069
30274
|
const zUnifiedChatGetHistoryV1Data = z.object({
|
|
30070
30275
|
path: z.object({ "sessionId": z.string() }),
|
|
30071
30276
|
query: z.object({
|
|
30072
|
-
"workspaceId": z.string(),
|
|
30073
30277
|
"limit": z.number().optional(),
|
|
30074
30278
|
"before": z.string().optional()
|
|
30075
30279
|
}).optional(),
|
|
@@ -30077,7 +30281,6 @@ const zUnifiedChatGetHistoryV1Data = z.object({
|
|
|
30077
30281
|
});
|
|
30078
30282
|
const zUnifiedChatGetAnalyticsV1Data = z.object({
|
|
30079
30283
|
query: z.object({
|
|
30080
|
-
"workspaceId": z.string(),
|
|
30081
30284
|
"session_id": z.string().optional(),
|
|
30082
30285
|
"user_id": z.string().optional(),
|
|
30083
30286
|
"project_id": z.string().optional(),
|
|
@@ -30123,13 +30326,11 @@ const zUnifiedChatGetWorkspaceUsageV1Data = z.object({
|
|
|
30123
30326
|
});
|
|
30124
30327
|
const zUnifiedChatGetIssueContextV1Data = z.object({
|
|
30125
30328
|
path: z.object({ "issueId": z.string() }),
|
|
30126
|
-
query: z.object({ "workspaceId": z.string() }).optional(),
|
|
30127
30329
|
url: z.literal("/v1/chat/issues/{issueId}/context")
|
|
30128
30330
|
});
|
|
30129
30331
|
const zUnifiedChatStreamEventsV1Data = z.object({
|
|
30130
30332
|
path: z.object({ "sessionId": z.string() }),
|
|
30131
30333
|
query: z.object({
|
|
30132
|
-
"workspaceId": z.string(),
|
|
30133
30334
|
"includeHistory": z.boolean().optional(),
|
|
30134
30335
|
"historyLimit": z.number().optional()
|
|
30135
30336
|
}).optional(),
|
|
@@ -30152,21 +30353,13 @@ const zUnifiedChatGetPendingImprovementsV1Data = z.object({
|
|
|
30152
30353
|
});
|
|
30153
30354
|
const zUnifiedChatMatchImprovementsV1Data = z.object({
|
|
30154
30355
|
body: zImprovementMatchContextDto,
|
|
30155
|
-
query: z.object({ "workspaceId": z.string() }).optional(),
|
|
30156
30356
|
url: z.literal("/v1/chat/improvements/match")
|
|
30157
30357
|
});
|
|
30158
30358
|
const zUnifiedChatFormatImprovementsV1Data = z.object({
|
|
30159
30359
|
body: zImprovementMatchContextDto,
|
|
30160
|
-
query: z.object({
|
|
30161
|
-
"workspaceId": z.string(),
|
|
30162
|
-
"maxImprovements": z.number().optional()
|
|
30163
|
-
}).optional(),
|
|
30360
|
+
query: z.object({ "maxImprovements": z.number().optional() }).optional(),
|
|
30164
30361
|
url: z.literal("/v1/chat/improvements/format")
|
|
30165
30362
|
});
|
|
30166
|
-
const zUnifiedChatRecordOutcomeV1Data = z.object({
|
|
30167
|
-
body: zRecordOutcomeDto,
|
|
30168
|
-
url: z.literal("/v1/chat/improvements/outcome")
|
|
30169
|
-
});
|
|
30170
30363
|
const zUnifiedChatGetInjectionV1Data = z.object({
|
|
30171
30364
|
query: z.object({ "session_id": z.string() }).optional(),
|
|
30172
30365
|
url: z.literal("/v1/chat/injection")
|
|
@@ -31030,7 +31223,6 @@ const zWebhookBulkOperationV1Data = z.object({
|
|
|
31030
31223
|
body: zBulkWebhookRequestDto,
|
|
31031
31224
|
url: z.literal("/v1/webhook/bulk")
|
|
31032
31225
|
});
|
|
31033
|
-
const zWebhookHandleLevrWebhookData = z.object({ url: z.literal("/webhook/levr") });
|
|
31034
31226
|
|
|
31035
31227
|
//#endregion
|
|
31036
31228
|
//#region ../sdk/dist/gen/well-known/zod.js
|
|
@@ -31933,7 +32125,8 @@ async function uploadImport(options) {
|
|
|
31933
32125
|
run_name: options.runName,
|
|
31934
32126
|
automation_source: options.automationSource,
|
|
31935
32127
|
automation_source_id: options.automationSourceId,
|
|
31936
|
-
import_metadata: options.importMetadata ? JSON.stringify(options.importMetadata) : void 0
|
|
32128
|
+
import_metadata: options.importMetadata ? JSON.stringify(options.importMetadata) : void 0,
|
|
32129
|
+
include_results: options.includeResults ? true : void 0
|
|
31937
32130
|
},
|
|
31938
32131
|
requestValidator: void 0
|
|
31939
32132
|
});
|
|
@@ -31956,6 +32149,53 @@ function tryReadMessage(err) {
|
|
|
31956
32149
|
return typeof m === "string" ? m : void 0;
|
|
31957
32150
|
}
|
|
31958
32151
|
}
|
|
32152
|
+
async function uploadAttachment(body) {
|
|
32153
|
+
const result = await attachmentUploadUploadV1({
|
|
32154
|
+
body,
|
|
32155
|
+
requestValidator: void 0
|
|
32156
|
+
});
|
|
32157
|
+
return {
|
|
32158
|
+
status: result.response?.status ?? 0,
|
|
32159
|
+
data: result.data,
|
|
32160
|
+
error: result.error
|
|
32161
|
+
};
|
|
32162
|
+
}
|
|
32163
|
+
/**
|
|
32164
|
+
* Server-side append to an execution result's actual_result, addressed by
|
|
32165
|
+
* the variant id alone (ENG-6161 PATCH /v1/run/run-result-variant/:id). Never
|
|
32166
|
+
* a read-modify-write: the server appends.
|
|
32167
|
+
*/
|
|
32168
|
+
async function appendActualResult(runResultVariantId, text) {
|
|
32169
|
+
const result = await runApiUpdateRunResultVariantByIdV1({
|
|
32170
|
+
path: { runResultVariantId },
|
|
32171
|
+
body: { append_actual_result: text },
|
|
32172
|
+
requestValidator: void 0
|
|
32173
|
+
});
|
|
32174
|
+
if (result.error) throw new Error(`Append failed (${String(result.response?.status ?? "unknown")}): ${tryReadMessage(result.error) ?? JSON.stringify(result.error)}`);
|
|
32175
|
+
}
|
|
32176
|
+
/** A NEW comment on an issue, test or run (append-only; ENG-6164 --embed). */
|
|
32177
|
+
async function createComment(target, targetId, body) {
|
|
32178
|
+
const result = target === "issue" ? await commentIssueCreateV1({
|
|
32179
|
+
body: {
|
|
32180
|
+
issue_id: targetId,
|
|
32181
|
+
body
|
|
32182
|
+
},
|
|
32183
|
+
requestValidator: void 0
|
|
32184
|
+
}) : target === "test" ? await commentTestCreateV1({
|
|
32185
|
+
body: {
|
|
32186
|
+
test_id: targetId,
|
|
32187
|
+
body
|
|
32188
|
+
},
|
|
32189
|
+
requestValidator: void 0
|
|
32190
|
+
}) : await commentRunCreateV1({
|
|
32191
|
+
body: {
|
|
32192
|
+
run_id: targetId,
|
|
32193
|
+
body
|
|
32194
|
+
},
|
|
32195
|
+
requestValidator: void 0
|
|
32196
|
+
});
|
|
32197
|
+
if (result.error) throw new Error(`Comment failed (${String(result.response?.status ?? "unknown")}): ${tryReadMessage(result.error) ?? JSON.stringify(result.error)}`);
|
|
32198
|
+
}
|
|
31959
32199
|
|
|
31960
32200
|
//#endregion
|
|
31961
|
-
export { authGetProfileV1, authGetSitesV1, client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1, uploadImport };
|
|
32201
|
+
export { appendActualResult, authGetProfileV1, authGetSitesV1, client, configureClient, createComment, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1, uploadAttachment, uploadImport };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "./token-
|
|
5
|
-
import {
|
|
1
|
+
import { authGetSitesV1, configureClient } from "./sdk-client-CTvYVr7D.js";
|
|
2
|
+
import "./env-CdwyPHGV.js";
|
|
3
|
+
import "./token-refresh-DeusLK8H.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-7xb7kG7h.js";
|
|
5
|
+
import { saveWorkspace } from "./workspace-store-CnrxyYRB.js";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/workspace/selectHandler.ts
|
|
8
8
|
async function selectHandler(_flags, workspaceId) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { isTokenExpired } from "./token-refresh-
|
|
1
|
+
import { authGetProfileV1, configureClient } from "./sdk-client-CTvYVr7D.js";
|
|
2
|
+
import { getApiUrl, getPatToken, readCredentials } from "./env-CdwyPHGV.js";
|
|
3
|
+
import { isTokenExpired } from "./token-refresh-DeusLK8H.js";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
|
|
6
6
|
//#region src/commands/auth/statusHandler.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLI_CLIENT_ID, deleteCredentials, getApiUrl, writeCredentials } from "./env-
|
|
1
|
+
import { CLI_CLIENT_ID, deleteCredentials, getApiUrl, writeCredentials } from "./env-CdwyPHGV.js";
|
|
2
2
|
|
|
3
3
|
//#region src/auth/token-refresh.ts
|
|
4
4
|
const REFRESH_BUFFER_MS = 300 * 1e3;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|