@lwrjs/types 0.10.0-alpha.3 → 0.10.0-alpha.6

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 CHANGED
@@ -37,7 +37,7 @@ export interface NormalizedLwrAppBootstrapConfig {
37
37
  module: string | undefined;
38
38
  preloadModules: string[];
39
39
  }
40
- export declare type LwrAppBootstrapConfig = Partial<NormalizedLwrAppBootstrapConfig>;
40
+ export type LwrAppBootstrapConfig = Partial<NormalizedLwrAppBootstrapConfig>;
41
41
  export interface LwrLockerConfig {
42
42
  enabled: boolean;
43
43
  trustedComponents?: string[];
@@ -49,14 +49,14 @@ export interface RouteHandlersConfig {
49
49
  export interface LocalizedViewRequest extends ViewRequest {
50
50
  locale?: string;
51
51
  }
52
- export declare type RouteHandlerFunction = (viewRequest: LocalizedViewRequest, handlerContext: HandlerContext) => Promise<RouteHandlerViewResponse>;
52
+ export type RouteHandlerFunction = (viewRequest: LocalizedViewRequest, handlerContext: HandlerContext) => Promise<RouteHandlerViewResponse>;
53
53
  export interface ResourcePaths {
54
54
  rootDir: string;
55
55
  assets: AssetConfig[];
56
56
  layoutsDir: string;
57
57
  contentDir: string;
58
58
  }
59
- export declare type RouteHandlerView = Pick<View, 'contentTemplate' | 'layoutTemplate' | 'rootComponent'>;
59
+ export type RouteHandlerView = Pick<View, 'contentTemplate' | 'layoutTemplate' | 'rootComponent'>;
60
60
  export interface RouteHandlerViewApi {
61
61
  hasViewResponse(view: RouteHandlerView, viewParams?: ViewParams, renderOptions?: RenderOptions): boolean;
62
62
  getViewResponse(view: RouteHandlerView, viewParams?: ViewParams, renderOptions?: RenderOptions): Promise<ViewResponse | undefined>;
@@ -167,19 +167,19 @@ export interface AssetDirConfig extends AssetConfigCommon {
167
167
  export interface AssetFileConfig extends AssetConfigCommon {
168
168
  file: string;
169
169
  }
170
- export declare type AssetConfig = AssetDirConfig | AssetFileConfig;
170
+ export type AssetConfig = AssetDirConfig | AssetFileConfig;
171
171
  export interface LwcConfig {
172
172
  modules: ResolverModuleRecord[];
173
173
  interchangeable?: string[];
174
174
  interchangeableModules?: InterchangeableModuleRecord[];
175
175
  }
176
- export declare type InterchangeableModuleMap = Map<Specifier, Map<Environment, Specifier>>;
176
+ export type InterchangeableModuleMap = Map<Specifier, Map<Environment, Specifier>>;
177
177
  export interface NormalizedLwcConfig extends Omit<LwcConfig, 'interchangeableModules'> {
178
178
  interchangeableModulesMap?: InterchangeableModuleMap;
179
179
  }
180
- export declare type ServiceEntry = [string, any?];
181
- export declare type ServiceConfig = string | ServiceEntry;
182
- export declare type ResolvedServiceEntry<T extends LwrService> = [ServiceCtor<T>, any?];
180
+ export type ServiceEntry = [string, any?];
181
+ export type ServiceConfig = string | ServiceEntry;
182
+ export type ResolvedServiceEntry<T extends LwrService> = [ServiceCtor<T>, any?];
183
183
  export interface BundleConfig {
184
184
  exclude?: string[];
185
185
  UNSAFE_lwrDefaultExclude?: string[];
@@ -189,7 +189,7 @@ export interface BundleConfig {
189
189
  export interface BundleConfigOverrides extends BundleConfig {
190
190
  appendExcludes?: boolean;
191
191
  }
192
- export declare type Environment = string;
192
+ export type Environment = string;
193
193
  export interface EnvironmentConfig {
194
194
  default?: Environment;
195
195
  supported?: Environment[];
package/build/index.d.ts CHANGED
@@ -16,16 +16,16 @@ export * from './serviceAPI/serviceAPI.js';
16
16
  export * from './serviceAPI/loaderPlugins/loaderPlugins.js';
17
17
  export * from './serviceAPI/handleStaleModule/handleStaleModule.js';
18
18
  export * from './serviceAPI/appMetadata/appMetadata.js';
19
- export declare type Json = undefined | null | boolean | number | string | Json[] | {
19
+ export type Json = undefined | null | boolean | number | string | Json[] | {
20
20
  [prop: string]: Json;
21
21
  };
22
- export declare type Dict<T> = Record<string, T>;
23
- export declare type JsonCompatible<T> = {
22
+ export type Dict<T> = Record<string, T>;
23
+ export type JsonCompatible<T> = {
24
24
  [P in keyof T]: T[P] extends Json ? T[P] : Pick<T, P> extends Required<Pick<T, P>> ? never : JsonCompatible<T[P]>;
25
25
  };
26
- export declare type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
27
- export declare type Specifier = string;
28
- export declare type Version = string;
26
+ export type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
27
+ export type Specifier = string;
28
+ export type Version = string;
29
29
  export interface AbstractModuleId {
30
30
  specifier: string;
31
31
  namespace?: string;
@@ -68,7 +68,7 @@ export interface ImportMetadataImports {
68
68
  export interface ImportMetadataIndex {
69
69
  [specifier: string]: string;
70
70
  }
71
- export declare type ModuleEntry = FsModuleEntry | VirtualModuleEntry;
71
+ export type ModuleEntry = FsModuleEntry | VirtualModuleEntry;
72
72
  interface BaseModuleEntry {
73
73
  id: string;
74
74
  entry: string;
@@ -147,8 +147,8 @@ export interface CodeSource {
147
147
  export interface SignedSource extends CodeSource {
148
148
  signedCode?: string;
149
149
  }
150
- export declare type CompatMode = '0' | '1';
151
- export declare type ModuleFormat = 'esm' | 'amd';
150
+ export type CompatMode = '0' | '1';
151
+ export type ModuleFormat = 'esm' | 'amd';
152
152
  export interface ServerModeConfig {
153
153
  format: ModuleFormat;
154
154
  bundle: boolean;
@@ -180,7 +180,7 @@ export interface RuntimeEnvironment extends ServerModeConfig {
180
180
  export interface SourceMapRuntimeEnvironment extends RuntimeEnvironment {
181
181
  sourceMapUrl?: string;
182
182
  }
183
- export declare type RuntimeParams = Record<string, string | number | boolean | null | undefined | Record<string, string>>;
183
+ export type RuntimeParams = Record<string, string | number | boolean | null | undefined | Record<string, string>>;
184
184
  export interface ModuleIdentity {
185
185
  signature: string;
186
186
  moduleId: AbstractModuleId;
@@ -236,14 +236,14 @@ export interface LwrAppEmitter {
236
236
  notifyViewSourceChanged(payload: CompiledView): void;
237
237
  notifyAssetSourceChanged(payload: AssetSource): void;
238
238
  }
239
- export declare type EVENT_MODULE_DEFINITION_CHANGED = 'module_definition_changed';
239
+ export type EVENT_MODULE_DEFINITION_CHANGED = 'module_definition_changed';
240
240
  export interface ModuleDefinitionChangedEvent {
241
241
  eventType: EVENT_MODULE_DEFINITION_CHANGED;
242
242
  payload: LinkedModuleDefinition;
243
243
  }
244
- export declare type EVENT_MODULE_SOURCE_CHANGED = 'module_source_changed';
245
- export declare type EVENT_ASSET_SOURCE_CHANGED = 'asset_source_changed';
246
- export declare type EVENT_VIEW_SOURCE_CHANGED = 'view_source_changed';
244
+ export type EVENT_MODULE_SOURCE_CHANGED = 'module_source_changed';
245
+ export type EVENT_ASSET_SOURCE_CHANGED = 'asset_source_changed';
246
+ export type EVENT_VIEW_SOURCE_CHANGED = 'view_source_changed';
247
247
  export interface ModuleSourceChangedEvent {
248
248
  eventType: EVENT_MODULE_SOURCE_CHANGED;
249
249
  payload: ModuleCompiled;
@@ -261,7 +261,7 @@ export interface ModuleProvider {
261
261
  getModule<T extends AbstractModuleId>(moduleId: T, runtimeParams?: RuntimeParams): Promise<ModuleCompiled | undefined>;
262
262
  getModuleEntry<T extends AbstractModuleId>(moduleId: T, runtimeParams?: RuntimeParams): Promise<ModuleEntry | undefined>;
263
263
  }
264
- export declare type LwrService = ModuleProvider | ResourceProvider | ViewProvider | AssetProvider | HooksPlugin | AssetTransformPlugin | ViewTransformPlugin;
264
+ export type LwrService = ModuleProvider | ResourceProvider | ViewProvider | AssetProvider | HooksPlugin | AssetTransformPlugin | ViewTransformPlugin;
265
265
  export interface ServiceCtor<T extends LwrService, R extends Record<string, Json> = {}> {
266
266
  new (providerConfig: R, serviceProviderConfig?: any, ...args: any[]): T;
267
267
  }
@@ -275,7 +275,7 @@ export interface ModuleRegistry {
275
275
  resolveModuleUriSync<R extends RuntimeEnvironment, S extends string | undefined>(moduleId: Required<Pick<ModuleId, 'specifier' | 'version'>>, signature: S, runtimeEnvironment: R, runtimeParams?: RuntimeParams): string;
276
276
  getPublicApi(): PublicModuleRegistry;
277
277
  }
278
- export declare type PublicModuleRegistry = Pick<ModuleRegistry, 'getModule' | 'getModuleEntry' | 'getLinkedModule' | 'resolveModuleUri'>;
278
+ export type PublicModuleRegistry = Pick<ModuleRegistry, 'getModule' | 'getModuleEntry' | 'getLinkedModule' | 'resolveModuleUri'>;
279
279
  export interface BundleProvider {
280
280
  name: string;
281
281
  bundle<T extends AbstractModuleId, R extends RuntimeEnvironment>(moduleId: T, runtimeEnvironment: R, runtimeParams: RuntimeParams, configOverrides?: BundleConfig): Promise<BundleDefinition | undefined>;
@@ -286,7 +286,7 @@ export interface ModuleBundler {
286
286
  resolveModuleUri(moduleId: Required<Pick<ModuleId, 'specifier' | 'version'>>, runtimeEnvironment: RuntimeEnvironment, runtimeParams?: RuntimeParams, signature?: string): Promise<string>;
287
287
  getPublicApi(): PublicModuleBundler;
288
288
  }
289
- export declare type PublicModuleBundler = Pick<ModuleBundler, 'getModuleBundle' | 'resolveModuleUri'>;
289
+ export type PublicModuleBundler = Pick<ModuleBundler, 'getModuleBundle' | 'resolveModuleUri'>;
290
290
  export interface BundleRecord {
291
291
  imports?: BaseModuleReference[];
292
292
  dynamicImports?: BaseDynamicModuleReference[];
@@ -343,7 +343,7 @@ export interface AssetUri {
343
343
  entry: string;
344
344
  external?: boolean;
345
345
  }
346
- export declare type ResourceType = 'application/javascript' | 'application/json' | 'text/css' | 'lwr-importmap' | 'module' | string;
346
+ export type ResourceType = 'application/javascript' | 'application/json' | 'text/css' | 'lwr-importmap' | 'module' | string;
347
347
  export interface ResourceDefinition {
348
348
  specifier?: string;
349
349
  type: ResourceType;
@@ -370,13 +370,13 @@ export interface AssetSource {
370
370
  type?: AssetType;
371
371
  noTransform?: boolean;
372
372
  }
373
- export declare type AssetType = 'asset' | 'content-asset' | 'external' | 'unknown';
373
+ export type AssetType = 'asset' | 'content-asset' | 'external' | 'unknown';
374
374
  export interface AssetDefinition extends AssetSource {
375
375
  uri: string;
376
376
  type: AssetType;
377
377
  stream: (encoding?: BufferEncoding) => Readable;
378
378
  }
379
- export declare type ResourceJson = Pick<ResourceDefinition, 'type' | 'src'>;
379
+ export type ResourceJson = Pick<ResourceDefinition, 'type' | 'src'>;
380
380
  export interface ResourceProvider {
381
381
  name: string;
382
382
  getResource<R extends ResourceIdentifier, T extends BootstrapRuntimeEnvironment>(resourceIdentity: R, runtimeEnvironment: T, runtimeParams?: RuntimeParams): Promise<ResourceDefinition | undefined>;
@@ -385,19 +385,19 @@ export interface AssetProvider {
385
385
  name: string;
386
386
  getAsset(assetIdentifier: AssetIdentifier): Promise<AssetSource | undefined>;
387
387
  }
388
- export declare type TransformPluginContext = Record<string, any>;
389
- declare type AssetPluginTransformHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginTransformHookReturn>;
390
- declare type AssetPluginTransformHookReturn = null | undefined | false | string | Buffer | {
388
+ export type TransformPluginContext = Record<string, any>;
389
+ type AssetPluginTransformHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginTransformHookReturn>;
390
+ type AssetPluginTransformHookReturn = null | undefined | false | string | Buffer | {
391
391
  code: string | Buffer;
392
392
  context?: TransformPluginContext;
393
393
  };
394
- declare type AssetPluginExtractMetaHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginExtractMetaHookReturn>;
395
- declare type AssetPluginExtractMetaHookReturn = null | undefined | false | {
394
+ type AssetPluginExtractMetaHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginExtractMetaHookReturn>;
395
+ type AssetPluginExtractMetaHookReturn = null | undefined | false | {
396
396
  metadata?: AssetMetadata;
397
397
  context?: TransformPluginContext;
398
398
  };
399
- declare type AssetPluginOptimizeHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginOptimizeHookReturn>;
400
- declare type AssetPluginOptimizeHookReturn = null | undefined | false | string | Buffer | {
399
+ type AssetPluginOptimizeHook = (code: string | Buffer, assetSource: AssetSource, context?: TransformPluginContext) => Promise<AssetPluginOptimizeHookReturn>;
400
+ type AssetPluginOptimizeHookReturn = null | undefined | false | string | Buffer | {
401
401
  code: string | Buffer;
402
402
  map?: any;
403
403
  context?: TransformPluginContext;
@@ -417,7 +417,7 @@ export interface ResourceRegistry {
417
417
  resolveResourceUri<R extends ResourceIdentifier, T extends RuntimeEnvironment>(resourceIdentity: R, runtimeEnvironment: T): string;
418
418
  getPublicApi(): PublicResourceRegistry;
419
419
  }
420
- export declare type PublicResourceRegistry = Pick<ResourceRegistry, 'getResource' | 'resolveResourceUri'>;
420
+ export type PublicResourceRegistry = Pick<ResourceRegistry, 'getResource' | 'resolveResourceUri'>;
421
421
  export interface AssetRegistry {
422
422
  name: string;
423
423
  addAssetProviders(provider: AssetProvider[]): void;
@@ -426,14 +426,14 @@ export interface AssetRegistry {
426
426
  resolveAssetUri<R extends AssetIdentifier, T extends RuntimeEnvironment>(resourceIdentity: R, runtimeEnvironment: T): Promise<AssetUri>;
427
427
  getPublicApi(): PublicAssetRegistry;
428
428
  }
429
- export declare type PublicAssetRegistry = Pick<AssetRegistry, 'getAsset' | 'resolveAssetUri'>;
429
+ export type PublicAssetRegistry = Pick<AssetRegistry, 'getAsset' | 'resolveAssetUri'>;
430
430
  export interface LwcCompilerConfig {
431
431
  name: string;
432
432
  namespace?: string;
433
433
  filename: string;
434
434
  scopedStyles?: boolean;
435
435
  }
436
- export declare type SourceMap = string | null | undefined;
436
+ export type SourceMap = string | null | undefined;
437
437
  export interface CompiledMetadata {
438
438
  imports?: Import[];
439
439
  dynamicImports?: DynamicImport[];
@@ -446,7 +446,7 @@ export interface Import {
446
446
  moduleSpecifier: string;
447
447
  location: SourceLocation;
448
448
  }
449
- export declare type ModuleNameType = 'string' | 'unresolved';
449
+ export type ModuleNameType = 'string' | 'unresolved';
450
450
  export interface DynamicImport {
451
451
  moduleSpecifier: string;
452
452
  location: SourceLocation;
@@ -541,7 +541,7 @@ export interface GraphDepthOptions {
541
541
  dynamic: number;
542
542
  includeId?: IncludeIdHook;
543
543
  }
544
- export declare type GraphDepth = 'all' | 'direct' | 'none';
544
+ export type GraphDepth = 'all' | 'direct' | 'none';
545
545
  export interface FlatGraphNode {
546
546
  specifier: Specifier;
547
547
  static: Specifier[];
@@ -551,14 +551,14 @@ export interface GraphNode {
551
551
  static: Specifier[];
552
552
  dynamic: Specifier[];
553
553
  }
554
- export declare type URIMap = Record<string, string>;
555
- export declare type LinkedModuleDefinitionMap = Record<string, LinkedModuleDefinition | BundleDefinition>;
554
+ export type URIMap = Record<string, string>;
555
+ export type LinkedModuleDefinitionMap = Record<string, LinkedModuleDefinition | BundleDefinition>;
556
556
  export interface FlattenedModuleGraphs {
557
557
  graphs: FlatGraphNode[];
558
558
  uriMap: URIMap;
559
559
  linkedDefinitions: LinkedModuleDefinitionMap;
560
560
  }
561
- export declare type ImportMapImports = {
561
+ export type ImportMapImports = {
562
562
  [key: string]: string;
563
563
  };
564
564
  export interface LwrBuilderOverwriteOptions {
package/build/server.d.ts CHANGED
@@ -5,8 +5,8 @@ import Koa, { Context } from 'koa';
5
5
  import http from 'http';
6
6
  import { Readable } from 'stream';
7
7
  import type { NormalizedLwrGlobalConfig, RuntimeContext, RuntimeEnvironment } from './index.js';
8
- export declare type ServerTypes = 'koa' | 'express' | 'fs';
9
- export declare type ServerTypeImpl<T extends ServerTypes> = T extends 'koa' ? Koa : T extends 'express' ? ExpressApp : T extends 'fs' ? LwrDispatcher : never;
8
+ export type ServerTypes = 'koa' | 'express' | 'fs';
9
+ export type ServerTypeImpl<T extends ServerTypes> = T extends 'koa' ? Koa : T extends 'express' ? ExpressApp : T extends 'fs' ? LwrDispatcher : never;
10
10
  export interface FsContext extends Context {
11
11
  fs?: {
12
12
  headers?: http.IncomingHttpHeaders;
@@ -35,8 +35,8 @@ export interface InternalAppServer<T extends ServerTypes> {
35
35
  useCompression(): void;
36
36
  getRegexWildcard(): string;
37
37
  }
38
- export declare type PublicAppServer<T extends ServerTypes> = Pick<InternalAppServer<T>, 'use' | 'all' | 'get' | 'post' | 'getRegexWildcard'>;
39
- export declare type InternalAppServerOptions = {
38
+ export type PublicAppServer<T extends ServerTypes> = Pick<InternalAppServer<T>, 'use' | 'all' | 'get' | 'post' | 'getRegexWildcard'>;
39
+ export type InternalAppServerOptions = {
40
40
  app?: ServerTypeImpl<ServerTypes>;
41
41
  basePath?: string;
42
42
  };
@@ -46,7 +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
+ export type Headers = http.IncomingHttpHeaders;
50
50
  export interface MiddlewareRequest {
51
51
  params: any;
52
52
  originalUrl: string;
@@ -1,4 +1,4 @@
1
- export declare type AppMetadata = {
1
+ export type AppMetadata = {
2
2
  appId?: string;
3
3
  bootstrapModule: string;
4
4
  rootComponent?: string;
@@ -1,12 +1,12 @@
1
1
  export interface RegisterHandleStaleModuleHook {
2
2
  (hook: HandleStaleModuleHook): void;
3
3
  }
4
- export declare type HandleStaleModuleHookArgs = {
4
+ export type HandleStaleModuleHookArgs = {
5
5
  name: string;
6
6
  oldUrl: string;
7
7
  newUrl: string;
8
8
  };
9
- export declare type DEPRECIATEDHandleStaleModuleHookArgs = {
9
+ export type DEPRECIATEDHandleStaleModuleHookArgs = {
10
10
  name: string;
11
11
  oldHash: string;
12
12
  newHash: string;
@@ -1,11 +1,11 @@
1
1
  import { ImportMetadata } from '../..';
2
- declare type ResolveParams = {
2
+ type ResolveParams = {
3
3
  parentUrl: string;
4
4
  };
5
5
  export interface RegisterLoaderHooks {
6
6
  (hook: LoaderHooks): void;
7
7
  }
8
- export declare type LoaderHooks = {
8
+ export type LoaderHooks = {
9
9
  resolveModule?: ResolveModuleHook;
10
10
  loadModule?: LoadModuleHook;
11
11
  loadMapping?: LoadMappingHook;
@@ -19,19 +19,19 @@ export interface LoadModuleHook {
19
19
  export interface LoadMappingHook {
20
20
  (specifier: string, params: MappingResolveParams): Promise<MappingResponse> | MappingResponse;
21
21
  }
22
- export declare type MappingResolveParams = {
22
+ export type MappingResolveParams = {
23
23
  knownModules: string[];
24
24
  };
25
- export declare type MappingResponse = ImportMetadata | null;
26
- export declare type URLResponse = {
25
+ export type MappingResponse = ImportMetadata | null;
26
+ export type URLResponse = {
27
27
  url: string;
28
28
  };
29
- export declare type CustomResponse = {
29
+ export type CustomResponse = {
30
30
  data: string;
31
31
  status: number;
32
32
  statusText?: string;
33
33
  };
34
- export declare type LoadHookResponse = CustomResponse | globalThis.Response | null;
35
- export declare type ResolveHookResponse = URLResponse | string | null;
34
+ export type LoadHookResponse = CustomResponse | globalThis.Response | null;
35
+ export type ResolveHookResponse = URLResponse | string | null;
36
36
  export {};
37
37
  //# sourceMappingURL=loaderPlugins.d.ts.map
package/build/views.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { LwrErrorRoute, LwrRoute, RouteHandlerFunction, RouteHandlerView, View } from './config.js';
3
3
  import { AssetSource, AssetUri, Endpoints, FlattenedModuleGraphs, ImportMetadata, Json, LwrStringBuilder, ResourceDefinition, RuntimeEnvironment, RuntimeParams, Specifier, TransformPluginContext } from './index.js';
4
- export declare type ViewIdentity = Pick<View, 'rootComponent' | 'contentTemplate'>;
4
+ export type ViewIdentity = Pick<View, 'rootComponent' | 'contentTemplate'>;
5
5
  export interface ViewSource {
6
6
  name: string;
7
7
  slug: string;
@@ -18,7 +18,7 @@ export interface CompiledView extends ViewSource {
18
18
  };
19
19
  render: (context?: any) => Promise<RenderingResult>;
20
20
  }
21
- export declare type NormalizedRenderingResult = Required<RenderingResult>;
21
+ export type NormalizedRenderingResult = Required<RenderingResult>;
22
22
  export interface RenderingResult {
23
23
  renderedView: string;
24
24
  metadata?: RenderedViewMetadata;
@@ -107,7 +107,7 @@ export interface ViewResponse {
107
107
  viewDefinition?: LinkedViewDefinition;
108
108
  };
109
109
  }
110
- export declare type RouteHandlerViewResponse = ViewDefinitionResponse | ViewResponse;
110
+ export type RouteHandlerViewResponse = ViewDefinitionResponse | ViewResponse;
111
111
  export interface ViewDefinitionResponse {
112
112
  status?: number;
113
113
  view: RouteHandlerView;
@@ -133,14 +133,14 @@ export interface ViewTranformPluginContext {
133
133
  };
134
134
  importer?: string;
135
135
  }
136
- declare type ViewPluginLinkHook = (builder: LwrStringBuilder, viewContext: ViewTranformPluginContext, viewMetadata: RenderedViewMetadata, context?: TransformPluginContext) => Promise<ViewPluginLinkHookReturn>;
137
- declare type ViewPluginLinkHookReturn = void | null | undefined | false | LwrStringBuilder | {
136
+ type ViewPluginLinkHook = (builder: LwrStringBuilder, viewContext: ViewTranformPluginContext, viewMetadata: RenderedViewMetadata, context?: TransformPluginContext) => Promise<ViewPluginLinkHookReturn>;
137
+ type ViewPluginLinkHookReturn = void | null | undefined | false | LwrStringBuilder | {
138
138
  builder?: LwrStringBuilder;
139
139
  context?: TransformPluginContext;
140
140
  cache?: CacheResponse;
141
141
  };
142
- declare type ViewPluginOptimizeHook = (code: string, assetSource: AssetSource, context?: TransformPluginContext) => Promise<ViewPluginOptimizeHookReturn>;
143
- declare type ViewPluginOptimizeHookReturn = null | undefined | false | string | {
142
+ type ViewPluginOptimizeHook = (code: string, assetSource: AssetSource, context?: TransformPluginContext) => Promise<ViewPluginOptimizeHookReturn>;
143
+ type ViewPluginOptimizeHookReturn = null | undefined | false | string | {
144
144
  code: string;
145
145
  map?: any;
146
146
  context?: TransformPluginContext;
@@ -152,7 +152,7 @@ export interface ViewTransformHooks {
152
152
  export interface ViewTransformPlugin extends Partial<ViewTransformHooks> {
153
153
  name: string;
154
154
  }
155
- export declare type ViewParams = Record<string, Json>;
155
+ export type ViewParams = Record<string, Json>;
156
156
  export interface ViewInfo {
157
157
  id: string;
158
158
  url: string;
@@ -169,7 +169,7 @@ export interface ViewPageContext {
169
169
  title?: string;
170
170
  url: string;
171
171
  }
172
- export declare type ViewModuleResourceContext = {
172
+ export type ViewModuleResourceContext = {
173
173
  isPreload?: boolean;
174
174
  isSSR?: boolean;
175
175
  async?: boolean;
@@ -183,7 +183,7 @@ export interface ViewRegistry {
183
183
  hasViewDefinition<R extends RuntimeEnvironment>(view: View, viewParams: ViewParams, runtimeEnvironment: R, runtimeParams?: RuntimeParams, renderOptions?: RenderOptions): boolean;
184
184
  getPublicApi(): PublicViewRegistry;
185
185
  }
186
- export declare type PublicViewRegistry = Pick<ViewRegistry, 'getView' | 'getViewDefinition'>;
186
+ export type PublicViewRegistry = Pick<ViewRegistry, 'getView' | 'getViewDefinition'>;
187
187
  export interface ViewHandler {
188
188
  getViewContent(viewRequest: ViewRequest, route: LwrRoute | LwrErrorRoute, runtimeEnvironment: RuntimeEnvironment, runtimeParams: RuntimeParams): Promise<ViewResponse>;
189
189
  getViewJson(viewRequest: ViewRequest, route: LwrRoute | LwrErrorRoute, runtimeEnvironment: RuntimeEnvironment, runtimeParams: RuntimeParams): Promise<ViewResponse>;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "build": "tsc -b"
9
9
  },
10
10
  "type": "module",
11
- "version": "0.10.0-alpha.3",
11
+ "version": "0.10.0-alpha.6",
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": "e5c38c00c2ef094961b65e7dffa1ca6ee7c5f734"
32
+ "gitHead": "9592d07bd5204eb85c9cb8b576e2a267a798ce00"
33
33
  }