@powerhousedao/switchboard 6.0.0-dev.2 → 6.0.0-dev.21

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,17 @@
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
12
- fi
4
+ # Regenerate Prisma client for current platform (fixes darwin-arm64 vs linux-musl-openssl mismatch)
5
+ echo "[entrypoint] Regenerating Prisma client for current platform..."
6
+ prisma generate --schema node_modules/document-drive/dist/prisma/schema.prisma
13
7
 
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
8
+ # Run migrations if DATABASE_URL is postgres and migrations not skipped
9
+ if [ -n "$DATABASE_URL" ] && echo "$DATABASE_URL" | grep -q "^postgres" && [ "$SKIP_DB_MIGRATIONS" != "true" ]; then
10
+ echo "[entrypoint] Running Prisma db push..."
11
+ prisma db push --schema node_modules/document-drive/dist/prisma/schema.prisma --skip-generate
12
+ echo "[entrypoint] Running migrations..."
13
+ ph switchboard --migrate
18
14
  fi
19
15
 
20
- echo "[entrypoint] Starting switchboard..."
21
- export SWITCHBOARD_PORT="${PORT:-4001}"
22
- ph switchboard --port $SWITCHBOARD_PORT
16
+ echo "[entrypoint] Starting switchboard on port ${PORT:-3000}..."
17
+ 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.2",
4
+ "version": "6.0.0-dev.21",
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.2",
46
- "@powerhousedao/reactor": "6.0.0-dev.2",
47
- "@powerhousedao/reactor-api": "6.0.0-dev.2",
48
- "@renown/sdk": "6.0.0-dev.2",
49
- "document-drive": "6.0.0-dev.2",
50
- "document-model": "6.0.0-dev.2"
45
+ "@powerhousedao/config": "6.0.0-dev.21",
46
+ "@powerhousedao/reactor": "6.0.0-dev.21",
47
+ "@powerhousedao/reactor-api": "6.0.0-dev.21",
48
+ "document-drive": "6.0.0-dev.21",
49
+ "@renown/sdk": "6.0.0-dev.21",
50
+ "document-model": "6.0.0-dev.21"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/express": "^4.17.25",
package/tsconfig.json CHANGED
@@ -2,9 +2,13 @@
2
2
  "extends": "../../tsconfig.options.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
- "lib": ["ESNext"]
5
+ "lib": [
6
+ "ESNext"
7
+ ]
6
8
  },
7
- "include": ["**/*"],
9
+ "include": [
10
+ "**/*"
11
+ ],
8
12
  "references": [
9
13
  {
10
14
  "path": "../../packages/document-model"
@@ -20,6 +24,9 @@
20
24
  },
21
25
  {
22
26
  "path": "../../packages/renown"
27
+ },
28
+ {
29
+ "path": "../../packages/reactor"
23
30
  }
24
31
  ]
25
32
  }