@lwrjs/types 0.11.0-alpha.9 → 0.11.0
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 -2
- package/build/index.d.ts +13 -2
- package/build/serviceAPI/serviceAPI.d.ts +5 -1
- package/build/views.d.ts +2 -4
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface LwrGlobalConfig {
|
|
|
119
119
|
type RequiredPick<T, K extends keyof T> = {
|
|
120
120
|
[P in K]-?: T[P];
|
|
121
121
|
};
|
|
122
|
-
export type OnStartConfig = RequiredPick<LwrGlobalConfig, 'basePath' | 'i18n' | 'routes'>;
|
|
122
|
+
export type OnStartConfig = RequiredPick<LwrGlobalConfig, 'basePath' | 'i18n' | 'routes' | 'errorRoutes'>;
|
|
123
123
|
export interface BuildOptions {
|
|
124
124
|
target?: string;
|
|
125
125
|
input?: string;
|
|
@@ -152,7 +152,6 @@ export interface NormalizedLwrGlobalConfig extends Required<Omit<LwrGlobalConfig
|
|
|
152
152
|
}
|
|
153
153
|
export interface StaticSiteGenerator {
|
|
154
154
|
outputDir?: string;
|
|
155
|
-
locales?: string[];
|
|
156
155
|
skipCleanOutputDir?: boolean;
|
|
157
156
|
skipBaseDocumentGeneration?: boolean;
|
|
158
157
|
_additionalRoutePaths?: string[];
|
package/build/index.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ export interface ServerModeConfig {
|
|
|
157
157
|
compat: CompatMode;
|
|
158
158
|
watchFiles: boolean;
|
|
159
159
|
debug: boolean;
|
|
160
|
-
|
|
160
|
+
i18n: I18NConfig;
|
|
161
161
|
hmrEnabled: boolean;
|
|
162
162
|
immutableAssets: boolean;
|
|
163
163
|
env: {
|
|
@@ -179,11 +179,18 @@ export interface RuntimeEnvironment extends ServerModeConfig {
|
|
|
179
179
|
debug: boolean;
|
|
180
180
|
serverMode: string;
|
|
181
181
|
basePath: string;
|
|
182
|
+
defaultAssetPath: string;
|
|
182
183
|
}
|
|
183
184
|
export interface SourceMapRuntimeEnvironment extends RuntimeEnvironment {
|
|
184
185
|
sourceMapUrl?: string;
|
|
185
186
|
}
|
|
186
187
|
export type RuntimeParams = Record<string, string | number | boolean | null | undefined | Record<string, string>>;
|
|
188
|
+
export interface EnvironmentContext {
|
|
189
|
+
basePath: string;
|
|
190
|
+
locale: string;
|
|
191
|
+
assetBasePath: string;
|
|
192
|
+
uiBasePath: string;
|
|
193
|
+
}
|
|
187
194
|
export interface ModuleIdentity {
|
|
188
195
|
signature: string;
|
|
189
196
|
moduleId: AbstractModuleId;
|
|
@@ -481,6 +488,9 @@ declare global {
|
|
|
481
488
|
readonly env: ImportMetaEnv;
|
|
482
489
|
}
|
|
483
490
|
}
|
|
491
|
+
export type ServerData = {
|
|
492
|
+
[prop: string]: Json;
|
|
493
|
+
};
|
|
484
494
|
export interface ClientBootstrapConfig {
|
|
485
495
|
appId?: string;
|
|
486
496
|
bootstrapModule: string;
|
|
@@ -489,7 +499,7 @@ export interface ClientBootstrapConfig {
|
|
|
489
499
|
preloadModules?: string[];
|
|
490
500
|
rootComponent?: string;
|
|
491
501
|
rootComponents?: string[];
|
|
492
|
-
serverData?:
|
|
502
|
+
serverData?: ServerData;
|
|
493
503
|
customInit?: Function;
|
|
494
504
|
onError?: Function;
|
|
495
505
|
baseUrl?: string;
|
|
@@ -660,6 +670,7 @@ export interface SiteResource extends SiteArtifact {
|
|
|
660
670
|
export interface SiteBundle extends SiteArtifact {
|
|
661
671
|
version?: Version;
|
|
662
672
|
imports: string[];
|
|
673
|
+
dynamicImports?: string[];
|
|
663
674
|
includedModules?: string[];
|
|
664
675
|
}
|
|
665
676
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { ServerData } from '../index';
|
|
1
2
|
import type { RegisterLoaderHooks } from './loaderPlugins/loaderPlugins';
|
|
2
3
|
import type { RegisterHandleStaleModuleHook } from './handleStaleModule/handleStaleModule';
|
|
3
4
|
import type { AppMetadata } from './appMetadata/appMetadata';
|
|
4
|
-
export interface
|
|
5
|
+
export interface DataServiceAPI {
|
|
6
|
+
serverData: ServerData;
|
|
7
|
+
}
|
|
8
|
+
export interface ServiceAPI extends DataServiceAPI {
|
|
5
9
|
addLoaderPlugin: NoOp | RegisterLoaderHooks;
|
|
6
10
|
handleStaleModule: RegisterHandleStaleModuleHook;
|
|
7
11
|
appMetadata: AppMetadata;
|
package/build/views.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { LwrErrorRoute, LwrRoute, RouteHandlerFunction, RouteHandlerView, View } from './config.js';
|
|
3
|
-
import type { AssetSource, UriDefinition, Endpoints, FlattenedModuleGraphs, ImportMetadata, Json, LwrStringBuilder, ResourceDefinition, RuntimeEnvironment, RuntimeParams, Specifier } from './index.js';
|
|
3
|
+
import type { AssetSource, UriDefinition, Endpoints, FlattenedModuleGraphs, ImportMetadata, Json, LwrStringBuilder, ResourceDefinition, RuntimeEnvironment, RuntimeParams, Specifier, ServerData } from './index.js';
|
|
4
4
|
export type ViewIdentity = Pick<View, 'id' | 'rootComponent' | 'contentTemplate'>;
|
|
5
5
|
export interface ViewSource {
|
|
6
6
|
name: string;
|
|
@@ -44,9 +44,7 @@ export interface CustomElementReference {
|
|
|
44
44
|
export interface RenderedViewMetadata {
|
|
45
45
|
customElements: CustomElementReference[];
|
|
46
46
|
assetReferences: AssetReference[];
|
|
47
|
-
serverData?:
|
|
48
|
-
[prop: string]: Json;
|
|
49
|
-
};
|
|
47
|
+
serverData?: ServerData;
|
|
50
48
|
serverDebug?: {
|
|
51
49
|
message?: string;
|
|
52
50
|
};
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.11.0
|
|
11
|
+
"version": "0.11.0",
|
|
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"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "fbc883ea90a12672ce6f1adc2201144fda8762bd"
|
|
33
33
|
}
|