vault-cortex 0.4.0 → 0.4.1
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/bin.js +2 -1
- package/dist/prompts.js +2 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { minimumNodeVersion, satisfiesMinimum } from "./node-version.js";
|
|
5
|
-
const
|
|
5
|
+
const pkg = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
|
|
6
|
+
const { version, engines } = pkg;
|
|
6
7
|
// npm only warns (EBADENGINE) on an engines mismatch but runs the CLI anyway,
|
|
7
8
|
// which would surface as a cryptic crash inside a dependency. Fail with a
|
|
8
9
|
// clear message instead — and only import dependency-laden code after the
|
package/dist/prompts.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as clack from "@clack/prompts";
|
|
2
2
|
// User pressed ctrl-C mid-prompt: 130 = 128 + SIGINT, the shell convention.
|
|
3
|
+
// clack.isCancel is a type guard (value is symbol), so after the early exit
|
|
4
|
+
// TypeScript narrows `value` to `T` — no assertion needed.
|
|
3
5
|
const exitOnCancel = (value) => {
|
|
4
6
|
if (clack.isCancel(value)) {
|
|
5
7
|
clack.cancel("Cancelled.");
|