@powerhousedao/switchboard 4.1.0-dev.5 → 4.1.0-dev.50
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/CHANGELOG.md +378 -0
- package/Dockerfile +6 -4
- package/README.md +218 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +103 -50
- package/dist/src/server.js.map +1 -1
- package/dist/src/types.d.ts +3 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/entrypoint.sh +6 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,381 @@
|
|
|
1
|
+
## 4.1.0-dev.50 (2025-09-09)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 4.1.0-dev.49 (2025-09-09)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 4.1.0-dev.48 (2025-09-09)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
13
|
+
## 4.1.0-dev.47 (2025-09-06)
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- **docs:** added zip redundancy to release notes ([3acfe1027](https://github.com/powerhouse-inc/powerhouse/commit/3acfe1027))
|
|
18
|
+
|
|
19
|
+
### ❤️ Thank You
|
|
20
|
+
|
|
21
|
+
- Callme-T
|
|
22
|
+
|
|
23
|
+
## 4.1.0-dev.46 (2025-09-05)
|
|
24
|
+
|
|
25
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
26
|
+
|
|
27
|
+
## 5.0.0-staging.3 (2025-09-08)
|
|
28
|
+
|
|
29
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
30
|
+
|
|
31
|
+
## 5.0.0-staging.2 (2025-09-05)
|
|
32
|
+
|
|
33
|
+
### 🩹 Fixes
|
|
34
|
+
|
|
35
|
+
- **docs:** added zip redundancy to release notes ([3acfe1027](https://github.com/powerhouse-inc/powerhouse/commit/3acfe1027))
|
|
36
|
+
|
|
37
|
+
### ❤️ Thank You
|
|
38
|
+
|
|
39
|
+
- Callme-T
|
|
40
|
+
|
|
41
|
+
## 5.0.0-staging.1 (2025-09-04)
|
|
42
|
+
|
|
43
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
44
|
+
|
|
45
|
+
## 4.1.0-dev.44 (2025-09-04)
|
|
46
|
+
|
|
47
|
+
### 🚀 Features
|
|
48
|
+
|
|
49
|
+
- **switchboard:** updated readme ([9659cf035](https://github.com/powerhouse-inc/powerhouse/commit/9659cf035))
|
|
50
|
+
|
|
51
|
+
### ❤️ Thank You
|
|
52
|
+
|
|
53
|
+
- Frank
|
|
54
|
+
|
|
55
|
+
## 4.1.0-dev.43 (2025-09-02)
|
|
56
|
+
|
|
57
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
58
|
+
|
|
59
|
+
## 4.1.0-dev.42 (2025-09-02)
|
|
60
|
+
|
|
61
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
62
|
+
|
|
63
|
+
## 4.1.0-dev.41 (2025-09-02)
|
|
64
|
+
|
|
65
|
+
### 🩹 Fixes
|
|
66
|
+
|
|
67
|
+
- **document-drive:** install openssl ([89f21529e](https://github.com/powerhouse-inc/powerhouse/commit/89f21529e))
|
|
68
|
+
- **document-drive:** prisma build ([7884368a2](https://github.com/powerhouse-inc/powerhouse/commit/7884368a2))
|
|
69
|
+
- **switchboard, connect:** fetch proper tag ([79a0bc967](https://github.com/powerhouse-inc/powerhouse/commit/79a0bc967))
|
|
70
|
+
|
|
71
|
+
### ❤️ Thank You
|
|
72
|
+
|
|
73
|
+
- Frank
|
|
74
|
+
|
|
75
|
+
## 4.1.0-dev.40 (2025-09-02)
|
|
76
|
+
|
|
77
|
+
### 🩹 Fixes
|
|
78
|
+
|
|
79
|
+
- **switchboard:** added openssl to dockerfile ([a10230c60](https://github.com/powerhouse-inc/powerhouse/commit/a10230c60))
|
|
80
|
+
|
|
81
|
+
### ❤️ Thank You
|
|
82
|
+
|
|
83
|
+
- Frank
|
|
84
|
+
|
|
85
|
+
## 4.1.0-dev.39 (2025-09-02)
|
|
86
|
+
|
|
87
|
+
### 🩹 Fixes
|
|
88
|
+
|
|
89
|
+
- **switchboard:** added db push to switchboard entrypoint ([d109e4afb](https://github.com/powerhouse-inc/powerhouse/commit/d109e4afb))
|
|
90
|
+
|
|
91
|
+
### ❤️ Thank You
|
|
92
|
+
|
|
93
|
+
- Frank
|
|
94
|
+
|
|
95
|
+
## 4.1.0-dev.38 (2025-08-30)
|
|
96
|
+
|
|
97
|
+
### 🚀 Features
|
|
98
|
+
|
|
99
|
+
- gql-gen spec ([5bf2c7226](https://github.com/powerhouse-inc/powerhouse/commit/5bf2c7226))
|
|
100
|
+
- **reactor:** we have a reactor facade ([7a61e68ab](https://github.com/powerhouse-inc/powerhouse/commit/7a61e68ab))
|
|
101
|
+
- **reactor:** impstubbing out initial interface and types ([b74b194f9](https://github.com/powerhouse-inc/powerhouse/commit/b74b194f9))
|
|
102
|
+
|
|
103
|
+
### ❤️ Thank You
|
|
104
|
+
|
|
105
|
+
- Benjamin Jordan (@thegoldenmule)
|
|
106
|
+
|
|
107
|
+
## 4.1.0-dev.37 (2025-08-29)
|
|
108
|
+
|
|
109
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
110
|
+
|
|
111
|
+
## 4.1.0-dev.36 (2025-08-28)
|
|
112
|
+
|
|
113
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
114
|
+
|
|
115
|
+
## 4.1.0-dev.35 (2025-08-27)
|
|
116
|
+
|
|
117
|
+
### 🩹 Fixes
|
|
118
|
+
|
|
119
|
+
- **switchboard, ph-cli:** slight type fixes ([b1bf76f1b](https://github.com/powerhouse-inc/powerhouse/commit/b1bf76f1b))
|
|
120
|
+
|
|
121
|
+
### ❤️ Thank You
|
|
122
|
+
|
|
123
|
+
- Benjamin Jordan (@thegoldenmule)
|
|
124
|
+
|
|
125
|
+
## 4.1.0-dev.34 (2025-08-26)
|
|
126
|
+
|
|
127
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
128
|
+
|
|
129
|
+
## 4.1.0-dev.33 (2025-08-21)
|
|
130
|
+
|
|
131
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
132
|
+
|
|
133
|
+
## 4.1.0-dev.32 (2025-08-21)
|
|
134
|
+
|
|
135
|
+
### 🩹 Fixes
|
|
136
|
+
|
|
137
|
+
- **ph-cli:** resolve local document model loading in switchboard and vetra ([262f13035](https://github.com/powerhouse-inc/powerhouse/commit/262f13035))
|
|
138
|
+
|
|
139
|
+
### ❤️ Thank You
|
|
140
|
+
|
|
141
|
+
- Guillermo Puente @gpuente
|
|
142
|
+
|
|
143
|
+
## 4.1.0-dev.31 (2025-08-20)
|
|
144
|
+
|
|
145
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
146
|
+
|
|
147
|
+
## 4.1.0-dev.30 (2025-08-20)
|
|
148
|
+
|
|
149
|
+
### 🩹 Fixes
|
|
150
|
+
|
|
151
|
+
- add additional tags ([4f0cf8658](https://github.com/powerhouse-inc/powerhouse/commit/4f0cf8658))
|
|
152
|
+
|
|
153
|
+
### ❤️ Thank You
|
|
154
|
+
|
|
155
|
+
- Frank
|
|
156
|
+
|
|
157
|
+
## 4.1.0-dev.29 (2025-08-20)
|
|
158
|
+
|
|
159
|
+
### 🩹 Fixes
|
|
160
|
+
|
|
161
|
+
- fetch tags :-) ([df0b7beba](https://github.com/powerhouse-inc/powerhouse/commit/df0b7beba))
|
|
162
|
+
|
|
163
|
+
### ❤️ Thank You
|
|
164
|
+
|
|
165
|
+
- Frank
|
|
166
|
+
|
|
167
|
+
## 4.1.0-dev.28 (2025-08-20)
|
|
168
|
+
|
|
169
|
+
### 🩹 Fixes
|
|
170
|
+
|
|
171
|
+
- removed metadata extraction from commit ([637960021](https://github.com/powerhouse-inc/powerhouse/commit/637960021))
|
|
172
|
+
|
|
173
|
+
### ❤️ Thank You
|
|
174
|
+
|
|
175
|
+
- Frank
|
|
176
|
+
|
|
177
|
+
## 4.1.0-dev.27 (2025-08-20)
|
|
178
|
+
|
|
179
|
+
### 🩹 Fixes
|
|
180
|
+
|
|
181
|
+
- extract metadata tags and labels for docker ([bb9c81ce7](https://github.com/powerhouse-inc/powerhouse/commit/bb9c81ce7))
|
|
182
|
+
- use github tag properly ([95ccff4b8](https://github.com/powerhouse-inc/powerhouse/commit/95ccff4b8))
|
|
183
|
+
- proper tag for docker images ([e73e10617](https://github.com/powerhouse-inc/powerhouse/commit/e73e10617))
|
|
184
|
+
- use patname secret instead of github token ([db9dfd5cd](https://github.com/powerhouse-inc/powerhouse/commit/db9dfd5cd))
|
|
185
|
+
|
|
186
|
+
### ❤️ Thank You
|
|
187
|
+
|
|
188
|
+
- Frank
|
|
189
|
+
|
|
190
|
+
## 4.1.0-dev.26 (2025-08-20)
|
|
191
|
+
|
|
192
|
+
### 🩹 Fixes
|
|
193
|
+
|
|
194
|
+
- docker deploy alternative approach ([2a5522cdc](https://github.com/powerhouse-inc/powerhouse/commit/2a5522cdc))
|
|
195
|
+
|
|
196
|
+
### ❤️ Thank You
|
|
197
|
+
|
|
198
|
+
- Frank
|
|
199
|
+
|
|
200
|
+
## 4.1.0-dev.25 (2025-08-20)
|
|
201
|
+
|
|
202
|
+
### 🩹 Fixes
|
|
203
|
+
|
|
204
|
+
- docker deploy ([b057a7cce](https://github.com/powerhouse-inc/powerhouse/commit/b057a7cce))
|
|
205
|
+
|
|
206
|
+
### ❤️ Thank You
|
|
207
|
+
|
|
208
|
+
- Frank
|
|
209
|
+
|
|
210
|
+
## 4.1.0-dev.24 (2025-08-20)
|
|
211
|
+
|
|
212
|
+
### 🚀 Features
|
|
213
|
+
|
|
214
|
+
- **codegen:** add drive explorer template ([9c27219dc](https://github.com/powerhouse-inc/powerhouse/commit/9c27219dc))
|
|
215
|
+
- **connect,reactor-browser:** remove more old electron garbage ([5cd255568](https://github.com/powerhouse-inc/powerhouse/commit/5cd255568))
|
|
216
|
+
- **connect:** remove broken electron code ([3f28d6a46](https://github.com/powerhouse-inc/powerhouse/commit/3f28d6a46))
|
|
217
|
+
- **reactor-browser,connect,vetra:** move state hooks into reactor browser and eliminate redundant and dead code ([30fa16f1f](https://github.com/powerhouse-inc/powerhouse/commit/30fa16f1f))
|
|
218
|
+
- **connect,state,renown:** add state hook for renown ([5beb1252b](https://github.com/powerhouse-inc/powerhouse/commit/5beb1252b))
|
|
219
|
+
- **connect:** remove unused dep ([ef492bc7a](https://github.com/powerhouse-inc/powerhouse/commit/ef492bc7a))
|
|
220
|
+
- **connect,state,reactor-browser:** eliminate jotai ([53b1ab759](https://github.com/powerhouse-inc/powerhouse/commit/53b1ab759))
|
|
221
|
+
- **state:** rename to vetra packages ([c415b7dc2](https://github.com/powerhouse-inc/powerhouse/commit/c415b7dc2))
|
|
222
|
+
- **state:** use ph packages atoms ([6421fbeea](https://github.com/powerhouse-inc/powerhouse/commit/6421fbeea))
|
|
223
|
+
|
|
224
|
+
### 🩹 Fixes
|
|
225
|
+
|
|
226
|
+
- today claude taught me I could mock a package to fix circular references ([dcb83174c](https://github.com/powerhouse-inc/powerhouse/commit/dcb83174c))
|
|
227
|
+
- **monorepo:** numerous build issues ([04349dd25](https://github.com/powerhouse-inc/powerhouse/commit/04349dd25))
|
|
228
|
+
|
|
229
|
+
### ❤️ Thank You
|
|
230
|
+
|
|
231
|
+
- Benjamin Jordan (@thegoldenmule)
|
|
232
|
+
- ryanwolhuter @ryanwolhuter
|
|
233
|
+
|
|
234
|
+
## 4.1.0-dev.23 (2025-08-19)
|
|
235
|
+
|
|
236
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
237
|
+
|
|
238
|
+
## 4.1.0-dev.22 (2025-08-15)
|
|
239
|
+
|
|
240
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
241
|
+
|
|
242
|
+
## 4.1.0-dev.21 (2025-08-15)
|
|
243
|
+
|
|
244
|
+
### 🚀 Features
|
|
245
|
+
|
|
246
|
+
- **vetra:** update manifest when new module is added ([#1766](https://github.com/powerhouse-inc/powerhouse/pull/1766))
|
|
247
|
+
|
|
248
|
+
### 🩹 Fixes
|
|
249
|
+
|
|
250
|
+
- fixed debug launch configuration now that source maps are in the proper locations ([c75d793ed](https://github.com/powerhouse-inc/powerhouse/commit/c75d793ed))
|
|
251
|
+
|
|
252
|
+
### ❤️ Thank You
|
|
253
|
+
|
|
254
|
+
- Benjamin Jordan (@thegoldenmule)
|
|
255
|
+
- Guillermo Puente Sandoval @gpuente
|
|
256
|
+
|
|
257
|
+
## 4.1.0-dev.20 (2025-08-15)
|
|
258
|
+
|
|
259
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
260
|
+
|
|
261
|
+
## 4.1.0-dev.19 (2025-08-14)
|
|
262
|
+
|
|
263
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
264
|
+
|
|
265
|
+
## 4.1.0-dev.18 (2025-08-14)
|
|
266
|
+
|
|
267
|
+
### 🩹 Fixes
|
|
268
|
+
|
|
269
|
+
- overly aggressive linter fixes ([e074de3df](https://github.com/powerhouse-inc/powerhouse/commit/e074de3df))
|
|
270
|
+
|
|
271
|
+
### ❤️ Thank You
|
|
272
|
+
|
|
273
|
+
- Benjamin Jordan (@thegoldenmule)
|
|
274
|
+
|
|
275
|
+
## 4.1.0-dev.17 (2025-08-12)
|
|
276
|
+
|
|
277
|
+
### 🚀 Features
|
|
278
|
+
|
|
279
|
+
- refactor vetra command and remove vetra deps in connect and reactor ([#1753](https://github.com/powerhouse-inc/powerhouse/pull/1753))
|
|
280
|
+
|
|
281
|
+
### ❤️ Thank You
|
|
282
|
+
|
|
283
|
+
- Guillermo Puente Sandoval @gpuente
|
|
284
|
+
|
|
285
|
+
## 4.1.0-dev.16 (2025-08-12)
|
|
286
|
+
|
|
287
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
288
|
+
|
|
289
|
+
## 4.1.0-dev.15 (2025-08-12)
|
|
290
|
+
|
|
291
|
+
### 🚀 Features
|
|
292
|
+
|
|
293
|
+
- **reactor-mcp,reactor-api,reactor-local,switchboard,ph-cli:** run mcp on express app ([d51fa590e](https://github.com/powerhouse-inc/powerhouse/commit/d51fa590e))
|
|
294
|
+
|
|
295
|
+
### ❤️ Thank You
|
|
296
|
+
|
|
297
|
+
- acaldas @acaldas
|
|
298
|
+
|
|
299
|
+
## 4.1.0-dev.14 (2025-08-11)
|
|
300
|
+
|
|
301
|
+
### 🚀 Features
|
|
302
|
+
|
|
303
|
+
- update document engineering dep ([54dcee90d](https://github.com/powerhouse-inc/powerhouse/commit/54dcee90d))
|
|
304
|
+
|
|
305
|
+
### ❤️ Thank You
|
|
306
|
+
|
|
307
|
+
- acaldas @acaldas
|
|
308
|
+
|
|
309
|
+
## 4.1.0-dev.13 (2025-08-09)
|
|
310
|
+
|
|
311
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
312
|
+
|
|
313
|
+
## 4.1.0-dev.12 (2025-08-08)
|
|
314
|
+
|
|
315
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
316
|
+
|
|
317
|
+
## 4.1.0-dev.11 (2025-08-07)
|
|
318
|
+
|
|
319
|
+
### 🚀 Features
|
|
320
|
+
|
|
321
|
+
- **switchboard:** added dev mode to switchboard where local document models are loaded ([449e730b6](https://github.com/powerhouse-inc/powerhouse/commit/449e730b6))
|
|
322
|
+
- **switchboard,reactor-local,reactor-api:** moved vite loader to reactor-api package ([c84f0a2a3](https://github.com/powerhouse-inc/powerhouse/commit/c84f0a2a3))
|
|
323
|
+
- vetra package documents and app integration ([0e4053302](https://github.com/powerhouse-inc/powerhouse/commit/0e4053302))
|
|
324
|
+
- **vetra:** added vetra drive editor ([4ebafd143](https://github.com/powerhouse-inc/powerhouse/commit/4ebafd143))
|
|
325
|
+
- integrate package documents into reactor system ([939fe8e80](https://github.com/powerhouse-inc/powerhouse/commit/939fe8e80))
|
|
326
|
+
- **connect:** integrate Vetra package documents and editors ([2ecb9bd15](https://github.com/powerhouse-inc/powerhouse/commit/2ecb9bd15))
|
|
327
|
+
|
|
328
|
+
### ❤️ Thank You
|
|
329
|
+
|
|
330
|
+
- acaldas @acaldas
|
|
331
|
+
- Guillermo Puente @gpuente
|
|
332
|
+
- Guillermo Puente Sandoval @gpuente
|
|
333
|
+
|
|
334
|
+
## 4.1.0-dev.10 (2025-08-07)
|
|
335
|
+
|
|
336
|
+
### 🚀 Features
|
|
337
|
+
|
|
338
|
+
- **builder-tools,codegen,design-system,reactor-api:** updated document-engineering version ([e74068b43](https://github.com/powerhouse-inc/powerhouse/commit/e74068b43))
|
|
339
|
+
|
|
340
|
+
### ❤️ Thank You
|
|
341
|
+
|
|
342
|
+
- acaldas @acaldas
|
|
343
|
+
|
|
344
|
+
## 4.1.0-dev.9 (2025-08-07)
|
|
345
|
+
|
|
346
|
+
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
|
347
|
+
|
|
348
|
+
## 4.1.0-dev.8 (2025-08-06)
|
|
349
|
+
|
|
350
|
+
### 🚀 Features
|
|
351
|
+
|
|
352
|
+
- **switchboard,config,reactor-api:** handle auth in reactor-api ([f33c921ee](https://github.com/powerhouse-inc/powerhouse/commit/f33c921ee))
|
|
353
|
+
|
|
354
|
+
### ❤️ Thank You
|
|
355
|
+
|
|
356
|
+
- acaldas @acaldas
|
|
357
|
+
|
|
358
|
+
## 4.1.0-dev.7 (2025-08-06)
|
|
359
|
+
|
|
360
|
+
### 🚀 Features
|
|
361
|
+
|
|
362
|
+
- **switchboard:** added readme ([fbadfca11](https://github.com/powerhouse-inc/powerhouse/commit/fbadfca11))
|
|
363
|
+
|
|
364
|
+
### ❤️ Thank You
|
|
365
|
+
|
|
366
|
+
- Frank
|
|
367
|
+
|
|
368
|
+
## 4.1.0-dev.6 (2025-08-06)
|
|
369
|
+
|
|
370
|
+
### 🚀 Features
|
|
371
|
+
|
|
372
|
+
- **reactor-mcp:** load local document models and reload when they change ([0408a017c](https://github.com/powerhouse-inc/powerhouse/commit/0408a017c))
|
|
373
|
+
- **reactor-local,reactor-api,document-drive:** reload local document models when they change ([5d9af3951](https://github.com/powerhouse-inc/powerhouse/commit/5d9af3951))
|
|
374
|
+
|
|
375
|
+
### ❤️ Thank You
|
|
376
|
+
|
|
377
|
+
- acaldas @acaldas
|
|
378
|
+
|
|
1
379
|
## 4.1.0-dev.5 (2025-08-05)
|
|
2
380
|
|
|
3
381
|
This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
|
package/Dockerfile
CHANGED
|
@@ -36,10 +36,12 @@ ENV PH_SWITCHBOARD_PORT=$PORT
|
|
|
36
36
|
# Other
|
|
37
37
|
ARG TAG=latest
|
|
38
38
|
ENV TAG=$TAG
|
|
39
|
-
|
|
40
|
-
RUN pnpm add -g ph-cmd@$TAG
|
|
41
|
-
RUN if [ "$TAG"
|
|
42
|
-
ph init project
|
|
39
|
+
RUN apk add --no-cache openssl
|
|
40
|
+
RUN pnpm add -g ph-cmd@$TAG prisma
|
|
41
|
+
RUN if [[ "$TAG" == *"dev"* ]]; then \
|
|
42
|
+
ph init project --dev --package-manager pnpm; \
|
|
43
|
+
elif [[ "$TAG" == *"staging"* ]]; then \
|
|
44
|
+
ph init project --staging --package-manager pnpm; \
|
|
43
45
|
else \
|
|
44
46
|
ph init project --package-manager pnpm; \
|
|
45
47
|
fi
|
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Switchboard
|
|
2
|
+
|
|
3
|
+
A powerful document-driven server that provides a unified API for managing and serving document models, drives, and reactors in the Powerhouse ecosystem.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
|
|
7
|
+
- **Document Model Management**: Serve and manage document models with GraphQL API
|
|
8
|
+
- **Document Drive Support**: Handle document drives with filesystem and PostgreSQL storage
|
|
9
|
+
- **Reactor Integration**: Built-in support for Powerhouse reactors
|
|
10
|
+
- **Flexible Storage**: Support for filesystem, PostgreSQL, and Redis caching
|
|
11
|
+
- **Docker Ready**: Containerized deployment with comprehensive environment configuration
|
|
12
|
+
- **Authentication**: Configurable authentication with guest, user, and admin roles
|
|
13
|
+
- **HTTPS Support**: Built-in HTTPS server with custom certificates
|
|
14
|
+
- **Profiling**: Integration with Pyroscope for performance monitoring
|
|
15
|
+
- **Error Tracking**: Sentry integration for error monitoring and reporting
|
|
16
|
+
|
|
17
|
+
## 📦 Installation
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- Node.js 22+
|
|
22
|
+
- pnpm (recommended) or npm
|
|
23
|
+
- Redis (optional, for caching)
|
|
24
|
+
- PostgreSQL (optional, for persistent storage)
|
|
25
|
+
|
|
26
|
+
### Local Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Clone the repository
|
|
30
|
+
git clone https://github.com/powerhouse-inc/powerhouse.git
|
|
31
|
+
cd powerhouse
|
|
32
|
+
|
|
33
|
+
# Install dependencies
|
|
34
|
+
pnpm install
|
|
35
|
+
|
|
36
|
+
# Build the switchboard
|
|
37
|
+
pnpm --filter @powerhousedao/switchboard build
|
|
38
|
+
|
|
39
|
+
# Start in development mode
|
|
40
|
+
pnpm --filter @powerhousedao/switchboard dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Global Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Install globally
|
|
47
|
+
npm install -g @powerhousedao/switchboard
|
|
48
|
+
|
|
49
|
+
# Or using pnpm
|
|
50
|
+
pnpm add -g @powerhousedao/switchboard
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 🏃♂️ Quick Start
|
|
54
|
+
|
|
55
|
+
## ⚙️ Configuration
|
|
56
|
+
|
|
57
|
+
### Environment Variables
|
|
58
|
+
|
|
59
|
+
| Variable | Description | Default |
|
|
60
|
+
|----------|-------------|---------|
|
|
61
|
+
| `PORT` | Server port | `4001` |
|
|
62
|
+
| `DATABASE_URL` | Database connection string | `./.ph/drive-storage` |
|
|
63
|
+
| `REDIS_URL` | Redis connection URL | - |
|
|
64
|
+
| `REDIS_TLS_URL` | Redis TLS connection URL | - |
|
|
65
|
+
| `SENTRY_DSN` | Sentry DSN for error tracking | - |
|
|
66
|
+
| `SENTRY_ENV` | Sentry environment | - |
|
|
67
|
+
| `PYROSCOPE_SERVER_ADDRESS` | Pyroscope server address | - |
|
|
68
|
+
|
|
69
|
+
### Authentication Configuration
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const options = {
|
|
73
|
+
auth: {
|
|
74
|
+
enabled: true,
|
|
75
|
+
guests: ['0x123', '0x456'],
|
|
76
|
+
users: ['0x789', '0xabc'],
|
|
77
|
+
admins: ['0xdef', '0xghi']
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Storage Options
|
|
83
|
+
|
|
84
|
+
Switchboard supports multiple storage backends:
|
|
85
|
+
|
|
86
|
+
- **Filesystem**: Local file-based storage (default)
|
|
87
|
+
- **PostgreSQL**: Persistent database storage
|
|
88
|
+
- **Redis**: Caching layer (optional)
|
|
89
|
+
|
|
90
|
+
## 🐳 Docker Deployment
|
|
91
|
+
|
|
92
|
+
### Using Docker Compose
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
version: '3.8'
|
|
96
|
+
services:
|
|
97
|
+
switchboard:
|
|
98
|
+
image: powerhouse/switchboard:latest
|
|
99
|
+
ports:
|
|
100
|
+
- "4001:4001"
|
|
101
|
+
environment:
|
|
102
|
+
- PORT=4001
|
|
103
|
+
- DATABASE_URL=postgresql://user:pass@db:5432/switchboard
|
|
104
|
+
- REDIS_URL=redis://redis:6379
|
|
105
|
+
depends_on:
|
|
106
|
+
- db
|
|
107
|
+
- redis
|
|
108
|
+
|
|
109
|
+
db:
|
|
110
|
+
image: postgres:15
|
|
111
|
+
environment:
|
|
112
|
+
POSTGRES_DB: switchboard
|
|
113
|
+
POSTGRES_USER: user
|
|
114
|
+
POSTGRES_PASSWORD: pass
|
|
115
|
+
|
|
116
|
+
redis:
|
|
117
|
+
image: redis:7-alpine
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Environment Variables for Docker
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Database
|
|
124
|
+
PH_SWITCHBOARD_DATABASE_URL="postgresql://user:pass@db:5432/switchboard"
|
|
125
|
+
PH_SWITCHBOARD_REDIS_URL="redis://redis:6379"
|
|
126
|
+
|
|
127
|
+
# Authentication
|
|
128
|
+
PH_SWITCHBOARD_AUTH_ENABLED=true
|
|
129
|
+
PH_SWITCHBOARD_ADMINS_LIST="0x123,0x456"
|
|
130
|
+
PH_SWITCHBOARD_USERS_LIST="0x789,0xabc"
|
|
131
|
+
PH_SWITCHBOARD_GUESTS_LIST="0xdef,0xghi"
|
|
132
|
+
|
|
133
|
+
# Packages
|
|
134
|
+
PH_PACKAGES="package1,package2,package3"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 🔧 Development
|
|
138
|
+
|
|
139
|
+
### Project Structure
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
src/
|
|
143
|
+
├── index.ts # Main entry point
|
|
144
|
+
├── server.ts # Server implementation
|
|
145
|
+
├── config.ts # Configuration management
|
|
146
|
+
├── types.ts # TypeScript type definitions
|
|
147
|
+
├── utils.ts # Utility functions
|
|
148
|
+
├── profiler.ts # Profiling integration
|
|
149
|
+
├── install-packages.ts # Package installation
|
|
150
|
+
└── clients/ # External client integrations
|
|
151
|
+
└── redis.ts # Redis client
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Available Scripts
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Build the project
|
|
158
|
+
pnpm build
|
|
159
|
+
|
|
160
|
+
# Start in development mode
|
|
161
|
+
pnpm dev
|
|
162
|
+
|
|
163
|
+
# Start production server
|
|
164
|
+
pnpm start
|
|
165
|
+
|
|
166
|
+
# Lint code
|
|
167
|
+
pnpm lint
|
|
168
|
+
|
|
169
|
+
# Clean build artifacts
|
|
170
|
+
pnpm clean
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Adding New Features
|
|
174
|
+
|
|
175
|
+
1. **Document Models**: Add new document model modules to the reactor builder
|
|
176
|
+
2. **Storage Backends**: Implement new storage adapters
|
|
177
|
+
3. **Authentication**: Extend authentication logic
|
|
178
|
+
4. **API Endpoints**: Add new GraphQL resolvers
|
|
179
|
+
|
|
180
|
+
## 📚 API Reference
|
|
181
|
+
|
|
182
|
+
### GraphQL Endpoints
|
|
183
|
+
|
|
184
|
+
Switchboard exposes a GraphQL API for document operations:
|
|
185
|
+
|
|
186
|
+
- **Document Models**: Query and mutate document models
|
|
187
|
+
- **Document Drives**: Manage document drives
|
|
188
|
+
- **Reactor Operations**: Execute reactor operations
|
|
189
|
+
|
|
190
|
+
### REST Endpoints
|
|
191
|
+
|
|
192
|
+
- `GET /health` - Health check endpoint
|
|
193
|
+
- `POST /graphql` - GraphQL endpoint
|
|
194
|
+
- `GET /graphql` - GraphQL playground (development)
|
|
195
|
+
|
|
196
|
+
## 🤝 Contributing
|
|
197
|
+
|
|
198
|
+
1. Fork the repository
|
|
199
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
200
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
201
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
202
|
+
5. Open a Pull Request
|
|
203
|
+
|
|
204
|
+
## 📄 License
|
|
205
|
+
|
|
206
|
+
This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
|
|
207
|
+
|
|
208
|
+
## 🆘 Support
|
|
209
|
+
|
|
210
|
+
- **Documentation**: [Powerhouse Docs](https://docs.powerhouse.com)
|
|
211
|
+
- **Issues**: [GitHub Issues](https://github.com/powerhouse-inc/powerhouse/issues)
|
|
212
|
+
- **Discussions**: [GitHub Discussions](https://github.com/powerhouse-inc/powerhouse/discussions)
|
|
213
|
+
|
|
214
|
+
## 🔗 Related Projects
|
|
215
|
+
|
|
216
|
+
- [@powerhousedao/reactor-api](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/reactor-api) - Reactor API package
|
|
217
|
+
- [@powerhousedao/document-drive](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-drive) - Document drive management
|
|
218
|
+
- [@powerhousedao/document-model](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-model) - Document model system
|
package/dist/src/config.d.ts
CHANGED
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,MAcpB,CAAC"}
|
package/dist/src/config.js
CHANGED
package/dist/src/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;AAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,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;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;AAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;AAQjC,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,QAAQ,EAAE;QACR,0FAA0F;QAC1F,GAAG,EACD,OAAO,CAAC,GAAG,CAAC,2BAA2B;YACvC,WAAW,EAAE,QAAQ,EAAE,GAAG;YAC1B,QAAQ;KACX;IACD,IAAI,EACF,OAAO,CAAC,GAAG,CAAC,mBAAmB;QAC/B,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC7C,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QACzC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI,IAAI,CAAC;IACjC,GAAG,EAAE,IAAI;CACV,CAAC"}
|
package/dist/src/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AA0BA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAyI9E,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAmB5B,CAAC;AAEF,cAAc,YAAY,CAAC"}
|