@powerhousedao/switchboard 6.0.0-dev.1 → 6.0.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/entrypoint.sh CHANGED
@@ -1,22 +1,11 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
- if [ ! -z "$PH_PACKAGES" ]; then
5
- # Convert comma-separated list to space-separated
6
- PACKAGES=$(echo $PH_PACKAGES | tr ',' ' ')
7
- # Install each package
8
- for pkg in $PACKAGES; do
9
- echo "[entrypoint] Installing package: $pkg"
10
- ph install $pkg
11
- done
4
+ # Run Prisma db push if DATABASE_URL is postgres and migrations not skipped
5
+ if [ -n "$DATABASE_URL" ] && echo "$DATABASE_URL" | grep -q "^postgres" && [ "$SKIP_DB_MIGRATIONS" != "true" ]; then
6
+ echo "[entrypoint] Running Prisma db push..."
7
+ prisma db push --schema node_modules/document-drive/dist/prisma/schema.prisma --skip-generate
12
8
  fi
13
9
 
14
- # Check if DATABASE_URL starts with postgres and run Prisma db push
15
- if [ ! -z "$DATABASE_URL" ] && echo "$DATABASE_URL" | grep -q "^postgres" && [ "$SKIP_DB_MIGRATIONS" != "true" ]; then
16
- echo "[entrypoint] DATABASE_URL starts with postgres, running Prisma db push..."
17
- prisma db push --schema node_modules/document-drive/dist/prisma/schema.prisma --skip-generate
18
- fi
19
-
20
- echo "[entrypoint] Starting switchboard..."
21
- export SWITCHBOARD_PORT="${PORT:-4001}"
22
- ph switchboard --port $SWITCHBOARD_PORT
10
+ echo "[entrypoint] Starting switchboard on port ${PORT:-3000}..."
11
+ exec ph switchboard --port ${PORT:-3000}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/switchboard",
3
3
  "type": "module",
4
- "version": "6.0.0-dev.1",
4
+ "version": "6.0.0-dev.3",
5
5
  "main": "dist/src/index.js",
6
6
  "exports": {
7
7
  ".": {
@@ -42,12 +42,12 @@
42
42
  "kysely-pglite-dialect": "^1.1.1",
43
43
  "pg": "^8.13.0",
44
44
  "redis": "^4.7.0",
45
- "@powerhousedao/config": "6.0.0-dev.1",
46
- "@powerhousedao/reactor": "6.0.0-dev.1",
47
- "@powerhousedao/reactor-api": "6.0.0-dev.1",
48
- "document-drive": "6.0.0-dev.1",
49
- "@renown/sdk": "6.0.0-dev.1",
50
- "document-model": "6.0.0-dev.1"
45
+ "@powerhousedao/config": "6.0.0-dev.3",
46
+ "@powerhousedao/reactor": "6.0.0-dev.3",
47
+ "@powerhousedao/reactor-api": "6.0.0-dev.3",
48
+ "@renown/sdk": "6.0.0-dev.3",
49
+ "document-drive": "6.0.0-dev.3",
50
+ "document-model": "6.0.0-dev.3"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/express": "^4.17.25",
@@ -61,7 +61,11 @@
61
61
  "lint": "eslint",
62
62
  "build": "pnpm run install-packages",
63
63
  "start": "node dist/src/index.js",
64
+ "start:profile": "mkdir -p .prof && node --cpu-prof --cpu-prof-dir=.prof dist/src/index.js",
65
+ "start:profile:bun": "mkdir -p .prof && bun --cpu-prof --cpu-prof-dir=.prof dist/src/index.js",
64
66
  "dev": "concurrently -P 'pnpm -w run tsc --watch' 'nodemon --trace-warnings --watch \"../..\" -e ts,tsx,js,json dist/src/index.js -- {@}' --",
65
- "install-packages": "node dist/src/install-packages.js"
67
+ "install-packages": "node dist/src/install-packages.js",
68
+ "migrate": "node dist/src/migrate.js",
69
+ "migrate:status": "node dist/src/migrate.js status"
66
70
  }
67
71
  }