@elizaos/cli 1.4.3-alpha.5 → 1.4.3-alpha.6

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
@@ -4688,7 +4688,7 @@ __export(exports_version, {
4688
4688
  BUILD_TIME: () => BUILD_TIME,
4689
4689
  BUILD_ENV: () => BUILD_ENV
4690
4690
  });
4691
- var CLI_VERSION = "1.4.3-alpha.4", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-03T06:35:18.336Z", BUILD_ENV = "production", version_default;
4691
+ var CLI_VERSION = "1.4.3-alpha.5", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-03T07:21:02.892Z", BUILD_ENV = "production", version_default;
4692
4692
  var init_version = __esm(() => {
4693
4693
  version_default = {
4694
4694
  version: CLI_VERSION,
@@ -6708,32 +6708,41 @@ function isRunningFromNodeModules() {
6708
6708
  return __filename3.includes("node_modules") || __filename3.includes("/.bun/");
6709
6709
  }
6710
6710
  function getVersion() {
6711
+ const __filename3 = fileURLToPath2(import.meta.url);
6711
6712
  const userEnv = UserEnvironment.getInstance();
6712
- const monorepoRoot = userEnv.findMonorepoRoot(process.cwd());
6713
- if (monorepoRoot) {
6714
- return "monorepo";
6715
- }
6716
- if (!isRunningFromNodeModules()) {
6713
+ const monorepoRoot = userEnv.findMonorepoRoot(__filename3);
6714
+ if (monorepoRoot && !isRunningFromNodeModules()) {
6717
6715
  return "monorepo";
6718
6716
  }
6717
+ if (!isRunningFromNodeModules()) {}
6719
6718
  if (cachedVersion) {
6720
6719
  return cachedVersion;
6721
6720
  }
6722
6721
  try {
6723
- const __filename3 = fileURLToPath2(import.meta.url);
6724
- const __dirname3 = dirname(__filename3);
6725
- const versionPath = path7.resolve(__dirname3, "../version.js");
6726
- if (existsSync6(versionPath)) {
6727
- const versionContent = readFileSync4(versionPath, "utf-8");
6728
- const versionMatch = versionContent.match(/export const CLI_VERSION = ['"]([^'"]+)['"]/);
6729
- if (versionMatch && versionMatch[1]) {
6730
- cachedVersion = versionMatch[1];
6731
- return cachedVersion;
6732
- }
6733
- const defaultMatch = versionContent.match(/version:\s*['"]([^'"]+)['"]/);
6734
- if (defaultMatch && defaultMatch[1]) {
6735
- cachedVersion = defaultMatch[1];
6736
- return cachedVersion;
6722
+ const __filename4 = fileURLToPath2(import.meta.url);
6723
+ const __dirname3 = dirname(__filename4);
6724
+ const possiblePaths = [
6725
+ path7.resolve(__dirname3, "../version.js"),
6726
+ path7.resolve(__dirname3, "version.js"),
6727
+ path7.resolve(__dirname3, "./version.js")
6728
+ ];
6729
+ if (__filename4.endsWith("index.js")) {
6730
+ const distDir = path7.dirname(__filename4);
6731
+ possiblePaths.unshift(path7.resolve(distDir, "version.js"));
6732
+ }
6733
+ for (const versionPath of possiblePaths) {
6734
+ if (existsSync6(versionPath)) {
6735
+ const versionContent = readFileSync4(versionPath, "utf-8");
6736
+ const versionMatch = versionContent.match(/export const CLI_VERSION = ['"]([^'"]+)['"]/);
6737
+ if (versionMatch && versionMatch[1]) {
6738
+ cachedVersion = versionMatch[1];
6739
+ return cachedVersion;
6740
+ }
6741
+ const defaultMatch = versionContent.match(/version:\s*['"]([^'"]+)['"]/);
6742
+ if (defaultMatch && defaultMatch[1]) {
6743
+ cachedVersion = defaultMatch[1];
6744
+ return cachedVersion;
6745
+ }
6737
6746
  }
6738
6747
  }
6739
6748
  } catch (error) {}
@@ -297444,5 +297453,5 @@ main2().catch((error2) => {
297444
297453
  process.exit(1);
297445
297454
  });
297446
297455
 
297447
- //# debugId=480E3EEF1057668964756E2164756E21
297456
+ //# debugId=246A29A6D471C7CE64756E2164756E21
297448
297457
  //# sourceMappingURL=index.js.map