oh-langfuse 0.1.61 → 0.1.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-langfuse",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Use npm scripts to configure Claude Code / OpenCode / Codex with Langfuse tracing.",
@@ -147,7 +147,7 @@ function writeAutoUpdateHelper(target) {
147
147
  "exit /b 0",
148
148
  ""
149
149
  ];
150
- fs.writeFileSync(helper, "\ufeff" + lines.join(os.EOL), "utf8");
150
+ fs.writeFileSync(helper, lines.join(os.EOL), "utf8");
151
151
  return helper;
152
152
  }
153
153
 
@@ -301,7 +301,7 @@ function writeAgentCommandShim({ baseDir, target, executable, realCli, publicKey
301
301
  "exit /b %ERRORLEVEL%",
302
302
  ""
303
303
  ].filter(Boolean).join(os.EOL);
304
- fs.writeFileSync(shim, "\ufeff" + content, "utf8");
304
+ fs.writeFileSync(shim, content, "utf8");
305
305
  return { shim, shimDir };
306
306
  }
307
307
 
@@ -333,7 +333,7 @@ function createAgentLauncher({ baseDir, target, executable }) {
333
333
  `${executable} %*`,
334
334
  ""
335
335
  ].join(os.EOL);
336
- fs.writeFileSync(launcher, "\ufeff" + content, "utf8");
336
+ fs.writeFileSync(launcher, content, "utf8");
337
337
  return launcher;
338
338
  }
339
339
 
@@ -176,7 +176,7 @@ function writeAutoUpdateHelper(target) {
176
176
  "exit /b 0",
177
177
  ""
178
178
  ];
179
- fs.writeFileSync(helper, "\ufeff" + lines.join(os.EOL), "utf8");
179
+ fs.writeFileSync(helper, lines.join(os.EOL), "utf8");
180
180
  return helper;
181
181
  }
182
182
 
@@ -294,7 +294,7 @@ function writeAgentCommandShim({ baseDir, target, executable, realCli, publicKey
294
294
  "exit /b %ERRORLEVEL%",
295
295
  ""
296
296
  ].filter(Boolean).join(os.EOL);
297
- fs.writeFileSync(shim, "\ufeff" + content, "utf8");
297
+ fs.writeFileSync(shim, content, "utf8");
298
298
  return { shim, shimDir };
299
299
  }
300
300
 
@@ -326,7 +326,7 @@ function createAgentLauncher({ baseDir, target, executable }) {
326
326
  `${executable} %*`,
327
327
  ""
328
328
  ].join(os.EOL);
329
- fs.writeFileSync(launcher, "\ufeff" + content, "utf8");
329
+ fs.writeFileSync(launcher, content, "utf8");
330
330
  return launcher;
331
331
  }
332
332
 
@@ -398,7 +398,7 @@ async function createHookLauncher({ hooksDir, hookPython, pyPath }) {
398
398
  `${cmdQuote(hookPython)} ${cmdQuote(pyPath)}`,
399
399
  ""
400
400
  ].join(os.EOL);
401
- await fsp.writeFile(launcher, "\ufeff" + content, "utf8");
401
+ await fsp.writeFile(launcher, content, "utf8");
402
402
  return launcher;
403
403
  }
404
404
 
@@ -719,7 +719,7 @@ function writeWindowsLauncherCmd(opencodeDir, { publicKey, secretKey, baseUrl, u
719
719
  cmd.push(" exit /b %ERRORLEVEL%");
720
720
  cmd.push(")");
721
721
  cmd.push("opencode %*");
722
- fs.writeFileSync(p, "\ufeff" + cmd.join("\r\n") + "\r\n", "utf8");
722
+ fs.writeFileSync(p, cmd.join("\r\n") + "\r\n", "utf8");
723
723
  return p;
724
724
  }
725
725
 
@@ -754,7 +754,7 @@ function writeAutoUpdateHelper(target) {
754
754
  "exit /b 0",
755
755
  ""
756
756
  ];
757
- fs.writeFileSync(helper, "\ufeff" + lines.join(os.EOL), "utf8");
757
+ fs.writeFileSync(helper, lines.join(os.EOL), "utf8");
758
758
  return helper;
759
759
  }
760
760
 
@@ -820,7 +820,7 @@ function writeOpencodeCommandShim(opencodeDir, { publicKey, secretKey, baseUrl,
820
820
  cmd.push(windowsAutoUpdateCommand("opencode"));
821
821
  cmd.push(`call ${cmdQuote(realOpencodeCli)} %*`);
822
822
  cmd.push("exit /b %ERRORLEVEL%");
823
- fs.writeFileSync(shim, "\ufeff" + cmd.join("\r\n") + "\r\n", "utf8");
823
+ fs.writeFileSync(shim, cmd.join("\r\n") + "\r\n", "utf8");
824
824
  return { shim, shimDir };
825
825
  }
826
826
 
@@ -1080,7 +1080,7 @@ async function runNpmInstallOrThrow({ opencodeDir, pkgName = "opencode-plugin-la
1080
1080
  );
1081
1081
  }
1082
1082
 
1083
- function setWindowsUserEnv({ publicKey, secretKey, baseUrl }) {
1083
+ function setWindowsUserEnv({ publicKey, secretKey, baseUrl }) {
1084
1084
  const cmd = [
1085
1085
  "$ErrorActionPreference = 'Stop';",
1086
1086
  `[Environment]::SetEnvironmentVariable('LANGFUSE_PUBLIC_KEY', ${psQuote(publicKey)}, 'User');`,
@@ -1090,11 +1090,10 @@ function setWindowsUserEnv({ publicKey, secretKey, baseUrl }) {
1090
1090
  const r = spawnSync("powershell", ["-NoProfile", "-Command", cmd], { stdio: "inherit", encoding: "utf8" });
1091
1091
  if (r.status !== 0) {
1092
1092
  throw new Error("写入用户级环境变量失败。");
1093
- }
1094
- }
1095
- }
1096
-
1097
- function prependWindowsUserPath(dir) {
1093
+ }
1094
+ }
1095
+
1096
+ function prependWindowsUserPath(dir) {
1098
1097
  if (process.platform !== "win32") return false;
1099
1098
  const cmd = [
1100
1099
  "$ErrorActionPreference = 'Stop';",