@lwrjs/types 0.6.5 → 0.7.0-alpha.10
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/LICENSE +10 -0
- package/build/config.d.ts +1 -0
- package/build/index.d.ts +19 -3
- package/build/server.d.ts +2 -0
- package/package.json +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MIT LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020, Salesforce.com, Inc.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
|
+
|
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
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,7 +633,13 @@ 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;
|
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.
|
|
11
|
+
"version": "0.7.0-alpha.10",
|
|
12
12
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -26,5 +26,6 @@
|
|
|
26
26
|
],
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=14.15.4 <17"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "83c1e65e2169094cb55ac2c37e5aef16d3a9aa4a"
|
|
30
31
|
}
|