mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-21 18:08:05 -06:00
a042125170
* fix(memory): preserve provenance across dreaming * fix(build): preserve bundled hook metadata * refactor(build): remove obsolete directory helper * test(memory): align provenance fixtures * test(memory): type consolidation run options * test(memory): register write provenance siblings * fix(memory): preserve legacy provenance registration * fix(memory): make provenance provider-independent * fix(memory): canonicalize provenance workspace keys * fix(memory): keep provenance mutation host-private * fix(build): track runtime postbuild implementations * fix(build): verify bundled hook metadata outputs
25 lines
727 B
TypeScript
25 lines
727 B
TypeScript
// Copy Assets script supports OpenClaw repository automation.
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
type BuildCopyContext = {
|
|
prefix: string;
|
|
projectRoot: string;
|
|
verbose: boolean;
|
|
};
|
|
|
|
export function resolveBuildCopyContext(importMetaUrl: string): BuildCopyContext {
|
|
const filePath = fileURLToPath(importMetaUrl);
|
|
return {
|
|
prefix: `[${path.basename(filePath, path.extname(filePath))}]`,
|
|
projectRoot: path.resolve(path.dirname(filePath), ".."),
|
|
verbose: process.env.OPENCLAW_BUILD_VERBOSE === "1",
|
|
};
|
|
}
|
|
|
|
export function logVerboseCopy(context: BuildCopyContext, message: string): void {
|
|
if (context.verbose) {
|
|
console.log(`${context.prefix} ${message}`);
|
|
}
|
|
}
|