@lwrjs/types 0.15.0-alpha.45 → 0.15.0-alpha.46

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.
Files changed (2) hide show
  1. package/build/views.d.ts +8 -8
  2. package/package.json +2 -2
package/build/views.d.ts CHANGED
@@ -19,14 +19,14 @@ export interface CompiledView extends ViewSource {
19
19
  render: (context: any, runtimeEnvironment: RuntimeEnvironment) => Promise<RenderingResult>;
20
20
  }
21
21
  export type NormalizedRenderingResult = Required<Pick<RenderingResult, 'renderedView' | 'metadata' | 'options' | 'cache'>> & {
22
- redirect?: SsrRedirect;
22
+ status?: SsrStatus;
23
23
  };
24
24
  export interface RenderingResult {
25
25
  renderedView: string;
26
26
  metadata?: RenderedViewMetadata;
27
27
  options?: RenderOptions;
28
28
  cache?: CacheResponse;
29
- redirect?: SsrRedirect;
29
+ status?: SsrStatus;
30
30
  }
31
31
  export interface RenderedView extends NormalizedRenderingResult {
32
32
  compiledView: CompiledView;
@@ -87,7 +87,7 @@ export interface LinkedViewDefinition {
87
87
  viewRecord: RenderedViewRecord;
88
88
  immutable: boolean;
89
89
  cache?: CacheResponse;
90
- redirect?: SsrRedirect;
90
+ status?: SsrStatus;
91
91
  nonce?: string;
92
92
  }
93
93
  export interface ViewRequestQs {
@@ -152,7 +152,7 @@ type ViewPluginLinkHook = (builder: LwrStringBuilder, viewContext: ViewTransform
152
152
  type ViewPluginLinkHookReturn = void | null | undefined | false | LwrStringBuilder | {
153
153
  builder?: LwrStringBuilder;
154
154
  cache?: CacheResponse;
155
- redirect?: SsrRedirect;
155
+ status?: SsrStatus;
156
156
  serverBundles?: Set<BundleDefinition>;
157
157
  };
158
158
  type ViewPluginOptimizeHook = (code: string, assetSource: AssetSource) => Promise<ViewPluginOptimizeHookReturn>;
@@ -258,11 +258,11 @@ export interface SsrDataResponse {
258
258
  }[];
259
259
  };
260
260
  cache?: CacheResponse;
261
- redirect?: SsrRedirect;
261
+ status?: SsrStatus;
262
262
  }
263
- export interface SsrRedirect {
264
- status?: 301 | 302;
265
- location: string;
263
+ export interface SsrStatus {
264
+ code: 301 | 302 | 429 | 503;
265
+ location?: string;
266
266
  }
267
267
  export interface DirectToCoreProxy {
268
268
  origin: string;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "build": "tsc -b"
9
9
  },
10
10
  "type": "module",
11
- "version": "0.15.0-alpha.45",
11
+ "version": "0.15.0-alpha.46",
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": ">=18.0.0"
31
31
  },
32
- "gitHead": "9fa1a2ce015fedee28dd9ab5f711ed235e4b3353"
32
+ "gitHead": "366b77f76c34626c9449da0042766fc107cc6b8f"
33
33
  }