@forklaunch/hyper-express 0.9.24 → 0.9.26
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 +15 -0
- package/lib/index.mjs +15 -0
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -103,6 +103,7 @@ var import_hyper_express_fork = require("@forklaunch/hyper-express-fork");
|
|
|
103
103
|
var import_zod = require("@forklaunch/validator/zod");
|
|
104
104
|
var import_express_api_reference = require("@scalar/express-api-reference");
|
|
105
105
|
var import_crypto = __toESM(require("crypto"));
|
|
106
|
+
var import_fs = __toESM(require("fs"));
|
|
106
107
|
|
|
107
108
|
// src/cluster/hyperExpress.cluster.ts
|
|
108
109
|
var import_node_cluster = __toESM(require("cluster"));
|
|
@@ -463,6 +464,20 @@ var Application = class extends import_http13.ForklaunchExpressLikeApplication {
|
|
|
463
464
|
this.openapiConfiguration = configurationOptions?.openapi;
|
|
464
465
|
}
|
|
465
466
|
async listen(arg0, arg1, arg2) {
|
|
467
|
+
if (process.env.FORKLAUNCH_MODE === "openapi") {
|
|
468
|
+
const openApiSpec = (0, import_http13.generateOpenApiSpecs)(
|
|
469
|
+
this.schemaValidator,
|
|
470
|
+
[],
|
|
471
|
+
[],
|
|
472
|
+
this,
|
|
473
|
+
this.openapiConfiguration
|
|
474
|
+
);
|
|
475
|
+
import_fs.default.writeFileSync(
|
|
476
|
+
process.env.FORKLAUNCH_OPENAPI_OUTPUT,
|
|
477
|
+
JSON.stringify(openApiSpec, null, 2)
|
|
478
|
+
);
|
|
479
|
+
process.exit(0);
|
|
480
|
+
}
|
|
466
481
|
if (typeof arg0 === "number") {
|
|
467
482
|
const port = arg0 || Number(process.env.PORT);
|
|
468
483
|
const protocol = process.env.PROTOCOL || "http";
|
package/lib/index.mjs
CHANGED
|
@@ -95,6 +95,7 @@ import {
|
|
|
95
95
|
import { ZodSchemaValidator } from "@forklaunch/validator/zod";
|
|
96
96
|
import { apiReference } from "@scalar/express-api-reference";
|
|
97
97
|
import crypto from "crypto";
|
|
98
|
+
import fs from "fs";
|
|
98
99
|
|
|
99
100
|
// src/cluster/hyperExpress.cluster.ts
|
|
100
101
|
import cluster from "cluster";
|
|
@@ -457,6 +458,20 @@ var Application = class extends ForklaunchExpressLikeApplication {
|
|
|
457
458
|
this.openapiConfiguration = configurationOptions?.openapi;
|
|
458
459
|
}
|
|
459
460
|
async listen(arg0, arg1, arg2) {
|
|
461
|
+
if (process.env.FORKLAUNCH_MODE === "openapi") {
|
|
462
|
+
const openApiSpec = generateOpenApiSpecs(
|
|
463
|
+
this.schemaValidator,
|
|
464
|
+
[],
|
|
465
|
+
[],
|
|
466
|
+
this,
|
|
467
|
+
this.openapiConfiguration
|
|
468
|
+
);
|
|
469
|
+
fs.writeFileSync(
|
|
470
|
+
process.env.FORKLAUNCH_OPENAPI_OUTPUT,
|
|
471
|
+
JSON.stringify(openApiSpec, null, 2)
|
|
472
|
+
);
|
|
473
|
+
process.exit(0);
|
|
474
|
+
}
|
|
460
475
|
if (typeof arg0 === "number") {
|
|
461
476
|
const port = arg0 || Number(process.env.PORT);
|
|
462
477
|
const protocol = process.env.PROTOCOL || "http";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/hyper-express",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.26",
|
|
4
4
|
"description": "Forklaunch framework for hyper-express.",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@forklaunch/hyper-express-fork": "^6.17.35",
|
|
29
|
-
"@scalar/express-api-reference": "^0.8.
|
|
29
|
+
"@scalar/express-api-reference": "^0.8.21",
|
|
30
30
|
"cors": "^2.8.5",
|
|
31
31
|
"live-directory": "^3.0.3",
|
|
32
32
|
"openapi3-ts": "^4.5.0",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"swagger-ui-dist": "^5.29.3",
|
|
35
35
|
"swagger-ui-express": "^5.0.1",
|
|
36
36
|
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.52.0",
|
|
37
|
-
"@forklaunch/core": "0.15.
|
|
38
|
-
"@forklaunch/
|
|
39
|
-
"@forklaunch/
|
|
37
|
+
"@forklaunch/core": "0.15.7",
|
|
38
|
+
"@forklaunch/common": "0.6.18",
|
|
39
|
+
"@forklaunch/validator": "0.10.18"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/js": "^9.37.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/qs": "^6.14.0",
|
|
47
47
|
"@types/swagger-ui-dist": "^3.30.6",
|
|
48
48
|
"@types/swagger-ui-express": "^4.1.8",
|
|
49
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
49
|
+
"@typescript/native-preview": "7.0.0-dev.20251008.1",
|
|
50
50
|
"jest": "^30.2.0",
|
|
51
51
|
"kill-port-process": "^3.2.1",
|
|
52
52
|
"prettier": "^3.6.2",
|