vault-cortex 0.13.2 → 0.15.0

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/README.md CHANGED
@@ -206,7 +206,7 @@ During `init --mode remote`, this flow is offered automatically.
206
206
 
207
207
  ## Requirements
208
208
 
209
- - Node.js >= 20.12 (only for this CLI — the server itself runs in Docker)
209
+ - Node.js >= 22.12 (only for this CLI — the server itself runs in Docker)
210
210
  - [Docker](https://docs.docker.com/get-docker/) or a Docker-compatible
211
211
  runtime (e.g. OrbStack, Colima, Podman) to run the server — the CLI
212
212
  manages the container through the `docker` command (on Linux, see
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { readFileSync } from "node:fs";
3
3
  import { fileURLToPath } from "node:url";
4
- import { minimumNodeVersion, satisfiesMinimum } from "./node-version.js";
4
+ import { minimumNodeVersion, nodeVersionRefusalMessage, satisfiesMinimum, } from "./node-version.js";
5
5
  const pkg = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
6
6
  const { version, engines } = pkg;
7
7
  // npm only warns (EBADENGINE) on an engines mismatch but runs the CLI anyway,
@@ -10,9 +10,10 @@ const { version, engines } = pkg;
10
10
  // check passes.
11
11
  const requiredNodeVersion = minimumNodeVersion(engines.node);
12
12
  if (!satisfiesMinimum(process.versions.node, requiredNodeVersion)) {
13
- console.error(`vault-cortex requires Node.js >= ${requiredNodeVersion} (you have ${process.versions.node}).\n` +
14
- `Upgrade at https://nodejs.org — or use the no-Node manual setup:\n` +
15
- `https://github.com/aliasunder/vault-cortex/blob/main/deploy/local/README.md`);
13
+ console.error(nodeVersionRefusalMessage({
14
+ minimum: requiredNodeVersion,
15
+ current: process.versions.node,
16
+ }));
16
17
  process.exit(1);
17
18
  }
18
19
  const { run } = await import("./main.js");
@@ -1,17 +1,28 @@
1
- /** Matches the first dotted version number in an engines range like ">=20.12.0". */
1
+ /** Matches the first dotted version number in an engines range like ">=22.12.0". */
2
2
  const VERSION_IN_RANGE = /(\d+)\.(\d+)(?:\.(\d+))?/;
3
3
  /**
4
- * Extracts the minimum version from a simple engines range (">=20.12.0").
4
+ * Extracts the minimum version from a simple engines range (">=22.12.0").
5
5
  * The CLI only ever declares a floor, so the first version in the string
6
6
  * is the minimum.
7
7
  */
8
8
  export const minimumNodeVersion = (enginesRange) => {
9
9
  const match = VERSION_IN_RANGE.exec(enginesRange);
10
- if (match === null)
10
+ if (!match)
11
11
  throw new Error(`Cannot parse engines range: ${enginesRange}`);
12
12
  const [, major, minor, patch] = match;
13
13
  return `${major}.${minor}.${patch ?? "0"}`;
14
14
  };
15
+ /**
16
+ * The refusal printed when the running Node is below the engines floor.
17
+ * Lives in this zero-import module so bin.ts can build it before any
18
+ * dependency-laden import runs on an unsupported runtime.
19
+ */
20
+ export const nodeVersionRefusalMessage = ({ minimum, current, }) => {
21
+ return (`vault-cortex requires Node.js >= ${minimum} (you have ${current}).\n` +
22
+ `Upgrade at https://nodejs.org — or use a no-Node manual setup:\n` +
23
+ ` local: https://github.com/aliasunder/vault-cortex/blob/main/deploy/local/README.md\n` +
24
+ ` remote: https://github.com/aliasunder/vault-cortex/blob/main/deploy/remote/README.md`);
25
+ };
15
26
  /**
16
27
  * Numeric major.minor.patch comparison: is current >= minimum?
17
28
  * The most significant differing segment decides; equal versions satisfy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vault-cortex",
3
- "version": "0.13.2",
3
+ "version": "0.15.0",
4
4
  "description": "Set up a Vault Cortex MCP server for your Obsidian vault in one command: npx vault-cortex@latest init",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "README.md"
13
13
  ],
14
14
  "engines": {
15
- "node": ">=20.12.0"
15
+ "node": ">=22.12.0"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
@@ -49,6 +49,6 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@clack/prompts": "1.7.0",
52
- "commander": "14.0.3"
52
+ "commander": "15.0.0"
53
53
  }
54
54
  }