{
  "name": "sideload-workspace",
  "private": true,
  "packageManager": "bun@1.3.11",
  "workspaces": [
    "frontend",
    "backend",
    "dependencies/webmuxd",
    "wasm/openssl",
    "wasm/libcurl-wasm",
    "wasm/zsign-wasm"
  ],
  "scripts": {
    "build": "cd dependencies/webmuxd && bun run build",
    "build:webmuxd": "cd dependencies/webmuxd && bun run build",
    "build:frontend": "bun run build:wasm:dist && cd frontend && bun run build",
    "build:backend": "cd backend && bun run check",
    "build:wasm": "bun run build:wasm:openssl && bun run build:wasm:libcurl && bun run build:wasm:zsign",
    "build:wasm:openssl": "bash scripts/build-wasm-openssl.sh",
    "build:wasm:libcurl": "bash scripts/build-wasm-libcurl.sh",
    "build:wasm:zsign": "bash scripts/build-wasm-zsign.sh",
    "setup": "git submodule update --init && bun install --ignore-scripts && bun run build:wasm:dist",
    "build:wasm:dist": "bun wasm/openssl/build.mjs && ln -sfn pkg wasm/openssl/binary && bun wasm/libcurl-wasm/build.mjs && mkdir -p wasm/zsign-wasm/js/dist && cp wasm/zsign-wasm/js/npm/* wasm/zsign-wasm/js/dist/",
    "dev": "bun run setup && mkdir -p frontend/dist && cd backend && bun x wrangler dev --port 8787 & cd frontend && bun run dev",
    "dev:frontend": "bun run setup && cd frontend && bun run dev",
    "dev:backend": "bun run setup && mkdir -p frontend/dist && cd backend && bun x wrangler dev --port 8787",
    "lint": "cd dependencies/webmuxd && bun run lint",
    "test": "cd dependencies/webmuxd && bun run test",
    "test:frontend": "cd frontend && bun run test"
  }
}
