@jay-framework/jay-stack-cli 0.15.2 ā 0.15.3
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/dist/index.js +7 -4
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import express from "express";
|
|
3
|
+
import http from "node:http";
|
|
3
4
|
import { mkDevServer, createViteForCli } from "@jay-framework/dev-server";
|
|
4
5
|
import { createEditorServer } from "@jay-framework/editor-server";
|
|
5
6
|
import getPort from "get-port";
|
|
@@ -2406,6 +2407,7 @@ async function startDevServer(options = {}) {
|
|
|
2406
2407
|
outputDir: "build"
|
|
2407
2408
|
};
|
|
2408
2409
|
const app = express();
|
|
2410
|
+
const httpServer = http.createServer(app);
|
|
2409
2411
|
const devServerPort = await getPort({ port: resolvedConfig.devServer.portRange });
|
|
2410
2412
|
const log = getLogger();
|
|
2411
2413
|
const editorServer = createEditorServer({
|
|
@@ -2443,7 +2445,8 @@ async function startDevServer(options = {}) {
|
|
|
2443
2445
|
projectRootFolder: process.cwd(),
|
|
2444
2446
|
publicBaseUrlPath: "/",
|
|
2445
2447
|
jayRollupConfig: jayOptions,
|
|
2446
|
-
logLevel: options.logLevel
|
|
2448
|
+
logLevel: options.logLevel,
|
|
2449
|
+
httpServer
|
|
2447
2450
|
});
|
|
2448
2451
|
app.use(server);
|
|
2449
2452
|
const publicPath = path.resolve(resolvedConfig.devServer.publicFolder);
|
|
@@ -2456,7 +2459,7 @@ async function startDevServer(options = {}) {
|
|
|
2456
2459
|
app.get(route.path, route.handler);
|
|
2457
2460
|
});
|
|
2458
2461
|
generatePageDefinitionFiles(routes, jayOptions.tsConfigFilePath, process.cwd());
|
|
2459
|
-
|
|
2462
|
+
httpServer.listen(devServerPort, () => {
|
|
2460
2463
|
log.important(`š Jay Stack dev server started successfully!`);
|
|
2461
2464
|
log.important(`š± Dev Server: http://localhost:${devServerPort}`);
|
|
2462
2465
|
log.important(`šØ Editor Server: http://localhost:${editorPort} (ID: ${editorId})`);
|
|
@@ -2478,8 +2481,8 @@ async function startDevServer(options = {}) {
|
|
|
2478
2481
|
const shutdown = async () => {
|
|
2479
2482
|
log.important("\nš Shutting down servers...");
|
|
2480
2483
|
await editorServer.stop();
|
|
2481
|
-
|
|
2482
|
-
await new Promise((resolve) =>
|
|
2484
|
+
httpServer.closeAllConnections();
|
|
2485
|
+
await new Promise((resolve) => httpServer.close(resolve));
|
|
2483
2486
|
process.exit(0);
|
|
2484
2487
|
};
|
|
2485
2488
|
if (options.testMode) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/jay-stack-cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"test:watch": "vitest"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jay-framework/compiler-jay-html": "^0.15.
|
|
28
|
-
"@jay-framework/compiler-shared": "^0.15.
|
|
29
|
-
"@jay-framework/dev-server": "^0.15.
|
|
30
|
-
"@jay-framework/editor-server": "^0.15.
|
|
31
|
-
"@jay-framework/fullstack-component": "^0.15.
|
|
32
|
-
"@jay-framework/logger": "^0.15.
|
|
33
|
-
"@jay-framework/plugin-validator": "^0.15.
|
|
34
|
-
"@jay-framework/stack-server-runtime": "^0.15.
|
|
27
|
+
"@jay-framework/compiler-jay-html": "^0.15.3",
|
|
28
|
+
"@jay-framework/compiler-shared": "^0.15.3",
|
|
29
|
+
"@jay-framework/dev-server": "^0.15.3",
|
|
30
|
+
"@jay-framework/editor-server": "^0.15.3",
|
|
31
|
+
"@jay-framework/fullstack-component": "^0.15.3",
|
|
32
|
+
"@jay-framework/logger": "^0.15.3",
|
|
33
|
+
"@jay-framework/plugin-validator": "^0.15.3",
|
|
34
|
+
"@jay-framework/stack-server-runtime": "^0.15.3",
|
|
35
35
|
"chalk": "^4.1.2",
|
|
36
36
|
"commander": "^14.0.0",
|
|
37
37
|
"express": "^5.0.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"yaml": "^2.3.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@jay-framework/dev-environment": "^0.15.
|
|
45
|
+
"@jay-framework/dev-environment": "^0.15.3",
|
|
46
46
|
"@types/express": "^5.0.2",
|
|
47
47
|
"@types/node": "^22.15.21",
|
|
48
48
|
"nodemon": "^3.0.3",
|