#!/bin/bash

set -euo pipefail

cd "$(dirname "$0")/.." || exit 1
ROOT="$(pwd -P)"

# Emit declarations to lib-dist/decl so api package (and tsc -b) can consume them
yarn tsc -p tsconfig.json
yarn vite build --config ./vite.api.config.ts
./bin/copy-migrations ../api
