@lwrjs/view-registry 0.15.0-alpha.13 → 0.15.0-alpha.14
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/build/cjs/index.cjs +6 -3
- package/build/cjs/utils.cjs +4 -2
- package/build/es/index.js +3 -0
- package/build/es/utils.d.ts +1 -1
- package/build/es/utils.js +2 -1
- package/package.json +7 -7
package/build/cjs/index.cjs
CHANGED
|
@@ -281,7 +281,8 @@ var LwrViewRegistry = class {
|
|
|
281
281
|
...renderedLayout.metadata.serverDebug
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
|
-
cache: renderedContent.cache
|
|
284
|
+
cache: renderedContent.cache,
|
|
285
|
+
redirect: renderedContent.redirect
|
|
285
286
|
}, {
|
|
286
287
|
view: {...view, layoutTemplate: layoutTemplatePath},
|
|
287
288
|
viewParams,
|
|
@@ -361,7 +362,8 @@ var LwrViewRegistry = class {
|
|
|
361
362
|
assetReferences: (0, import_utils.reduceSourceAssetReferences)(linkedMetadata.assetReferences),
|
|
362
363
|
...viewRecord
|
|
363
364
|
},
|
|
364
|
-
cache: {ttl: pageTtl}
|
|
365
|
+
cache: {ttl: pageTtl},
|
|
366
|
+
redirect: renderedView.redirect
|
|
365
367
|
};
|
|
366
368
|
}
|
|
367
369
|
return {
|
|
@@ -371,7 +373,8 @@ var LwrViewRegistry = class {
|
|
|
371
373
|
assetReferences: (0, import_utils.reduceSourceAssetReferences)(linkedMetadata.assetReferences),
|
|
372
374
|
moduleResources: []
|
|
373
375
|
},
|
|
374
|
-
cache: {ttl: pageTtl}
|
|
376
|
+
cache: {ttl: pageTtl},
|
|
377
|
+
redirect: renderedView.redirect
|
|
375
378
|
};
|
|
376
379
|
}
|
|
377
380
|
};
|
package/build/cjs/utils.cjs
CHANGED
|
@@ -109,7 +109,8 @@ function normalizeRenderedResult({
|
|
|
109
109
|
renderedView,
|
|
110
110
|
metadata,
|
|
111
111
|
options,
|
|
112
|
-
cache
|
|
112
|
+
cache,
|
|
113
|
+
redirect
|
|
113
114
|
}) {
|
|
114
115
|
return {
|
|
115
116
|
renderedView,
|
|
@@ -122,7 +123,8 @@ function normalizeRenderedResult({
|
|
|
122
123
|
options: {
|
|
123
124
|
skipMetadataCollection: options ? options.skipMetadataCollection : false
|
|
124
125
|
},
|
|
125
|
-
cache: cache || {}
|
|
126
|
+
cache: cache || {},
|
|
127
|
+
redirect
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
function reduceSourceAssetReferences(assets) {
|
package/build/es/index.js
CHANGED
|
@@ -304,6 +304,7 @@ export class LwrViewRegistry {
|
|
|
304
304
|
},
|
|
305
305
|
},
|
|
306
306
|
cache: renderedContent.cache,
|
|
307
|
+
redirect: renderedContent.redirect,
|
|
307
308
|
},
|
|
308
309
|
// Render Content now contains a layout
|
|
309
310
|
{
|
|
@@ -396,6 +397,7 @@ export class LwrViewRegistry {
|
|
|
396
397
|
...viewRecord,
|
|
397
398
|
},
|
|
398
399
|
cache: { ttl: pageTtl },
|
|
400
|
+
redirect: renderedView.redirect,
|
|
399
401
|
};
|
|
400
402
|
}
|
|
401
403
|
return {
|
|
@@ -406,6 +408,7 @@ export class LwrViewRegistry {
|
|
|
406
408
|
moduleResources: [],
|
|
407
409
|
},
|
|
408
410
|
cache: { ttl: pageTtl },
|
|
411
|
+
redirect: renderedView.redirect,
|
|
409
412
|
};
|
|
410
413
|
}
|
|
411
414
|
}
|
package/build/es/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AssetReference, JsonCompatible, LinkedViewDefinition, LwrErrorRoute, LwrRoute, ModuleBundler, ModuleId, ModuleJson, ModuleRegistry, NormalizedRenderingResult, PublicModuleRegistry, RenderOptions, RenderedAssetReference, RenderingResult, ResourceDefinition, RouteHandlerViewResponse, RuntimeEnvironment, RuntimeParams, ViewModuleResourceContext, ViewPageContext, ViewParams, ViewRequest, ViewResponse } from '@lwrjs/types';
|
|
2
2
|
export type HTMLResource = Partial<ResourceDefinition>;
|
|
3
3
|
export declare function generateHtmlTag(definition: HTMLResource): Promise<string>;
|
|
4
|
-
export declare function normalizeRenderedResult({ renderedView, metadata, options, cache, }: RenderingResult): NormalizedRenderingResult;
|
|
4
|
+
export declare function normalizeRenderedResult({ renderedView, metadata, options, cache, redirect, }: RenderingResult): NormalizedRenderingResult;
|
|
5
5
|
export declare function reduceSourceAssetReferences(assets: AssetReference[]): RenderedAssetReference[];
|
|
6
6
|
export declare function normalizeRenderOptions(runtimeEnvironment: RuntimeEnvironment, overrideRenderOptions?: RenderOptions, baseRenderOptions?: RenderOptions): Required<RenderOptions>;
|
|
7
7
|
export declare function generatePageContext({ requestPath: url }: ViewRequest, { id, contentTemplate, properties }: LwrRoute | LwrErrorRoute, runtimeParams: RuntimeParams): JsonCompatible<ViewPageContext>;
|
package/build/es/utils.js
CHANGED
|
@@ -66,7 +66,7 @@ export async function generateHtmlTag(definition) {
|
|
|
66
66
|
}
|
|
67
67
|
throw new Error(`Invalid external Resource Definition: missing a "src": "${definition.specifier}"`);
|
|
68
68
|
}
|
|
69
|
-
export function normalizeRenderedResult({ renderedView, metadata, options, cache, }) {
|
|
69
|
+
export function normalizeRenderedResult({ renderedView, metadata, options, cache, redirect, }) {
|
|
70
70
|
return {
|
|
71
71
|
renderedView,
|
|
72
72
|
metadata: {
|
|
@@ -79,6 +79,7 @@ export function normalizeRenderedResult({ renderedView, metadata, options, cache
|
|
|
79
79
|
skipMetadataCollection: options ? options.skipMetadataCollection : false,
|
|
80
80
|
},
|
|
81
81
|
cache: cache || {},
|
|
82
|
+
redirect,
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
export function reduceSourceAssetReferences(assets) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.0-alpha.
|
|
7
|
+
"version": "0.15.0-alpha.14",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"build": "tsc -b"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/app-service": "0.15.0-alpha.
|
|
37
|
-
"@lwrjs/diagnostics": "0.15.0-alpha.
|
|
38
|
-
"@lwrjs/instrumentation": "0.15.0-alpha.
|
|
39
|
-
"@lwrjs/shared-utils": "0.15.0-alpha.
|
|
36
|
+
"@lwrjs/app-service": "0.15.0-alpha.14",
|
|
37
|
+
"@lwrjs/diagnostics": "0.15.0-alpha.14",
|
|
38
|
+
"@lwrjs/instrumentation": "0.15.0-alpha.14",
|
|
39
|
+
"@lwrjs/shared-utils": "0.15.0-alpha.14",
|
|
40
40
|
"lru-cache": "^10.4.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@lwrjs/types": "0.15.0-alpha.
|
|
43
|
+
"@lwrjs/types": "0.15.0-alpha.14"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=18.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "c34e441a349c30ed3b52459c64e92d8036013036"
|
|
49
49
|
}
|