@plaud-ai/cli 0.3.6 → 0.3.7
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/index.js +26 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19899,10 +19899,18 @@ async function shutdown() {
|
|
|
19899
19899
|
return;
|
|
19900
19900
|
const client2 = cachedClient;
|
|
19901
19901
|
cachedClient = null;
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19902
|
+
let timer;
|
|
19903
|
+
try {
|
|
19904
|
+
await Promise.race([
|
|
19905
|
+
client2.shutdown(),
|
|
19906
|
+
new Promise((resolve) => {
|
|
19907
|
+
timer = setTimeout(resolve, SHUTDOWN_TIMEOUT_MS);
|
|
19908
|
+
})
|
|
19909
|
+
]);
|
|
19910
|
+
} finally {
|
|
19911
|
+
if (timer)
|
|
19912
|
+
clearTimeout(timer);
|
|
19913
|
+
}
|
|
19906
19914
|
}
|
|
19907
19915
|
|
|
19908
19916
|
// ../telemetry/dist/identity.js
|
|
@@ -20257,6 +20265,13 @@ var currentCommand = "unknown";
|
|
|
20257
20265
|
var currentRequestId = "";
|
|
20258
20266
|
var startedAt = 0;
|
|
20259
20267
|
var currentFileId;
|
|
20268
|
+
var HARD_EXIT_GRACE_MS = 500;
|
|
20269
|
+
function drainAndExit(code) {
|
|
20270
|
+
process.exitCode = code;
|
|
20271
|
+
setTimeout(() => process.exit(code), HARD_EXIT_GRACE_MS).unref();
|
|
20272
|
+
return new Promise(() => {
|
|
20273
|
+
});
|
|
20274
|
+
}
|
|
20260
20275
|
function errorTypeForExit(code) {
|
|
20261
20276
|
switch (code) {
|
|
20262
20277
|
case ExitCode.AUTH_FAILED:
|
|
@@ -20301,7 +20316,7 @@ async function telemetryExit(code) {
|
|
|
20301
20316
|
});
|
|
20302
20317
|
}
|
|
20303
20318
|
await shutdown();
|
|
20304
|
-
return
|
|
20319
|
+
return drainAndExit(code);
|
|
20305
20320
|
}
|
|
20306
20321
|
|
|
20307
20322
|
// src/commands/version.ts
|
|
@@ -20364,7 +20379,7 @@ function isNewer(current, latest) {
|
|
|
20364
20379
|
return false;
|
|
20365
20380
|
}
|
|
20366
20381
|
var updateCommand = new Command("update").description("Check npm for the latest Plaud CLI and print the upgrade command").action(async () => {
|
|
20367
|
-
const current = "0.3.
|
|
20382
|
+
const current = "0.3.7";
|
|
20368
20383
|
const spinner = ora("Checking npm for latest version...").start();
|
|
20369
20384
|
const latest = await fetchLatestVersion();
|
|
20370
20385
|
spinner.stop();
|
|
@@ -20419,10 +20434,10 @@ async function checkForUpdate(current) {
|
|
|
20419
20434
|
return isNewer(current, latest) ? latest : null;
|
|
20420
20435
|
}
|
|
20421
20436
|
var versionCommand = new Command2("version").description("Show CLI version information").action(async () => {
|
|
20422
|
-
const current = "0.3.
|
|
20437
|
+
const current = "0.3.7";
|
|
20423
20438
|
console.log(`plaud ${current}`);
|
|
20424
|
-
if ("
|
|
20425
|
-
if ("2026-
|
|
20439
|
+
if ("bacaae9") console.log(`commit ${"bacaae9"}`);
|
|
20440
|
+
if ("2026-08-05T03:31:25.414Z") console.log(`built ${"2026-08-05T03:31:25.414Z"}`);
|
|
20426
20441
|
if (current === "unknown") return;
|
|
20427
20442
|
const newer = await checkForUpdate(current);
|
|
20428
20443
|
if (newer) {
|
|
@@ -21701,7 +21716,7 @@ async function runWizard() {
|
|
|
21701
21716
|
try {
|
|
21702
21717
|
await initTelemetry({
|
|
21703
21718
|
surface: "cli",
|
|
21704
|
-
appVersion: "0.3.
|
|
21719
|
+
appVersion: "0.3.7"
|
|
21705
21720
|
});
|
|
21706
21721
|
} catch {
|
|
21707
21722
|
}
|
|
@@ -21710,7 +21725,7 @@ async function notifyUpdate() {
|
|
|
21710
21725
|
if (sub === "version" || sub === "update") return;
|
|
21711
21726
|
if (process.env.PLAUD_NO_UPDATE_NOTIFIER) return;
|
|
21712
21727
|
if (!process.stderr.isTTY) return;
|
|
21713
|
-
const current = "0.3.
|
|
21728
|
+
const current = "0.3.7";
|
|
21714
21729
|
if (current === "0.0.0") return;
|
|
21715
21730
|
try {
|
|
21716
21731
|
const newer = await checkForUpdate(current);
|