52719d1a7c
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo. - Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo. - Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent. - Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines. - Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration. - Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
#!/usr/bin/env bun
|
|
|
|
import * as fs from "node:fs/promises";
|
|
import * as path from "node:path";
|
|
|
|
const repoRoot = path.join(import.meta.dir, "..");
|
|
const nativeDir = path.join(repoRoot, "packages", "natives", "native");
|
|
const expectedAddons = [
|
|
"linux-x64-modern",
|
|
"linux-x64-baseline",
|
|
"linux-arm64",
|
|
"darwin-x64-modern",
|
|
"darwin-x64-baseline",
|
|
"darwin-arm64",
|
|
"win32-x64-modern",
|
|
"win32-x64-baseline",
|
|
] as const;
|
|
|
|
async function main(): Promise<void> {
|
|
const entries = await fs.readdir(nativeDir);
|
|
|
|
console.log("Native addons downloaded:");
|
|
for (const entry of entries.sort((a, b) => a.localeCompare(b))) {
|
|
console.log(` ${entry}`);
|
|
}
|
|
console.log();
|
|
console.log(`Expected addons: ${expectedAddons.join(", ")}`);
|
|
|
|
const missingAddons = expectedAddons.filter((platform) => !entries.includes(`pi_natives.${platform}.node`));
|
|
if (missingAddons.length > 0) {
|
|
for (const platform of missingAddons) {
|
|
console.error(`MISSING pi_natives.${platform}.node`);
|
|
}
|
|
process.exit(1);
|
|
}
|
|
|
|
for (const platform of expectedAddons) {
|
|
console.log(`OK pi_natives.${platform}.node`);
|
|
}
|
|
}
|
|
|
|
await main();
|