@lwrjs/types 0.7.0-alpha.0 → 0.7.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 +1 -0
- package/build/index.d.ts +24 -3
- package/build/server.d.ts +2 -0
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -152,10 +152,13 @@ export interface ServerModeConfig {
|
|
|
152
152
|
defaultLocale: string;
|
|
153
153
|
hmrEnabled: boolean;
|
|
154
154
|
immutableAssets: boolean;
|
|
155
|
-
|
|
155
|
+
env: {
|
|
156
|
+
NODE_ENV: string;
|
|
157
|
+
};
|
|
158
|
+
featureFlags: FeatureFlags;
|
|
156
159
|
}
|
|
157
|
-
export interface
|
|
158
|
-
|
|
160
|
+
export interface FeatureFlags {
|
|
161
|
+
LEGACY_LOADER: boolean;
|
|
159
162
|
}
|
|
160
163
|
export interface RuntimeEnvironment extends ServerModeConfig {
|
|
161
164
|
apiVersion: string;
|
|
@@ -413,6 +416,9 @@ export interface RenderedView {
|
|
|
413
416
|
}
|
|
414
417
|
export interface CustomElementReference {
|
|
415
418
|
tagName: string;
|
|
419
|
+
props?: {
|
|
420
|
+
[name: string]: string;
|
|
421
|
+
};
|
|
416
422
|
children?: CustomElementReference[];
|
|
417
423
|
location?: {
|
|
418
424
|
startOffset: number;
|
|
@@ -610,8 +616,12 @@ export interface Compiler {
|
|
|
610
616
|
getModuleMetadata(compiledSource: string): Promise<Partial<CompiledMetadata>>;
|
|
611
617
|
lockerize(compiledModule: ModuleCompiled, lockerConfig: LwrLockerConfig, sourcemap: boolean): CompilerResult;
|
|
612
618
|
minifyJavascript(source: string): Promise<CompilerResult>;
|
|
619
|
+
parseJavascript(source: string, options: ParseOptions): Promise<CompilerResult>;
|
|
613
620
|
minifyCSS(source: string): Promise<CompilerResult>;
|
|
614
621
|
}
|
|
622
|
+
export interface ParseOptions {
|
|
623
|
+
envMode: string;
|
|
624
|
+
}
|
|
615
625
|
export interface CompilerContext {
|
|
616
626
|
runtimeEnvironment: RuntimeEnvironment;
|
|
617
627
|
}
|
|
@@ -623,12 +633,19 @@ export interface ClientBootstrapConfig {
|
|
|
623
633
|
preloadModules?: string[];
|
|
624
634
|
rootComponent?: string;
|
|
625
635
|
rootComponents?: string[];
|
|
636
|
+
rootProperties?: {
|
|
637
|
+
[specifier: string]: {
|
|
638
|
+
[key: string]: string;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
626
641
|
customInit?: Function;
|
|
642
|
+
onError?: Function;
|
|
627
643
|
baseUrl?: string;
|
|
628
644
|
disableInitDefer?: boolean;
|
|
629
645
|
endpoints?: Endpoints;
|
|
630
646
|
imports?: ImportMetadataImports;
|
|
631
647
|
index?: ImportMetadataIndex;
|
|
648
|
+
metricsConfig?: MetricsConfig;
|
|
632
649
|
/**
|
|
633
650
|
/* @deprecated for mapping endpoint syntax
|
|
634
651
|
/* Import map for the loader to resolve modules, defaults to a "lwr-importmap" script tag
|
|
@@ -647,6 +664,10 @@ export interface BootstrapJson {
|
|
|
647
664
|
[id: string]: ModuleJson;
|
|
648
665
|
};
|
|
649
666
|
}
|
|
667
|
+
export interface MetricsConfig {
|
|
668
|
+
enableModuleFetchTracking?: boolean;
|
|
669
|
+
enableMappingFetchTracking?: boolean;
|
|
670
|
+
}
|
|
650
671
|
export interface ServerContext {
|
|
651
672
|
appObserver: LwrAppObserver;
|
|
652
673
|
appEmitter: LwrAppEmitter;
|
package/build/server.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export interface InternalAppServerConstructable {
|
|
|
46
46
|
export interface MiddlewareFunction {
|
|
47
47
|
(req: MiddlewareRequest, res: MiddlewareResponse, next: Function): void;
|
|
48
48
|
}
|
|
49
|
+
export declare type Headers = http.IncomingHttpHeaders;
|
|
49
50
|
export interface MiddlewareRequest {
|
|
50
51
|
params: any;
|
|
51
52
|
originalUrl: string;
|
|
@@ -53,6 +54,7 @@ export interface MiddlewareRequest {
|
|
|
53
54
|
query: any;
|
|
54
55
|
body: any;
|
|
55
56
|
method: string;
|
|
57
|
+
headers: Headers;
|
|
56
58
|
protocol: string;
|
|
57
59
|
locale: string;
|
|
58
60
|
acceptsLanguages(): string[];
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.7.0-alpha.
|
|
11
|
+
"version": "0.7.0-alpha.11",
|
|
12
12
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=14.15.4 <17"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "0b272d15905ec7b949974e8c5ba668a98eaa7e2d"
|
|
31
31
|
}
|