@nerdwerk/sv 1.0.0-rc.1 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -47,12 +47,12 @@ var files = {
|
|
|
47
47
|
"eslint.config.js": "import prettier from 'eslint-config-prettier';\nimport path from 'node:path';\nimport js from '@eslint/js';\nimport svelte from 'eslint-plugin-svelte';\nimport { defineConfig, includeIgnoreFile } from 'eslint/config';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\n\nconst gitignorePath = path.resolve(import.meta.dirname, '.gitignore');\n\nexport default defineConfig(\n includeIgnoreFile(gitignorePath),\n js.configs.recommended,\n ts.configs.recommended,\n svelte.configs.recommended,\n prettier,\n svelte.configs.prettier,\n {\n languageOptions: { globals: { ...globals.browser, ...globals.node } },\n rules: {\n // typescript-eslint recommends against no-undef in TypeScript projects.\n // https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors\n 'no-undef': 'off',\n // `const { secret: _secret, ...rest } = row` is how we strip fields.\n '@typescript-eslint/no-unused-vars': [\n 'error',\n { ignoreRestSiblings: true, varsIgnorePattern: '^_', argsIgnorePattern: '^_' }\n ]\n }\n },\n {\n files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],\n languageOptions: {\n parserOptions: {\n projectService: true,\n extraFileExtensions: ['.svelte'],\n parser: ts.parser\n }\n }\n }\n);\n",
|
|
48
48
|
"fly.toml": "# Empty on purpose: fly and the server refuse to run until sveet-setup (or you) fill in app and ORIGIN.\napp = ''\nprimary_region = 'ams'\n\n[build]\n\n[env]\n DATABASE_PATH = '/data/sqlite.db'\n ORIGIN = ''\n PORT = '3000'\n # Otherwise every visitor shares the proxy's IP and one rate-limit bucket.\n ADDRESS_HEADER = 'Fly-Client-IP'\n # SCW_SECRET_KEY and SCW_DEFAULT_PROJECT_ID are `fly secrets`; use 'console' until mail is set up.\n MAIL_TRANSPORT = 'scaleway'\n MAIL_FROM = 'login@mail.example.com'\n\n# A volume mounts on one machine only: scale up, not out, while the data is SQLite.\n[[mounts]]\n source = 'data'\n destination = '/data'\n\n[http_service]\n internal_port = 3000\n force_https = true\n auto_stop_machines = 'stop'\n auto_start_machines = true\n min_machines_running = 0\n\n # Fly's default (25) is hit long before bun or SQLite are busy.\n [http_service.concurrency]\n type = 'requests'\n soft_limit = 200\n hard_limit = 250\n\n[[vm]]\n size = 'shared-cpu-1x'\n memory = '512mb'\n",
|
|
49
49
|
"opencode.jsonc": "{\n \"$schema\": \"https://opencode.ai/config.json\",\n // ponytail on every turn, plus /ponytail-review, /ponytail-audit, /ponytail-debt\n \"plugins\": [\"@dietrichgebert/ponytail\"],\n \"mcp\": {\n \"servers\": {\n \"svelte\": { \"type\": \"remote\", \"url\": \"https://mcp.svelte.dev/mcp\", \"oauth\": false }\n }\n }\n}\n",
|
|
50
|
-
"package.json": "{\n \"name\": \"sveet\",\n \"version\": \"1.0.0\",\n \"description\": \"An opinionated, agent-first SvelteKit starter: bun, SQLite, Better Auth, ui-sdk, Fly.io.\",\n \"license\": \"MIT\",\n \"private\": true,\n \"type\": \"module\",\n \"engines\": {\n \"bun\": \">=1.4.4\"\n },\n \"sveet\": {\n \"version\": \"1.0.0-rc.
|
|
50
|
+
"package.json": "{\n \"name\": \"sveet\",\n \"version\": \"1.0.0\",\n \"description\": \"An opinionated, agent-first SvelteKit starter: bun, SQLite, Better Auth, ui-sdk, Fly.io.\",\n \"license\": \"MIT\",\n \"private\": true,\n \"type\": \"module\",\n \"engines\": {\n \"bun\": \">=1.4.4\"\n },\n \"sveet\": {\n \"version\": \"1.0.0-rc.2\"\n },\n \"scripts\": {\n \"setup\": \"bun scripts/setup.ts\",\n \"dev\": \"bun --bun vite dev\",\n \"build\": \"bun --bun vite build\",\n \"start\": \"./build/server\",\n \"prepare\": \"svelte-kit sync || echo \\\"\\\"\",\n \"check\": \"svelte-kit sync && svelte-check --tsgo --tsconfig ./tsconfig.json\",\n \"lint\": \"prettier --check . && eslint .\",\n \"format\": \"prettier --write .\",\n \"test:unit\": \"bun --bun vitest\",\n \"test:e2e\": \"bun scripts/test-e2e.ts\",\n \"test:setup\": \"playwright install chromium\",\n \"test\": \"bun run test:unit --run && bun run test:e2e\",\n \"verify\": \"bun run lint && bun run check && bun run test\",\n \"deploy\": \"bash scripts/deploy.sh\",\n \"db:generate\": \"drizzle-kit generate\",\n \"db:migrate\": \"bun src/lib/server/db/migrate.ts\",\n \"db:seed\": \"bun src/lib/server/db/seed-cli.ts\",\n \"db:reset\": \"bun src/lib/server/db/reset-cli.ts && bun run db:seed\",\n \"db:studio\": \"drizzle-kit studio\",\n \"auth:schema\": \"bun scripts/auth-schema.ts\",\n \"deps:update\": \"bash scripts/update-deps.sh\",\n \"hooks:install\": \"git config core.hooksPath .githooks\",\n \"sandbox\": \"bash scripts/sandbox.sh\"\n },\n \"imports\": {\n \"#lib/*\": \"./src/lib/*\"\n },\n \"dependencies\": {\n \"@ui-sdk/core\": \"^0.1.0-beta.13\",\n \"@ui-sdk/svelte\": \"^0.1.0-beta.13\",\n \"better-auth\": \"^1.7.27\",\n \"drizzle-orm\": \"^0.45.4\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^10.0.1\",\n \"@playwright/test\": \"^1.65.1\",\n \"@sveltejs/adapter-bun\": \"^1.0.2\",\n \"@sveltejs/kit\": \"^3.4.0\",\n \"@sveltejs/vite-plugin-svelte\": \"^7.3.1\",\n \"@tailwindcss/vite\": \"^4.3.5\",\n \"@types/bun\": \"^1.4.5\",\n \"@typescript/native\": \"npm:typescript@^7\",\n \"drizzle-kit\": \"^0.31.11\",\n \"eslint\": \"^10.15.0\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-svelte\": \"^3.24.1\",\n \"globals\": \"^17.14.0\",\n \"prettier\": \"^3.10.1\",\n \"prettier-plugin-svelte\": \"^4.2.0\",\n \"prettier-plugin-tailwindcss\": \"^0.8.1\",\n \"svelte\": \"^5.59.0\",\n \"svelte-check\": \"^4.7.8\",\n \"tailwindcss\": \"^4.3.5\",\n \"typescript\": \"^6\",\n \"typescript-eslint\": \"^8.73.0\",\n \"vite\": \"^8.3.8\",\n \"vitest\": \"^5.1.1\"\n }\n}\n",
|
|
51
51
|
"playwright.config.ts": "import { defineConfig, devices } from '@playwright/test';\n\n// Run via `bun run test:e2e`, which builds first; each test gets its own DB and server.\nexport default defineConfig({\n testDir: './tests/e2e',\n testMatch: '**/*.e2e.ts',\n fullyParallel: true,\n workers: 2,\n use: { trace: 'retain-on-failure' },\n projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }]\n});\n",
|
|
52
52
|
"scripts/auth-schema.ts": "// The CLI comes via bunx: as a dependency it hoists an older @better-auth/core that breaks the build.\nimport { $ } from 'bun';\n\nconst output = 'src/lib/server/db/auth.schema.ts';\nawait $`bunx --bun @better-auth/cli@latest generate --config src/lib/server/auth-schema.config.ts --output ${output} --yes`;\nawait $`bunx prettier --write ${output}`.quiet();\n\n// The CLI drops these DB defaults; the seed and tests insert users without timestamps.\nconst now = \".default(sql`(cast(unixepoch('subsecond') * 1000 as integer))`)\";\nlet source = (await Bun.file(output).text()).replace(\n /(\\b(?:createdAt|updatedAt): integer\\('(?:created|updated)_at', \\{ mode: 'timestamp_ms' \\}\\))(?!\\s*\\.default)/g,\n `$1${now}`\n);\nif (!/import \\{[^}]*\\bsql\\b[^}]*\\} from 'drizzle-orm'/.test(source)) {\n source = source.replace(\n /import \\{([^}]*)\\} from 'drizzle-orm';/,\n \"import {$1, sql } from 'drizzle-orm';\"\n );\n}\nawait Bun.write(output, source);\nawait $`bunx prettier --write ${output}`.quiet();\nconsole.log(`✓ ${output} — now: bun run db:generate`);\n",
|
|
53
53
|
"scripts/deploy.sh": "#!/usr/bin/env bash\n# Shipping to production stays a human decision, made on the host.\nset -euo pipefail\ncd \"$(dirname \"$0\")/..\"\nif [ -n \"${SVEET_SANDBOX:-}\" ]; then\n echo \"✋ Deploys don't run inside the sandbox. Run \\`bun run deploy\\` on your host.\" >&2\n exit 1\nfi\nbun run verify\nexec fly deploy \"$@\"\n",
|
|
54
54
|
"scripts/sandbox-vm.sh": "#!/usr/bin/env bash\n# Inside the VM: one-time setup, plus a supervisor that restarts `dev` and `opencode` when they exit.\nset -euo pipefail\ncd \"$(dirname \"$0\")/..\"\n\nRUN=/scratch/run\nLOGS=/scratch/logs\nmkdir -p \"$RUN\" \"$LOGS\" \"$HOME\"\n\n# The bun image has no `node`, which some agent CLIs launch through; bun stands in.\nmkdir -p \"$HOME/.local/bin\"\n[ -e \"$HOME/.local/bin/node\" ] || ln -s \"$(command -v bun)\" \"$HOME/.local/bin/node\"\n\n# /scratch outlives VM restarts; PID files from an earlier boot mean nothing.\nBOOT=\"$(cat /proc/sys/kernel/random/boot_id)\"\nif [ \"$(cat \"$RUN/boot_id\" 2> /dev/null)\" != \"$BOOT\" ]; then\n rm -f \"$RUN\"/*\n echo \"$BOOT\" > \"$RUN/boot_id\"\nfi\n\nservice_cmd() {\n case \"$1\" in\n dev) echo 'bun --bun vite dev' ;;\n opencode) echo 'OPENCODE_PASSWORD=\"$(cat /scratch/opencode-password)\" opencode serve --hostname 0.0.0.0 --port 4096' ;;\n *) echo \"unknown service: $1 (dev, opencode)\" >&2; return 1 ;;\n esac\n}\n\nalive() { [ -f \"$1\" ] && kill -0 \"$(cat \"$1\")\" 2> /dev/null; }\n\nstart() {\n local name=$1 cmd\n cmd=$(service_cmd \"$name\")\n alive \"$RUN/$name.loop\" && return 0\n # Own process group per run, so a restart also kills the service's children.\n setsid nohup bash -c \"\n while true; do\n setsid bash -c '$cmd' &\n echo \\$! > '$RUN/$name.pid'\n wait \\$! || true\n echo \\\"[sandbox] $name exited — restarting in 1s\\\"\n sleep 1\n done\" >> \"$LOGS/$name.log\" 2>&1 < /dev/null &\n echo $! > \"$RUN/$name.loop\"\n}\n\nrestart() {\n local name\n for name in \"$@\"; do\n if alive \"$RUN/$name.pid\"; then\n kill -TERM -- \"-$(cat \"$RUN/$name.pid\")\" 2> /dev/null || true\n echo \"↻ $name restarting\"\n else\n start \"$name\"\n echo \"▶ $name started\"\n fi\n done\n}\n\nsetup() {\n echo \"→ installing dependencies\"\n bun install --frozen-lockfile\n [ -f .env ] || bun scripts/setup.ts\n [ -s /scratch/local.db ] || bun run db:reset\n if [ ! -d \"$PLAYWRIGHT_BROWSERS_PATH\" ]; then\n echo \"→ installing Chromium for e2e tests (one time)\"\n bunx playwright install --with-deps chromium > \"$LOGS/playwright-install.log\" 2>&1\n fi\n if ! command -v opencode > /dev/null; then\n echo \"→ installing opencode\"\n bun install -g --trust @opencode/cli > \"$LOGS/agent-install.log\" 2>&1\n fi\n [ -s /scratch/opencode-password ] || head -c 18 /dev/urandom | base64 | tr -d '/+=' > /scratch/opencode-password\n touch /scratch/.ready\n}\n\ninstall_agent() {\n case \"$1\" in\n opencode) command -v opencode > /dev/null || bun install -g --trust @opencode/cli ;;\n claude) command -v claude > /dev/null || bun install -g @anthropic-ai/claude-code ;;\n codex) command -v codex > /dev/null || bun install -g @openai/codex ;;\n *) echo \"unknown agent: $1 (opencode, claude, codex)\" >&2; exit 1 ;;\n esac > \"$LOGS/agent-install.log\" 2>&1\n}\n\ncase \"${1:-}\" in\n up)\n [ -f /scratch/.ready ] || setup\n start dev\n start opencode\n ;;\n setup) setup ;;\n restart)\n shift\n [ $# -eq 0 ] && set -- dev\n [ \"$1\" = all ] && set -- dev opencode\n restart \"$@\"\n ;;\n status)\n for name in dev opencode; do\n if alive \"$RUN/$name.pid\"; then echo \"$name: running\"; else echo \"$name: down\"; fi\n done\n ;;\n password) cat /scratch/opencode-password ;;\n logs)\n name=${2:-dev}\n service_cmd \"$name\" > /dev/null\n exec tail -n 50 -f \"$LOGS/$name.log\"\n ;;\n agent)\n agent=${2:-opencode}\n install_agent \"$agent\"\n shift 2 || shift\n case \"$agent\" in\n # The terminal UI on the same server as the web UI: one set of sessions.\n opencode) OPENCODE_PASSWORD=\"$(cat /scratch/opencode-password)\" exec opencode --server http://127.0.0.1:4096 \"$@\" ;;\n claude) exec claude --dangerously-skip-permissions \"$@\" ;;\n codex) exec codex --dangerously-bypass-approvals-and-sandbox \"$@\" ;;\n esac\n ;;\n acp)\n agent=${2:-opencode}\n install_agent \"$agent\"\n case \"$agent\" in\n opencode) exec opencode acp ;;\n claude)\n command -v claude-agent-acp > /dev/null ||\n bun install -g @agentclientprotocol/claude-agent-acp > \"$LOGS/agent-install.log\" 2>&1\n exec claude-agent-acp\n ;;\n *) echo \"no ACP bridge for $agent (opencode, claude)\" >&2; exit 1 ;;\n esac\n ;;\n *)\n echo \"usage: sandbox-vm.sh up|setup|restart [dev|opencode|all]|status|password|logs [dev|opencode]|agent [opencode|claude|codex]|acp [opencode|claude]\" >&2\n exit 1\n ;;\nesac\n",
|
|
55
|
-
"scripts/sandbox.sh": "#!/usr/bin/env bash\n# `bun run sandbox [command]` — the project's dev VM (microsandbox). The same\n# command works on the host and inside the VM.\n#\n# (none) | up create on first run, start, run dev + opencode, print URLs\n# status URLs, password, what's running\n# restart [dev|opencode|all] restart a service (default: dev)\n# logs [dev|opencode] follow a service's log\n# shell a shell inside the VM\n# agent [opencode|claude|codex] a terminal agent inside the VM, no permission prompts\n# acp [opencode|claude] ACP over stdio, for editors (see `zed`)\n# zed print the Zed settings that run the agent inside the VM\n# stop | rm stop the VM, or delete it with its disks (logins included)\n#\n# Pure bash: it runs before anything is installed.\nset -euo pipefail\nROOT=\"$(cd \"$(dirname \"$0\")/..\" && pwd -P)\"\ncd \"$ROOT\"\n\nCOMMAND=\"${1:-up}\"\n[ $# -gt 0 ] && shift\n\nif [ -n \"${SVEET_SANDBOX:-}\" ]; then\n case \"$COMMAND\" in\n restart | status | logs | password) exec bash scripts/sandbox-vm.sh \"$COMMAND\" \"$@\" ;;\n *) echo \"You're inside the sandbox already. Here: restart, status, logs. Run '$COMMAND' on the host.\" >&2; exit 1 ;;\n esac\nfi\n\ncommand -v msb > /dev/null || {\n echo \"microsandbox (msb) not found — brew bundle, or brew install superradcompany/tap/microsandbox\" >&2\n exit 1\n}\n\
|
|
55
|
+
"scripts/sandbox.sh": "#!/usr/bin/env bash\n# `bun run sandbox [command]` — the project's dev VM (microsandbox). The same\n# command works on the host and inside the VM.\n#\n# (none) | up create on first run, start, run dev + opencode, print URLs\n# status URLs, password, what's running\n# restart [dev|opencode|all] restart a service (default: dev)\n# logs [dev|opencode] follow a service's log\n# shell a shell inside the VM\n# agent [opencode|claude|codex] a terminal agent inside the VM, no permission prompts\n# acp [opencode|claude] ACP over stdio, for editors (see `zed`)\n# zed print the Zed settings that run the agent inside the VM\n# stop | rm stop the VM, or delete it with its disks (logins included)\n#\n# Pure bash: it runs before anything is installed.\nset -euo pipefail\nROOT=\"$(cd \"$(dirname \"$0\")/..\" && pwd -P)\"\ncd \"$ROOT\"\n\nCOMMAND=\"${1:-up}\"\n[ $# -gt 0 ] && shift\n\nif [ -n \"${SVEET_SANDBOX:-}\" ]; then\n case \"$COMMAND\" in\n restart | status | logs | password) exec bash scripts/sandbox-vm.sh \"$COMMAND\" \"$@\" ;;\n *) echo \"You're inside the sandbox already. Here: restart, status, logs. Run '$COMMAND' on the host.\" >&2; exit 1 ;;\n esac\nfi\n\ncommand -v msb > /dev/null || {\n echo \"microsandbox (msb) not found — brew bundle, or brew install superradcompany/tap/microsandbox\" >&2\n exit 1\n}\n\n# From the path, not package.json: fresh checkouts are all named \"sveet\" and must not share a VM.\nNAME=\"${SANDBOX_NAME:-$(basename \"$ROOT\" | tr -c 'a-zA-Z0-9-\\n' '-')-$(printf %s \"$ROOT\" | cksum | cut -c1-6)}\"\n\nvm() { msb exec --no-stdin -w \"$ROOT\" \"$NAME\" -- bash scripts/sandbox-vm.sh \"$@\"; }\nexists() { msb inspect \"$NAME\" < /dev/null > /dev/null 2>&1; }\n\nrunning() { msb ls < /dev/null 2> /dev/null | grep -q \"^$NAME .*running\"; }\n\nports_free() {\n local port\n for port in 5173 4096; do\n if (: < \"/dev/tcp/127.0.0.1/$port\") 2> /dev/null; then\n echo \"✋ Port $port is already in use, probably by another project's sandbox.\" >&2\n echo \" See what's running with \\`msb ls\\`, stop it with \\`msb stop <name>\\`, then retry.\" >&2\n return 1\n fi\n done\n}\n\nensure_up() {\n if ! exists; then\n ports_free\n echo \"→ creating sandbox $NAME (first run takes a few minutes)\" >&2\n if ! msb create --conf Sandboxfile --name \"$NAME\" -w \"$ROOT\" \\\n -v \"$ROOT:$ROOT\" \\\n --mount-owned \"$ROOT/node_modules:kind=disk,size=8G\" \\\n --mount-owned /scratch:kind=disk,size=16G \\\n -p 5173:5173 -p 4096:4096 < /dev/null > /dev/null; then\n msb rm \"$NAME\" < /dev/null > /dev/null 2>&1 || true\n exit 1\n fi\n elif ! running; then\n ports_free\n msb start \"$NAME\" < /dev/null > /dev/null\n fi\n vm up >&2\n}\n\nbanner() {\n local password\n password=\"$(vm password)\"\n cat << EOF\n\n 🍭 $NAME is running\n\n App http://localhost:5173\n Agent http://localhost:4096 user: opencode password: $password\n\n bun run sandbox restart restart the dev server (also: opencode, all)\n bun run sandbox logs follow the dev server log (also: opencode)\n bun run sandbox agent opencode in this terminal (also: claude, codex)\n bun run sandbox shell a shell inside the VM\n bun run sandbox zed use the VM's agent from Zed (ACP)\n bun run sandbox stop stop the VM; \\`bun run sandbox\\` brings it back\n\n Your code is live-mounted. Deploys run here on the host: bun run deploy\nEOF\n vm status | sed 's/^/ /'\n}\n\ncase \"$COMMAND\" in\n up)\n ensure_up\n banner\n ;;\n status)\n exists || { echo \"No sandbox yet — run: bun run sandbox\" >&2; exit 1; }\n banner\n ;;\n restart) ensure_up && vm restart \"$@\" ;;\n logs) ensure_up && exec msb exec -t -w \"$ROOT\" \"$NAME\" -- bash scripts/sandbox-vm.sh logs \"$@\" ;;\n shell) ensure_up && exec msb exec -t -w \"$ROOT\" \"$NAME\" -- bash -l ;;\n agent) ensure_up && exec msb exec -t -w \"$ROOT\" \"$NAME\" -- bash scripts/sandbox-vm.sh agent \"$@\" ;;\n acp)\n # stdout carries the protocol; everything else goes to stderr.\n ensure_up\n exec msb exec --stream -w \"$ROOT\" \"$NAME\" -- bash scripts/sandbox-vm.sh acp \"$@\"\n ;;\n zed)\n cat << EOF\nAdd to Zed's settings (zed: open settings) — agent_servers is a global setting,\nso the name includes the project:\n\n \"agent_servers\": {\n \"opencode ($NAME)\": {\n \"command\": \"$ROOT/scripts/sandbox.sh\",\n \"args\": [\"acp\", \"opencode\"]\n },\n \"Claude Code ($NAME)\": {\n \"command\": \"$ROOT/scripts/sandbox.sh\",\n \"args\": [\"acp\", \"claude\"]\n }\n }\n\nThen pick it in the agent panel. Zed starts the VM if it isn't running. Sign in\nto a provider once first, with: bun run sandbox agent (opencode: /connect)\nEOF\n ;;\n stop) exec msb stop \"$NAME\" ;;\n rm)\n msb stop \"$NAME\" > /dev/null 2>&1 || true\n exec msb rm \"$NAME\"\n ;;\n *)\n sed -n \"2,13p\" \"$0\" | sed 's/^# \\{0,1\\}//'\n exit 1\n ;;\nesac\n",
|
|
56
56
|
"scripts/setup.ts": "// First run: .env with a fresh secret (never overwritten), then a seeded local DB.\nimport { existsSync } from 'node:fs';\nimport { randomBytes } from 'node:crypto';\nimport { $ } from 'bun';\n\nif (!existsSync('.env')) {\n const example = await Bun.file('.env.example').text();\n const secret = randomBytes(32).toString('base64');\n await Bun.write(\n '.env',\n example.replace(/^BETTER_AUTH_SECRET=.*$/m, `BETTER_AUTH_SECRET=\"${secret}\"`)\n );\n console.log('✓ created .env');\n}\nawait $`bun run db:reset`;\n",
|
|
57
57
|
"scripts/test-e2e.ts": "// Builds the production server, then runs Playwright against it; extra args go to Playwright.\nconst env = {\n ...process.env,\n DATABASE_PATH: ':memory:',\n ORIGIN: 'http://127.0.0.1:4173',\n BETTER_AUTH_SECRET: 'e2e-build-only-secret'\n};\nconst run = (cmd: string[]) => Bun.spawn(cmd, { env, stdout: 'inherit', stderr: 'inherit' }).exited;\n\nlet status = await run(['bun', 'run', 'build']);\nif (status === 0)\n status = await run(['bunx', '--no-install', 'playwright', 'test', ...process.argv.slice(2)]);\nprocess.exit(status);\n",
|
|
58
58
|
"scripts/update-deps.sh": "#!/usr/bin/env bash\n# In-range updates (no majors), committed only if verify passes.\nset -euo pipefail\ncd \"$(dirname \"$0\")/..\"\n[ -z \"$(git status --porcelain)\" ] || { echo \"Commit or stash your changes first.\" >&2; exit 1; }\n\nbun update\nif git diff --quiet -- package.json bun.lock; then echo \"Nothing to update.\"; exit 0; fi\nif bun run verify; then\n git commit -m \"Dependency update $(date +%F)\" -- package.json bun.lock\nelse\n git checkout -- package.json bun.lock && bun install\n echo \"!! verify failed — update reverted\" >&2\n exit 1\nfi\n",
|