@lwrjs/types 0.15.0-alpha.12 → 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/config.d.ts +8 -0
- package/build/index.d.ts +1 -1
- package/build/views.d.ts +11 -2
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export interface LwrAppBootstrapConfig {
|
|
|
48
48
|
preloadModules?: string[];
|
|
49
49
|
lwrVersion?: string;
|
|
50
50
|
lwcVersion?: string;
|
|
51
|
+
preloadResources?: PreloadResources;
|
|
51
52
|
}
|
|
52
53
|
export interface NormalizedLwrAppBootstrapConfig extends Required<Omit<LwrAppBootstrapConfig, 'module'>> {
|
|
53
54
|
services: BootstrapService[];
|
|
@@ -314,5 +315,12 @@ export interface I18NConfig {
|
|
|
314
315
|
uriPattern?: UriPattern;
|
|
315
316
|
}
|
|
316
317
|
export type UriPattern = undefined | 'path-prefix';
|
|
318
|
+
export interface PreloadResources {
|
|
319
|
+
patterns: PreloadResourcePatterns[];
|
|
320
|
+
}
|
|
321
|
+
export interface PreloadResourcePatterns {
|
|
322
|
+
match: string;
|
|
323
|
+
attributes?: Record<string, string>;
|
|
324
|
+
}
|
|
317
325
|
export {};
|
|
318
326
|
//# sourceMappingURL=config.d.ts.map
|
package/build/index.d.ts
CHANGED
|
@@ -644,7 +644,7 @@ export interface DecisionTree<Artifact extends SiteArtifact> {
|
|
|
644
644
|
/**
|
|
645
645
|
* Retrieve an artifact from the tree based on a path of decisions
|
|
646
646
|
*/
|
|
647
|
-
find(siteArtifactId: string | Partial<AbstractModuleId>, debug?: boolean, localeId?: string): Artifact | undefined;
|
|
647
|
+
find(siteArtifactId: string | Partial<AbstractModuleId>, debug?: boolean, ssr?: boolean, localeId?: string): Artifact | undefined;
|
|
648
648
|
}
|
|
649
649
|
export interface SiteMetadata {
|
|
650
650
|
/**
|
package/build/views.d.ts
CHANGED
|
@@ -18,12 +18,15 @@ export interface CompiledView extends ViewSource {
|
|
|
18
18
|
};
|
|
19
19
|
render: (context: any, runtimeEnvironment: RuntimeEnvironment) => Promise<RenderingResult>;
|
|
20
20
|
}
|
|
21
|
-
export type NormalizedRenderingResult = Required<RenderingResult
|
|
21
|
+
export type NormalizedRenderingResult = Required<Pick<RenderingResult, 'renderedView' | 'metadata' | 'options' | 'cache'>> & {
|
|
22
|
+
redirect?: SsrRedirect;
|
|
23
|
+
};
|
|
22
24
|
export interface RenderingResult {
|
|
23
25
|
renderedView: string;
|
|
24
26
|
metadata?: RenderedViewMetadata;
|
|
25
27
|
options?: RenderOptions;
|
|
26
28
|
cache?: CacheResponse;
|
|
29
|
+
redirect?: SsrRedirect;
|
|
27
30
|
}
|
|
28
31
|
export interface RenderedView extends NormalizedRenderingResult {
|
|
29
32
|
compiledView: CompiledView;
|
|
@@ -86,6 +89,7 @@ export interface LinkedViewDefinition {
|
|
|
86
89
|
viewRecord: RenderedViewRecord;
|
|
87
90
|
immutable: boolean;
|
|
88
91
|
cache?: CacheResponse;
|
|
92
|
+
redirect?: SsrRedirect;
|
|
89
93
|
nonce?: string;
|
|
90
94
|
}
|
|
91
95
|
export interface ViewRequestQs {
|
|
@@ -212,7 +216,7 @@ export interface SsrRequestContext {
|
|
|
212
216
|
query: ViewRequestQs;
|
|
213
217
|
locale: string;
|
|
214
218
|
basePath: string;
|
|
215
|
-
|
|
219
|
+
crossRequestCache: Record<string, any>;
|
|
216
220
|
}
|
|
217
221
|
export interface SsrRequestOptions {
|
|
218
222
|
bundleSpecifier: string;
|
|
@@ -248,6 +252,11 @@ export interface SsrDataResponse {
|
|
|
248
252
|
}[];
|
|
249
253
|
};
|
|
250
254
|
cache?: CacheResponse;
|
|
255
|
+
redirect?: SsrRedirect;
|
|
256
|
+
}
|
|
257
|
+
export interface SsrRedirect {
|
|
258
|
+
status?: 301 | 302;
|
|
259
|
+
location: string;
|
|
251
260
|
}
|
|
252
261
|
export {};
|
|
253
262
|
//# sourceMappingURL=views.d.ts.map
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.15.0-alpha.
|
|
11
|
+
"version": "0.15.0-alpha.14",
|
|
12
12
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=18.0.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c34e441a349c30ed3b52459c64e92d8036013036"
|
|
33
33
|
}
|