Rebrand from OpenClaw to Ironclaw across 16 files: Web app (apps/web): - layout.tsx: update metadata title to "Ironclaw" and description to "AI CRM with an agent that connects to your apps and does the work for you" - page.tsx: change landing page heading from "OpenClaw Dench" to "Ironclaw" - agent-runner.ts: rename stderr log prefix to [ironclaw stderr] - package.json: rename package from "openclaw-web" to "ironclaw-web" Package identity (root): - package.json: rename package from "openclaw-ai-sdk" to "ironclaw", update description to reflect CRM/workspace focus, change bin entry from "openclaw-ai-sdk" to "ironclaw" - openclaw.mjs: update error message to reference "ironclaw" - src/version.ts: change CORE_PACKAGE_NAME to "ironclaw" CLI and TUI: - command-format.ts: extend CLI prefix regex to accept both "ironclaw" and "openclaw" for backward compatibility - register.agent.ts: update example identity name to "Ironclaw" with 🔩 emoji (replacing 🦞) - tui.ts: rename TUI header from "openclaw tui" to "ironclaw tui" Onboarding and configuration wizards: - configure.wizard.ts: rename engine selection prompts and wizard intro headers to "Ironclaw" - onboarding.ts: rename onboarding intro and security warning text - onboarding.finalize.ts: rename all dashboard/control-UI messages and Brave Search setup instructions to reference "Ironclaw" Security audit: - audit.ts: rename state-dir permission warning details to "Ironclaw" - audit-extra.ts: rename plugin remediation text to "Ironclaw" Telegram: - bot-message-context.ts: rename access-denied message to "Ironclaw"
57 lines
1.4 KiB
JavaScript
Executable File
57 lines
1.4 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
import module from "node:module";
|
|
|
|
// https://nodejs.org/api/module.html#module-compile-cache
|
|
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
try {
|
|
module.enableCompileCache();
|
|
} catch {
|
|
// Ignore errors
|
|
}
|
|
}
|
|
|
|
const isModuleNotFoundError = (err) =>
|
|
err && typeof err === "object" && "code" in err && err.code === "ERR_MODULE_NOT_FOUND";
|
|
|
|
const installProcessWarningFilter = async () => {
|
|
// Keep bootstrap warnings consistent with the TypeScript runtime.
|
|
for (const specifier of ["./dist/warning-filter.js", "./dist/warning-filter.mjs"]) {
|
|
try {
|
|
const mod = await import(specifier);
|
|
if (typeof mod.installProcessWarningFilter === "function") {
|
|
mod.installProcessWarningFilter();
|
|
return;
|
|
}
|
|
} catch (err) {
|
|
if (isModuleNotFoundError(err)) {
|
|
continue;
|
|
}
|
|
throw err;
|
|
}
|
|
}
|
|
};
|
|
|
|
await installProcessWarningFilter();
|
|
|
|
const tryImport = async (specifier) => {
|
|
try {
|
|
await import(specifier);
|
|
return true;
|
|
} catch (err) {
|
|
// Only swallow missing-module errors; rethrow real runtime errors.
|
|
if (isModuleNotFoundError(err)) {
|
|
return false;
|
|
}
|
|
throw err;
|
|
}
|
|
};
|
|
|
|
if (await tryImport("./dist/entry.js")) {
|
|
// OK
|
|
} else if (await tryImport("./dist/entry.mjs")) {
|
|
// OK
|
|
} else {
|
|
throw new Error("ironclaw: missing dist/entry.(m)js (build output).");
|
|
}
|