claude-use 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/dist/cli.cjs +19 -9
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -221857,7 +221857,7 @@ var categories_default_default = {
221857
221857
  // package.json
221858
221858
  var package_default = {
221859
221859
  name: "claude-use",
221860
- version: "0.2.1",
221860
+ version: "0.2.2",
221861
221861
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
221862
221862
  license: "Apache-2.0",
221863
221863
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -238724,20 +238724,30 @@ function findExecutableInDir(dir, name) {
238724
238724
  throw error51;
238725
238725
  }
238726
238726
  }
238727
+ function searchPathForExecutable(pathDirs, name, findExecutableInDir2) {
238728
+ for (const dir of pathDirs) {
238729
+ const found = findExecutableInDir2(dir, name);
238730
+ if (found !== void 0) {
238731
+ return found;
238732
+ }
238733
+ }
238734
+ return void 0;
238735
+ }
238727
238736
  function resolveOwnExecutablePath(env) {
238728
238737
  if (env.argv1 === void 0) {
238729
238738
  return env.execPath;
238730
238739
  }
238731
- if (env.argv1.includes("/") || env.argv1.includes("\\")) {
238732
- return import_node_path12.default.resolve(env.cwd, env.argv1);
238740
+ if (!env.argv1.includes("/") && !env.argv1.includes("\\")) {
238741
+ return searchPathForExecutable(env.pathDirs, env.argv1, env.findExecutableInDir) ?? env.execPath;
238733
238742
  }
238734
- for (const dir of env.pathDirs) {
238735
- const found = env.findExecutableInDir(dir, env.argv1);
238736
- if (found !== void 0) {
238737
- return found;
238738
- }
238743
+ const directCandidate = import_node_path12.default.resolve(env.cwd, env.argv1);
238744
+ const directDir = import_node_path12.default.dirname(directCandidate);
238745
+ const directDirOnPath = env.pathDirs.some((dir) => import_node_path12.default.resolve(dir) === directDir);
238746
+ if (directDirOnPath) {
238747
+ return directCandidate;
238739
238748
  }
238740
- return env.execPath;
238749
+ const viaPath = searchPathForExecutable(env.pathDirs, import_node_path12.default.basename(directCandidate), env.findExecutableInDir);
238750
+ return viaPath ?? directCandidate;
238741
238751
  }
238742
238752
  function realOwnExecutablePath() {
238743
238753
  return resolveOwnExecutablePath({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",