@jay-framework/jay-stack-cli 0.15.1 → 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.
@@ -142,3 +142,20 @@ jay-stack params wix-stores/product-page
142
142
  ```
143
143
 
144
144
  Params are always strings (URL params).
145
+
146
+ ## Query Parameters
147
+
148
+ URL query parameters (`?page=2&sort=price`) are available in the **fast render phase only** via `props.query`:
149
+
150
+ ```typescript
151
+ .withFastRender(async (props, carryForward, dbService) => {
152
+ const page = parseInt(props.query.page || '1');
153
+ const sort = props.query.sort || 'name';
154
+ const products = await dbService.getProducts({ page, sort });
155
+ return phaseOutput({ products, currentPage: page }, {});
156
+ })
157
+ ```
158
+
159
+ - `props.query` is `Record<string, string>` — empty `{}` when no query string
160
+ - Not available in the slow phase (compile error) — slow results are cached by path params only
161
+ - In the interactive phase, use `new URLSearchParams(window.location.search)` directly
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
- const expressServer = app.listen(devServerPort, () => {
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
- expressServer.closeAllConnections();
2482
- await new Promise((resolve) => expressServer.close(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.1",
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.1",
28
- "@jay-framework/compiler-shared": "^0.15.1",
29
- "@jay-framework/dev-server": "^0.15.1",
30
- "@jay-framework/editor-server": "^0.15.1",
31
- "@jay-framework/fullstack-component": "^0.15.1",
32
- "@jay-framework/logger": "^0.15.1",
33
- "@jay-framework/plugin-validator": "^0.15.1",
34
- "@jay-framework/stack-server-runtime": "^0.15.1",
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.1",
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",