@lwrjs/types 0.17.2-alpha.3 → 0.17.2-alpha.30

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/cli.d.ts CHANGED
@@ -30,16 +30,24 @@ export type LocalDevMode = 'dev' | 'prod';
30
30
  */
31
31
  export interface LocalDevOptions {
32
32
  mode: LocalDevMode;
33
- siteDir: string;
34
33
  port: number;
34
+ basePath?: string;
35
35
  timeout?: number;
36
36
  logLevel?: string;
37
37
  open?: boolean;
38
- siteZip?: string;
39
38
  authToken?: string;
40
39
  sfCLI?: boolean;
40
+ }
41
+ export interface SitesLocalDevOptions extends LocalDevOptions {
42
+ siteDir: string;
43
+ siteZip?: string;
41
44
  writeSrcFilesToBundle?: boolean;
42
45
  inlineUpdate?: boolean;
43
46
  regenerateAllRoutes?: boolean;
44
47
  }
48
+ export interface ComponentLocalDevOptions extends LocalDevOptions {
49
+ name?: string;
50
+ namespacePaths?: string[];
51
+ rootDir?: string;
52
+ }
45
53
  //# sourceMappingURL=cli.d.ts.map
package/build/index.d.ts CHANGED
@@ -524,7 +524,7 @@ export interface ClientBootstrapConfig {
524
524
  customInit?: Function;
525
525
  onError?: Function;
526
526
  baseUrl?: string;
527
- disableInitDefer?: boolean;
527
+ initDeferDOM?: boolean;
528
528
  endpoints?: Endpoints;
529
529
  imports?: ImportMetadataImports;
530
530
  index?: ImportMetadataIndex;
@@ -532,6 +532,10 @@ export interface ClientBootstrapConfig {
532
532
  importMappings?: object;
533
533
  env?: any;
534
534
  }
535
+ export type GlobalThis = {
536
+ LWR: ClientBootstrapConfig;
537
+ [key: string]: unknown;
538
+ };
535
539
  export interface Endpoints {
536
540
  uris: Record<string, string>;
537
541
  modifiers?: Record<string, string>;
package/build/views.d.ts CHANGED
@@ -16,17 +16,14 @@ export interface CompiledView extends ViewSource {
16
16
  properties?: {
17
17
  [key: string]: unknown;
18
18
  };
19
- render: (context: any, runtimeEnvironment: RuntimeEnvironment) => Promise<RenderingResult>;
19
+ render: (context: Record<string, any>, runtimeEnvironment: RuntimeEnvironment) => Promise<RenderingResult>;
20
20
  }
21
- export type NormalizedRenderingResult = Required<Pick<RenderingResult, 'renderedView' | 'metadata' | 'options' | 'cache'>> & {
22
- status?: SsrStatus;
23
- };
21
+ export type NormalizedRenderingResult = Required<Pick<RenderingResult, 'renderedView' | 'metadata' | 'options' | 'cache'>>;
24
22
  export interface RenderingResult {
25
23
  renderedView: string;
26
24
  metadata?: RenderedViewMetadata;
27
25
  options?: RenderOptions;
28
26
  cache?: CacheResponse;
29
- status?: SsrStatus;
30
27
  }
31
28
  export interface RenderedView extends NormalizedRenderingResult {
32
29
  compiledView: CompiledView;
@@ -48,13 +45,18 @@ export interface RenderedViewMetadata {
48
45
  serverBundles?: Set<BundleDefinition>;
49
46
  serverData?: ServerData;
50
47
  serverDebug?: {
51
- message?: string;
48
+ warnings?: (Error | string)[];
52
49
  };
53
50
  }
51
+ export interface HtmlMetadata {
52
+ customElements: CustomElementReference[];
53
+ assetReferences: AssetReference[];
54
+ }
54
55
  export interface RenderedAssetReference {
55
56
  url: string;
56
57
  tagName?: string;
57
58
  override?: UriDefinition;
59
+ integrity?: string;
58
60
  }
59
61
  export interface AssetReference extends RenderedAssetReference {
60
62
  importer?: string;
@@ -87,7 +89,6 @@ export interface LinkedViewDefinition {
87
89
  viewRecord: RenderedViewRecord;
88
90
  immutable: boolean;
89
91
  cache?: CacheResponse;
90
- status?: SsrStatus;
91
92
  nonce?: string;
92
93
  }
93
94
  export interface ViewRequestQs {
@@ -152,7 +153,6 @@ type ViewPluginLinkHook = (builder: LwrStringBuilder, viewContext: ViewTransform
152
153
  type ViewPluginLinkHookReturn = void | null | undefined | false | LwrStringBuilder | {
153
154
  builder?: LwrStringBuilder;
154
155
  cache?: CacheResponse;
155
- status?: SsrStatus;
156
156
  serverBundles?: Set<BundleDefinition>;
157
157
  };
158
158
  type ViewPluginOptimizeHook = (code: string, assetSource: AssetSource) => Promise<ViewPluginOptimizeHookReturn>;
@@ -224,12 +224,6 @@ export interface SsrRequestContext {
224
224
  basePath: string;
225
225
  crossRequestCache: Record<string, any>;
226
226
  }
227
- export interface SsrRequestOptions {
228
- bundleSpecifier: string;
229
- cacheDir: string;
230
- host?: string;
231
- requestDepth?: number;
232
- }
233
227
  export type MetaTag = {
234
228
  name?: string;
235
229
  httpEquiv?: string;
@@ -241,28 +235,25 @@ export type LinkTag = {
241
235
  rel?: string;
242
236
  fetchpriority?: 'high' | 'low' | 'auto';
243
237
  };
238
+ export interface HeadMarkup {
239
+ title?: string;
240
+ meta?: MetaTag[];
241
+ scripts?: {
242
+ body: string;
243
+ }[];
244
+ links?: LinkTag[];
245
+ styles?: {
246
+ body: string;
247
+ id?: string;
248
+ }[];
249
+ }
244
250
  export interface SsrDataResponse {
245
251
  props?: {
246
252
  [prop: string]: Json;
247
253
  };
248
- markup?: {
249
- title?: string;
250
- meta?: MetaTag[];
251
- scripts?: {
252
- body: string;
253
- }[];
254
- links?: LinkTag[];
255
- styles?: {
256
- body: string;
257
- id?: string;
258
- }[];
259
- };
254
+ markup?: HeadMarkup;
260
255
  cache?: CacheResponse;
261
- status?: SsrStatus;
262
- }
263
- export interface SsrStatus {
264
- code: 301 | 302 | 429 | 503;
265
- location?: string;
256
+ warnings?: (Error | string)[];
266
257
  }
267
258
  export interface DirectToCoreProxy {
268
259
  origin: string;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "build": "tsc -b"
9
9
  },
10
10
  "type": "module",
11
- "version": "0.17.2-alpha.3",
11
+ "version": "0.17.2-alpha.30",
12
12
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
13
13
  "repository": {
14
14
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "chokidar": "^3.6.0"
28
28
  },
29
29
  "engines": {
30
- "node": ">=18.0.0"
30
+ "node": ">=20.0.0"
31
31
  },
32
- "gitHead": "43757693dfca356cff105d4896a7a3cbf11ac017"
32
+ "gitHead": "818bbb13d2d4b14d128c4c4f23229c9ce7458a23"
33
33
  }