@lwrjs/types 0.10.0-alpha.19 → 0.10.0-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/config.d.ts CHANGED
@@ -167,16 +167,21 @@ export interface RouteHandlers {
167
167
  [id: string]: [RouteHandlerFunction, any?];
168
168
  }
169
169
  interface AssetConfigCommon {
170
- urlPath: string;
170
+ urlPath?: string;
171
171
  alias?: string;
172
172
  }
173
173
  export interface AssetDirConfig extends AssetConfigCommon {
174
174
  dir: string;
175
+ root?: boolean;
176
+ }
177
+ export interface AssetRootDirConfig extends AssetDirConfig {
178
+ dir: string;
179
+ root: true;
175
180
  }
176
181
  export interface AssetFileConfig extends AssetConfigCommon {
177
182
  file: string;
178
183
  }
179
- export type AssetConfig = AssetDirConfig | AssetFileConfig;
184
+ export type AssetConfig = AssetRootDirConfig | AssetDirConfig | AssetFileConfig;
180
185
  export interface LwcConfig {
181
186
  modules: ResolverModuleRecord[];
182
187
  interchangeable?: string[];
@@ -244,6 +249,14 @@ export interface HooksPlugin {
244
249
  *
245
250
  */
246
251
  initConfigs?: (lwrConfig: NormalizedLwrGlobalConfig, dataConfig: GlobalData, runtimeConfig: RuntimeEnvironment) => Promise<void> | void;
252
+ /**
253
+ * Setup instrumentation utilities
254
+ *
255
+ * @remarks
256
+ * - When running LWR server, these hooks are invoked after `initConfigs` hooks and before `onStart` hooks
257
+ * - When running LWR handler, these hooks are invoked before config normalization and `onStart` hooks
258
+ */
259
+ initInstrumentation?: () => void;
247
260
  /**
248
261
  * Load routes on application start up.
249
262
  *
package/build/index.d.ts CHANGED
@@ -634,7 +634,7 @@ export interface SiteBundles {
634
634
  bundles: Record<string, SiteBundle>;
635
635
  }
636
636
  export interface SiteResources {
637
- resources: Record<string, SiteArtifact>;
637
+ resources: Record<string, SiteResource>;
638
638
  }
639
639
  export interface SiteAssets {
640
640
  assets: Record<string, SiteArtifact>;
@@ -643,6 +643,9 @@ export interface SiteArtifact {
643
643
  path: string;
644
644
  mimeType?: string;
645
645
  }
646
+ export interface SiteResource extends SiteArtifact {
647
+ inline?: boolean;
648
+ }
646
649
  export interface SiteBundle extends SiteArtifact {
647
650
  version?: Version;
648
651
  imports: string[];
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.19",
11
+ "version": "0.10.0-alpha.20",
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"
31
31
  },
32
- "gitHead": "0bd55139c08ddf5a532978cfa9e037eaf27e78e2"
32
+ "gitHead": "45a867fc54e98f77dd442ccd5f668e23027b9246"
33
33
  }