@lwrjs/types 0.6.0-alpha.8 → 0.6.1
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 +3 -1
- package/build/index.js +1 -1
- package/build/server.d.ts +7 -0
- package/build/serviceAPI/appMetadata/appMetadata.d.ts +7 -0
- package/build/serviceAPI/appMetadata/appMetadata.js +2 -0
- package/build/serviceAPI/serviceAPI.d.ts +2 -0
- package/package.json +2 -2
- package/build/metrics.d.ts +0 -2
- package/build/metrics.js +0 -2
package/build/config.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ export declare type ServiceEntry = [string, any?];
|
|
|
132
132
|
export declare type ServiceConfig = string | ServiceEntry;
|
|
133
133
|
export interface BundleConfig {
|
|
134
134
|
exclude?: string[];
|
|
135
|
+
UNSAFE_lwrDefaultExclude?: string[];
|
|
135
136
|
external?: Record<string, string>;
|
|
136
137
|
alias?: Record<string, string>;
|
|
137
138
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { Readable } from 'stream';
|
|
|
6
6
|
import { BundleConfig, EnvironmentConfig, HooksPlugin, LwrLockerConfig, NormalizedLwrErrorRoute, NormalizedLwrGlobalConfig, NormalizedLwrRoute, ResolverModuleRecord, RouteHandlerFunction, RouteHandlerView, View } from './config.js';
|
|
7
7
|
export * from './config.js';
|
|
8
8
|
export * from './server.js';
|
|
9
|
-
export * from './metrics.js';
|
|
10
9
|
export * from './serviceAPI/serviceAPI.js';
|
|
11
10
|
export * from './serviceAPI/loaderPlugins/loaderPlugins.js';
|
|
12
11
|
export * from './serviceAPI/handleStaleModule/handleStaleModule.js';
|
|
12
|
+
export * from './serviceAPI/appMetadata/appMetadata.js';
|
|
13
13
|
export declare type Json = undefined | null | boolean | number | string | Json[] | {
|
|
14
14
|
[prop: string]: Json;
|
|
15
15
|
};
|
|
@@ -571,6 +571,7 @@ export interface CompilerConfig {
|
|
|
571
571
|
name: string;
|
|
572
572
|
namespace?: string;
|
|
573
573
|
filename: string;
|
|
574
|
+
scopedStyles?: boolean;
|
|
574
575
|
}
|
|
575
576
|
export declare type SourceMap = string | null | undefined;
|
|
576
577
|
export interface CompiledMetadata {
|
|
@@ -613,6 +614,7 @@ export interface CompilerContext {
|
|
|
613
614
|
runtimeEnvironment: RuntimeEnvironment;
|
|
614
615
|
}
|
|
615
616
|
export interface ClientBootstrapConfig {
|
|
617
|
+
appId?: string;
|
|
616
618
|
bootstrapModule: string;
|
|
617
619
|
requiredModules?: string[];
|
|
618
620
|
autoBoot: boolean;
|
package/build/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from './config.js';
|
|
2
2
|
export * from './server.js';
|
|
3
|
-
export * from './metrics.js';
|
|
4
3
|
// -- ServiceAPI --------------------------------
|
|
5
4
|
export * from './serviceAPI/serviceAPI.js';
|
|
6
5
|
export * from './serviceAPI/loaderPlugins/loaderPlugins.js';
|
|
7
6
|
export * from './serviceAPI/handleStaleModule/handleStaleModule.js';
|
|
7
|
+
export * from './serviceAPI/appMetadata/appMetadata.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/build/server.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface InternalAppServer<T extends ServerTypes> {
|
|
|
36
36
|
useCompression(): void;
|
|
37
37
|
getRegexWildcard(): string;
|
|
38
38
|
}
|
|
39
|
+
export declare type PublicAppServer<T extends ServerTypes> = Pick<InternalAppServer<T>, 'use' | 'all' | 'get' | 'post' | 'getRegexWildcard'>;
|
|
39
40
|
export interface MiddlewareFunction {
|
|
40
41
|
(req: MiddlewareRequest, res: MiddlewareResponse, next: Function): void;
|
|
41
42
|
}
|
|
@@ -44,8 +45,13 @@ export interface MiddlewareRequest {
|
|
|
44
45
|
originalUrl: string;
|
|
45
46
|
path: string;
|
|
46
47
|
query: any;
|
|
48
|
+
body: any;
|
|
49
|
+
method: string;
|
|
50
|
+
protocol: string;
|
|
47
51
|
locale: string;
|
|
48
52
|
acceptsLanguages(): string[];
|
|
53
|
+
get(field: string): string | undefined;
|
|
54
|
+
cookie(name: string): string | undefined;
|
|
49
55
|
hasJsonParam(): boolean;
|
|
50
56
|
/**
|
|
51
57
|
* Return JSON if:
|
|
@@ -72,5 +78,6 @@ export interface MiddlewareResponse {
|
|
|
72
78
|
sendStatus(httpCode: number): void;
|
|
73
79
|
stream(stream: Readable): void;
|
|
74
80
|
type(type: string): MiddlewareResponse;
|
|
81
|
+
cookie(name: string, value?: string, options?: any): MiddlewareResponse;
|
|
75
82
|
}
|
|
76
83
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { RegisterLoaderHooks } from './loaderPlugins/loaderPlugins';
|
|
2
2
|
import { RegisterHandleStaleModuleHook } from './handleStaleModule/handleStaleModule';
|
|
3
|
+
import { AppMetadata } from './appMetadata/appMetadata';
|
|
3
4
|
export interface ServiceAPI {
|
|
4
5
|
addLoaderPlugin: NoOp | RegisterLoaderHooks;
|
|
5
6
|
handleStaleModule: RegisterHandleStaleModuleHook;
|
|
7
|
+
appMetadata: AppMetadata;
|
|
6
8
|
}
|
|
7
9
|
export interface NoOp {
|
|
8
10
|
(): void;
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.6.
|
|
11
|
+
"version": "0.6.1",
|
|
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": "4d7c44dfae958fe24ef1c94b0f60aa2b15e12f24"
|
|
31
31
|
}
|
package/build/metrics.d.ts
DELETED
package/build/metrics.js
DELETED