openclaw/scripts/lib/package-dist-imports.d.mts
Peter Steinberger 63a7b9f74c
fix(packaging): restore cloud-session bootstrap for CommonJS bundles (#160583)
The bundleDependencies change in #160015 exposed exact-path closure checks rejecting valid undici CommonJS requires. Resolve require edges with Node file and directory rules while keeping ESM imports strict, and carry package metadata through bootstrap inspection.

Restore cloud-session dispatch on the next Gateway update. Add checker and transferred-artifact regressions; verify a real undici 8.10.2 bootstrap artifact without starting or stopping a Gateway.
2026-09-28 17:44:53 +00:00

20 lines
682 B
TypeScript

export type PackageDistImport = { importerPath: string; importedPath: string; kind?: "require" };
export function collectPackageDistImportErrors(
params: { files: readonly string[]; packageJsons?: ReadonlyMap<string, string> } & (
| {
readText: (relativePath: string) => string;
imports?: readonly PackageDistImport[];
}
| {
imports: readonly PackageDistImport[];
readText?: (relativePath: string) => string;
}
),
): string[];
export function collectPackageDistImports(params: {
files: readonly string[];
packageJsons?: ReadonlyMap<string, string>;
readText: (relativePath: string) => string;
}): PackageDistImport[];