claude-use 0.2.2 → 0.2.3

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 +40 -17
  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.2",
221860
+ version: "0.2.3",
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>",
@@ -238709,14 +238709,33 @@ function listVersionsDir(dir) {
238709
238709
  };
238710
238710
  });
238711
238711
  }
238712
- function findExecutableInDir(dir, name) {
238712
+ var WINDOWS_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PS1";
238713
+ function windowsPathExtensions(pathext) {
238714
+ return (pathext ?? WINDOWS_DEFAULT_PATHEXT).split(";").map((ext) => ext.trim()).filter((ext) => ext.length > 0);
238715
+ }
238716
+ function resolveExecutableCandidate(dir, name, env) {
238713
238717
  const candidate = import_node_path12.default.join(dir, name);
238714
- try {
238715
- const stat = import_node_fs3.default.statSync(candidate);
238716
- if (stat.isFile() && (stat.mode & 73) !== 0) {
238717
- return candidate;
238718
+ if (env.platform === "win32") {
238719
+ const extensions = windowsPathExtensions(env.pathext);
238720
+ const alreadyHasRecognisedExtension = extensions.some((ext) => candidate.toLowerCase().endsWith(ext.toLowerCase()));
238721
+ if (alreadyHasRecognisedExtension) {
238722
+ return env.statFileMode(candidate) !== void 0 ? candidate : void 0;
238723
+ }
238724
+ for (const ext of extensions) {
238725
+ const withExt = candidate + ext;
238726
+ if (env.statFileMode(withExt) !== void 0) {
238727
+ return withExt;
238728
+ }
238718
238729
  }
238719
238730
  return void 0;
238731
+ }
238732
+ const mode = env.statFileMode(candidate);
238733
+ return mode !== void 0 && (mode & 73) !== 0 ? candidate : void 0;
238734
+ }
238735
+ function realStatFileMode(candidate) {
238736
+ try {
238737
+ const stat = import_node_fs3.default.statSync(candidate);
238738
+ return stat.isFile() ? stat.mode : void 0;
238720
238739
  } catch (error51) {
238721
238740
  if (isEnoent2(error51)) {
238722
238741
  return void 0;
@@ -238724,6 +238743,13 @@ function findExecutableInDir(dir, name) {
238724
238743
  throw error51;
238725
238744
  }
238726
238745
  }
238746
+ function findExecutableInDir(dir, name) {
238747
+ return resolveExecutableCandidate(dir, name, {
238748
+ platform: process.platform,
238749
+ pathext: process.env.PATHEXT,
238750
+ statFileMode: realStatFileMode
238751
+ });
238752
+ }
238727
238753
  function searchPathForExecutable(pathDirs, name, findExecutableInDir2) {
238728
238754
  for (const dir of pathDirs) {
238729
238755
  const found = findExecutableInDir2(dir, name);
@@ -238734,20 +238760,17 @@ function searchPathForExecutable(pathDirs, name, findExecutableInDir2) {
238734
238760
  return void 0;
238735
238761
  }
238736
238762
  function resolveOwnExecutablePath(env) {
238737
- if (env.argv1 === void 0) {
238738
- return env.execPath;
238739
- }
238740
- if (!env.argv1.includes("/") && !env.argv1.includes("\\")) {
238763
+ if (env.argv1 !== void 0 && !env.argv1.includes("/") && !env.argv1.includes("\\")) {
238741
238764
  return searchPathForExecutable(env.pathDirs, env.argv1, env.findExecutableInDir) ?? env.execPath;
238742
238765
  }
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;
238766
+ const candidate = env.argv1 === void 0 ? env.execPath : import_node_path12.default.resolve(env.cwd, env.argv1);
238767
+ const candidateDir = import_node_path12.default.dirname(candidate);
238768
+ const candidateDirOnPath = env.pathDirs.some((dir) => import_node_path12.default.resolve(dir) === candidateDir);
238769
+ if (candidateDirOnPath) {
238770
+ return candidate;
238748
238771
  }
238749
- const viaPath = searchPathForExecutable(env.pathDirs, import_node_path12.default.basename(directCandidate), env.findExecutableInDir);
238750
- return viaPath ?? directCandidate;
238772
+ const viaPath = searchPathForExecutable(env.pathDirs, import_node_path12.default.basename(candidate), env.findExecutableInDir);
238773
+ return viaPath ?? candidate;
238751
238774
  }
238752
238775
  function realOwnExecutablePath() {
238753
238776
  return resolveOwnExecutablePath({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
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>",