@dropthis/cli 0.22.0 → 0.23.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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ <p align="center"><img src="https://dropthis.app/icon-512.png" width="76" height="76" alt="dropthis" /></p>
2
+
1
3
  # @dropthis/cli
2
4
 
3
5
  Official CLI for [dropthis](https://dropthis.app) -- the publish layer between AI and the internet. Built for humans, AI agents, and CI/CD pipelines.
@@ -35,6 +37,8 @@ dropthis login request --email you@example.com
35
37
  dropthis login verify --email you@example.com --otp 123456
36
38
  ```
37
39
 
40
+ > A failed verify prints `Your code has expired` (`otp_expired`) or `That code is incorrect` (`otp_invalid`) and exits non-zero.
41
+
38
42
  Or pass both flags directly:
39
43
 
40
44
  ```bash
package/dist/cli.cjs CHANGED
@@ -916,13 +916,13 @@ async function runDoctor(_input, deps) {
916
916
  const authSource = credential?.source ?? "missing";
917
917
  const storageBackend = stored?.storage ?? "none";
918
918
  const pairs = [
919
- ["Version", "0.22.0"],
919
+ ["Version", "0.23.0"],
920
920
  ["Auth", authSource],
921
921
  ["Storage", storageBackend]
922
922
  ];
923
923
  writeKv(deps, pairs, {
924
924
  ok: true,
925
- version: "0.22.0",
925
+ version: "0.23.0",
926
926
  auth: { source: authSource },
927
927
  storage: { backend: storageBackend }
928
928
  });
@@ -1506,6 +1506,15 @@ async function runLoginInteractive(deps) {
1506
1506
  session = result;
1507
1507
  break;
1508
1508
  }
1509
+ if (result.error.code === "otp_expired" && attempt < maxAttempts) {
1510
+ const resend = await deps.client.auth.requestEmailOtp({ email });
1511
+ if (resend.error) {
1512
+ prompts4.cancel(resend.error.message);
1513
+ return { exitCode: exitCodeFor("api_error") };
1514
+ }
1515
+ prompts4.log.info("That code expired \u2014 we sent a new one.");
1516
+ continue;
1517
+ }
1509
1518
  if (attempt < maxAttempts) {
1510
1519
  prompts4.log.warning(result.error.message);
1511
1520
  } else {
@@ -2780,7 +2789,7 @@ function buildProgram(options = {}) {
2780
2789
  ` ${import_picocolors6.default.cyan("dropthis login")}`,
2781
2790
  ` ${import_picocolors6.default.cyan("dropthis publish ./dist")}`
2782
2791
  ].join("\n")
2783
- ).version("0.22.0").configureHelp({
2792
+ ).version("0.23.0").configureHelp({
2784
2793
  subcommandTerm(cmd) {
2785
2794
  const args = cmd.registeredArguments.map((a) => {
2786
2795
  const name = a.name();
@@ -3382,7 +3391,7 @@ ${import_picocolors6.default.bold("Canonical vs raw URLs:")}`,
3382
3391
  );
3383
3392
  const result = await runUpgrade(commandOptions, {
3384
3393
  ...deps,
3385
- currentVersion: "0.22.0"
3394
+ currentVersion: "0.23.0"
3386
3395
  });
3387
3396
  process.exitCode = result.exitCode;
3388
3397
  });
@@ -3636,7 +3645,7 @@ var showNotice = shouldShowNotice({
3636
3645
  if (showNotice) {
3637
3646
  const notice = noticeFromCache({
3638
3647
  cache: updateCache,
3639
- currentVersion: "0.22.0"
3648
+ currentVersion: "0.23.0"
3640
3649
  });
3641
3650
  if (notice) {
3642
3651
  process.stderr.write(`