@lwrjs/types 0.10.0-alpha.14 → 0.10.0-alpha.16
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 +11 -5
- package/build/index.d.ts +16 -1
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface View {
|
|
|
8
8
|
}
|
|
9
9
|
export interface LwrBaseRoute extends View {
|
|
10
10
|
properties?: Record<string, any>;
|
|
11
|
-
routeHandler?:
|
|
11
|
+
routeHandler?: ServiceConfig;
|
|
12
12
|
cache?: CacheResponse;
|
|
13
13
|
subRoutes?: string;
|
|
14
14
|
}
|
|
@@ -18,12 +18,14 @@ export interface LwrRoute extends LwrBaseRoute {
|
|
|
18
18
|
}
|
|
19
19
|
export interface NormalizedLwrRoute extends LwrRoute {
|
|
20
20
|
bootstrap: NormalizedLwrAppBootstrapConfig;
|
|
21
|
+
routeHandler?: ServiceEntry;
|
|
21
22
|
}
|
|
22
23
|
export interface LwrErrorRoute extends LwrBaseRoute {
|
|
23
24
|
status: 404 | 500;
|
|
24
25
|
}
|
|
25
26
|
export interface NormalizedLwrErrorRoute extends LwrErrorRoute {
|
|
26
27
|
bootstrap: NormalizedLwrAppBootstrapConfig;
|
|
28
|
+
routeHandler?: ServiceEntry;
|
|
27
29
|
}
|
|
28
30
|
export interface NormalizedLwrAppBootstrapConfig {
|
|
29
31
|
autoBoot: boolean;
|
|
@@ -44,12 +46,15 @@ export interface LwrLockerConfig {
|
|
|
44
46
|
clientOnly?: boolean;
|
|
45
47
|
}
|
|
46
48
|
export interface RouteHandlersConfig {
|
|
47
|
-
[id: string]:
|
|
49
|
+
[id: string]: ServiceConfig;
|
|
50
|
+
}
|
|
51
|
+
export interface NormalizedRouteHandlersConfig {
|
|
52
|
+
[id: string]: ServiceEntry;
|
|
48
53
|
}
|
|
49
54
|
export interface LocalizedViewRequest extends ViewRequest {
|
|
50
55
|
locale?: string;
|
|
51
56
|
}
|
|
52
|
-
export declare type RouteHandlerFunction = (viewRequest: LocalizedViewRequest, handlerContext: HandlerContext) => Promise<RouteHandlerViewResponse>;
|
|
57
|
+
export declare type RouteHandlerFunction = (viewRequest: LocalizedViewRequest, handlerContext: HandlerContext, routeHandlerOptions?: any) => Promise<RouteHandlerViewResponse>;
|
|
53
58
|
export interface ResourcePaths {
|
|
54
59
|
rootDir: string;
|
|
55
60
|
assets: AssetConfig[];
|
|
@@ -59,7 +64,7 @@ export interface ResourcePaths {
|
|
|
59
64
|
export declare type RouteHandlerView = Pick<View, 'contentTemplate' | 'layoutTemplate' | 'rootComponent'>;
|
|
60
65
|
export interface RouteHandlerViewApi {
|
|
61
66
|
hasViewResponse(view: RouteHandlerView, viewParams?: ViewParams, renderOptions?: RenderOptions): boolean;
|
|
62
|
-
getViewResponse(view: RouteHandlerView, viewParams?: ViewParams, renderOptions?: RenderOptions): Promise<ViewResponse
|
|
67
|
+
getViewResponse(view: RouteHandlerView, viewParams?: ViewParams, renderOptions?: RenderOptions): Promise<ViewResponse>;
|
|
63
68
|
}
|
|
64
69
|
export interface HandlerContext extends ResourcePaths {
|
|
65
70
|
route: LwrRoute | LwrErrorRoute;
|
|
@@ -115,6 +120,7 @@ export interface BuildOptions {
|
|
|
115
120
|
export interface NormalizedLwrGlobalConfig extends Required<Omit<LwrGlobalConfig, 'lwc'>> {
|
|
116
121
|
routes: NormalizedLwrRoute[];
|
|
117
122
|
errorRoutes: NormalizedLwrErrorRoute[];
|
|
123
|
+
routeHandlers: NormalizedRouteHandlersConfig;
|
|
118
124
|
assets: AssetConfig[];
|
|
119
125
|
lwrVersion: string;
|
|
120
126
|
amdLoader: string;
|
|
@@ -158,7 +164,7 @@ export interface Services {
|
|
|
158
164
|
uriTransformers: ResolvedServiceEntry<UriTransformPlugin>[];
|
|
159
165
|
}
|
|
160
166
|
export interface RouteHandlers {
|
|
161
|
-
[id: string]: RouteHandlerFunction;
|
|
167
|
+
[id: string]: [RouteHandlerFunction, any?];
|
|
162
168
|
}
|
|
163
169
|
interface AssetConfigCommon {
|
|
164
170
|
urlPath: string;
|
package/build/index.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export interface DynamicImportReference extends BaseDynamicModuleReference {
|
|
|
108
108
|
export interface ModuleRecord {
|
|
109
109
|
imports?: ImportModuleReference[];
|
|
110
110
|
dynamicImports?: DynamicImportReference[];
|
|
111
|
+
importMeta?: ImportMeta[];
|
|
111
112
|
}
|
|
112
113
|
export interface ChildHashObject {
|
|
113
114
|
[specifier: string]: string;
|
|
@@ -166,7 +167,7 @@ export interface FeatureFlags extends Record<string, boolean | undefined> {
|
|
|
166
167
|
LEGACY_LOADER?: boolean;
|
|
167
168
|
SSR_SANDBOX_WORKER?: boolean;
|
|
168
169
|
SSR_STATIC_BUNDLES?: boolean;
|
|
169
|
-
|
|
170
|
+
EXPERIMENTAL_UNVERSIONED_ALIASES?: boolean;
|
|
170
171
|
}
|
|
171
172
|
export interface RuntimeEnvironment extends ServerModeConfig {
|
|
172
173
|
apiVersion: string;
|
|
@@ -436,6 +437,7 @@ export declare type SourceMap = string | null | undefined;
|
|
|
436
437
|
export interface CompiledMetadata {
|
|
437
438
|
imports?: Import[];
|
|
438
439
|
dynamicImports?: DynamicImport[];
|
|
440
|
+
importMeta?: ImportMeta[];
|
|
439
441
|
}
|
|
440
442
|
export interface SourceLocation {
|
|
441
443
|
startColumn: number;
|
|
@@ -452,6 +454,10 @@ export interface DynamicImport {
|
|
|
452
454
|
importLocation: SourceLocation;
|
|
453
455
|
moduleNameType: ModuleNameType;
|
|
454
456
|
}
|
|
457
|
+
export interface ImportMeta {
|
|
458
|
+
statement: string;
|
|
459
|
+
location: SourceLocation;
|
|
460
|
+
}
|
|
455
461
|
export interface CompilerResult {
|
|
456
462
|
code: string;
|
|
457
463
|
map?: SourceMap;
|
|
@@ -460,6 +466,15 @@ export interface CompilerResult {
|
|
|
460
466
|
export interface BundleFiles {
|
|
461
467
|
[filename: string]: string;
|
|
462
468
|
}
|
|
469
|
+
interface ImportMetaEnv {
|
|
470
|
+
[key: string]: any;
|
|
471
|
+
SSR: boolean;
|
|
472
|
+
}
|
|
473
|
+
declare global {
|
|
474
|
+
interface ImportMeta {
|
|
475
|
+
readonly env: ImportMetaEnv;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
463
478
|
export interface ClientBootstrapConfig {
|
|
464
479
|
appId?: string;
|
|
465
480
|
bootstrapModule: string;
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.10.0-alpha.
|
|
11
|
+
"version": "0.10.0-alpha.16",
|
|
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": ">=16.0.0 <20"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c5a13d471330c0f738d0c783fd1b69f456c544bd"
|
|
33
33
|
}
|