@lwrjs/types 0.17.2-alpha.2 → 0.17.2-alpha.20

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/index.d.ts CHANGED
@@ -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,14 @@ 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
  }
54
51
  export interface RenderedAssetReference {
55
52
  url: string;
56
53
  tagName?: string;
57
54
  override?: UriDefinition;
55
+ integrity?: string;
58
56
  }
59
57
  export interface AssetReference extends RenderedAssetReference {
60
58
  importer?: string;
@@ -87,7 +85,6 @@ export interface LinkedViewDefinition {
87
85
  viewRecord: RenderedViewRecord;
88
86
  immutable: boolean;
89
87
  cache?: CacheResponse;
90
- status?: SsrStatus;
91
88
  nonce?: string;
92
89
  }
93
90
  export interface ViewRequestQs {
@@ -152,7 +149,6 @@ type ViewPluginLinkHook = (builder: LwrStringBuilder, viewContext: ViewTransform
152
149
  type ViewPluginLinkHookReturn = void | null | undefined | false | LwrStringBuilder | {
153
150
  builder?: LwrStringBuilder;
154
151
  cache?: CacheResponse;
155
- status?: SsrStatus;
156
152
  serverBundles?: Set<BundleDefinition>;
157
153
  };
158
154
  type ViewPluginOptimizeHook = (code: string, assetSource: AssetSource) => Promise<ViewPluginOptimizeHookReturn>;
@@ -224,12 +220,6 @@ export interface SsrRequestContext {
224
220
  basePath: string;
225
221
  crossRequestCache: Record<string, any>;
226
222
  }
227
- export interface SsrRequestOptions {
228
- bundleSpecifier: string;
229
- cacheDir: string;
230
- host?: string;
231
- requestDepth?: number;
232
- }
233
223
  export type MetaTag = {
234
224
  name?: string;
235
225
  httpEquiv?: string;
@@ -241,24 +231,26 @@ export type LinkTag = {
241
231
  rel?: string;
242
232
  fetchpriority?: 'high' | 'low' | 'auto';
243
233
  };
234
+ export interface HeadMarkup {
235
+ title?: string;
236
+ meta?: MetaTag[];
237
+ scripts?: {
238
+ body: string;
239
+ }[];
240
+ links?: LinkTag[];
241
+ styles?: {
242
+ body: string;
243
+ id?: string;
244
+ }[];
245
+ }
244
246
  export interface SsrDataResponse {
245
247
  props?: {
246
248
  [prop: string]: Json;
247
249
  };
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
- };
250
+ markup?: HeadMarkup;
260
251
  cache?: CacheResponse;
261
252
  status?: SsrStatus;
253
+ warnings?: (Error | string)[];
262
254
  }
263
255
  export interface SsrStatus {
264
256
  code: 301 | 302 | 429 | 503;
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.2",
11
+ "version": "0.17.2-alpha.20",
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": "739b237f5d7f2c1989142cb505a56cc763f21976"
32
+ "gitHead": "871213620dec8ff886be421339f1e90e86dbee96"
33
33
  }