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 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 { version, engines } = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
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.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vault-cortex",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Set up a Vault Cortex MCP server for your Obsidian vault in one command: npx vault-cortex init",
5
5
  "license": "MIT",
6
6
  "type": "module",