mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-19 07:03:48 +00:00
feat: add release pipeline for crates.io and npm publishing
- Add --check, --publish-crates, --publish-npm-sdk, --publish-npm-cli flags to release script - Create CI workflow with pre-release checks (cargo fmt, clippy, test, tsc) - Update release workflow to run checks, build binaries, and publish packages - Add @sandbox-agent/cli npm package with platform-specific binaries (esbuild pattern) - Configure TypeScript SDK for npm publishing (exports, files, types) - Add crates.io metadata to Cargo.toml (repository, description) - Rename @sandbox-agent/web to @sandbox-agent/inspector
This commit is contained in:
parent
6e1b13c242
commit
016024c04b
26 changed files with 360 additions and 48 deletions
26
sdks/cli/bin/sandbox-agent
Executable file
26
sdks/cli/bin/sandbox-agent
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env node
|
||||
const { execFileSync } = require("child_process");
|
||||
const path = require("path");
|
||||
|
||||
const PLATFORMS = {
|
||||
"darwin-arm64": "@sandbox-agent/cli-darwin-arm64",
|
||||
"darwin-x64": "@sandbox-agent/cli-darwin-x64",
|
||||
"linux-x64": "@sandbox-agent/cli-linux-x64",
|
||||
"win32-x64": "@sandbox-agent/cli-win32-x64",
|
||||
};
|
||||
|
||||
const key = `${process.platform}-${process.arch}`;
|
||||
const pkg = PLATFORMS[key];
|
||||
if (!pkg) {
|
||||
console.error(`Unsupported platform: ${key}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
const pkgPath = require.resolve(`${pkg}/package.json`);
|
||||
const bin = process.platform === "win32" ? "sandbox-agent.exe" : "sandbox-agent";
|
||||
execFileSync(path.join(path.dirname(pkgPath), "bin", bin), process.argv.slice(2), { stdio: "inherit" });
|
||||
} catch (e) {
|
||||
if (e.status !== undefined) process.exit(e.status);
|
||||
throw e;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue