@levr-one/cli 0.10.4 → 0.10.5
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/cli.js +8 -8
- package/dist/{importHandler-DjqSSsBZ.js → importHandler-CVPZHLAZ.js} +2 -2
- package/dist/{listHandler-HDOTNXEo.js → listHandler-Kq68Ca6e.js} +1 -1
- package/dist/{loginHandler-DckKib3B.js → loginHandler-CYrP8mF2.js} +2 -2
- package/dist/{pushHandler-D6aA95g7.js → pushHandler-C_xMOBVM.js} +2 -2
- package/dist/{resolve-workspace-C6NcN4DK.js → resolve-workspace-ytMhhIYv.js} +1 -1
- package/dist/{runHandler-CPDKYZI9.js → runHandler-ogFHd3e6.js} +21 -4
- package/dist/{sdk-client-Cvy2DYQA.js → sdk-client-Bn2yatEI.js} +28 -5
- package/dist/{selectHandler-D8jyi0UY.js → selectHandler-BaWUR0JQ.js} +1 -1
- package/dist/{statusHandler-OuPRXqaF.js → statusHandler-cMQSlF-A.js} +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -213,7 +213,7 @@ Examples:
|
|
|
213
213
|
aliases: { d: "device-code" }
|
|
214
214
|
},
|
|
215
215
|
loader: async () => {
|
|
216
|
-
const { loginHandler } = await import("./loginHandler-
|
|
216
|
+
const { loginHandler } = await import("./loginHandler-CYrP8mF2.js");
|
|
217
217
|
return loginHandler;
|
|
218
218
|
}
|
|
219
219
|
});
|
|
@@ -252,7 +252,7 @@ Examples:
|
|
|
252
252
|
},
|
|
253
253
|
parameters: {},
|
|
254
254
|
loader: async () => {
|
|
255
|
-
const { statusHandler } = await import("./statusHandler-
|
|
255
|
+
const { statusHandler } = await import("./statusHandler-cMQSlF-A.js");
|
|
256
256
|
return statusHandler;
|
|
257
257
|
}
|
|
258
258
|
});
|
|
@@ -356,7 +356,7 @@ Examples:
|
|
|
356
356
|
}
|
|
357
357
|
},
|
|
358
358
|
loader: async () => {
|
|
359
|
-
const { pushHandler } = await import("./pushHandler-
|
|
359
|
+
const { pushHandler } = await import("./pushHandler-C_xMOBVM.js");
|
|
360
360
|
return pushHandler;
|
|
361
361
|
}
|
|
362
362
|
});
|
|
@@ -476,7 +476,7 @@ Examples:
|
|
|
476
476
|
}
|
|
477
477
|
},
|
|
478
478
|
loader: async () => {
|
|
479
|
-
const { importHandler } = await import("./importHandler-
|
|
479
|
+
const { importHandler } = await import("./importHandler-CVPZHLAZ.js");
|
|
480
480
|
return importHandler;
|
|
481
481
|
}
|
|
482
482
|
});
|
|
@@ -497,7 +497,7 @@ Examples:
|
|
|
497
497
|
},
|
|
498
498
|
parameters: {},
|
|
499
499
|
loader: async () => {
|
|
500
|
-
const { listHandler } = await import("./listHandler-
|
|
500
|
+
const { listHandler } = await import("./listHandler-Kq68Ca6e.js");
|
|
501
501
|
return listHandler;
|
|
502
502
|
}
|
|
503
503
|
});
|
|
@@ -530,7 +530,7 @@ Examples:
|
|
|
530
530
|
flags: {}
|
|
531
531
|
},
|
|
532
532
|
loader: async () => {
|
|
533
|
-
const { selectHandler } = await import("./selectHandler-
|
|
533
|
+
const { selectHandler } = await import("./selectHandler-BaWUR0JQ.js");
|
|
534
534
|
return selectHandler;
|
|
535
535
|
}
|
|
536
536
|
});
|
|
@@ -616,14 +616,14 @@ Examples:
|
|
|
616
616
|
}
|
|
617
617
|
},
|
|
618
618
|
loader: async () => {
|
|
619
|
-
const { gatesRunHandler } = await import("./runHandler-
|
|
619
|
+
const { gatesRunHandler } = await import("./runHandler-ogFHd3e6.js");
|
|
620
620
|
return gatesRunHandler;
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
623
|
|
|
624
624
|
//#endregion
|
|
625
625
|
//#region package.json
|
|
626
|
-
var version = "0.10.
|
|
626
|
+
var version = "0.10.5";
|
|
627
627
|
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region src/app.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getApiUrl, getTeamId } from "./env-CHeKHu5S.js";
|
|
2
|
-
import { authGetProfileV1, configureClient, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-
|
|
2
|
+
import { authGetProfileV1, configureClient, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import "./workspace-store-DDOxnut1.js";
|
|
4
|
-
import { resolveWorkspace } from "./resolve-workspace-
|
|
4
|
+
import { resolveWorkspace } from "./resolve-workspace-ytMhhIYv.js";
|
|
5
5
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
6
6
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
7
7
|
import chalk from "chalk";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./env-CHeKHu5S.js";
|
|
2
|
-
import { authGetSitesV1, configureClient } from "./sdk-client-
|
|
2
|
+
import { authGetSitesV1, configureClient } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import { loadWorkspace } from "./workspace-store-DDOxnut1.js";
|
|
4
4
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
5
5
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CLI_CLIENT_ID, getApiUrl, getAuthUrl, setSessionApiUrl, writeCredentials } from "./env-CHeKHu5S.js";
|
|
2
|
-
import { configureClient } from "./sdk-client-
|
|
2
|
+
import { configureClient } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import "./workspace-store-DDOxnut1.js";
|
|
4
|
-
import { autoSelectWorkspace } from "./resolve-workspace-
|
|
4
|
+
import { autoSelectWorkspace } from "./resolve-workspace-ytMhhIYv.js";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { createHash, randomBytes } from "node:crypto";
|
|
7
7
|
import { createServer } from "node:http";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getApiUrl, getAutomationSourceIdOverride, getSourceOverride, getTeamId } from "./env-CHeKHu5S.js";
|
|
2
|
-
import { client, configureClient, uploadImport } from "./sdk-client-
|
|
2
|
+
import { client, configureClient, uploadImport } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import "./workspace-store-DDOxnut1.js";
|
|
4
|
-
import { resolveWorkspace } from "./resolve-workspace-
|
|
4
|
+
import { resolveWorkspace } from "./resolve-workspace-ytMhhIYv.js";
|
|
5
5
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
6
6
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
7
7
|
import { readFileSync, statSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./env-CHeKHu5S.js";
|
|
2
|
-
import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-
|
|
2
|
+
import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import "./workspace-store-DDOxnut1.js";
|
|
4
|
-
import { resolveWorkspace } from "./resolve-workspace-
|
|
4
|
+
import { resolveWorkspace } from "./resolve-workspace-ytMhhIYv.js";
|
|
5
5
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
6
6
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
@@ -151,6 +151,18 @@ function runLocalCommands(commands, run = runInShell, onEach, onBefore) {
|
|
|
151
151
|
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/commands/gates/runHandler.ts
|
|
154
|
+
/** ENG-6070 review R5 M3 — dead gates are named, with their remedy. */
|
|
155
|
+
function printDeadGates(out, dead) {
|
|
156
|
+
for (const d of dead ?? []) out(` DEAD ${d.test_name ? `"${d.test_name}"` : d.link_id}${d.required === false ? " (advisory)" : ""}: ${d.reason === "test_deleted" ? "its test was deleted" : "the gate was removed"}${d.remedy ? ` — ${d.remedy}` : ""}`);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* ENG-6070 review R5 M3 — exit 0 only on `all_pass` with no REQUIRED dead
|
|
160
|
+
* gate (an older server's summary can still count a dead gate's old pass).
|
|
161
|
+
*/
|
|
162
|
+
function exitCodeOf(summary) {
|
|
163
|
+
const requiredDead = (summary.dead_gates ?? []).some((d) => d.required !== false);
|
|
164
|
+
return summary.status === "all_pass" && !requiredDead ? 0 : 1;
|
|
165
|
+
}
|
|
154
166
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
155
167
|
/**
|
|
156
168
|
* Seams for tests: the shell runner (production: `chooseShell`'s bash), and
|
|
@@ -229,9 +241,10 @@ async function gatesRunHandler(flags, issue) {
|
|
|
229
241
|
if (commands.length === 0) {
|
|
230
242
|
if (!flags.json) {
|
|
231
243
|
out(`${label}: no local commands to run (status ${summary.status ?? "unknown"}, ${summary.gates_passing ?? 0}/${summary.gates_total ?? 0} gates passing).`);
|
|
244
|
+
printDeadGates(out, summary.dead_gates);
|
|
232
245
|
printManualTasks(out, tasks);
|
|
233
246
|
} else out(JSON.stringify({ verify: summary }, null, 2));
|
|
234
|
-
this.process.exitCode = summary
|
|
247
|
+
this.process.exitCode = exitCodeOf(summary);
|
|
235
248
|
return;
|
|
236
249
|
}
|
|
237
250
|
if (flags["dry-run"]) {
|
|
@@ -302,9 +315,13 @@ async function gatesRunHandler(flags, issue) {
|
|
|
302
315
|
out(` ${String(g.status).toUpperCase()} ${g.test_name ?? g.gate_type}: ${String(g.actual ?? "").slice(0, 300)}`);
|
|
303
316
|
}
|
|
304
317
|
for (const r of after.receipts ?? []) if (!r.accepted) out(` REJECTED ${r.link_id}: ${r.reason ?? ""}`);
|
|
318
|
+
printDeadGates(out, after.dead_gates ?? summary.dead_gates);
|
|
305
319
|
printManualTasks(out, tasks);
|
|
306
320
|
}
|
|
307
|
-
this.process.exitCode =
|
|
321
|
+
this.process.exitCode = exitCodeOf({
|
|
322
|
+
...after,
|
|
323
|
+
dead_gates: after.dead_gates ?? summary.dead_gates
|
|
324
|
+
});
|
|
308
325
|
}
|
|
309
326
|
function printManualTasks(out, tasks) {
|
|
310
327
|
if (tasks.length === 0) return;
|
|
@@ -16291,20 +16291,24 @@ const zIssueGateVerificationReportGateResultsV1Body = z.object({ results: z.arra
|
|
|
16291
16291
|
})).optional()
|
|
16292
16292
|
})) });
|
|
16293
16293
|
const zIssueGateVerificationDeployGatesV1Body = z.object({
|
|
16294
|
-
root_folder_name: z.string(),
|
|
16294
|
+
root_folder_name: z.string().optional().describe(""),
|
|
16295
16295
|
child_folders: z.array(z.object({
|
|
16296
16296
|
deliverable: z.number(),
|
|
16297
16297
|
name: z.string()
|
|
16298
16298
|
})),
|
|
16299
16299
|
tests_by_deliverable: z.record(z.string(), z.array(z.object({
|
|
16300
16300
|
name: z.string(),
|
|
16301
|
+
test_id: z.string().optional().describe(""),
|
|
16302
|
+
rename_from: z.string().max(500).optional().describe(""),
|
|
16301
16303
|
required: z.boolean().optional().describe(""),
|
|
16302
16304
|
advisory_reason: z.string().max(2e3).optional().describe(""),
|
|
16303
16305
|
data: z.record(z.string(), z.unknown()).optional()
|
|
16304
16306
|
}))).describe(""),
|
|
16305
16307
|
link_template: z.record(z.string(), z.string()),
|
|
16306
16308
|
verification_rule: z.record(z.string(), z.unknown()).optional(),
|
|
16307
|
-
|
|
16309
|
+
remove: z.record(z.string(), z.array(z.string().max(500))).optional().describe(""),
|
|
16310
|
+
sync_plan: z.boolean().optional().describe(""),
|
|
16311
|
+
dry_run: z.boolean().optional().describe(""),
|
|
16308
16312
|
rename_reused: z.boolean().optional(),
|
|
16309
16313
|
test_origin: z.string().optional(),
|
|
16310
16314
|
validate: z.boolean().optional(),
|
|
@@ -17062,7 +17066,9 @@ const zResponseIssueTestLinkDto = z.object({
|
|
|
17062
17066
|
epoch: z.number().describe(""),
|
|
17063
17067
|
created_by: z.string().describe(""),
|
|
17064
17068
|
updated_by: z.string().describe(""),
|
|
17065
|
-
workspace_id: z.string().describe("")
|
|
17069
|
+
workspace_id: z.string().describe(""),
|
|
17070
|
+
deleted_at: z.unknown().describe(""),
|
|
17071
|
+
deleted_by: z.string().nullable().describe("")
|
|
17066
17072
|
});
|
|
17067
17073
|
const zUpdateIssueTestLinkDto = z.object({
|
|
17068
17074
|
id: z.string().optional().describe(""),
|
|
@@ -17159,6 +17165,7 @@ const zIssueTestLinkFindAllV1Data = z.object({
|
|
|
17159
17165
|
"filter.verified_by_user_id": z.array(z.string()).optional(),
|
|
17160
17166
|
"filter.created_at": z.array(z.string()).optional(),
|
|
17161
17167
|
"filter.updated_at": z.array(z.string()).optional(),
|
|
17168
|
+
"filter.deleted_at": z.array(z.string()).optional(),
|
|
17162
17169
|
"sortBy": z.array(z.enum([
|
|
17163
17170
|
"id:ASC",
|
|
17164
17171
|
"id:DESC",
|
|
@@ -17215,13 +17222,16 @@ const zIssueTestLinkFindAllV1Data = z.object({
|
|
|
17215
17222
|
"created_at:ASC",
|
|
17216
17223
|
"created_at:DESC",
|
|
17217
17224
|
"updated_at:ASC",
|
|
17218
|
-
"updated_at:DESC"
|
|
17225
|
+
"updated_at:DESC",
|
|
17226
|
+
"deleted_at:ASC",
|
|
17227
|
+
"deleted_at:DESC"
|
|
17219
17228
|
])).optional(),
|
|
17220
17229
|
"search": z.string().optional(),
|
|
17221
17230
|
"searchBy": z.array(z.string()).optional()
|
|
17222
17231
|
}).optional(),
|
|
17223
17232
|
url: z.literal("/v1/issue-test-link")
|
|
17224
17233
|
});
|
|
17234
|
+
const zIssueTestLinkFindRecentlyDeletedV1Data = z.object({ url: z.literal("/v1/issue-test-link/recently-deleted") });
|
|
17225
17235
|
const zIssueTestLinkFindOneV1Data = z.object({
|
|
17226
17236
|
path: z.object({ "id": z.string() }),
|
|
17227
17237
|
url: z.literal("/v1/issue-test-link/{id}")
|
|
@@ -17239,6 +17249,10 @@ const zIssueTestLinkBulkOperationV1Data = z.object({
|
|
|
17239
17249
|
body: zBulkIssueTestLinkRequestDto,
|
|
17240
17250
|
url: z.literal("/v1/issue-test-link/bulk")
|
|
17241
17251
|
});
|
|
17252
|
+
const zIssueTestLinkRestoreV1Data = z.object({
|
|
17253
|
+
path: z.object({ "id": z.string() }),
|
|
17254
|
+
url: z.literal("/v1/issue-test-link/{id}/restore")
|
|
17255
|
+
});
|
|
17242
17256
|
|
|
17243
17257
|
//#endregion
|
|
17244
17258
|
//#region ../sdk/dist/gen/issue-test-link-waiver/zod.js
|
|
@@ -27888,6 +27902,7 @@ const zBulkTransactionRequestDto = z.object({ operations: z.array(zTransactionOp
|
|
|
27888
27902
|
const zIngestRequestDto = z.object({
|
|
27889
27903
|
source_workspace_id: z.string(),
|
|
27890
27904
|
schema_version_hash: z.string(),
|
|
27905
|
+
migration_head: z.string().optional(),
|
|
27891
27906
|
entities: z.array(z.object({
|
|
27892
27907
|
entity_type: z.string(),
|
|
27893
27908
|
entity_id: z.string(),
|
|
@@ -28514,7 +28529,11 @@ const zTestBulkOperationDto = z.object({
|
|
|
28514
28529
|
data: z.unknown().optional().describe(""),
|
|
28515
28530
|
tx_id: z.string().describe("")
|
|
28516
28531
|
});
|
|
28517
|
-
const zBulkTestRequestDto = z.object({
|
|
28532
|
+
const zBulkTestRequestDto = z.object({
|
|
28533
|
+
operations: z.array(zTestBulkOperationDto).describe(""),
|
|
28534
|
+
remove_gate_links: z.boolean().optional().describe(""),
|
|
28535
|
+
change_reason: z.string().max(2e3).optional().describe("")
|
|
28536
|
+
});
|
|
28518
28537
|
const zBulkTestOperationResultDto = z.object({
|
|
28519
28538
|
index: z.number().describe(""),
|
|
28520
28539
|
status: z.number().describe(""),
|
|
@@ -28599,6 +28618,10 @@ const zTestUpdateV1Data = z.object({
|
|
|
28599
28618
|
});
|
|
28600
28619
|
const zTestRemoveV1Data = z.object({
|
|
28601
28620
|
path: z.object({ "testId": z.string() }),
|
|
28621
|
+
query: z.object({
|
|
28622
|
+
"remove_gate_links": z.boolean().optional(),
|
|
28623
|
+
"change_reason": z.string().optional()
|
|
28624
|
+
}).optional(),
|
|
28602
28625
|
url: z.literal("/v1/test/{testId}")
|
|
28603
28626
|
});
|
|
28604
28627
|
const zTestBulkOperationV1Data = z.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./env-CHeKHu5S.js";
|
|
2
|
-
import { authGetSitesV1, configureClient } from "./sdk-client-
|
|
2
|
+
import { authGetSitesV1, configureClient } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import { saveWorkspace } from "./workspace-store-DDOxnut1.js";
|
|
4
4
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
5
5
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getApiUrl, getPatToken, readCredentials } from "./env-CHeKHu5S.js";
|
|
2
|
-
import { authGetProfileV1, configureClient } from "./sdk-client-
|
|
2
|
+
import { authGetProfileV1, configureClient } from "./sdk-client-Bn2yatEI.js";
|
|
3
3
|
import { isTokenExpired } from "./token-refresh-Cu5RpkLJ.js";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
|