Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

2.0 KB
Raw Blame
export ENV := "local"

worker-build: setup worker_build_setup
  worker-build --features create-default-state,bebop-owned-all

# rust both unit and e2e tests
test: worker-build
  npx vitest run
  cargo test

# Run tests without the alarm-keep-alive feature
test-no-alarm: setup worker_build_setup
    worker-build --profile sync-service-release --no-default-features --features create-default-state,bebop-owned-all,do-sqlite-snapshot-storage,search-service
    npx vitest run

setup:
    npm install && cd bebop/ && npx bebopc build

worker_build_setup:
    cargo install [email protected]

# initialize the local D1 database used by wrangler dev
migrate-d1-local:
  CI=true npx wrangler d1 migrations apply USER_PEER_MAPPING --local --config wrangler.toml

# run worker using wrangler / miniflare
dev: migrate-d1-local
  npx wrangler dev

# clean testing artifacts
clean:
  rm -rf node_modules .wrangler data

deploy-dev: (check-secrets "dev")
  npx wrangler deploy --env dev

migrate-d1-playground:
  CI=true npx wrangler d1 migrations apply USER_PEER_MAPPING --env playground --remote

deploy-playground: (check-secrets "playground") migrate-d1-playground
  npx wrangler deploy --env playground

deploy-playground-dry:
  npx wrangler deploy --env playground --dry-run

deploy-dev-dry:
  npx wrangler deploy --env dev --dry-run

deploy-prod-dry:
  npx wrangler deploy --env prod --dry-run

migrate-d1-prod:
  CI=true npx wrangler d1 migrations apply USER_PEER_MAPPING --env prod --remote

# CI runs the same three steps (.github/workflows/deploy_sync_service.yml)
deploy-prod: (check-secrets "prod") migrate-d1-prod
  npx wrangler deploy --env prod

openapi:
    cargo run --quiet --bin sync_service_openapi --features openapi > ../../apps/web/src/lib/service-clients/service-sync/openapi.json
    \cd ../../apps/web && bunx --bun @biomejs/biome format --write src/lib/service-clients/service-sync/openapi.json

# Read-only: verifies binding names without retrieving secret values.
check-secrets environment:
  node scripts/check-deploy-secrets.mjs {{environment}}