@lwrjs/view-registry 0.12.0-alpha.19 → 0.12.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.
@@ -314,6 +314,7 @@ var LwrViewRegistry = class {
314
314
  const linkedMetadata = skipMetadataCollection ? renderedViewMetadata : await (0, import_shared_utils.extractMetadataFromHtml)(renderedViewContent, renderedViewMetadata, this.globalConfig);
315
315
  const mergedViewContext = {
316
316
  ...viewContext,
317
+ config: this.globalConfig,
317
318
  runtimeEnvironment,
318
319
  importer: importer || renderedView.compiledView.filePath
319
320
  };
@@ -129,6 +129,7 @@ var LwrViewHandler = class {
129
129
  const {rootDir, assets, contentDir, layoutsDir} = this.globalConfig;
130
130
  const paths = {rootDir, assets, contentDir, layoutsDir};
131
131
  const locale = runtimeParams.locale;
132
+ const basePath = runtimeParams.basePath;
132
133
  const viewApi = this.getBoundApi(viewRequest, route, runtimeEnvironment, runtimeParams);
133
134
  const response = await (0, import_instrumentation.getTracer)().trace({
134
135
  name: import_instrumentation.ViewSpan.ExecuteRouteHandler,
@@ -138,7 +139,7 @@ var LwrViewHandler = class {
138
139
  }
139
140
  }, async () => {
140
141
  try {
141
- return await routeHandlerFn({...viewRequest, locale}, {route, viewApi, ...paths}, routeHandlerOptions);
142
+ return await routeHandlerFn({...viewRequest, locale, basePath}, {route, viewApi, ...paths}, routeHandlerOptions);
142
143
  } catch (err) {
143
144
  if (err instanceof import_diagnostics.DiagnosticsError) {
144
145
  throw err;
package/build/es/index.js CHANGED
@@ -329,6 +329,7 @@ export class LwrViewRegistry {
329
329
  : await extractMetadataFromHtml(renderedViewContent, renderedViewMetadata, this.globalConfig);
330
330
  const mergedViewContext = {
331
331
  ...viewContext,
332
+ config: this.globalConfig,
332
333
  runtimeEnvironment,
333
334
  importer: importer || renderedView.compiledView.filePath,
334
335
  };
@@ -145,6 +145,7 @@ export class LwrViewHandler {
145
145
  const { rootDir, assets, contentDir, layoutsDir } = this.globalConfig;
146
146
  const paths = { rootDir, assets, contentDir, layoutsDir };
147
147
  const locale = runtimeParams.locale;
148
+ const basePath = runtimeParams.basePath;
148
149
  const viewApi = this.getBoundApi(viewRequest, route, runtimeEnvironment, runtimeParams);
149
150
  const response = await getTracer().trace({
150
151
  name: ViewSpan.ExecuteRouteHandler,
@@ -154,7 +155,7 @@ export class LwrViewHandler {
154
155
  },
155
156
  }, async () => {
156
157
  try {
157
- return await routeHandlerFn({ ...viewRequest, locale }, { route: route, viewApi, ...paths }, routeHandlerOptions);
158
+ return await routeHandlerFn({ ...viewRequest, locale, basePath }, { route: route, viewApi, ...paths }, routeHandlerOptions);
158
159
  }
159
160
  catch (err) {
160
161
  if (err instanceof DiagnosticsError) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.12.0-alpha.19",
7
+ "version": "0.12.0-alpha.20",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,17 +30,17 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/app-service": "0.12.0-alpha.19",
34
- "@lwrjs/diagnostics": "0.12.0-alpha.19",
35
- "@lwrjs/instrumentation": "0.12.0-alpha.19",
36
- "@lwrjs/shared-utils": "0.12.0-alpha.19",
33
+ "@lwrjs/app-service": "0.12.0-alpha.20",
34
+ "@lwrjs/diagnostics": "0.12.0-alpha.20",
35
+ "@lwrjs/instrumentation": "0.12.0-alpha.20",
36
+ "@lwrjs/shared-utils": "0.12.0-alpha.20",
37
37
  "lru-cache": "^10.2.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@lwrjs/types": "0.12.0-alpha.19"
40
+ "@lwrjs/types": "0.12.0-alpha.20"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=18.0.0"
44
44
  },
45
- "gitHead": "5e1cd0d97d8e90cbd8b43868e2d7b33df6f8fa82"
45
+ "gitHead": "ae1793e34eaf4e9b97996d7aea9031908b23a13a"
46
46
  }