chatroom-cli 1.91.3 → 1.91.4

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/dist/index.js CHANGED
@@ -29907,8 +29907,9 @@ function resolveCodexExecutablePath(moduleRef = import.meta.url) {
29907
29907
  return cachedExecutablePath2;
29908
29908
  const chatroomCliRoot = resolveChatroomCliRoot2(moduleRef);
29909
29909
  const require3 = createRequire4(join8(chatroomCliRoot, "package.json"));
29910
+ let codexPackageDir;
29910
29911
  try {
29911
- require3.resolve(`${CODEX_NPM_NAME}/package.json`, { paths: [chatroomCliRoot] });
29912
+ codexPackageDir = dirname3(require3.resolve(`${CODEX_NPM_NAME}/package.json`, { paths: [chatroomCliRoot] }));
29912
29913
  } catch {
29913
29914
  throw new CodexSdkPackageError(`${CODEX_NPM_NAME} is not installed. Ensure chatroom-cli was installed with optional dependencies. ${REINSTALL_HINT2}`);
29914
29915
  }
@@ -29917,7 +29918,17 @@ function resolveCodexExecutablePath(moduleRef = import.meta.url) {
29917
29918
  const codexBinaryName = process.platform === "win32" ? "codex.exe" : "codex";
29918
29919
  let platformPkgDir;
29919
29920
  try {
29920
- platformPkgDir = dirname3(require3.resolve(`${platformPkg}/package.json`, { paths: [chatroomCliRoot] }));
29921
+ const platformPackageJson = [codexPackageDir, chatroomCliRoot].map((resolveFrom) => {
29922
+ try {
29923
+ return require3.resolve(`${platformPkg}/package.json`, { paths: [resolveFrom] });
29924
+ } catch {
29925
+ return;
29926
+ }
29927
+ }).find((resolved) => resolved !== undefined);
29928
+ if (!platformPackageJson) {
29929
+ throw new Error(`Unable to resolve ${platformPkg}`);
29930
+ }
29931
+ platformPkgDir = dirname3(platformPackageJson);
29921
29932
  } catch {
29922
29933
  throw new CodexSdkPackageError(`Native Codex CLI package ${platformPkg} is not installed. Ensure ${CODEX_NPM_NAME} is installed with optional dependencies. ${REINSTALL_HINT2}`);
29923
29934
  }
@@ -117793,4 +117804,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
117793
117804
  });
117794
117805
  program2.parse();
117795
117806
 
117796
- //# debugId=7232F20998B29AC964756E2164756E21
117807
+ //# debugId=E74FDA2AD007D39564756E2164756E21