#!/bin/sh
set -eu

# Terminalwerk runs command executors with cwd set to the Akte source path.
CLI_PATH="$PWD/../../packages/cli/dist/index.js"

if [ ! -f "$CLI_PATH" ]; then
  echo "servicewerk: CLI build not found at $CLI_PATH" >&2
  echo "Run 'npm run build' in the servicewerk project." >&2
  exit 1
fi

exec node "$CLI_PATH" "$@"
