hatchee 0.1.4 → 0.1.5

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/dist/cli.mjs +8 -8
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -11942,7 +11942,8 @@ class Daemon {
11942
11942
  });
11943
11943
  const hooks = createServer((req, res) => {
11944
11944
  const url = req.url ?? "";
11945
- const jsonPost = req.method === "POST" && String(req.headers["content-type"] ?? "").includes("application/json");
11945
+ const ctEssence = String(req.headers["content-type"] ?? "").split(";")[0].trim().toLowerCase();
11946
+ const jsonPost = req.method === "POST" && ctEssence === "application/json";
11946
11947
  if (url === "/pair") {
11947
11948
  if (!jsonPost) {
11948
11949
  res.writeHead(415).end("expected application/json");
@@ -12231,18 +12232,17 @@ var LABEL = "cloud.hatchee.daemon";
12231
12232
  var PLIST = join3(HOME, "Library", "LaunchAgents", `${LABEL}.plist`);
12232
12233
  var UNIT = join3(HOME, ".config", "systemd", "user", "hatchee.service");
12233
12234
  function servicePath(node) {
12234
- return [
12235
+ const system = ["/usr/bin", "/bin", "/usr/sbin", "/sbin"];
12236
+ const userTool = [
12235
12237
  dirname(node),
12236
- "/usr/bin",
12237
- "/bin",
12238
- "/usr/sbin",
12239
- "/sbin",
12240
12238
  "/opt/homebrew/bin",
12241
12239
  "/usr/local/bin",
12242
12240
  join3(HOME, ".bun/bin"),
12243
12241
  join3(HOME, ".npm-global/bin"),
12244
12242
  join3(HOME, ".local/bin")
12245
- ].join(":");
12243
+ ];
12244
+ const seen = new Set;
12245
+ return [...system, ...userTool].filter((p) => p && !seen.has(p) && seen.add(p)).join(":");
12246
12246
  }
12247
12247
  function xmlEsc(s) {
12248
12248
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
@@ -12408,7 +12408,7 @@ function uninstallService() {
12408
12408
  }
12409
12409
 
12410
12410
  // src/cli.ts
12411
- var VERSION2 = "0.1.4";
12411
+ var VERSION2 = "0.1.5";
12412
12412
  var cmd = process.argv[2] ?? "help";
12413
12413
  switch (cmd) {
12414
12414
  case "up": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hatchee",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Your coding agents, alive on your iPhone lock screen — Hatchee daemon. Approve Claude Code / Codex from your phone.",
5
5
  "type": "module",
6
6
  "bin": { "hatchee": "dist/cli.mjs" },