@elizaos/cli 1.4.2 → 1.4.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/{chunk-SMZBJQJR.js → chunk-HOC6B3QV.js} +1 -1
- package/dist/{chunk-D3QSET5H.js → chunk-N5G5XSGP.js} +29 -5
- package/dist/{chunk-FSSUAWXQ.js → chunk-NSNXXD3I.js} +2 -2
- package/dist/commands/agent/actions/index.js +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/create/actions/index.js +2 -2
- package/dist/commands/create/index.js +3 -3
- package/dist/index.js +138 -128
- package/dist/{registry-RF6PW3EN.js → registry-ELONUC44.js} +1 -1
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-quick-starter/src/__tests__/test-utils.ts +1 -0
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/plugin-starter/src/__tests__/test-utils.ts +1 -0
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-starter/src/__tests__/config.test.ts +6 -15
- package/dist/templates/project-starter/src/__tests__/error-handling.test.ts +4 -18
- package/dist/templates/project-starter/src/__tests__/events.test.ts +27 -23
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/src/__tests__/config.test.ts +40 -0
- package/dist/templates/project-tee-starter/src/index.ts +1 -2
- package/dist/templates/project-tee-starter/src/plugin.ts +21 -19
- package/dist/{utils-5HPZSIF6.js → utils-X6UXPLKD.js} +1 -1
- package/package.json +6 -7
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-quick-starter/src/__tests__/test-utils.ts +1 -0
- package/templates/plugin-starter/package.json +2 -2
- package/templates/plugin-starter/src/__tests__/test-utils.ts +1 -0
- package/templates/project-starter/package.json +4 -4
- package/templates/project-starter/src/__tests__/config.test.ts +6 -15
- package/templates/project-starter/src/__tests__/error-handling.test.ts +4 -18
- package/templates/project-starter/src/__tests__/events.test.ts +27 -23
- package/templates/project-tee-starter/package.json +4 -4
- package/templates/project-tee-starter/src/__tests__/config.test.ts +40 -0
- package/templates/project-tee-starter/src/index.ts +1 -2
- package/templates/project-tee-starter/src/plugin.ts +21 -19
|
@@ -2757,7 +2757,7 @@ async function getGitHubCredentials() {
|
|
|
2757
2757
|
}
|
|
2758
2758
|
logger10.warn("Invalid GitHub token found in environment variables");
|
|
2759
2759
|
}
|
|
2760
|
-
const { getGitHubToken: getGitHubToken2 } = await import("./registry-
|
|
2760
|
+
const { getGitHubToken: getGitHubToken2 } = await import("./registry-ELONUC44.js");
|
|
2761
2761
|
const token = await getGitHubToken2() || void 0;
|
|
2762
2762
|
if (token) {
|
|
2763
2763
|
const isValid2 = await validateGitHubToken(token);
|
|
@@ -2863,10 +2863,16 @@ async function ensureDirectory(token, repo, path22, branch) {
|
|
|
2863
2863
|
} catch (error) {
|
|
2864
2864
|
logger10.info(`Directory ${path22} doesn't exist, creating it`);
|
|
2865
2865
|
}
|
|
2866
|
+
const [owner, repoName] = repo.split("/");
|
|
2867
|
+
if (!owner || !repoName) {
|
|
2868
|
+
logger10.error(`Invalid repository format: ${repo}. Expected format: owner/repo`);
|
|
2869
|
+
return false;
|
|
2870
|
+
}
|
|
2866
2871
|
const placeholderPath = `${path22}/.gitkeep`;
|
|
2867
2872
|
const result = await updateFile(
|
|
2868
2873
|
token,
|
|
2869
|
-
|
|
2874
|
+
owner,
|
|
2875
|
+
repoName,
|
|
2870
2876
|
placeholderPath,
|
|
2871
2877
|
"",
|
|
2872
2878
|
// Empty content for placeholder
|
|
@@ -4615,7 +4621,7 @@ async function testPublishToGitHub(packageJson, username) {
|
|
|
4615
4621
|
logger20.info("[\u2713] Can create and update files");
|
|
4616
4622
|
return true;
|
|
4617
4623
|
} catch (error) {
|
|
4618
|
-
logger20.error("Test failed:"
|
|
4624
|
+
logger20.error({ error }, "Test failed:");
|
|
4619
4625
|
return false;
|
|
4620
4626
|
}
|
|
4621
4627
|
}
|
|
@@ -4756,7 +4762,7 @@ async function publishToGitHub(cwd, packageJson, username, skipRegistry = false,
|
|
|
4756
4762
|
insertIndex = i;
|
|
4757
4763
|
break;
|
|
4758
4764
|
}
|
|
4759
|
-
const match = line.match(/^\s*"(
|
|
4765
|
+
const match = line.match(/^\s*"([^"]+)"/);
|
|
4760
4766
|
if (match) {
|
|
4761
4767
|
const existingPackage = match[1];
|
|
4762
4768
|
if (registryPackageName < existingPackage) {
|
|
@@ -4777,7 +4783,25 @@ async function publishToGitHub(cwd, packageJson, username, skipRegistry = false,
|
|
|
4777
4783
|
logger20.error("Could not find insertion point in index.json");
|
|
4778
4784
|
return false;
|
|
4779
4785
|
}
|
|
4780
|
-
lines.
|
|
4786
|
+
const isLastEntry = lines[insertIndex].trim() === "}";
|
|
4787
|
+
if (isLastEntry) {
|
|
4788
|
+
let prevLineIndex = insertIndex - 1;
|
|
4789
|
+
while (prevLineIndex >= 0 && lines[prevLineIndex].trim() === "") {
|
|
4790
|
+
prevLineIndex--;
|
|
4791
|
+
}
|
|
4792
|
+
if (prevLineIndex >= 0) {
|
|
4793
|
+
const prevLine = lines[prevLineIndex];
|
|
4794
|
+
const prevTrim = prevLine.trim();
|
|
4795
|
+
const isEntryLine = /^"[^"]+"\s*:/.test(prevTrim);
|
|
4796
|
+
if (isEntryLine && !prevTrim.endsWith(",")) {
|
|
4797
|
+
lines[prevLineIndex] = prevLine.trimEnd() + ",";
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
const newEntryWithoutComma = newEntry.replace(/,\s*$/, "");
|
|
4801
|
+
lines.splice(insertIndex, 0, newEntryWithoutComma);
|
|
4802
|
+
} else {
|
|
4803
|
+
lines.splice(insertIndex, 0, newEntry);
|
|
4804
|
+
}
|
|
4781
4805
|
const updatedContent = lines.join("\n");
|
|
4782
4806
|
const indexUpdated = await updateFile(
|
|
4783
4807
|
token,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
selectEmbeddingModel,
|
|
10
10
|
validateCreateOptions,
|
|
11
11
|
validateProjectName
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HOC6B3QV.js";
|
|
13
13
|
import {
|
|
14
14
|
displayBanner,
|
|
15
15
|
handleError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N5G5XSGP.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/create/index.ts
|
|
19
19
|
import { Command } from "commander";
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
setupAIModelConfig,
|
|
9
9
|
setupEmbeddingModelConfig,
|
|
10
10
|
setupProjectEnvironment
|
|
11
|
-
} from "../../../chunk-
|
|
12
|
-
import "../../../chunk-
|
|
11
|
+
} from "../../../chunk-HOC6B3QV.js";
|
|
12
|
+
import "../../../chunk-N5G5XSGP.js";
|
|
13
13
|
import "../../../chunk-FQYWRHLX.js";
|
|
14
14
|
import "../../../chunk-GXWWPFBO.js";
|
|
15
15
|
import "../../../chunk-I4L4T7QX.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-NSNXXD3I.js";
|
|
4
|
+
import "../../chunk-HOC6B3QV.js";
|
|
5
|
+
import "../../chunk-N5G5XSGP.js";
|
|
6
6
|
import "../../chunk-FQYWRHLX.js";
|
|
7
7
|
import "../../chunk-GXWWPFBO.js";
|
|
8
8
|
import "../../chunk-I4L4T7QX.js";
|