@forklaunch/hyper-express 0.7.8 → 0.7.9

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/lib/index.js CHANGED
@@ -330,12 +330,17 @@ Correlation id: ${(0, import_http13.isForklaunchRequest)(req) ? req.context.corr
330
330
  [import_http13.ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode ?? 500
331
331
  });
332
332
  });
333
+ const openApiServerUrls = (0, import_common3.getEnvVar)("DOCS_SERVER_URLS")?.split(",") ?? [
334
+ `${protocol}://${host}:${port}`
335
+ ];
336
+ const openApiServerDescriptions = (0, import_common3.getEnvVar)(
337
+ "DOCS_SERVER_DESCRIPTIONS"
338
+ )?.split(",") ?? ["Main Server"];
333
339
  const openApi = (0, import_http13.generateOpenApiSpecs)(
334
340
  this.schemaValidator,
335
- protocol,
336
- host,
337
- port,
338
- this.routers
341
+ openApiServerUrls,
342
+ openApiServerDescriptions,
343
+ this
339
344
  );
340
345
  if (this.docsConfiguration == null || this.docsConfiguration.type === "scalar") {
341
346
  this.internal.use(
package/lib/index.mjs CHANGED
@@ -79,7 +79,7 @@ var trace = (schemaValidator, path, contractDetails, ...handlers2) => {
79
79
  };
80
80
 
81
81
  // src/hyperExpressApplication.ts
82
- import { safeStringify as safeStringify2 } from "@forklaunch/common";
82
+ import { getEnvVar, safeStringify as safeStringify2 } from "@forklaunch/common";
83
83
  import {
84
84
  ATTR_HTTP_RESPONSE_STATUS_CODE,
85
85
  ForklaunchExpressLikeApplication,
@@ -322,12 +322,17 @@ Correlation id: ${isForklaunchRequest(req) ? req.context.correlationId : "No cor
322
322
  [ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode ?? 500
323
323
  });
324
324
  });
325
+ const openApiServerUrls = getEnvVar("DOCS_SERVER_URLS")?.split(",") ?? [
326
+ `${protocol}://${host}:${port}`
327
+ ];
328
+ const openApiServerDescriptions = getEnvVar(
329
+ "DOCS_SERVER_DESCRIPTIONS"
330
+ )?.split(",") ?? ["Main Server"];
325
331
  const openApi = generateOpenApiSpecs(
326
332
  this.schemaValidator,
327
- protocol,
328
- host,
329
- port,
330
- this.routers
333
+ openApiServerUrls,
334
+ openApiServerDescriptions,
335
+ this
331
336
  );
332
337
  if (this.docsConfiguration == null || this.docsConfiguration.type === "scalar") {
333
338
  this.internal.use(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/hyper-express",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "Forklaunch framework for hyper-express.",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -35,8 +35,8 @@
35
35
  "swagger-ui-express": "^5.0.1",
36
36
  "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.44.0",
37
37
  "@forklaunch/common": "0.4.6",
38
- "@forklaunch/validator": "0.8.0",
39
- "@forklaunch/core": "0.12.0"
38
+ "@forklaunch/core": "0.12.1",
39
+ "@forklaunch/validator": "0.8.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "^9.32.0",