@lwrjs/types 0.12.0-alpha.1 → 0.12.0-alpha.11
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 +12 -3
- package/build/index.d.ts +1 -1
- package/build/server.d.ts +4 -0
- package/build/views.d.ts +2 -4
- package/package.json +3 -3
package/build/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssetProvider, AssetTransformPlugin, BundleProvider, CacheResponse, LwrService, ModuleProvider, RenderOptions, ResourceProvider, RouteHandlerViewResponse, RuntimeEnvironment, ServerTypes, ServiceCtor, Specifier, UriTransformPlugin, ViewParams, ViewProvider, ViewRequest, ViewResponse, ViewTransformPlugin } from './index';
|
|
1
|
+
import type { AssetProvider, AssetTransformPlugin, BundleProvider, CacheResponse, LwrService, ModuleProvider, RenderOptions, ResourceProvider, RouteHandlerViewResponse, RuntimeEnvironment, ServerContext, ServerTypes, ServiceCtor, Specifier, UriTransformPlugin, ViewParams, ViewProvider, ViewRequest, ViewResponse, ViewTransformPlugin } from './index';
|
|
2
2
|
export interface View {
|
|
3
3
|
id: string;
|
|
4
4
|
rootComponent?: string;
|
|
@@ -40,6 +40,7 @@ export interface LwrAppBootstrapConfig {
|
|
|
40
40
|
services?: (string | BootstrapService)[];
|
|
41
41
|
configAsSrc?: boolean;
|
|
42
42
|
ssr?: boolean;
|
|
43
|
+
preloadData?: boolean;
|
|
43
44
|
mixedMode?: boolean;
|
|
44
45
|
module?: string | undefined;
|
|
45
46
|
preloadModules?: string[];
|
|
@@ -51,7 +52,6 @@ export interface NormalizedLwrAppBootstrapConfig extends Required<Omit<LwrAppBoo
|
|
|
51
52
|
export interface LwrLockerConfig {
|
|
52
53
|
enabled: boolean;
|
|
53
54
|
trustedComponents?: string[];
|
|
54
|
-
clientOnly?: boolean;
|
|
55
55
|
}
|
|
56
56
|
export interface RouteHandlersConfig {
|
|
57
57
|
[id: string]: string | null;
|
|
@@ -281,6 +281,15 @@ export interface HooksPlugin {
|
|
|
281
281
|
* For the `createHandler` runtime, these hooks are invoked during server context initialization.
|
|
282
282
|
*/
|
|
283
283
|
onStart?: (config: OnStartConfig) => void;
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* Attach instantiated route handlers, providers, and transformers directly to the server context.
|
|
287
|
+
*
|
|
288
|
+
* @remarks
|
|
289
|
+
* This is a temporary hook to enable a tactical solution for LWR@MRT local development
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
setupServerContext?: (context: ServerContext, startHooks: HooksPlugin[]) => Promise<void> | void;
|
|
284
293
|
}
|
|
285
294
|
export interface Locale {
|
|
286
295
|
id: string;
|
|
@@ -291,6 +300,6 @@ export interface I18NConfig {
|
|
|
291
300
|
locales: Locale[];
|
|
292
301
|
uriPattern?: UriPattern;
|
|
293
302
|
}
|
|
294
|
-
export type UriPattern = undefined | 'path-prefix'
|
|
303
|
+
export type UriPattern = undefined | 'path-prefix';
|
|
295
304
|
export {};
|
|
296
305
|
//# sourceMappingURL=config.d.ts.map
|
package/build/index.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export interface ServerModeConfig {
|
|
|
168
168
|
export interface FeatureFlags extends Record<string, boolean | string | undefined> {
|
|
169
169
|
ASSETS_ON_LAMBDA?: boolean;
|
|
170
170
|
LEGACY_LOADER?: boolean;
|
|
171
|
-
|
|
171
|
+
SSR_SANDBOX_VM?: boolean;
|
|
172
172
|
SSR_STATIC_BUNDLES?: boolean;
|
|
173
173
|
SSR_WITH_CSR_FALLBACK?: boolean;
|
|
174
174
|
EXPERIMENTAL_UNVERSIONED_ALIASES?: boolean;
|
package/build/server.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ export interface MiddlewareRequest {
|
|
|
82
82
|
* Return true when the environment path parameter exists and is supported
|
|
83
83
|
*/
|
|
84
84
|
validateEnvironmentRequest(config: NormalizedLwrGlobalConfig): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Return true when the api version path parameter exists and is supported
|
|
87
|
+
*/
|
|
88
|
+
validateApiVersion(config: NormalizedLwrGlobalConfig): boolean;
|
|
85
89
|
/**
|
|
86
90
|
* Use the request parameters to resolve the runtime context(ie. environment and parameters)
|
|
87
91
|
*/
|
package/build/views.d.ts
CHANGED
|
@@ -23,12 +23,10 @@ export interface RenderingResult {
|
|
|
23
23
|
renderedView: string;
|
|
24
24
|
metadata?: RenderedViewMetadata;
|
|
25
25
|
options?: RenderOptions;
|
|
26
|
+
cache?: CacheResponse;
|
|
26
27
|
}
|
|
27
|
-
export interface RenderedView {
|
|
28
|
+
export interface RenderedView extends NormalizedRenderingResult {
|
|
28
29
|
compiledView: CompiledView;
|
|
29
|
-
renderedView: string;
|
|
30
|
-
metadata: RenderedViewMetadata;
|
|
31
|
-
options: RenderOptions;
|
|
32
30
|
}
|
|
33
31
|
export interface CustomElementReference {
|
|
34
32
|
tagName: string;
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.12.0-alpha.
|
|
11
|
+
"version": "0.12.0-alpha.11",
|
|
12
12
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"chokidar": "^3.5.3"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "781951a5ef92ce735cbffce7c7a2a32c60bd3c16"
|
|
33
33
|
}
|