@levr-one/cli 0.5.0 → 0.5.2

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/README.md CHANGED
@@ -14,14 +14,45 @@ The command-line interface for [Levr](https://www.levr.one). The binary is
14
14
  ## Install
15
15
 
16
16
  ```bash
17
- npm install -g @levr-one/cli # global install for daily use
18
- # or run once, no install:
19
- npx @levr-one/cli --help
17
+ npm install -g @levr-one/cli # gives you a persistent `levr` command
20
18
  ```
21
19
 
22
20
  The package is self-contained — no peer setup required. A global install
23
21
  replaces the `levr` bin from the deprecated `@levr-one/setup` package.
24
22
 
23
+ ### Or run it without a global install
24
+
25
+ ```bash
26
+ npx @levr-one/cli --help
27
+ ```
28
+
29
+ `npx` is right for one-shot use (`mcp add`, trying a command). Two things to
30
+ expect:
31
+
32
+ - **`levr` will not be on your PATH afterwards.** npx puts the command on PATH
33
+ only for the duration of that one invocation. Shell completion also assumes a
34
+ global install, since the generated script wires up the `levr` command.
35
+ - **It does download the package** — roughly 8 MB into npm's `~/.npm/_npx`
36
+ cache, kept indefinitely. The first run asks `Ok to proceed?`; later runs are
37
+ silent until a new version is published.
38
+
39
+ In scripts and CI, pass `--yes` — **in a terminal the prompt blocks until it is
40
+ answered**, so an unattended run with a TTY hangs rather than failing:
41
+
42
+ ```bash
43
+ npx --yes @levr-one/cli push ./test-results.xml
44
+ ```
45
+
46
+ Two things to get right:
47
+
48
+ - **Always `npx @levr-one/cli`, never `npx levr`.** npx treats the first
49
+ positional as a _package_ name, so `npx levr` would fetch and run whatever
50
+ package is published under the unscoped name `levr` — which is not ours.
51
+ - **npm's flags go before the package name.** `npx @levr-one/cli --yes` passes
52
+ `--yes` to `levr`, not to npm.
53
+
54
+ For reproducible CI, pin `@levr-one/cli` to a version you have validated.
55
+
25
56
  ## Quick start
26
57
 
27
58
  **Using an AI client?** Wire the Levr MCP server into it — no login needed;
@@ -203,7 +234,7 @@ levr import ./cases.csv --team-id <uuid> --map "State=labels:state"
203
234
  env:
204
235
  LEVR_TOKEN: ${{ secrets.LEVR_TOKEN }}
205
236
  # LEVR_TEAM_ID is optional — server resolves from automation source or workspace default
206
- run: npx @levr-one/cli push ./test-results.xml
237
+ run: npx --yes @levr-one/cli push ./test-results.xml
207
238
  ```
208
239
 
209
240
  ### GitLab CI
@@ -211,7 +242,7 @@ levr import ./cases.csv --team-id <uuid> --map "State=labels:state"
211
242
  ```yaml
212
243
  push-results:
213
244
  script:
214
- - npx @levr-one/cli push ./test-results.xml
245
+ - npx --yes @levr-one/cli push ./test-results.xml
215
246
  variables:
216
247
  LEVR_TOKEN: $LEVR_TOKEN
217
248
  ```
@@ -220,7 +251,7 @@ push-results:
220
251
 
221
252
  ```groovy
222
253
  withEnv(["LEVR_TOKEN=${LEVR_TOKEN}"]) {
223
- sh 'npx @levr-one/cli push ./test-results.xml'
254
+ sh 'npx --yes @levr-one/cli push ./test-results.xml'
224
255
  }
225
256
  ```
226
257
 
@@ -272,6 +303,10 @@ levr workspace current # show the active workspace
272
303
 
273
304
  ## Shell completion (optional)
274
305
 
306
+ Completion needs a global install: the generated script wires up the `levr`
307
+ command, so it does nothing if `levr` is not on your PATH (which it is not when
308
+ you run via `npx`).
309
+
275
310
  `levr completion` prints a completion script to **stdout**. It never edits your
276
311
  shell config — you choose where the script goes:
277
312
 
package/dist/cli.js CHANGED
@@ -180,7 +180,7 @@ Examples:
180
180
  aliases: { d: "device-code" }
181
181
  },
182
182
  loader: async () => {
183
- const { loginHandler } = await import("./loginHandler-BhvCWTd8.js");
183
+ const { loginHandler } = await import("./loginHandler-D3szhgXj.js");
184
184
  return loginHandler;
185
185
  }
186
186
  });
@@ -219,7 +219,7 @@ Examples:
219
219
  },
220
220
  parameters: {},
221
221
  loader: async () => {
222
- const { statusHandler } = await import("./statusHandler-B6XRPg4k.js");
222
+ const { statusHandler } = await import("./statusHandler-BB5BTz0L.js");
223
223
  return statusHandler;
224
224
  }
225
225
  });
@@ -330,7 +330,7 @@ Examples:
330
330
  }
331
331
  },
332
332
  loader: async () => {
333
- const { pushHandler } = await import("./pushHandler-v4-lHK6A.js");
333
+ const { pushHandler } = await import("./pushHandler-BgKnW9th.js");
334
334
  return pushHandler;
335
335
  }
336
336
  });
@@ -442,7 +442,7 @@ Examples:
442
442
  }
443
443
  },
444
444
  loader: async () => {
445
- const { importHandler } = await import("./importHandler-D27Xrx73.js");
445
+ const { importHandler } = await import("./importHandler-vnrB51lr.js");
446
446
  return importHandler;
447
447
  }
448
448
  });
@@ -463,7 +463,7 @@ Examples:
463
463
  },
464
464
  parameters: {},
465
465
  loader: async () => {
466
- const { listHandler } = await import("./listHandler-8uqFClxw.js");
466
+ const { listHandler } = await import("./listHandler-CR5TqJLK.js");
467
467
  return listHandler;
468
468
  }
469
469
  });
@@ -496,7 +496,7 @@ Examples:
496
496
  flags: {}
497
497
  },
498
498
  loader: async () => {
499
- const { selectHandler } = await import("./selectHandler-DeEZe6PU.js");
499
+ const { selectHandler } = await import("./selectHandler-Dyms28ls.js");
500
500
  return selectHandler;
501
501
  }
502
502
  });
@@ -520,7 +520,7 @@ Examples:
520
520
 
521
521
  //#endregion
522
522
  //#region package.json
523
- var version = "0.5.0";
523
+ var version = "0.5.2";
524
524
 
525
525
  //#endregion
526
526
  //#region src/app.ts
@@ -1,7 +1,7 @@
1
1
  import { getApiUrl } from "./env-CHeKHu5S.js";
2
- import { configureClient, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-DP7uCfXP.js";
2
+ import { configureClient, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-C5qmnw6U.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { resolveWorkspace } from "./resolve-workspace-BnTDxvYq.js";
4
+ import { resolveWorkspace } from "./resolve-workspace-iMf5dt8G.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-DP7uCfXP.js";
2
+ import { authGetSitesV1, configureClient } from "./sdk-client-C5qmnw6U.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-DP7uCfXP.js";
2
+ import { configureClient } from "./sdk-client-C5qmnw6U.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { autoSelectWorkspace } from "./resolve-workspace-BnTDxvYq.js";
4
+ import { autoSelectWorkspace } from "./resolve-workspace-iMf5dt8G.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, uploadAutomationIngest, uploadImport } from "./sdk-client-DP7uCfXP.js";
2
+ import { client, configureClient, uploadAutomationIngest, uploadImport } from "./sdk-client-C5qmnw6U.js";
3
3
  import "./workspace-store-DDOxnut1.js";
4
- import { resolveWorkspace } from "./resolve-workspace-BnTDxvYq.js";
4
+ import { resolveWorkspace } from "./resolve-workspace-iMf5dt8G.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-DP7uCfXP.js";
1
+ import { authGetSitesV1 } from "./sdk-client-C5qmnw6U.js";
2
2
  import { clearWorkspace, loadWorkspace, saveWorkspace } from "./workspace-store-DDOxnut1.js";
3
3
 
4
4
  //#region src/workspace/resolve-workspace.ts
@@ -2594,7 +2594,8 @@ const zAuthCreateWorkspaceDto = z.object({
2594
2594
  email: z.string(),
2595
2595
  password: z.string(),
2596
2596
  recaptchaToken: z.string().optional(),
2597
- invitation_token: z.string().optional()
2597
+ invitation_token: z.string().optional(),
2598
+ recreate_token: z.string().optional()
2598
2599
  });
2599
2600
  const zLoginUserDto = z.object({
2600
2601
  id: z.string().describe(""),
@@ -10580,6 +10581,10 @@ const zDataSetTestBulkOperationV1Data = z.object({
10580
10581
  url: z.literal("/v1/data-set-test/bulk")
10581
10582
  });
10582
10583
 
10584
+ //#endregion
10585
+ //#region ../sdk/dist/gen/deactivate-account/zod.js
10586
+ const zDeactivateAccountData = z.object({ url: z.literal("/v1/auth/account/deactivate") });
10587
+
10583
10588
  //#endregion
10584
10589
  //#region ../sdk/dist/gen/dedup-exclusion/zod.js
10585
10590
  const zCreateDedupExclusionDto = z.object({
@@ -10837,6 +10842,10 @@ const zDedupVerdictFindOneV1Data = z.object({
10837
10842
  url: z.literal("/v1/dedup-verdict/{id}")
10838
10843
  });
10839
10844
 
10845
+ //#endregion
10846
+ //#region ../sdk/dist/gen/delete-account/zod.js
10847
+ const zDeleteAccountData = z.object({ url: z.literal("/v1/auth/account") });
10848
+
10840
10849
  //#endregion
10841
10850
  //#region ../sdk/dist/gen/deliverable-gate/zod.js
10842
10851
  const zDeliverableGateGetGatesForIssuesV1Body = z.object({ issueIds: z.array(z.string()).describe("") });
@@ -11114,7 +11123,7 @@ const zEmailChangeRequestRequestEmailChangeV1Data = z.object({
11114
11123
  const zEmailVerifyDto = z.object({
11115
11124
  email: z.string(),
11116
11125
  token: z.string(),
11117
- type: z.enum(["change"]).optional()
11126
+ type: z.enum(["change", "reactivate"]).optional()
11118
11127
  });
11119
11128
  const zResendVerificationDto = z.object({ email: z.string() });
11120
11129
  const zEmailVerificationVerifyEmailV1Data = z.object({
@@ -13909,6 +13918,19 @@ const zGateSetDefinitionRestoreV1Data = z.object({
13909
13918
  url: z.literal("/v1/gate-set-definition/{id}/restore")
13910
13919
  });
13911
13920
 
13921
+ //#endregion
13922
+ //#region ../sdk/dist/gen/get-account-deletion-blockers/zod.js
13923
+ const zAccountDeletionBlockersResponseDto = z.object({ blockers: z.array(z.object({
13924
+ workspace_id: z.string(),
13925
+ workspace_name: z.string().nullable(),
13926
+ members: z.array(z.object({
13927
+ id: z.string(),
13928
+ name: z.string().nullable(),
13929
+ email: z.string().nullable()
13930
+ }))
13931
+ })) });
13932
+ const zGetAccountDeletionBlockersData = z.object({ url: z.literal("/v1/auth/account/deletion-blockers") });
13933
+
13912
13934
  //#endregion
13913
13935
  //#region ../sdk/dist/gen/git-content/zod.js
13914
13936
  const zGitContentGetFileContentV1Data = z.object({
@@ -17968,7 +17990,9 @@ const zResponseLabelAssignedFolderDto = z.object({
17968
17990
  epoch: z.number().describe(""),
17969
17991
  created_by: z.string().describe(""),
17970
17992
  updated_by: z.string().describe(""),
17971
- workspace_id: z.string().describe("")
17993
+ workspace_id: z.string().describe(""),
17994
+ deleted_at: z.unknown().describe(""),
17995
+ deleted_by: z.string().nullable().describe("")
17972
17996
  });
17973
17997
  const zUpdateLabelAssignedFolderDto = z.object({
17974
17998
  id: z.string().optional().describe(""),
@@ -18020,19 +18044,23 @@ const zLabelAssignedFolderFindAllV1Data = z.object({
18020
18044
  "filter.folder_id": z.array(z.string()).optional(),
18021
18045
  "filter.created_at": z.array(z.string()).optional(),
18022
18046
  "filter.updated_at": z.array(z.string()).optional(),
18047
+ "filter.deleted_at": z.array(z.string()).optional(),
18023
18048
  "sortBy": z.array(z.enum([
18024
18049
  "id:ASC",
18025
18050
  "id:DESC",
18026
18051
  "created_at:ASC",
18027
18052
  "created_at:DESC",
18028
18053
  "updated_at:ASC",
18029
- "updated_at:DESC"
18054
+ "updated_at:DESC",
18055
+ "deleted_at:ASC",
18056
+ "deleted_at:DESC"
18030
18057
  ])).optional(),
18031
18058
  "search": z.string().optional(),
18032
18059
  "searchBy": z.array(z.string()).optional()
18033
18060
  }).optional(),
18034
18061
  url: z.literal("/v1/label-assigned-folder")
18035
18062
  });
18063
+ const zLabelAssignedFolderFindRecentlyDeletedV1Data = z.object({ url: z.literal("/v1/label-assigned-folder/recently-deleted") });
18036
18064
  const zLabelAssignedFolderFindOneV1Data = z.object({
18037
18065
  path: z.object({ "id": z.string() }),
18038
18066
  url: z.literal("/v1/label-assigned-folder/{id}")
@@ -18050,6 +18078,10 @@ const zLabelAssignedFolderBulkOperationV1Data = z.object({
18050
18078
  body: zBulkLabelAssignedFolderRequestDto,
18051
18079
  url: z.literal("/v1/label-assigned-folder/bulk")
18052
18080
  });
18081
+ const zLabelAssignedFolderRestoreV1Data = z.object({
18082
+ path: z.object({ "id": z.string() }),
18083
+ url: z.literal("/v1/label-assigned-folder/{id}/restore")
18084
+ });
18053
18085
 
18054
18086
  //#endregion
18055
18087
  //#region ../sdk/dist/gen/label-assigned-issue/zod.js
@@ -29838,6 +29870,7 @@ const zResponseUserAccountDto = z.object({
29838
29870
  locked_until: z.unknown().optional().describe(""),
29839
29871
  old_password: z.string().nullable().optional().describe(""),
29840
29872
  pending_email: z.string().nullable().optional().describe(""),
29873
+ recreated_at: z.unknown().optional().describe(""),
29841
29874
  created_at: z.unknown().describe(""),
29842
29875
  updated_at: z.unknown().describe(""),
29843
29876
  epoch: z.number().describe(""),
@@ -30891,6 +30924,16 @@ const zWorkspaceSubscriptionBulkOperationV1Data = z.object({
30891
30924
  url: z.literal("/v1/workspace-subscription/bulk")
30892
30925
  });
30893
30926
 
30927
+ //#endregion
30928
+ //#region ../sdk/dist/gen/workspace-transfer-ownership/zod.js
30929
+ const zTransferOwnershipBodyDto = z.object({ new_owner_user_id: z.string().describe("") });
30930
+ const zTransferOwnershipResponseDto = z.object({ success: z.boolean() });
30931
+ const zWorkspaceTransferOwnershipData = z.object({
30932
+ body: zTransferOwnershipBodyDto,
30933
+ path: z.object({ "id": z.string() }),
30934
+ url: z.literal("/v1/workspace/{id}/transfer-ownership")
30935
+ });
30936
+
30894
30937
  //#endregion
30895
30938
  //#region ../sdk/dist/gen/workspace-url-key/zod.js
30896
30939
  const zWorkspaceByUrlKeyResponseDto = z.object({
@@ -1,5 +1,5 @@
1
1
  import "./env-CHeKHu5S.js";
2
- import { authGetSitesV1, configureClient } from "./sdk-client-DP7uCfXP.js";
2
+ import { authGetSitesV1, configureClient } from "./sdk-client-C5qmnw6U.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-DP7uCfXP.js";
2
+ import { authGetProfileV1, configureClient } from "./sdk-client-C5qmnw6U.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.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "The command-line interface for Levr",
5
5
  "type": "module",
6
6
  "license": "MIT",