@levr-one/cli 0.10.4 → 0.10.6

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 CHANGED
@@ -213,7 +213,7 @@ Examples:
213
213
  aliases: { d: "device-code" }
214
214
  },
215
215
  loader: async () => {
216
- const { loginHandler } = await import("./loginHandler-DckKib3B.js");
216
+ const { loginHandler } = await import("./loginHandler-DabcJxdy.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-OuPRXqaF.js");
255
+ const { statusHandler } = await import("./statusHandler-BdqXsbIm.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-D6aA95g7.js");
359
+ const { pushHandler } = await import("./pushHandler-F0i0eU_Z.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-DjqSSsBZ.js");
479
+ const { importHandler } = await import("./importHandler-B6NgpS8y.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-HDOTNXEo.js");
500
+ const { listHandler } = await import("./listHandler-Ex03FZ74.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-D8jyi0UY.js");
533
+ const { selectHandler } = await import("./selectHandler-CpXdtjM8.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-CPDKYZI9.js");
619
+ const { gatesRunHandler } = await import("./runHandler-yY1h60Vw.js");
620
620
  return gatesRunHandler;
621
621
  }
622
622
  });
623
623
 
624
624
  //#endregion
625
625
  //#region package.json
626
- var version = "0.10.4";
626
+ var version = "0.10.6";
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-Cvy2DYQA.js";
2
+ import { authGetProfileV1, configureClient, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-DZYtHmtI.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { resolveWorkspace } from "./resolve-workspace-C6NcN4DK.js";
4
+ import { resolveWorkspace } from "./resolve-workspace-CeIDOFR2.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-Cvy2DYQA.js";
2
+ import { authGetSitesV1, configureClient } from "./sdk-client-DZYtHmtI.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-Cvy2DYQA.js";
2
+ import { configureClient } from "./sdk-client-DZYtHmtI.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { autoSelectWorkspace } from "./resolve-workspace-C6NcN4DK.js";
4
+ import { autoSelectWorkspace } from "./resolve-workspace-CeIDOFR2.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-Cvy2DYQA.js";
2
+ import { client, configureClient, uploadImport } from "./sdk-client-DZYtHmtI.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { resolveWorkspace } from "./resolve-workspace-C6NcN4DK.js";
4
+ import { resolveWorkspace } from "./resolve-workspace-CeIDOFR2.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,4 +1,4 @@
1
- import { authGetSitesV1 } from "./sdk-client-Cvy2DYQA.js";
1
+ import { authGetSitesV1 } from "./sdk-client-DZYtHmtI.js";
2
2
  import { clearWorkspace, loadWorkspace, saveWorkspace } from "./workspace-store-DDOxnut1.js";
3
3
 
4
4
  //#region src/workspace/resolve-workspace.ts
@@ -1,7 +1,7 @@
1
1
  import "./env-CHeKHu5S.js";
2
- import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-Cvy2DYQA.js";
2
+ import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-DZYtHmtI.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { resolveWorkspace } from "./resolve-workspace-C6NcN4DK.js";
4
+ import { resolveWorkspace } from "./resolve-workspace-CeIDOFR2.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.status === "all_pass" ? 0 : 1;
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 = after.status === "all_pass" ? 0 : 1;
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;
@@ -13650,7 +13650,7 @@ const zCreateGateDefinitionDto = z.object({
13650
13650
  is_system: z.boolean().nullable().optional().describe(""),
13651
13651
  is_default: z.boolean().optional().describe(""),
13652
13652
  sort_order: z.number().optional().describe(""),
13653
- layer: z.number().optional().describe(""),
13653
+ technique: z.string().optional().describe(""),
13654
13654
  estimated_cost: z.number().nullable().optional().describe(""),
13655
13655
  estimated_duration_ms: z.number().nullable().optional().describe(""),
13656
13656
  resolver_template: z.unknown().optional().describe("")
@@ -13669,7 +13669,7 @@ const zResponseGateDefinitionDto = z.object({
13669
13669
  is_system: z.boolean().nullable().optional().describe(""),
13670
13670
  is_default: z.boolean().optional().describe(""),
13671
13671
  sort_order: z.number().optional().describe(""),
13672
- layer: z.number().optional().describe(""),
13672
+ technique: z.string().optional().describe(""),
13673
13673
  estimated_cost: z.number().nullable().optional().describe(""),
13674
13674
  estimated_duration_ms: z.number().nullable().optional().describe(""),
13675
13675
  resolver_template: z.unknown().optional().describe(""),
@@ -13696,7 +13696,7 @@ const zUpdateGateDefinitionDto = z.object({
13696
13696
  is_system: z.boolean().nullable().optional().describe(""),
13697
13697
  is_default: z.boolean().optional().describe(""),
13698
13698
  sort_order: z.number().optional().describe(""),
13699
- layer: z.number().optional().describe(""),
13699
+ technique: z.string().optional().describe(""),
13700
13700
  estimated_cost: z.number().nullable().optional().describe(""),
13701
13701
  estimated_duration_ms: z.number().nullable().optional().describe(""),
13702
13702
  resolver_template: z.unknown().optional().describe("")
@@ -13753,7 +13753,7 @@ const zGateDefinitionFindAllV1Data = z.object({
13753
13753
  "filter.is_system": z.array(z.string()).optional(),
13754
13754
  "filter.is_default": z.array(z.string()).optional(),
13755
13755
  "filter.sort_order": z.array(z.string()).optional(),
13756
- "filter.layer": z.array(z.string()).optional(),
13756
+ "filter.technique": z.array(z.string()).optional(),
13757
13757
  "filter.estimated_cost": z.array(z.string()).optional(),
13758
13758
  "filter.estimated_duration_ms": z.array(z.string()).optional(),
13759
13759
  "filter.created_at": z.array(z.string()).optional(),
@@ -13781,8 +13781,8 @@ const zGateDefinitionFindAllV1Data = z.object({
13781
13781
  "color:DESC",
13782
13782
  "sort_order:ASC",
13783
13783
  "sort_order:DESC",
13784
- "layer:ASC",
13785
- "layer:DESC",
13784
+ "technique:ASC",
13785
+ "technique:DESC",
13786
13786
  "estimated_cost:ASC",
13787
13787
  "estimated_cost:DESC",
13788
13788
  "estimated_duration_ms:ASC",
@@ -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
- replace_existing: z.boolean().optional(),
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(),
@@ -28458,7 +28473,15 @@ const zUpdateTestDto = z.object({
28458
28473
  type: z.enum(["guided"]),
28459
28474
  step: z.string(),
28460
28475
  expected_result: z.string().optional(),
28461
- result: z.string().optional()
28476
+ result: z.string().optional(),
28477
+ technique: z.enum([
28478
+ "presence",
28479
+ "pattern",
28480
+ "structure",
28481
+ "semantic",
28482
+ "execution",
28483
+ "state"
28484
+ ]).optional()
28462
28485
  }),
28463
28486
  z.object({
28464
28487
  id: z.string().optional(),
@@ -28473,14 +28496,29 @@ const zUpdateTestDto = z.object({
28473
28496
  "But",
28474
28497
  "*"
28475
28498
  ]).optional(),
28476
- data_table: z.object({ rows: z.array(z.array(z.string())) }).optional()
28499
+ data_table: z.object({ rows: z.array(z.array(z.string())) }).optional(),
28500
+ technique: z.enum([
28501
+ "presence",
28502
+ "pattern",
28503
+ "structure",
28504
+ "semantic",
28505
+ "execution",
28506
+ "state"
28507
+ ]).optional()
28477
28508
  }),
28478
28509
  z.object({
28479
28510
  id: z.string().optional(),
28480
28511
  type: z.string(),
28481
28512
  params: z.record(z.string(), z.unknown()).optional(),
28482
28513
  expected_result: z.string().optional(),
28483
- layer: z.string().optional()
28514
+ technique: z.enum([
28515
+ "presence",
28516
+ "pattern",
28517
+ "structure",
28518
+ "semantic",
28519
+ "execution",
28520
+ "state"
28521
+ ]).optional()
28484
28522
  })
28485
28523
  ])).optional()
28486
28524
  }).optional(),
@@ -28514,7 +28552,11 @@ const zTestBulkOperationDto = z.object({
28514
28552
  data: z.unknown().optional().describe(""),
28515
28553
  tx_id: z.string().describe("")
28516
28554
  });
28517
- const zBulkTestRequestDto = z.object({ operations: z.array(zTestBulkOperationDto).describe("") });
28555
+ const zBulkTestRequestDto = z.object({
28556
+ operations: z.array(zTestBulkOperationDto).describe(""),
28557
+ remove_gate_links: z.boolean().optional().describe(""),
28558
+ change_reason: z.string().max(2e3).optional().describe("")
28559
+ });
28518
28560
  const zBulkTestOperationResultDto = z.object({
28519
28561
  index: z.number().describe(""),
28520
28562
  status: z.number().describe(""),
@@ -28599,6 +28641,10 @@ const zTestUpdateV1Data = z.object({
28599
28641
  });
28600
28642
  const zTestRemoveV1Data = z.object({
28601
28643
  path: z.object({ "testId": z.string() }),
28644
+ query: z.object({
28645
+ "remove_gate_links": z.boolean().optional(),
28646
+ "change_reason": z.string().optional()
28647
+ }).optional(),
28602
28648
  url: z.literal("/v1/test/{testId}")
28603
28649
  });
28604
28650
  const zTestBulkOperationV1Data = z.object({
@@ -1,5 +1,5 @@
1
1
  import "./env-CHeKHu5S.js";
2
- import { authGetSitesV1, configureClient } from "./sdk-client-Cvy2DYQA.js";
2
+ import { authGetSitesV1, configureClient } from "./sdk-client-DZYtHmtI.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-Cvy2DYQA.js";
2
+ import { authGetProfileV1, configureClient } from "./sdk-client-DZYtHmtI.js";
3
3
  import { isTokenExpired } from "./token-refresh-Cu5RpkLJ.js";
4
4
  import chalk from "chalk";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levr-one/cli",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "The command-line interface for Levr",
5
5
  "type": "module",
6
6
  "license": "MIT",