@jay-framework/stack-server-runtime 0.15.1 → 0.15.2
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.d.ts +1 -1
- package/dist/index.js +6 -3
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ declare function slowRenderInstances(discovered: DiscoveredHeadlessInstance[], h
|
|
|
131
131
|
*/
|
|
132
132
|
declare function validateForEachInstances(forEachInstances: ForEachHeadlessInstance[], headlessInstanceComponents: HeadlessInstanceComponent[]): string[];
|
|
133
133
|
|
|
134
|
-
declare function renderFastChangingData(pageParams: object, pageProps: PageProps, carryForward: object, parts: Array<DevServerPagePart>, instancePhaseData?: InstancePhaseData, forEachInstances?: ForEachHeadlessInstance[], headlessInstanceComponents?: HeadlessInstanceComponent[], mergedSlowViewState?: object): Promise<AnyFastRenderResult>;
|
|
134
|
+
declare function renderFastChangingData(pageParams: object, pageProps: PageProps, carryForward: object, parts: Array<DevServerPagePart>, instancePhaseData?: InstancePhaseData, forEachInstances?: ForEachHeadlessInstance[], headlessInstanceComponents?: HeadlessInstanceComponent[], mergedSlowViewState?: object, query?: Record<string, string>): Promise<AnyFastRenderResult>;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Action metadata loaded from .jay-action files.
|
package/dist/index.js
CHANGED
|
@@ -365,7 +365,7 @@ function resolveBinding(binding, item) {
|
|
|
365
365
|
}
|
|
366
366
|
return binding;
|
|
367
367
|
}
|
|
368
|
-
async function renderFastChangingData(pageParams, pageProps, carryForward, parts, instancePhaseData, forEachInstances, headlessInstanceComponents, mergedSlowViewState) {
|
|
368
|
+
async function renderFastChangingData(pageParams, pageProps, carryForward, parts, instancePhaseData, forEachInstances, headlessInstanceComponents, mergedSlowViewState, query = {}) {
|
|
369
369
|
let fastViewState = {};
|
|
370
370
|
let fastCarryForward = {};
|
|
371
371
|
for (const part of parts) {
|
|
@@ -376,6 +376,7 @@ async function renderFastChangingData(pageParams, pageProps, carryForward, parts
|
|
|
376
376
|
const partProps = {
|
|
377
377
|
...pageProps,
|
|
378
378
|
...pageParams,
|
|
379
|
+
query,
|
|
379
380
|
...contractInfo && {
|
|
380
381
|
contractName: contractInfo.contractName,
|
|
381
382
|
metadata: contractInfo.metadata
|
|
@@ -412,7 +413,8 @@ async function renderFastChangingData(pageParams, pageProps, carryForward, parts
|
|
|
412
413
|
continue;
|
|
413
414
|
const services = resolveServices(comp.compDefinition.services);
|
|
414
415
|
const cf = instancePhaseData.carryForwards[coordKey];
|
|
415
|
-
const
|
|
416
|
+
const instanceProps = { ...instance.props, query };
|
|
417
|
+
const fastResult = comp.compDefinition.slowlyRender ? await comp.compDefinition.fastRender(instanceProps, cf, ...services) : await comp.compDefinition.fastRender(instanceProps, ...services);
|
|
416
418
|
if (fastResult.kind === "PhaseOutput") {
|
|
417
419
|
const instanceSlowVS = carryForward?.__instanceSlowViewStates?.[coordKey];
|
|
418
420
|
instanceViewStates[coordKey] = instanceSlowVS ? { ...instanceSlowVS, ...fastResult.rendered } : fastResult.rendered;
|
|
@@ -457,7 +459,8 @@ async function renderFastChangingData(pageParams, pageProps, carryForward, parts
|
|
|
457
459
|
cf = slowResult.carryForward;
|
|
458
460
|
}
|
|
459
461
|
}
|
|
460
|
-
const
|
|
462
|
+
const forEachProps = { ...props, query };
|
|
463
|
+
const fastResult = comp.compDefinition.slowlyRender ? await comp.compDefinition.fastRender(forEachProps, cf, ...services) : await comp.compDefinition.fastRender(forEachProps, ...services);
|
|
461
464
|
if (fastResult.kind === "PhaseOutput") {
|
|
462
465
|
const coord = computeForEachInstanceKey(
|
|
463
466
|
trackByValue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/stack-server-runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"test:watch": "vitest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jay-framework/compiler-jay-html": "^0.15.
|
|
30
|
-
"@jay-framework/compiler-shared": "^0.15.
|
|
31
|
-
"@jay-framework/component": "^0.15.
|
|
32
|
-
"@jay-framework/fullstack-component": "^0.15.
|
|
33
|
-
"@jay-framework/logger": "^0.15.
|
|
34
|
-
"@jay-framework/runtime": "^0.15.
|
|
35
|
-
"@jay-framework/ssr-runtime": "^0.15.
|
|
36
|
-
"@jay-framework/stack-route-scanner": "^0.15.
|
|
37
|
-
"@jay-framework/view-state-merge": "^0.15.
|
|
29
|
+
"@jay-framework/compiler-jay-html": "^0.15.2",
|
|
30
|
+
"@jay-framework/compiler-shared": "^0.15.2",
|
|
31
|
+
"@jay-framework/component": "^0.15.2",
|
|
32
|
+
"@jay-framework/fullstack-component": "^0.15.2",
|
|
33
|
+
"@jay-framework/logger": "^0.15.2",
|
|
34
|
+
"@jay-framework/runtime": "^0.15.2",
|
|
35
|
+
"@jay-framework/ssr-runtime": "^0.15.2",
|
|
36
|
+
"@jay-framework/stack-route-scanner": "^0.15.2",
|
|
37
|
+
"@jay-framework/view-state-merge": "^0.15.2",
|
|
38
38
|
"yaml": "^2.3.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@jay-framework/dev-environment": "^0.15.
|
|
42
|
-
"@jay-framework/jay-cli": "^0.15.
|
|
43
|
-
"@jay-framework/stack-client-runtime": "^0.15.
|
|
41
|
+
"@jay-framework/dev-environment": "^0.15.2",
|
|
42
|
+
"@jay-framework/jay-cli": "^0.15.2",
|
|
43
|
+
"@jay-framework/stack-client-runtime": "^0.15.2",
|
|
44
44
|
"@types/express": "^5.0.2",
|
|
45
45
|
"@types/node": "^22.15.21",
|
|
46
46
|
"nodemon": "^3.0.3",
|