Files
household-bot/package.json
whekin f4fe4470f7 feat(infra): implement multi-environment deployment strategy
- Update CD workflow for branch-based environments (main -> Prod, dev -> Dev)
- Support Terraform workspaces for environment isolation
- Add manage_runtime_secrets flag to prevent accidental secret destruction
- Add infra management and secret setup utility scripts
- Prefix GitHub deployer identity with environment name
- Synchronize bot environment variables with latest runtime config
2026-03-15 19:11:18 +04:00

57 lines
3.2 KiB
JSON

{
"name": "kojori-tg-bot",
"private": true,
"type": "module",
"workspaces": [
"apps/*",
"packages/*",
"scripts"
],
"scripts": {
"build": "bun run --filter '*' build",
"typecheck": "bun run --filter '*' typecheck",
"test": "bun run --filter '*' test",
"prepare": "[ -d .git ] && lefthook install || true",
"lint": "oxlint .",
"lint:fix": "oxlint --fix .",
"format": "bunx oxfmt .",
"format:check": "bunx oxfmt --check .",
"db:generate": "bunx drizzle-kit generate --config packages/db/drizzle.config.ts",
"db:check": "bunx drizzle-kit check --config packages/db/drizzle.config.ts",
"db:migrate": "bunx drizzle-kit migrate --config packages/db/drizzle.config.ts",
"db:migrations:check": "bun run scripts/check-migration-hygiene.ts",
"db:migrations:manifest": "bun run scripts/update-migration-checksums.ts",
"db:push": "bunx drizzle-kit push --config packages/db/drizzle.config.ts",
"db:studio": "bunx drizzle-kit studio --config packages/db/drizzle.config.ts",
"db:seed": "set -a; [ -f .env ] && . ./.env; set +a; bun run --filter @household/db seed",
"review:coderabbit": "coderabbit --prompt-only --base main || ~/.local/bin/coderabbit --prompt-only --base main",
"infra:fmt": "terraform -chdir=infra/terraform fmt -recursive",
"infra:fmt:check": "terraform -chdir=infra/terraform fmt -check -recursive",
"infra:init": "terraform -chdir=infra/terraform init",
"infra:validate": "terraform -chdir=infra/terraform init -backend=false && terraform -chdir=infra/terraform validate",
"infra:plan:dev": "terraform -chdir=infra/terraform workspace select dev || terraform -chdir=infra/terraform workspace new dev && terraform -chdir=infra/terraform plan -var-file=dev.tfvars",
"infra:apply:dev": "terraform -chdir=infra/terraform workspace select dev && terraform -chdir=infra/terraform apply -var-file=dev.tfvars",
"infra:plan:prod": "terraform -chdir=infra/terraform workspace select prod || terraform -chdir=infra/terraform workspace new prod && terraform -chdir=infra/terraform plan -var-file=prod.tfvars",
"infra:apply:prod": "terraform -chdir=infra/terraform workspace select prod && terraform -chdir=infra/terraform apply -var-file=prod.tfvars",
"dev:bot": "bun run --filter @household/bot dev",
"dev:miniapp": "bun run --filter @household/miniapp dev",
"docker:build:bot": "docker build -f apps/bot/Dockerfile -t household-bot:local .",
"docker:build:miniapp": "docker build -f apps/miniapp/Dockerfile -t household-miniapp:local .",
"docker:build": "bun run docker:build:bot && bun run docker:build:miniapp",
"docker:smoke": "docker compose up --build",
"test:e2e": "bun run scripts/e2e/billing-flow.ts",
"ops:deploy:smoke": "bun run scripts/ops/deploy-smoke.ts",
"ops:telegram:webhook": "bun run scripts/ops/telegram-webhook.ts",
"ops:telegram:commands": "bun run scripts/ops/telegram-commands.ts",
"ops:reminder": "bun run scripts/ops/trigger-reminder.ts"
},
"devDependencies": {
"@types/bun": "1.3.10",
"@typescript/native-preview": "7.0.0-dev.20260304.1",
"drizzle-kit": "^0.31.4",
"lefthook": "2.1.2",
"oxlint": "^1.51.0",
"typescript": "^5.9.2"
}
}