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

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
@@ -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,28 +231,25 @@ 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
- status?: SsrStatus;
262
- }
263
- export interface SsrStatus {
264
- code: 301 | 302 | 429 | 503;
265
- location?: string;
252
+ warnings?: (Error | string)[];
266
253
  }
267
254
  export interface DirectToCoreProxy {
268
255
  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.2",
11
+ "version": "0.17.2-alpha.21",
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": "448ae2b681a4718241a29890f34e0ac13e35e6fd"
33
33
  }