@insforge/cli 0.1.51-dev.0 → 0.1.52
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 +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1123,7 +1123,7 @@ async function reportCliUsage(toolName, success, maxRetries = 1, explicitConfig)
|
|
|
1123
1123
|
|
|
1124
1124
|
// src/lib/analytics.ts
|
|
1125
1125
|
import { PostHog } from "posthog-node";
|
|
1126
|
-
var POSTHOG_API_KEY = "";
|
|
1126
|
+
var POSTHOG_API_KEY = "phc_ueV1ii62wdBTkH7E70ugyeqHIHu8dFDdjs0qq3TZhJz";
|
|
1127
1127
|
var POSTHOG_HOST = process.env.POSTHOG_HOST || "https://us.i.posthog.com";
|
|
1128
1128
|
var client = null;
|
|
1129
1129
|
function getClient() {
|
|
@@ -2000,6 +2000,7 @@ ${prompts.map((p) => `\u2022 "${p}"`).join("\n")}`,
|
|
|
2000
2000
|
throw err;
|
|
2001
2001
|
}
|
|
2002
2002
|
} catch (err) {
|
|
2003
|
+
await shutdownAnalytics();
|
|
2003
2004
|
handleError(err, json);
|
|
2004
2005
|
} finally {
|
|
2005
2006
|
await shutdownAnalytics();
|
|
@@ -2167,6 +2168,7 @@ function registerProjectLinkCommand(program2) {
|
|
|
2167
2168
|
return;
|
|
2168
2169
|
} catch (err) {
|
|
2169
2170
|
await reportCliUsage("cli.link_direct", false);
|
|
2171
|
+
await shutdownAnalytics();
|
|
2170
2172
|
handleError(err, json);
|
|
2171
2173
|
}
|
|
2172
2174
|
}
|
|
@@ -2346,6 +2348,7 @@ ${prompts.map((p) => `\u2022 "${p}"`).join("\n")}`,
|
|
|
2346
2348
|
}
|
|
2347
2349
|
} catch (err) {
|
|
2348
2350
|
await reportCliUsage("cli.link", false);
|
|
2351
|
+
await shutdownAnalytics();
|
|
2349
2352
|
handleError(err, json);
|
|
2350
2353
|
} finally {
|
|
2351
2354
|
await shutdownAnalytics();
|
|
@@ -4647,6 +4650,7 @@ function registerDiagnoseMetricsCommand(diagnoseCmd2) {
|
|
|
4647
4650
|
await reportCliUsage("cli.diagnose.metrics", true);
|
|
4648
4651
|
} catch (err) {
|
|
4649
4652
|
await reportCliUsage("cli.diagnose.metrics", false);
|
|
4653
|
+
await shutdownAnalytics();
|
|
4650
4654
|
handleError(err, json);
|
|
4651
4655
|
} finally {
|
|
4652
4656
|
await shutdownAnalytics();
|
|
@@ -4714,6 +4718,7 @@ function registerDiagnoseAdvisorCommand(diagnoseCmd2) {
|
|
|
4714
4718
|
await reportCliUsage("cli.diagnose.advisor", true);
|
|
4715
4719
|
} catch (err) {
|
|
4716
4720
|
await reportCliUsage("cli.diagnose.advisor", false);
|
|
4721
|
+
await shutdownAnalytics();
|
|
4717
4722
|
handleError(err, json);
|
|
4718
4723
|
} finally {
|
|
4719
4724
|
await shutdownAnalytics();
|
|
@@ -4903,6 +4908,7 @@ function registerDiagnoseDbCommand(diagnoseCmd2) {
|
|
|
4903
4908
|
await reportCliUsage("cli.diagnose.db", true);
|
|
4904
4909
|
} catch (err) {
|
|
4905
4910
|
await reportCliUsage("cli.diagnose.db", false);
|
|
4911
|
+
await shutdownAnalytics();
|
|
4906
4912
|
handleError(err, json);
|
|
4907
4913
|
} finally {
|
|
4908
4914
|
await shutdownAnalytics();
|
|
@@ -4993,6 +4999,7 @@ function registerDiagnoseLogsCommand(diagnoseCmd2) {
|
|
|
4993
4999
|
await reportCliUsage("cli.diagnose.logs", true);
|
|
4994
5000
|
} catch (err) {
|
|
4995
5001
|
await reportCliUsage("cli.diagnose.logs", false);
|
|
5002
|
+
await shutdownAnalytics();
|
|
4996
5003
|
handleError(err, json);
|
|
4997
5004
|
} finally {
|
|
4998
5005
|
await shutdownAnalytics();
|
|
@@ -5074,7 +5081,7 @@ function registerDiagnoseCommands(diagnoseCmd2) {
|
|
|
5074
5081
|
const s = !json ? clack10.spinner() : null;
|
|
5075
5082
|
s?.start("Collecting diagnostic data...");
|
|
5076
5083
|
const data2 = await collectDiagnosticData(projectId, ossMode, apiUrl);
|
|
5077
|
-
const cliVersion = "0.1.
|
|
5084
|
+
const cliVersion = "0.1.52";
|
|
5078
5085
|
s?.stop("Data collected");
|
|
5079
5086
|
if (!json) {
|
|
5080
5087
|
console.log(`
|
|
@@ -5284,6 +5291,7 @@ function registerDiagnoseCommands(diagnoseCmd2) {
|
|
|
5284
5291
|
await reportCliUsage(usageEvent, true);
|
|
5285
5292
|
} catch (err) {
|
|
5286
5293
|
await reportCliUsage(usageEvent, false);
|
|
5294
|
+
await shutdownAnalytics();
|
|
5287
5295
|
handleError(err, json);
|
|
5288
5296
|
} finally {
|
|
5289
5297
|
await shutdownAnalytics();
|