@imunitic/synapse 0.14.1 → 0.14.2

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.
@@ -17,7 +17,7 @@
17
17
  const fs = require("fs");
18
18
  const os = require("os");
19
19
  const path = require("path");
20
- const { hookPath, platformPackageName, HOOK_NAME } = require("../lib/resolve-binaries.cjs");
20
+ const { hookPath, platformPackageName, HOOK_NAME, EXE } = require("../lib/resolve-binaries.cjs");
21
21
 
22
22
  const PKG_ROOT = path.join(__dirname, "..");
23
23
 
@@ -51,7 +51,10 @@ function resolveHookBin() {
51
51
  `or npm skipped it. Try "npm install" again, or check that ${platformPackageName()} exists.`
52
52
  );
53
53
  }
54
- return hookBin;
54
+ // `/` between the parts on Windows: the command runs through whichever
55
+ // shell the harness uses, and a shell that reads `\` as an escape would
56
+ // lose every one of them, while every Windows API accepts `/`.
57
+ return process.platform === "win32" ? hookBin.replace(/\\/g, "/") : hookBin;
55
58
  }
56
59
 
57
60
  function configure(harness) {
@@ -182,7 +185,7 @@ function renderHooksTemplate(templatePath, hookBin) {
182
185
  function isOurHookCommand(command) {
183
186
  if (typeof command !== "string") return false;
184
187
  const binToken = command.split(" ", 1)[0];
185
- return path.basename(binToken) === HOOK_NAME;
188
+ return path.basename(binToken, EXE) === HOOK_NAME;
186
189
  }
187
190
 
188
191
  // Merges a rendered hooks.json-shaped template into an existing hooks.json
@@ -14,6 +14,7 @@ const path = require("path");
14
14
 
15
15
  const CLI_NAME = "synapse";
16
16
  const HOOK_NAME = "synapse-hook";
17
+ const EXE = process.platform === "win32" ? ".exe" : "";
17
18
 
18
19
  // Matches process.platform/process.arch directly (not a compiler target triple)
19
20
  // since that's what npm's own `os`/`cpu` fields select against -- the
@@ -39,7 +40,7 @@ function resolveBinDir() {
39
40
  function resolvedPath(name) {
40
41
  const binDir = resolveBinDir();
41
42
  if (!binDir) return null;
42
- const file = path.join(binDir, name);
43
+ const file = path.join(binDir, name + EXE);
43
44
  return fs.existsSync(file) ? file : null;
44
45
  }
45
46
 
@@ -51,4 +52,4 @@ function hookPath() {
51
52
  return resolvedPath(HOOK_NAME);
52
53
  }
53
54
 
54
- module.exports = { platformPackageName, resolveBinDir, cliPath, hookPath, CLI_NAME, HOOK_NAME };
55
+ module.exports = { platformPackageName, resolveBinDir, cliPath, hookPath, CLI_NAME, HOOK_NAME, EXE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imunitic/synapse",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Memory for Claude Code, Codex CLI, and OpenCode: a durable markdown vault plus a per-repo code graph.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,9 +23,10 @@
23
23
  "*.conf.template"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@imunitic/synapse-darwin-arm64": "0.14.1",
27
- "@imunitic/synapse-linux-x64": "0.14.1",
28
- "@imunitic/synapse-linux-arm64": "0.14.1"
26
+ "@imunitic/synapse-darwin-arm64": "0.14.2",
27
+ "@imunitic/synapse-linux-x64": "0.14.2",
28
+ "@imunitic/synapse-linux-arm64": "0.14.2",
29
+ "@imunitic/synapse-win32-x64": "0.14.2"
29
30
  },
30
31
  "license": "SEE LICENSE IN LICENSE"
31
32
  }