@typerighter/rpc-server 0.3.1 → 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.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4,7 +4,11 @@ import { EventEmitter } from "node:events";
4
4
  import { binPath } from "./platform.js";
5
5
 
6
6
  function resolveBin() {
7
- // Prefer user's system binary
7
+ // Prefer local binary (dev build or downloaded release)
8
+ const local = binPath();
9
+ if (existsSync(local)) return local;
10
+
11
+ // Fall back to system binary
8
12
  try {
9
13
  const system = execFileSync("which", ["typedown-rpc"], { encoding: "utf-8" }).trim();
10
14
  if (system) return system;
@@ -12,10 +16,6 @@ function resolveBin() {
12
16
  // ignore
13
17
  }
14
18
 
15
- // Fall back to downloaded binary
16
- const local = binPath();
17
- if (existsSync(local)) return local;
18
-
19
19
  throw new Error(
20
20
  `typedown-rpc binary not found. Run "pnpm install" to download it, ` +
21
21
  `install via Nix, or build manually with "cargo build --release -p typedown-server".`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@typerighter/rpc-server",
4
- "version": "0.3.1",
4
+ "version": "0.4.1",
5
5
  "description": "Typedown RPC server binary.",
6
6
  "repository": {
7
7
  "type": "git",