@elizaos/cli 1.2.1 → 1.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.
package/dist/index.js CHANGED
@@ -5,11 +5,11 @@ const require = createRequire(import.meta.url);
5
5
 
6
6
  import {
7
7
  create
8
- } from "./chunk-NZGCZTGS.js";
8
+ } from "./chunk-J5E77VTL.js";
9
9
  import {
10
10
  getElizaCharacter
11
- } from "./chunk-RIKSF2AY.js";
12
- import "./chunk-GISU7XYL.js";
11
+ } from "./chunk-5RHJRZKW.js";
12
+ import "./chunk-PMV25BM7.js";
13
13
  import {
14
14
  TestRunner,
15
15
  UserEnvironment,
@@ -46,14 +46,17 @@ import {
46
46
  testPublishToGitHub,
47
47
  testPublishToNpm,
48
48
  validateDataDir
49
- } from "./chunk-UM35ZDGG.js";
49
+ } from "./chunk-YKFBLIQD.js";
50
50
  import {
51
51
  configureEmojis,
52
52
  emoji,
53
+ require_execa,
53
54
  runBunCommand
54
- } from "./chunk-7PPBVSWE.js";
55
+ } from "./chunk-GRPGGUED.js";
55
56
  import "./chunk-F24MS2YR.js";
56
- import "./chunk-AQ6OMR2A.js";
57
+ import {
58
+ __toESM
59
+ } from "./chunk-XB5JBFO6.js";
57
60
 
58
61
  // src/utils/port-validation.ts
