mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-29 04:19:30 +00:00
* feat!: remove Fly.io cloud provider support Drop Fly.io as a supported cloud provider. Sprite (which uses Fly.io infrastructure internally) is retained. - Delete packages/cli/src/fly/ module, sh/fly/ scripts, fixtures/fly/ - Remove fly cloud entry and 6 fly matrix entries from manifest.json - Remove fly imports, destroy cases, and connection handlers from commands.ts - Remove fly-ssh sentinel from security.ts - Port E2E test suite from Fly.io to AWS Lightsail (fly-e2e.sh → aws-e2e.sh) - Update README (7 clouds, 42 combinations), CLAUDE.md, and skill prompts - Clean up fly references in build config, gitignore, icon sources - Bump CLI version to 0.11.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: restore Docker image build under sh/docker/ Move openclaw Dockerfile from sh/fly/docker/ to sh/docker/ and rename workflow from fly-docker.yml to docker.yml with updated paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: fix extra blank lines in commands.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: spawn-bot <spawn-bot@openrouter.ai> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
#!/usr/bin/env bun
|
|
// Build bundled JS files for cloud providers that use TypeScript.
|
|
// Each cloud with a cli/src/{cloud}/main.ts gets bundled into {cloud}.js.
|
|
// These bundles are uploaded to GitHub releases for curl|bash execution.
|
|
//
|
|
// Usage:
|
|
// bun run cli/build-clouds.ts # build all clouds
|
|
// bun run cli/build-clouds.ts aws # build specific cloud
|
|
|
|
import { readdirSync, existsSync } from "fs";
|
|
import path from "path";
|
|
|
|
const cliDir = path.dirname(new URL(import.meta.url).pathname);
|
|
const srcDir = path.join(cliDir, "src");
|
|
|
|
async function buildCloud(cloud: string): Promise<boolean> {
|
|
const entry = path.join(srcDir, cloud, "main.ts");
|
|
const outfile = path.join(cliDir, `${cloud}.js`);
|
|
|
|
if (!existsSync(entry)) {
|
|
console.log(`skip: ${entry} not found`);
|
|
return false;
|
|
}
|
|
|
|
console.log(`build: src/${cloud}/main.ts -> ${cloud}.js`);
|
|
const result = await Bun.build({
|
|
entrypoints: [entry],
|
|
outdir: cliDir,
|
|
naming: `${cloud}.js`,
|
|
target: "bun",
|
|
minify: true,
|
|
packages: "bundle",
|
|
});
|
|
|
|
if (!result.success) {
|
|
console.error(`FAIL: ${cloud}`);
|
|
for (const log of result.logs) console.error(" ", log);
|
|
return false;
|
|
}
|
|
|
|
const stat = Bun.file(outfile);
|
|
console.log(` ${cloud}.js ${(stat.size / 1024).toFixed(1)} KB`);
|
|
return true;
|
|
}
|
|
|
|
const filter = process.argv[2];
|
|
let built = 0;
|
|
let failed = 0;
|
|
|
|
if (filter) {
|
|
(await buildCloud(filter)) ? built++ : failed++;
|
|
} else {
|
|
// Auto-discover: any directory under src/ with a main.ts
|
|
for (const entry of readdirSync(srcDir, { withFileTypes: true })) {
|
|
if (!entry.isDirectory()) continue;
|
|
if (entry.name.startsWith("__")) continue;
|
|
if (!existsSync(path.join(srcDir, entry.name, "main.ts"))) continue;
|
|
(await buildCloud(entry.name)) ? built++ : failed++;
|
|
}
|
|
}
|
|
|
|
console.log(`\n${built} built, ${failed} failed`);
|
|
if (failed > 0) process.exit(1);
|