@ishlabs/cli 0.17.5 → 0.17.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.
|
@@ -76,6 +76,15 @@ export async function initObservability() {
|
|
|
76
76
|
setTag("client.name", "ish-cli");
|
|
77
77
|
setTag("client.version", pkg.version);
|
|
78
78
|
}
|
|
79
|
+
// Natural-exit flush hook. `process.exit()` paths are covered by
|
|
80
|
+
// `exitWithFlush`, but successful CLI commands return normally —
|
|
81
|
+
// Node tears the process down via `beforeExit` and there's no
|
|
82
|
+
// process.exit to wrap. This is the catch-all for that case.
|
|
83
|
+
// Use `once` so a command that explicitly calls exit doesn't
|
|
84
|
+
// double-flush.
|
|
85
|
+
process.once("beforeExit", () => {
|
|
86
|
+
void flushObservability();
|
|
87
|
+
});
|
|
79
88
|
}
|
|
80
89
|
catch (err) {
|
|
81
90
|
// Don't crash the CLI on init failure. Print to stderr at verbose
|