uppy/packages/@uppy/companion/start-dev
Kevin van Zonneveld e99a17f1fe
companion: port to TypeScript (#6179)
Supersedes #6178.

This branch keeps the exact same final content as #6178, but splits
history for reviewability:

1. `chore(companion): rename source and test files from .js to .ts`
(pure `git mv`, no content changes)
2. `feat(companion): port Companion to TypeScript` (actual
content/type/schema/build updates)

Validation note:
- Final tree is byte-for-byte identical to `ts-companion`
(`7b5b16a298690b0492de4cc4fab744f998b45570`).

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2026-05-04 20:50:43 +08:00

21 lines
707 B
Bash
Executable file

#!/usr/bin/env bash
./node_modules/.bin/tsc --build tsconfig.build.json --watch --preserveWatchOutput &
TSC_WATCH_PID=$!
trap 'kill $TSC_WATCH_PID 2>/dev/null || true' EXIT
# Load local env vars. In CI, these are injected.
if [ -f ../../../.env ]; then
DOTENV_CONFIG_PATH=../../../.env node --watch -r dotenv/config dist/standalone/start-server.js
else
env \
COMPANION_DATADIR="./output" \
COMPANION_DOMAIN="localhost:3020" \
COMPANION_PROTOCOL="http" \
COMPANION_PORT=3020 \
COMPANION_CLIENT_ORIGINS="" \
COMPANION_SECRET="development" \
COMPANION_PREAUTH_SECRET="development2" \
COMPANION_ALLOW_LOCAL_URLS="true" \
node --watch dist/standalone/start-server.js
fi