mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 10:51:33 +00:00
* build: generate export html vendor assets * build: declare marked generator contract * fix(build): preserve export asset working root * fix(build): preserve postbuild root ownership * test(build): update Docker TypeScript step count
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import type fs from "node:fs";
|
|
|
|
export type StaticExtensionAsset = {
|
|
pluginDir?: string;
|
|
src: string;
|
|
dest: string;
|
|
};
|
|
|
|
export type RuntimePostBuildParams = {
|
|
rootDir?: string;
|
|
repoRoot?: string;
|
|
cwd?: string;
|
|
env?: NodeJS.ProcessEnv;
|
|
fs?: typeof fs;
|
|
timings?: boolean | "verbose";
|
|
warn?: (message: string) => void;
|
|
};
|
|
|
|
type StaticExtensionAssetParams = Pick<RuntimePostBuildParams, "rootDir" | "fs" | "warn"> & {
|
|
assets?: StaticExtensionAsset[];
|
|
};
|
|
|
|
type LegacyCliExitCompatChunk = { dest: string; contents: string };
|
|
|
|
export function listStaticExtensionAssetOutputs(params?: StaticExtensionAssetParams): string[];
|
|
export function generateExportHtmlVendorAssets(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir">,
|
|
): Readonly<Record<string, string>>;
|
|
export function listExportHtmlTemplateOutputs(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs">,
|
|
): string[];
|
|
export function copyExportHtmlTemplates(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs">,
|
|
): void;
|
|
|
|
export function listCoreRuntimePostBuildOutputs(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs"> & {
|
|
chunks?: LegacyCliExitCompatChunk[];
|
|
},
|
|
): string[];
|
|
export function writeStableRootRuntimeAliases(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs">,
|
|
): void;
|
|
export function rewriteRootRuntimeImportsToStableAliases(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs">,
|
|
): void;
|
|
export function writeLegacyRootRuntimeCompatAliases(
|
|
params?: Pick<RuntimePostBuildParams, "rootDir" | "fs">,
|
|
): void;
|
|
export function writeLegacyCliExitCompatChunks(params?: {
|
|
rootDir?: string;
|
|
chunks?: LegacyCliExitCompatChunk[];
|
|
}): void;
|
|
export function runRuntimePostBuild(params?: RuntimePostBuildParams): void;
|