@webqit/webflo 1.0.27 → 1.0.29

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/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "1.0.27",
15
+ "version": "1.0.29",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -102,6 +102,7 @@ export class WebfloServer extends WebfloRuntime {
102
102
  }));
103
103
  }
104
104
  // ---------------
105
+ await this.setupCapabilities();
105
106
  this.control();
106
107
  if (this.#cx.logger) {
107
108
  if (this.#servers.size) {
@@ -200,12 +201,12 @@ export class WebfloServer extends WebfloRuntime {
200
201
  //this.#sdk.db = new ODBClient({ dialect: 'postgres' });
201
202
  }
202
203
  }
203
- if (this.#cx.server.capabilities?.redis && process.env[this.#cx.server.capabilities.redis_url_variable]) {
204
+ if (this.#cx.server.capabilities?.redis) {
204
205
  const { Redis } = await import('ioredis');
205
206
  this.#sdk.redis = process.env[this.#cx.server.capabilities.redis_url_variable]
206
207
  ? new Redis(process.env[this.#cx.server.capabilities.redis_url_variable])
207
208
  : new Redis;
208
- console.log('Redis capabilities');
209
+ console.log('Redis capabilities', process.env[this.#cx.server.capabilities.redis_url_variable] ? 'with url' : '');
209
210
  }
210
211
  if (this.#cx.server.capabilities?.webpush) {
211
212
  const { default: webpush } = await import('web-push');
@@ -228,7 +229,6 @@ export class WebfloServer extends WebfloRuntime {
228
229
 
229
230
  #globalMessagingRegistry = new Map;
230
231
  async handleNodeWsRequest(wss, nodeRequest, socket, head) {
231
- await this.setupCapabilities();
232
232
  const proto = this.getRequestProto(nodeRequest).replace('http', 'ws');
233
233
  const [fullUrl, requestInit] = this.parseNodeRequest(proto, nodeRequest, false);
234
234
  const scope = {};
@@ -295,7 +295,6 @@ export class WebfloServer extends WebfloRuntime {
295
295
  }
296
296
 
297
297
  async handleNodeHttpRequest(nodeRequest, nodeResponse) {
298
- await this.setupCapabilities();
299
298
  const proto = this.getRequestProto(nodeRequest);
300
299
  const [fullUrl, requestInit] = this.parseNodeRequest(proto, nodeRequest);
301
300
  const scope = {};