@lwrjs/types 0.9.0-alpha.26 → 0.9.0-alpha.28
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 +11 -0
- package/build/index.d.ts +8 -2
- package/package.json +2 -2
package/build/config.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface NormalizedLwrAppBootstrapConfig {
|
|
|
35
35
|
configAsSrc: boolean;
|
|
36
36
|
ssr: boolean;
|
|
37
37
|
module: string | undefined;
|
|
38
|
+
preloadModules: [];
|
|
38
39
|
}
|
|
39
40
|
export declare type LwrAppBootstrapConfig = Partial<NormalizedLwrAppBootstrapConfig>;
|
|
40
41
|
export interface LwrLockerConfig {
|
|
@@ -99,6 +100,16 @@ export interface LwrGlobalConfig {
|
|
|
99
100
|
staticSiteGenerator?: StaticSiteGenerator;
|
|
100
101
|
locker?: LwrLockerConfig;
|
|
101
102
|
}
|
|
103
|
+
export interface BuildOptions {
|
|
104
|
+
target?: string;
|
|
105
|
+
input?: string;
|
|
106
|
+
output?: string;
|
|
107
|
+
routes?: string[];
|
|
108
|
+
modules?: string[];
|
|
109
|
+
locales?: string[];
|
|
110
|
+
clean?: boolean;
|
|
111
|
+
mode?: string;
|
|
112
|
+
}
|
|
102
113
|
export interface NormalizedLwrGlobalConfig extends Required<Omit<LwrGlobalConfig, 'lwc'>> {
|
|
103
114
|
routes: NormalizedLwrRoute[];
|
|
104
115
|
errorRoutes: NormalizedLwrErrorRoute[];
|
package/build/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { WatchOptions } from 'chokidar';
|
|
|
6
6
|
import { EventEmitter } from 'events';
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import { Readable } from 'stream';
|
|
9
|
-
import { BundleConfig, EnvironmentConfig, HooksPlugin, LwrLockerConfig, NormalizedLwrErrorRoute, NormalizedLwrGlobalConfig, NormalizedLwrRoute, ResolverModuleRecord, BundleConfigOverrides, RouteHandlers } from './config.js';
|
|
9
|
+
import { BundleConfig, EnvironmentConfig, HooksPlugin, LwrLockerConfig, NormalizedLwrErrorRoute, NormalizedLwrGlobalConfig, NormalizedLwrRoute, ResolverModuleRecord, BundleConfigOverrides, RouteHandlers, AssetConfig } from './config.js';
|
|
10
10
|
import { AssetReference, CompiledView, PublicViewRegistry, ViewProvider, ViewRegistry, ViewTransformPlugin } from './views.js';
|
|
11
11
|
export * from './lwr-shim.js';
|
|
12
12
|
export * from './config.js';
|
|
@@ -168,6 +168,7 @@ export interface FeatureFlags extends Record<string, boolean | undefined> {
|
|
|
168
168
|
LEGACY_LOADER?: boolean;
|
|
169
169
|
SSR_STATIC_BUNDLES?: boolean;
|
|
170
170
|
SSR_SANDBOX_WORKER?: boolean;
|
|
171
|
+
ASSETS_ON_LAMBDA?: boolean;
|
|
171
172
|
}
|
|
172
173
|
export interface RuntimeEnvironment extends ServerModeConfig {
|
|
173
174
|
apiVersion: string;
|
|
@@ -194,6 +195,7 @@ export interface ResourceIdentity {
|
|
|
194
195
|
export interface AssetIdentity {
|
|
195
196
|
assetId: AssetIdentifier;
|
|
196
197
|
signature: string;
|
|
198
|
+
immutable: boolean;
|
|
197
199
|
}
|
|
198
200
|
export interface RuntimeContext {
|
|
199
201
|
runtimeEnvironment: RuntimeEnvironment;
|
|
@@ -311,6 +313,7 @@ export interface ProviderAppConfig {
|
|
|
311
313
|
esmLoader: string;
|
|
312
314
|
environment?: EnvironmentConfig;
|
|
313
315
|
bundleConfig: BundleConfig;
|
|
316
|
+
assets: AssetConfig[];
|
|
314
317
|
}
|
|
315
318
|
export interface ProviderContext {
|
|
316
319
|
appObserver: Pick<LwrAppObserver, 'onModuleDefinitionChange' | 'onModuleSourceChange' | 'onAssetSourceChange' | 'onViewSourceChange'>;
|
|
@@ -338,6 +341,7 @@ export interface AssetUri {
|
|
|
338
341
|
uri: string;
|
|
339
342
|
immutable: boolean;
|
|
340
343
|
entry: string;
|
|
344
|
+
external?: boolean;
|
|
341
345
|
}
|
|
342
346
|
export declare type ResourceType = 'application/javascript' | 'application/json' | 'text/css' | 'lwr-importmap' | 'module' | string;
|
|
343
347
|
export interface ResourceDefinition {
|
|
@@ -363,6 +367,8 @@ export interface AssetSource {
|
|
|
363
367
|
content: (encoding?: BufferEncoding) => string | Buffer;
|
|
364
368
|
uri?: string;
|
|
365
369
|
metadata?: AssetMetadata;
|
|
370
|
+
type?: AssetType;
|
|
371
|
+
noTransform?: boolean;
|
|
366
372
|
}
|
|
367
373
|
export declare type AssetType = 'asset' | 'content-asset' | 'external' | 'unknown';
|
|
368
374
|
export interface AssetDefinition extends AssetSource {
|
|
@@ -377,7 +383,7 @@ export interface ResourceProvider {
|
|
|
377
383
|
}
|
|
378
384
|
export interface AssetProvider {
|
|
379
385
|
name: string;
|
|
380
|
-
getAsset(
|
|
386
|
+
getAsset(assetIdentifier: AssetIdentifier): Promise<AssetSource | undefined>;
|
|
381
387
|
}
|
|
382
388
|
export declare type TransformPluginContext = Record<string, any>;
|
|
383
389
|
declare type AssetPluginTransformHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginTransformHookReturn>;
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc -b"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"version": "0.9.0-alpha.
|
|
11
|
+
"version": "0.9.0-alpha.28",
|
|
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 <20"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "da7d0c58d2e34958a289a18f43c5998e85e72986"
|
|
33
33
|
}
|