59
62
  function validatePort(value) {
@@ -1582,8 +1585,8 @@ async function addPlugin(pluginArg, opts) {
1582
1585
  }
1583
1586
 
1584
1587
  // src/commands/plugins/actions/remove.ts
1588
+ var import_execa = __toESM(require_execa(), 1);
1585
1589
  import { logger as logger4 } from "@elizaos/core";
1586
- import { execa } from "execa";
1587
1590
  import { existsSync as existsSync9, rmSync } from "fs";
1588
1591
  import path9 from "path";
1589
1592
  async function removePlugin(plugin) {
@@ -1610,7 +1613,7 @@ async function removePlugin(plugin) {
1610
1613
  }
1611
1614
  console.info(`Removing ${packageNameToRemove}...`);
1612
1615
  try {
1613
- await execa("bun", ["remove", packageNameToRemove], {
1616
+ await (0, import_execa.execa)("bun", ["remove", packageNameToRemove], {
1614
1617
  cwd,
1615
1618
  stdio: "inherit"
1616
1619
  });
@@ -2929,7 +2932,7 @@ import { readFileSync as readFileSync4 } from "fs";
2929
2932
  import path12 from "path";
2930
2933
  async function generatePlugin(opts) {
2931
2934
  try {
2932
- const { PluginCreator } = await import("./plugin-creator-35CAJF4O.js");
2935
+ const { PluginCreator } = await import("./plugin-creator-KFTUVFYX.js");
2933
2936
  if (opts.apiKey) {
2934
2937
  process.env.ANTHROPIC_API_KEY = opts.apiKey;
2935
2938
  }
@@ -3040,7 +3043,7 @@ import path18 from "path";
3040
3043
  import * as clack10 from "@clack/prompts";
3041
3044
 
3042
3045
  // src/commands/publish/actions/npm-publish.ts
3043
- import { execa as execa2 } from "execa";
3046
+ var import_execa2 = __toESM(require_execa(), 1);
3044
3047
  import { promises as fs2 } from "fs";
3045
3048
  import path13 from "path";
3046
3049
  async function publishToNpm(cwd, packageJson, npmUsername) {
@@ -3052,9 +3055,9 @@ async function publishToNpm(cwd, packageJson, npmUsername) {
3052
3055
  await fs2.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
3053
3056
  }
3054
3057
  console.info("Building package...");
3055
- await execa2("npm", ["run", "build"], { cwd, stdio: "inherit" });
3058
+ await (0, import_execa2.execa)("npm", ["run", "build"], { cwd, stdio: "inherit" });
3056
3059
  console.info("Publishing to npm...");
3057
- await execa2("npm", ["publish", "--ignore-scripts"], { cwd, stdio: "inherit" });
3060
+ await (0, import_execa2.execa)("npm", ["publish", "--ignore-scripts"], { cwd, stdio: "inherit" });
3058
3061
  console.log(`[\u221A] Successfully published ${packageJson.name}@${packageJson.version} to npm`);
3059
3062
  }
3060
3063
 
@@ -3292,14 +3295,14 @@ async function generatePackageMetadata(packageJson, cliVersion, username) {
3292
3295
  }
3293
3296
 
3294
3297
  // src/commands/publish/utils/authentication.ts
3295
- import { execa as execa3 } from "execa";
3298
+ var import_execa3 = __toESM(require_execa(), 1);
3296
3299
  import * as clack7 from "@clack/prompts";
3297
3300
  async function getNpmUsername() {
3298
3301
  console.info(
3299
3302
  "NPM authentication required for registry compliance (package name must match potential NPM package)."
3300
3303
  );
3301
3304
  try {
3302
- const { stdout } = await execa3("npm", ["whoami"]);
3305
+ const { stdout } = await (0, import_execa3.execa)("npm", ["whoami"]);
3303
3306
  const currentUser = stdout.trim();
3304
3307
  console.info(`Found existing NPM login: ${currentUser}`);
3305
3308
  const useExisting = await clack7.confirm({
@@ -3314,8 +3317,8 @@ async function getNpmUsername() {
3314
3317
  return currentUser;
3315
3318
  } else {
3316
3319
  console.info("Please login with your desired NPM account...");
3317
- await execa3("npm", ["login"], { stdio: "inherit" });
3318
- const { stdout: newStdout } = await execa3("npm", ["whoami"]);
3320
+ await (0, import_execa3.execa)("npm", ["login"], { stdio: "inherit" });
3321
+ const { stdout: newStdout } = await (0, import_execa3.execa)("npm", ["whoami"]);
3319
3322
  const newUser = newStdout.trim();
3320
3323
  console.info(`Logged in as: ${newUser}`);
3321
3324
  return newUser;
@@ -3323,8 +3326,8 @@ async function getNpmUsername() {
3323
3326
  } catch (error) {
3324
3327
  console.info("Not logged into NPM. Please login to continue...");
3325
3328
  try {
3326
- await execa3("npm", ["login"], { stdio: "inherit" });
3327
- const { stdout } = await execa3("npm", ["whoami"]);
3329
+ await (0, import_execa3.execa)("npm", ["login"], { stdio: "inherit" });
3330
+ const { stdout } = await (0, import_execa3.execa)("npm", ["whoami"]);
3328
3331
  const username = stdout.trim();
3329
3332
  console.info(`Successfully logged in as: ${username}`);
3330
3333
  return username;
@@ -3336,7 +3339,7 @@ async function getNpmUsername() {
3336
3339
  }
3337
3340
 
3338
3341
  // src/commands/publish/utils/version-check.ts
3339
- import { execa as execa7 } from "execa";
3342
+ var import_execa7 = __toESM(require_execa(), 1);
3340
3343
  import { promises as fs7 } from "fs";
3341
3344
  import path17 from "path";
3342
3345
  import { fileURLToPath as fileURLToPath3 } from "url";
@@ -3347,12 +3350,12 @@ import { logger as logger13 } from "@elizaos/core";
3347
3350
  import { Command as Command4 } from "commander";
3348
3351
 
3349
3352
  // src/commands/update/actions/cli-update.ts
3353
+ var import_execa5 = __toESM(require_execa(), 1);
3350
3354
  import { logger as logger11 } from "@elizaos/core";
3351
- import { execa as execa5 } from "execa";
3352
3355
 
3353
3356
  // src/commands/update/utils/version-utils.ts
3357
+ var import_execa4 = __toESM(require_execa(), 1);
3354
3358
  import { logger as logger10 } from "@elizaos/core";
3355
- import { execa as execa4 } from "execa";
3356
3359
  import * as semver from "semver";
3357
3360
  var SPECIAL_VERSION_TAGS = ["latest", "next", "canary", "rc", "dev", "nightly", "alpha"];
3358
3361
  var ELIZAOS_ORG = "@elizaos";
@@ -3398,7 +3401,7 @@ function isMajorUpdate(currentVersion, targetVersion) {
3398
3401
  }
3399
3402
  async function fetchLatestVersion(packageName) {
3400
3403
  try {
3401
- const { stdout } = await execa4("npm", ["view", packageName, "version"], {
3404
+ const { stdout } = await (0, import_execa4.execa)("npm", ["view", packageName, "version"], {
3402
3405
  env: { NODE_ENV: "production" }
3403
3406
  });
3404
3407
  const version = stdout.trim();
@@ -3448,7 +3451,7 @@ async function performCliUpdate(options = {}) {
3448
3451
  migrationError instanceof Error ? migrationError.message : String(migrationError)
3449
3452
  );
3450
3453
  try {
3451
- await execa5("npm", ["install", "-g", `@elizaos/cli@${latestVersion}`], {
3454
+ await (0, import_execa5.execa)("npm", ["install", "-g", `@elizaos/cli@${latestVersion}`], {
3452
3455
  stdio: "inherit"
3453
3456
  });
3454
3457
  console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
@@ -3462,7 +3465,7 @@ async function performCliUpdate(options = {}) {
3462
3465
  }
3463
3466
  }
3464
3467
  try {
3465
- await execa5("bun", ["add", "-g", `@elizaos/cli@${latestVersion}`], { stdio: "inherit" });
3468
+ await (0, import_execa5.execa)("bun", ["add", "-g", `@elizaos/cli@${latestVersion}`], { stdio: "inherit" });
3466
3469
  console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
3467
3470
  return true;
3468
3471
  } catch (bunError) {
@@ -3485,8 +3488,8 @@ import { promises as fs6 } from "fs";
3485
3488
  import * as path16 from "path";
3486
3489
 
3487
3490
  // src/commands/update/utils/package-utils.ts
3491
+ var import_execa6 = __toESM(require_execa(), 1);
3488
3492
  import fs5 from "fs/promises";
3489
- import { execa as execa6 } from "execa";
3490
3493
  import { logger as logger12 } from "@elizaos/core";
3491
3494
  async function checkForUpdates(dependencies) {
3492
3495
  const updates = {};
@@ -3534,7 +3537,7 @@ async function installDependencies(cwd) {
3534
3537
  console.log("\nInstalling updated packages...");
3535
3538
  try {
3536
3539
  const packageManager = await getPackageManager();
3537
- await execa6(packageManager, ["install"], { cwd, stdio: "inherit" });
3540
+ await (0, import_execa6.execa)(packageManager, ["install"], { cwd, stdio: "inherit" });
3538
3541
  console.log("Dependencies installed successfully [\u2713]");
3539
3542
  } catch (error) {
3540
3543
  throw new Error(
@@ -3695,7 +3698,7 @@ async function checkCliVersion() {
3695
3698
  const cliPackageJsonContent = await fs7.readFile(cliPackageJsonPath, "utf-8");
3696
3699
  const cliPackageJson = JSON.parse(cliPackageJsonContent);
3697
3700
  const currentVersion = cliPackageJson.version || "0.0.0";
3698
- const { stdout } = await execa7("npm", ["view", "@elizaos/cli", "time", "--json"]);
3701
+ const { stdout } = await (0, import_execa7.execa)("npm", ["view", "@elizaos/cli", "time", "--json"]);
3699
3702
  const timeData = JSON.parse(stdout);
3700
3703
  delete timeData.created;
3701
3704
  delete timeData.modified;
@@ -4042,13 +4045,13 @@ var publish = new Command5().name("publish").description("Publish a plugin to np
4042
4045
  import { Command as Command6 } from "commander";
4043
4046
 
4044
4047
  // src/commands/monorepo/actions/clone.ts
4045
- import { execa as execa8 } from "execa";
4048
+ var import_execa8 = __toESM(require_execa(), 1);
4046
4049
  import { existsSync as existsSync12, readdirSync as readdirSync3, mkdirSync } from "fs";
4047
4050
  import path19 from "path";
4048
4051
  async function cloneRepository(repo, branch, destination) {
4049
4052
  try {
4050
4053
  const repoUrl = `https://github.com/${repo}`;
4051
- await execa8("git", ["clone", "-b", branch, repoUrl, destination], {
4054
+ await (0, import_execa8.execa)("git", ["clone", "-b", branch, repoUrl, destination], {
4052
4055
  stdio: "inherit"
4053
4056
  });
4054
4057
  } catch (error) {
@@ -4812,7 +4815,7 @@ async function installPluginDependencies(projectInfo) {
4812
4815
  };
4813
4816
  await fs11.promises.writeFile(packageJsonPath, JSON.stringify(packageJsonContent, null, 2));
4814
4817
  }
4815
- const { installPlugin: installPlugin2 } = await import("./utils-JZFPT3VW.js");
4818
+ const { installPlugin: installPlugin2 } = await import("./utils-Q5OUIPQH.js");
4816
4819
  for (const dependency of project.pluginModule.dependencies) {
4817
4820
  await installPlugin2(dependency, pluginsDir);
4818
4821
  const dependencyPath = path24.join(pluginsDir, "node_modules", dependency);
@@ -4835,8 +4838,8 @@ import { spawn as spawn3 } from "child_process";
4835
4838
  import path26 from "path";
4836
4839
 
4837
4840
  // src/utils/testing/tsc-validator.ts
4841
+ var import_execa9 = __toESM(require_execa(), 1);
4838
4842
  import { logger as logger21 } from "@elizaos/core";
4839
- import { execa as execa9 } from "execa";
4840
4843
  import path25 from "path";
4841
4844
  import { existsSync as existsSync17 } from "fs";
4842
4845
  async function runTypeCheck(projectPath, strict = true) {
@@ -4853,7 +4856,7 @@ async function runTypeCheck(projectPath, strict = true) {
4853
4856
  if (strict) {
4854
4857
  args.push("--strict");
4855
4858
  }
4856
- const { stdout, stderr } = await execa9("tsc", args, {
4859
+ const { stdout, stderr } = await (0, import_execa9.execa)("tsc", args, {
4857
4860
  cwd: projectPath,
4858
4861
  reject: false
4859
4862
  });
@@ -3,14 +3,17 @@ import { createRequire } from 'module';
3
3
  const require = createRequire(import.meta.url);
4
4
 
5
5
  import {
6
+ require_execa,
6
7
  runBunCommand
7
- } from "./chunk-7PPBVSWE.js";
8
- import "./chunk-AQ6OMR2A.js";
8
+ } from "./chunk-GRPGGUED.js";
9
+ import {
10
+ __toESM
11
+ } from "./chunk-XB5JBFO6.js";
9
12
 
10
13
  // src/utils/plugin-creator.ts
14
+ var import_execa = __toESM(require_execa(), 1);
11
15
  import Anthropic from "@anthropic-ai/sdk";
12
16
  import { logger } from "@elizaos/core";
13
- import { execa } from "execa";
14
17
  import * as fs from "fs-extra";
15
18
  import * as clack from "@clack/prompts";
16
19
  import ora from "ora";
@@ -90,7 +93,7 @@ var PluginCreator = class {
90
93
  spinner.info("Checking disk space...");
91
94
  await this.checkDiskSpace();
92
95
  try {
93
- await execa("claude", ["--version"], { stdio: "pipe" });
96
+ await (0, import_execa.execa)("claude", ["--version"], { stdio: "pipe" });
94
97
  } catch {
95
98
  throw new Error(
96
99
  "Claude Code is required for plugin generation. Install with: bun install -g @anthropic-ai/claude-code"
@@ -214,7 +217,7 @@ var PluginCreator = class {
214
217
  await fs.ensureDir(tempDir);
215
218
  this.pluginPath = path.join(tempDir, `plugin-${pluginName}`);
216
219
  try {
217
- await execa(
220
+ await (0, import_execa.execa)(
218
221
  "bunx",
219
222
  ["@elizaos/cli", "create", `plugin-${pluginName}`, "-t", "plugin-starter"],
220
223
  {
@@ -684,7 +687,7 @@ Make all necessary changes to fix the issues and ensure the plugin builds and al
684
687
  prompt
685
688
  ];
686
689
  logger.info(`\u{1F680} Executing: claude ${claudeArgs.join(" ")}`);
687
- this.activeClaudeProcess = execa("claude", claudeArgs, {
690
+ this.activeClaudeProcess = (0, import_execa.execa)("claude", claudeArgs, {
688
691
  stdio: "inherit",
689
692
  cwd: this.pluginPath
690
693
  });
@@ -887,7 +890,7 @@ ${fileContent}
887
890
  }
888
891
  async getAvailableDiskSpace() {
889
892
  try {
890
- const result = await execa("df", ["-k", os.tmpdir()]);
893
+ const result = await (0, import_execa.execa)("df", ["-k", os.tmpdir()]);
891
894
  const lines = result.stdout.split("\n");
892
895
  const dataLine = lines[1];
893
896
  const parts = dataLine.split(/\s+/);
@@ -28,10 +28,10 @@ import {
28
28
  setEnvVar,
29
29
  setGitHubToken,
30
30
  validateDataDir
31
- } from "./chunk-UM35ZDGG.js";
32
- import "./chunk-7PPBVSWE.js";
31
+ } from "./chunk-YKFBLIQD.js";
32
+ import "./chunk-GRPGGUED.js";
33
33
  import "./chunk-F24MS2YR.js";
34
- import "./chunk-AQ6OMR2A.js";
34
+ import "./chunk-XB5JBFO6.js";
35
35
  export {
36
36
  checkDataDir,
37
37
  ensureElizaDir,
@@ -7,11 +7,11 @@ import {
7
7
  setupAIModelConfig,
8
8
  setupEmbeddingModelConfig,
9
9
  setupProjectEnvironment
10
- } from "./chunk-GISU7XYL.js";
11
- import "./chunk-UM35ZDGG.js";
12
- import "./chunk-7PPBVSWE.js";
10
+ } from "./chunk-PMV25BM7.js";
11
+ import "./chunk-YKFBLIQD.js";
12
+ import "./chunk-GRPGGUED.js";
13
13
  import "./chunk-F24MS2YR.js";
14
- import "./chunk-AQ6OMR2A.js";
14
+ import "./chunk-XB5JBFO6.js";
15
15
  export {
16
16
  createProjectDirectories,
17
17
  setupAIModelConfig,
@@ -40,7 +40,7 @@
40
40
  "tsup.config.ts"
41
41
  ],
42
42
  "dependencies": {
43
- "@elizaos/core": "1.2.1",
43
+ "@elizaos/core": "1.2.2",
44
44
  "@tanstack/react-query": "^5.80.7",
45
45
  "clsx": "^2.1.1",
46
46
  "tailwind-merge": "^3.3.1",
@@ -28,10 +28,10 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@elizaos/cli": "1.2.1",
32
- "@elizaos/core": "1.2.1",
33
- "@elizaos/plugin-bootstrap": "1.2.1",
34
- "@elizaos/plugin-sql": "1.2.1",
31
+ "@elizaos/cli": "1.2.2",
32
+ "@elizaos/core": "1.2.2",
33
+ "@elizaos/plugin-bootstrap": "1.2.2",
34
+ "@elizaos/plugin-sql": "1.2.2",
35
35
  "@tanstack/react-query": "^5.29.0",
36
36
  "clsx": "^2.1.1",
37
37
  "react": "^18.3.1",
@@ -33,10 +33,10 @@
33
33
  "GUIDE.md"
34
34
  ],
35
35
  "dependencies": {
36
- "@elizaos/cli": "1.2.1",
37
- "@elizaos/core": "1.2.1",
36
+ "@elizaos/cli": "1.2.2",
37
+ "@elizaos/core": "1.2.2",
38
38
  "@elizaos/plugin-redpill": "1.0.3",
39
- "@elizaos/plugin-sql": "1.2.1",
39
+ "@elizaos/plugin-sql": "1.2.2",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "viem": "2.30.1",
@@ -113,12 +113,12 @@ import {
113
113
  updateFile,
114
114
  validateGitHubToken,
115
115
  writeEnvFile
116
- } from "./chunk-UM35ZDGG.js";
116
+ } from "./chunk-YKFBLIQD.js";
117
117
  import {
118
118
  runBunCommand
119
- } from "./chunk-7PPBVSWE.js";
119
+ } from "./chunk-GRPGGUED.js";
120
120
  import "./chunk-F24MS2YR.js";
121
- import "./chunk-AQ6OMR2A.js";
121
+ import "./chunk-XB5JBFO6.js";
122
122
  export {
123
123
  NAV_BACK,
124
124
  NAV_NEXT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "elizaOS CLI - Manage your AI agents and plugins",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -69,20 +69,19 @@
69
69
  "typescript": "5.8.3",
70
70
  "vite": "^6.3.5"
71
71
  },
72
- "gitHead": "227798477b53ad38b01f147ac1a649a5d1c810a3",
72
+ "gitHead": "624b0bf9afbbdf0170d1abbdcba0ca5ed9032aeb",
73
73
  "dependencies": {
74
74
  "@anthropic-ai/claude-code": "^1.0.35",
75
75
  "@anthropic-ai/sdk": "^0.54.0",
76
76
  "@clack/prompts": "^0.11.0",
77
- "@elizaos/core": "1.2.1",
78
- "@elizaos/plugin-sql": "1.2.1",
79
- "@elizaos/server": "1.2.1",
77
+ "@elizaos/core": "1.2.2",
78
+ "@elizaos/plugin-sql": "1.2.2",
79
+ "@elizaos/server": "1.2.2",
80
80
  "bun": "^1.2.17",
81
81
  "chalk": "^5.3.0",
82
82
  "chokidar": "^4.0.3",
83
83
  "commander": "^14.0.0",
84
84
  "dotenv": "^16.5.0",
85
- "execa": "^9.6.0",
86
85
  "fs-extra": "^11.1.0",
87
86
  "globby": "^14.0.2",
88
87
  "https-proxy-agent": "^7.0.6",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "index.html": {
3
- "file": "assets/index-CdoewY3J.js",
3
+ "file": "assets/index-Dxx6LGim.js",
4
4
  "name": "index",
5
5
  "src": "index.html",
6
6
  "isEntry": true,
@@ -40,7 +40,7 @@
40
40
  "tsup.config.ts"
41
41
  ],
42
42
  "dependencies": {
43
- "@elizaos/core": "1.2.1",
43
+ "@elizaos/core": "1.2.2",
44
44
  "@tanstack/react-query": "^5.80.7",
45
45
  "clsx": "^2.1.1",
46
46
  "tailwind-merge": "^3.3.1",
@@ -28,10 +28,10 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@elizaos/cli": "1.2.1",
32
- "@elizaos/core": "1.2.1",
33
- "@elizaos/plugin-bootstrap": "1.2.1",
34
- "@elizaos/plugin-sql": "1.2.1",
31
+ "@elizaos/cli": "1.2.2",
32
+ "@elizaos/core": "1.2.2",
33
+ "@elizaos/plugin-bootstrap": "1.2.2",
34
+ "@elizaos/plugin-sql": "1.2.2",
35
35
  "@tanstack/react-query": "^5.29.0",
36
36
  "clsx": "^2.1.1",
37
37
  "react": "^18.3.1",
@@ -33,10 +33,10 @@
33
33
  "GUIDE.md"
34
34
  ],
35
35
  "dependencies": {
36
- "@elizaos/cli": "1.2.1",
37
- "@elizaos/core": "1.2.1",
36
+ "@elizaos/cli": "1.2.2",
37
+ "@elizaos/core": "1.2.2",
38
38
  "@elizaos/plugin-redpill": "1.0.3",
39
- "@elizaos/plugin-sql": "1.2.1",
39
+ "@elizaos/plugin-sql": "1.2.2",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "viem": "2.30.1",
@@ -1,166 +0,0 @@
1
-
2
- import { createRequire } from 'module';
3
- const require = createRequire(import.meta.url);
4
-
5
-
6
- // src/utils/emoji-handler.ts
7
- import { logger } from "@elizaos/core";
8
- var config = {
9
- enabled: true,
10
- forceDisable: false
11
- };
12
- var EMOJIS = {
13
- // Status indicators
14
- success: { emoji: "\u2705", fallback: "[OK]" },
15
- error: { emoji: "\u274C", fallback: "[ERROR]" },
16
- warning: { emoji: "\u26A0\uFE0F", fallback: "[WARNING]" },
17
- info: { emoji: "\u2139\uFE0F", fallback: "[INFO]" },
18
- // Actions
19
- rocket: { emoji: "\u{1F680}", fallback: ">>" },
20
- sparkles: { emoji: "\u2728", fallback: "*" },
21
- party: { emoji: "\u{1F389}", fallback: "[DONE]" },
22
- // Objects/Tools
23
- package: { emoji: "\u{1F4E6}", fallback: "[PKG]" },
24
- link: { emoji: "\u{1F517}", fallback: "[LINK]" },
25
- lightbulb: { emoji: "\u{1F4A1}", fallback: "[TIP]" },
26
- clipboard: { emoji: "\u{1F4CB}", fallback: "[LIST]" },
27
- // Platforms
28
- penguin: { emoji: "\u{1F427}", fallback: "[LINUX]" },
29
- globe: { emoji: "\u{1F310}", fallback: "[WEB]" },
30
- // Arrows and pointers
31
- rightArrow: { emoji: "\u2192", fallback: "->" },
32
- bullet: { emoji: "\u2022", fallback: "*" }
33
- };
34
- function detectEmojiSupport() {
35
- if (config.forceDisable) {
36
- return false;
37
- }
38
- const term = process.env.TERM || "";
39
- const termProgram = process.env.TERM_PROGRAM || "";
40
- const colorTerm = process.env.COLORTERM;
41
- const ciEnv = process.env.CI;
42
- if (ciEnv === "true" || process.env.GITHUB_ACTIONS) {
43
- return false;
44
- }
45
- if (process.platform === "win32") {
46
- if (termProgram === "vscode" || process.env.WT_SESSION || process.env.WT_PROFILE_ID || termProgram === "Windows Terminal") {
47
- return true;
48
- }
49
- if (process.env.PSModulePath && process.env.POWERSHELL_TELEMETRY_OPTOUT !== void 0) {
50
- return true;
51
- }
52
- return false;
53
- }
54
- if (process.platform === "darwin" || process.platform === "linux") {
55
- if (termProgram === "vscode" || termProgram === "iTerm.app" || termProgram === "Apple_Terminal" || term.includes("xterm") || term.includes("screen") || colorTerm) {
56
- return true;
57
- }
58
- }
59
- if (term.includes("256color") || term.includes("truecolor")) {
60
- return true;
61
- }
62
- return false;
63
- }
64
- function getEmoji(key) {
65
- const emojiDef = EMOJIS[key];
66
- if (!emojiDef) {
67
- logger.warn(`Unknown emoji key: ${key}`);
68
- return "";
69
- }
70
- return config.enabled && detectEmojiSupport() ? emojiDef.emoji : emojiDef.fallback;
71
- }
72
- function configureEmojis(newConfig) {
73
- config = { ...config, ...newConfig };
74
- }
75
- function withEmoji(key, message, spacing = true) {
76
- const emoji2 = getEmoji(key);
77
- const space = spacing && emoji2 ? " " : "";
78
- return `${emoji2}${space}${message}`;
79
- }
80
- var emoji = {
81
- success: (msg) => withEmoji("success", msg),
82
- error: (msg) => withEmoji("error", msg),
83
- warning: (msg) => withEmoji("warning", msg),
84
- info: (msg) => withEmoji("info", msg),
85
- rocket: (msg) => withEmoji("rocket", msg),
86
- package: (msg) => withEmoji("package", msg),
87
- link: (msg) => withEmoji("link", msg),
88
- tip: (msg) => withEmoji("lightbulb", msg),
89
- list: (msg) => withEmoji("clipboard", msg),
90
- penguin: (msg) => withEmoji("penguin", msg),
91
- bullet: (msg) => withEmoji("bullet", msg)
92
- };
93
- function initializeEmojiSupport() {
94
- const supported = detectEmojiSupport();
95
- if (process.env.DEBUG || process.env.ELIZA_DEBUG) {
96
- logger.debug(
97
- `Emoji support: ${supported ? "enabled" : "disabled"} (platform: ${process.platform}, term: ${process.env.TERM || "unknown"})`
98
- );
99
- }
100
- }
101
- initializeEmojiSupport();
102
-
103
- // src/utils/run-bun.ts
104
- import { execa } from "execa";
105
-
106
- // src/utils/bun-installation-helper.ts
107
- import { logger as logger2 } from "@elizaos/core";
108
- function displayBunInstallationTipCompact() {
109
- const platform = process.platform;
110
- if (platform === "win32") {
111
- return 'Install bun: powershell -c "irm bun.sh/install.ps1 | iex" (see https://bun.sh/docs/installation)';
112
- } else {
113
- return "Install bun: curl -fsSL https://bun.sh/install | bash (see https://bun.sh/docs/installation)";
114
- }
115
- }
116
-
117
- // src/utils/run-bun.ts
118
- async function runBunCommand(args, cwd, silent = false) {
119
- const finalArgs = [...args];
120
- const isInstallCommand = args[0] === "install";
121
- const isCI = process.env.CI || process.env.ELIZA_TEST_MODE === "true";
122
- if (isCI && isInstallCommand) {
123
- if (!finalArgs.includes("--frozen-lockfile")) {
124
- finalArgs.push("--frozen-lockfile");
125
- }
126
- console.info("\u2705 Using CI-optimized flags for faster installation...");
127
- }
128
- try {
129
- const result = await execa("bun", finalArgs, {
130
- cwd,
131
- stdio: silent ? "pipe" : "inherit",
132
- reject: false
133
- });
134
- if (silent && result.exitCode !== 0) {
135
- throw new Error(
136
- `Bun command failed with exit code ${result.exitCode}: ${result.stderr || result.stdout}`
137
- );
138
- }
139
- } catch (error) {
140
- if (error.code === "ENOENT" || error.message?.includes("bun: command not found")) {
141
- throw new Error(`Bun command not found. ${displayBunInstallationTipCompact()}`);
142
- }
143
- if (isCI && isInstallCommand && (error.message?.includes("frozen-lockfile") || error.message?.includes("install"))) {
144
- console.warn("CI-optimized install failed, retrying with basic args...");
145
- const retryResult = await execa("bun", args, {
146
- cwd,
147
- stdio: silent ? "pipe" : "inherit",
148
- reject: false
149
- });
150
- if (silent && retryResult.exitCode !== 0) {
151
- throw new Error(
152
- `Bun command failed with exit code ${retryResult.exitCode}: ${retryResult.stderr || retryResult.stdout}`
153
- );
154
- }
155
- } else {
156
- throw error;
157
- }
158
- }
159
- }
160
-
161
- export {
162
- configureEmojis,
163
- emoji,
164
- displayBunInstallationTipCompact,
165
- runBunCommand
166
- };
@@ -1,14 +0,0 @@
1
-
2
- import { createRequire } from 'module';
3
- const require = createRequire(import.meta.url);
4
-
5
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
6
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
7
- }) : x)(function(x) {
8
- if (typeof require !== "undefined") return require.apply(this, arguments);
9
- throw Error('Dynamic require of "' + x + '" is not supported');
10
- });
11
-
12
- export {
13
- __require
14
- };