@lwrjs/types 0.6.0-alpha.9 → 0.6.2
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 +2 -0
- package/build/index.d.ts +5 -1
- package/build/index.js +1 -1
- package/build/server.d.ts +13 -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
|
@@ -65,6 +65,7 @@ export interface LwrGlobalConfig {
|
|
|
65
65
|
lwrConfigFile?: string;
|
|
66
66
|
port?: number;
|
|
67
67
|
serverMode?: string;
|
|
68
|
+
basePath?: string;
|
|
68
69
|
rootDir?: string;
|
|
69
70
|
cacheDir?: string;
|
|
70
71
|
contentDir?: string;
|
|
@@ -132,6 +133,7 @@ export declare type ServiceEntry = [string, any?];
|
|
|
132
133
|
export declare type ServiceConfig = string | ServiceEntry;
|
|
133
134
|
export interface BundleConfig {
|
|
134
135
|
exclude?: string[];
|
|
136
|
+
UNSAFE_lwrDefaultExclude?: string[];
|
|
135
137
|
external?: Record<string, string>;
|
|
136
138
|
alias?: Record<string, string>;
|
|
137
139
|
}
|
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
|
};
|
|
@@ -162,6 +162,7 @@ export interface RuntimeEnvironment extends ServerModeConfig {
|
|
|
162
162
|
lwrVersion: string;
|
|
163
163
|
debug: boolean;
|
|
164
164
|
serverMode: string;
|
|
165
|
+
basePath: string;
|
|
165
166
|
}
|
|
166
167
|
export interface SourceMapRuntimeEnvironment extends RuntimeEnvironment {
|
|
167
168
|
sourceMapUrl?: string;
|
|
@@ -274,6 +275,7 @@ export interface ProviderAppConfig {
|
|
|
274
275
|
modules: ResolverModuleRecord[];
|
|
275
276
|
routes: NormalizedLwrRoute[];
|
|
276
277
|
errorRoutes: NormalizedLwrErrorRoute[];
|
|
278
|
+
basePath: string;
|
|
277
279
|
rootDir: string;
|
|
278
280
|
contentDir: string;
|
|
279
281
|
layoutsDir: string;
|
|
@@ -571,6 +573,7 @@ export interface CompilerConfig {
|
|
|
571
573
|
name: string;
|
|
572
574
|
namespace?: string;
|
|
573
575
|
filename: string;
|
|
576
|
+
scopedStyles?: boolean;
|
|
574
577
|
}
|
|
575
578
|
export declare type SourceMap = string | null | undefined;
|
|
576
579
|
export interface CompiledMetadata {
|
|
@@ -613,6 +616,7 @@ export interface CompilerContext {
|
|
|
613
616
|
runtimeEnvironment: RuntimeEnvironment;
|
|
614
617
|
}
|
|
615
618
|
export interface ClientBootstrapConfig {
|
|
619
|
+
appId?: string;
|
|
616
620
|
bootstrapModule: string;
|
|
617
621
|
requiredModules?: string[];
|
|
618
622
|
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,13 @@ 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'>;
|
|
40
|
+
export declare type InternalAppServerOptions = {
|
|
41
|
+
basePath?: string;
|
|
42
|
+
};
|
|
43
|
+
export interface InternalAppServerConstructable {
|
|
44
|
+
new (options: InternalAppServerOptions): InternalAppServer<ServerTypes>;
|
|
45
|
+
}
|
|
39
46
|
export interface MiddlewareFunction {
|
|
40
47
|
(req: MiddlewareRequest, res: MiddlewareResponse, next: Function): void;
|
|
41
48
|
}
|
|
@@ -44,8 +51,13 @@ export interface MiddlewareRequest {
|
|
|
44
51
|
originalUrl: string;
|
|
45
52
|
path: string;
|
|
46
53
|
query: any;
|
|
54
|
+
body: any;
|
|
55
|
+
method: string;
|
|
56
|
+
protocol: string;
|
|
47
57
|
locale: string;
|
|
48
58
|
acceptsLanguages(): string[];
|
|
59
|
+
get(field: string): string | undefined;
|
|
60
|
+
cookie(name: string): string | undefined;
|
|
49
61
|
hasJsonParam(): boolean;
|
|
50
62
|
/**
|
|
51
63
|
* Return JSON if:
|
|
@@ -72,5 +84,6 @@ export interface MiddlewareResponse {
|
|
|
72
84
|
sendStatus(httpCode: number): void;
|
|
73
85
|
stream(stream: Readable): void;
|
|
74
86
|
type(type: string): MiddlewareResponse;
|
|
87
|
+
cookie(name: string, value?: string, options?: any): MiddlewareResponse;
|
|
75
88
|
}
|
|
76
89
|
//# 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.2",
|
|
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": "ef85bdc48adde58b7c648561d67acbb408bbe189"
|
|
31
31
|
}
|
package/build/metrics.d.ts
DELETED
package/build/metrics.js
DELETED