mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 04:15:48 -06:00
c70aee247e
* refactor(scripts): migrate JavaScript tools to TypeScript * fix(ci): keep changed-scope preflight zero-install * fix(ci): preserve zero-install script owners * fix(ci): complete script migration follow-through * fix(release): keep stable closeout zero-install * fix(scripts): preserve standalone execution boundaries * fix(scripts): repair standalone loader boundaries * fix(scripts): normalize gateway observation ids * fix(scripts): keep Docker packager standalone * test(scripts): preserve rebase cleanup helpers * test(sessions): use tracked temp directory
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { resolve } from "node:path";
|
|
import { validatePrepublishPluginRegistryArtifact } from "../../prepublish-plugin-registry-artifact.mjs";
|
|
|
|
type CrossOsCompanionPackage = {
|
|
name: string;
|
|
tarballPath: string;
|
|
};
|
|
|
|
export function resolveCrossOsCompanionPackages(params: {
|
|
artifactDir: string;
|
|
candidateVersion: string;
|
|
manifestSha256: string;
|
|
requiredPackages: string[];
|
|
sourceSha: string;
|
|
}): CrossOsCompanionPackage[] {
|
|
const artifactDir = resolve(params.artifactDir);
|
|
const { manifest } = validatePrepublishPluginRegistryArtifact({
|
|
artifactDir,
|
|
expectedCandidateVersion: params.candidateVersion,
|
|
expectedManifestSha256: params.manifestSha256,
|
|
expectedSourceSha: params.sourceSha,
|
|
requiredPackages: params.requiredPackages,
|
|
});
|
|
const requiredPackages = new Set(params.requiredPackages);
|
|
return manifest.packages
|
|
.filter((entry: { name: string; tarball: string }) => requiredPackages.has(entry.name))
|
|
.map((entry: { name: string; tarball: string }) => ({
|
|
name: entry.name,
|
|
tarballPath: resolve(artifactDir, entry.tarball),
|
|
}));
|
|
}
|