mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 07:03:31 +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
34
frontend/packages/inspector/Dockerfile
Normal file
34
frontend/packages/inspector/Dockerfile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Copy package files for all workspaces
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
COPY frontend/packages/inspector/package.json ./frontend/packages/inspector/
|
||||
COPY sdks/typescript/package.json ./sdks/typescript/
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install --filter @sandbox-agent/inspector...
|
||||
|
||||
# Copy SDK source (with pre-generated types)
|
||||
COPY sdks/typescript ./sdks/typescript
|
||||
|
||||
# Build SDK (just tsc, skip generate since types are pre-generated)
|
||||
RUN cd sdks/typescript && pnpm exec tsc -p tsconfig.json
|
||||
|
||||
# Copy inspector source
|
||||
COPY frontend/packages/inspector ./frontend/packages/inspector
|
||||
|
||||
# Build inspector
|
||||
RUN cd frontend/packages/inspector && pnpm exec vite build
|
||||
|
||||
FROM caddy:alpine
|
||||
COPY --from=build /app/frontend/packages/inspector/dist /srv
|
||||
RUN cat > /etc/caddy/Caddyfile <<'EOF'
|
||||
:80 {
|
||||
root * /srv
|
||||
file_server
|
||||
try_files {path} /index.html
|
||||
}
|
||||
EOF
|
||||
EXPOSE 80
|
||||
1285
frontend/packages/inspector/index.html
Normal file
1285
frontend/packages/inspector/index.html
Normal file
File diff suppressed because it is too large
Load diff
25
frontend/packages/inspector/package.json
Normal file
25
frontend/packages/inspector/package.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "@sandbox-agent/inspector",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "pnpm --filter sandbox-agent build && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sandbox-agent": "workspace:*",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^5.4.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"lucide-react": "^0.469.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
}
|
||||
}
|
||||
1299
frontend/packages/inspector/src/App.tsx
Normal file
1299
frontend/packages/inspector/src/App.tsx
Normal file
File diff suppressed because it is too large
Load diff
9
frontend/packages/inspector/src/main.tsx
Normal file
9
frontend/packages/inspector/src/main.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
1
frontend/packages/inspector/src/vite-env.d.ts
vendored
Normal file
1
frontend/packages/inspector/src/vite-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/// <reference types="vite/client" />
|
||||
17
frontend/packages/inspector/tsconfig.json
Normal file
17
frontend/packages/inspector/tsconfig.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"strict": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
10
frontend/packages/inspector/tsconfig.node.json
Normal file
10
frontend/packages/inspector/tsconfig.node.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
9
frontend/packages/inspector/vite.config.ts
Normal file
9
frontend/packages/inspector/vite.config.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue