closeclaw 3.0.1 → 3.0.3
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/cli-loader.cjs +0 -0
- package/dist/cli.cjs +18 -10
- package/dist/cli.jsc +0 -0
- package/dist/index.cjs +4 -4
- package/dist/index.jsc +0 -0
- package/package.json +1 -1
package/dist/cli-loader.cjs
CHANGED
|
File without changes
|
package/dist/cli.cjs
CHANGED
|
@@ -7768,10 +7768,10 @@ var init_index = __esm({
|
|
|
7768
7768
|
publicDir = (0, import_node_path5.join)(_currentDir, "public");
|
|
7769
7769
|
hasPublicDir = (0, import_node_fs5.existsSync)(publicDir);
|
|
7770
7770
|
if (hasPublicDir) {
|
|
7771
|
-
app.use("/assets/*", (0, import_serve_static.serveStatic)({ root:
|
|
7772
|
-
app.use("/fonts/*", (0, import_serve_static.serveStatic)({ root:
|
|
7773
|
-
app.get("/favicon.ico", (0, import_serve_static.serveStatic)({ root:
|
|
7774
|
-
app.get("*", (0, import_serve_static.serveStatic)({ root:
|
|
7771
|
+
app.use("/assets/*", (0, import_serve_static.serveStatic)({ root: publicDir }));
|
|
7772
|
+
app.use("/fonts/*", (0, import_serve_static.serveStatic)({ root: publicDir }));
|
|
7773
|
+
app.get("/favicon.ico", (0, import_serve_static.serveStatic)({ root: publicDir, path: "/favicon.ico" }));
|
|
7774
|
+
app.get("*", (0, import_serve_static.serveStatic)({ root: publicDir, path: "/index.html" }));
|
|
7775
7775
|
} else if (process.env.NODE_ENV !== "development") {
|
|
7776
7776
|
log.warn("server", "No public/ directory found \u2014 frontend will not be served. Run 'npm run build' first.");
|
|
7777
7777
|
}
|
|
@@ -7801,14 +7801,22 @@ var import_node_fs7 = require("fs");
|
|
|
7801
7801
|
var import_node_path6 = require("path");
|
|
7802
7802
|
var import_node_child_process3 = require("child_process");
|
|
7803
7803
|
var import_node_readline = require("readline");
|
|
7804
|
-
var import_meta3 = {};
|
|
7805
7804
|
var HOME = process.env.HOME || process.env.USERPROFILE || "~";
|
|
7806
7805
|
var PID_FILE = (0, import_node_path6.join)(HOME, ".closeclaw", "platform.pid");
|
|
7807
|
-
var PKG_PATH = new URL("../package.json", import_meta3.url);
|
|
7808
7806
|
function readPkgVersion() {
|
|
7809
7807
|
try {
|
|
7810
|
-
const
|
|
7811
|
-
|
|
7808
|
+
const candidates = [
|
|
7809
|
+
(0, import_node_path6.join)(__dirname, "..", "package.json"),
|
|
7810
|
+
(0, import_node_path6.join)(__dirname, "package.json"),
|
|
7811
|
+
(0, import_node_path6.join)(process.cwd(), "package.json")
|
|
7812
|
+
];
|
|
7813
|
+
for (const p of candidates) {
|
|
7814
|
+
if ((0, import_node_fs7.existsSync)(p)) {
|
|
7815
|
+
const pkg = JSON.parse((0, import_node_fs7.readFileSync)(p, "utf-8"));
|
|
7816
|
+
return pkg.version ?? "unknown";
|
|
7817
|
+
}
|
|
7818
|
+
}
|
|
7819
|
+
return "unknown";
|
|
7812
7820
|
} catch {
|
|
7813
7821
|
return "unknown";
|
|
7814
7822
|
}
|
|
@@ -7954,8 +7962,8 @@ async function commandStart(args) {
|
|
|
7954
7962
|
const openclawPath = whichSync("openclaw");
|
|
7955
7963
|
if (openclawPath) {
|
|
7956
7964
|
try {
|
|
7957
|
-
const pluginDir = (0, import_node_path6.join)(
|
|
7958
|
-
const altPluginDir = (0, import_node_path6.join)(
|
|
7965
|
+
const pluginDir = (0, import_node_path6.join)(__dirname, "..", "packages", "platform-tools");
|
|
7966
|
+
const altPluginDir = (0, import_node_path6.join)(__dirname, "..", "..", "platform-tools");
|
|
7959
7967
|
const resolvedPluginDir = (0, import_node_fs7.existsSync)((0, import_node_path6.join)(pluginDir, "package.json")) ? pluginDir : (0, import_node_fs7.existsSync)((0, import_node_path6.join)(altPluginDir, "package.json")) ? altPluginDir : null;
|
|
7960
7968
|
if (resolvedPluginDir) {
|
|
7961
7969
|
const pluginCheck = (0, import_node_child_process3.execSync)(`${openclawPath} plugins list 2>/dev/null || true`, { encoding: "utf-8" });
|
package/dist/cli.jsc
CHANGED
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -6859,10 +6859,10 @@ app.route("", attachmentRoutes);
|
|
|
6859
6859
|
var publicDir = (0, import_node_path4.join)(_currentDir, "public");
|
|
6860
6860
|
var hasPublicDir = (0, import_node_fs4.existsSync)(publicDir);
|
|
6861
6861
|
if (hasPublicDir) {
|
|
6862
|
-
app.use("/assets/*", (0, import_serve_static.serveStatic)({ root:
|
|
6863
|
-
app.use("/fonts/*", (0, import_serve_static.serveStatic)({ root:
|
|
6864
|
-
app.get("/favicon.ico", (0, import_serve_static.serveStatic)({ root:
|
|
6865
|
-
app.get("*", (0, import_serve_static.serveStatic)({ root:
|
|
6862
|
+
app.use("/assets/*", (0, import_serve_static.serveStatic)({ root: publicDir }));
|
|
6863
|
+
app.use("/fonts/*", (0, import_serve_static.serveStatic)({ root: publicDir }));
|
|
6864
|
+
app.get("/favicon.ico", (0, import_serve_static.serveStatic)({ root: publicDir, path: "/favicon.ico" }));
|
|
6865
|
+
app.get("*", (0, import_serve_static.serveStatic)({ root: publicDir, path: "/index.html" }));
|
|
6866
6866
|
} else if (process.env.NODE_ENV !== "development") {
|
|
6867
6867
|
log.warn("server", "No public/ directory found \u2014 frontend will not be served. Run 'npm run build' first.");
|
|
6868
6868
|
}
|
package/dist/index.jsc
CHANGED
|
Binary file
|