openclaw/scripts/lib/bundled-plugin-build-entries-types.d.ts
Peter Steinberger 6d9e21892e
fix(nodes): bootstrap source builds with private QA tooling (#149926)
* fix(nodes): bootstrap source builds with private QA tooling

Keep private QA chunks out of node bootstrap archives only when their current
bytes match the shared ownership record and no retained runtime requires them.
Preserve root URL and bound createRequire imports, verify copied bytes, and
keep package inventory and updater selection unchanged.

Move the existing ownership reader, import parser and private plugin set to
runtime-safe owners with all tooling callers migrated. Cover archive creation,
root scripts, dependency scopes and package verification; retain the existing
source-build bootstrap contract.

* test(build): stage shared sources for declaration fixtures

Copy the relocated build configuration owners into the synthetic project and
resolve record-coerce through its existing local source. Keep the package
forwarder relative so cache relocation stays stable and generator imports do
not depend on the compiler configuration under test.

Preserve the original declaration assertions, including invalid-config
failures and cleanup ownership checks.

* fix(build): keep ownership metadata readable by cold tooling

Import the existing normalization source directly so native run-node,
updater, and packaging entrypoints do not need workspace package resolution
before their bootstrap logic can run.

Copy the shared policy source into the two remaining concrete packaging
fixtures and remove the declaration fixture package forwarder made obsolete
by the native-readable owner. Preserve existing assertions and timeouts.
2026-09-16 04:08:49 -07:00

33 lines
1.3 KiB
TypeScript

// Bundled Plugin Build Entries Types.D script supports OpenClaw repository automation.
export type BundledPluginBuildEntry = {
id: string;
hasPackageJson: boolean;
packageJson: unknown;
catalogSourceEntries: string[];
sourceEntries: string[];
};
export type BundledPluginBuildEntryParams = {
cwd?: string;
env?: NodeJS.ProcessEnv;
includeRootPackageExcludedDirs?: boolean;
};
export const DOCKER_SELECTED_PLUGIN_BUILD_IDS_ENV: string;
export function parseDockerSelectedPluginBuildIdFilter(env?: NodeJS.ProcessEnv): Set<string> | null;
export function collectPluginSourceEntries(packageJson: unknown): string[];
export function collectPluginDeclarationSourceEntries(
packageJson: unknown,
sourceEntries: string[],
): string[];
export function collectTopLevelPublicSurfaceEntries(pluginDir: string): string[];
export function collectRootPackageExcludedExtensionDirs(
params?: BundledPluginBuildEntryParams,
): Set<string>;
export function collectBundledPluginBuildEntries(
params?: BundledPluginBuildEntryParams,
): BundledPluginBuildEntry[];
export function listBundledPluginBuildEntries(
params?: BundledPluginBuildEntryParams,
): Record<string, string>;
export function listBundledPluginPackArtifacts(params?: BundledPluginBuildEntryParams): string[];