@powerhousedao/switchboard 2.4.5-dev.4 → 2.4.5-dev.5

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/.env CHANGED
@@ -1,4 +1,4 @@
1
- DATABASE_URL="postgres://postgres:postgres@localhost:5444/postgres"
1
+ DATABASE_URL="postgresql://postgres:postgres@localhost:5444/postgres"
2
2
  REDIS_URL="redis://localhost:6380"
3
3
  API_ORIGIN=http://localhost:3000
4
4
  JWT_SECRET="secret"
@@ -6,7 +6,7 @@ PORT=4001
6
6
  ADMIN_USERS=""
7
7
  ## Optional parameters
8
8
  # JWT_EXPIRATION_PERIOD="3600"
9
- SWITCHBOARD_AUTH_ENABLED="true"
9
+ SWITCHBOARD_AUTH_ENABLED=true
10
10
  SWITCHBOARD_AUTH_GUESTS=""
11
11
  SWITCHBOARD_AUTH_USERS=""
12
- SWITCHBOARD_AUTH_ADMINS=""
12
+ SWITCHBOARD_AUTH_ADMINS="0x1AD3d72e54Fb0eB46e87F82f77B284FC8a66b16C"
package/CHANGELOG.md CHANGED
@@ -1,13 +1,14 @@
1
- ## 2.4.5-dev.4 (2025-05-16)
1
+ ## 2.4.5-dev.5 (2025-05-16)
2
2
 
3
- ### 🚀 Features
3
+ ### 🩹 Fixes
4
4
 
5
- - **switchboard:** added authentication middleware ([7cab35e96](https://github.com/powerhouse-inc/powerhouse/commit/7cab35e96))
5
+ - **auth:** some error handling ([1b3d6a38d](https://github.com/powerhouse-inc/powerhouse/commit/1b3d6a38d))
6
+ - **switchboard:** use config ([28b994a9e](https://github.com/powerhouse-inc/powerhouse/commit/28b994a9e))
6
7
 
7
8
  ### 🧱 Updated Dependencies
8
9
 
9
- - Updated document-drive to 1.29.12-dev.9
10
- - Updated @powerhousedao/reactor-api to 1.29.26-dev.8
10
+ - Updated document-drive to 1.29.12-dev.10
11
+ - Updated @powerhousedao/reactor-api to 1.29.26-dev.9
11
12
 
12
13
  ### ❤️ Thank You
13
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACd,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AACD,eAAO,MAAM,MAAM,EAAE,MAOpB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAGA,UAAU,MAAM;IACd,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AACD,eAAO,MAAM,MAAM,EAAE,MAOpB,CAAC"}
@@ -1,3 +1,5 @@
1
+ import dotenv from "dotenv";
2
+ dotenv.config();
1
3
  export const config = {
2
4
  auth: {
3
5
  enabled: Boolean(process.env.SWITCHBOARD_AUTH_ENABLED) || false,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,KAAK;QAC/D,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QAC9D,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5D,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;KAC/D;CACF,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAUhB,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,KAAK;QAC/D,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QAC9D,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5D,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;KAC/D;CACF,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { config } from "./config.js";
2
3
  import { startSwitchboard } from "./server.js";
3
- startSwitchboard().catch(console.error);
4
+ startSwitchboard(config).catch(console.error);
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}