mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 10:17:39 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -11,17 +11,17 @@ import {
|
||||
|
||||
const ROOT_DIR = path.parse(process.cwd()).root;
|
||||
const CONFIG_DIR = path.join(ROOT_DIR, "config");
|
||||
const ETC_CLAWDBOT_DIR = path.join(ROOT_DIR, "etc", "moltbot");
|
||||
const ETC_OPENCLAW_DIR = path.join(ROOT_DIR, "etc", "openclaw");
|
||||
const SHARED_DIR = path.join(ROOT_DIR, "shared");
|
||||
|
||||
const DEFAULT_BASE_PATH = path.join(CONFIG_DIR, "moltbot.json");
|
||||
const DEFAULT_BASE_PATH = path.join(CONFIG_DIR, "openclaw.json");
|
||||
|
||||
function configPath(...parts: string[]) {
|
||||
return path.join(CONFIG_DIR, ...parts);
|
||||
}
|
||||
|
||||
function etcMoltbotPath(...parts: string[]) {
|
||||
return path.join(ETC_CLAWDBOT_DIR, ...parts);
|
||||
function etcOpenClawPath(...parts: string[]) {
|
||||
return path.join(ETC_OPENCLAW_DIR, ...parts);
|
||||
}
|
||||
|
||||
function sharedPath(...parts: string[]) {
|
||||
@@ -70,7 +70,7 @@ describe("resolveConfigIncludes", () => {
|
||||
});
|
||||
|
||||
it("resolves absolute path $include", () => {
|
||||
const absolute = etcMoltbotPath("agents.json");
|
||||
const absolute = etcOpenClawPath("agents.json");
|
||||
const files = { [absolute]: { list: [{ id: "main" }] } };
|
||||
const obj = { agents: { $include: absolute } };
|
||||
expect(resolve(obj, files)).toEqual({
|
||||
@@ -283,7 +283,7 @@ describe("resolveConfigIncludes", () => {
|
||||
it("resolves parent directory references", () => {
|
||||
const files = { [sharedPath("common.json")]: { shared: true } };
|
||||
const obj = { $include: "../../shared/common.json" };
|
||||
expect(resolve(obj, files, configPath("sub", "moltbot.json"))).toEqual({
|
||||
expect(resolve(obj, files, configPath("sub", "openclaw.json"))).toEqual({
|
||||
shared: true,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user