@vc-shell/framework 1.0.246 → 1.0.247

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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.0.247](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.246...v1.0.247) (2024-07-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **useAppInsights:** add return if appInsights is not active ([5724a14](https://github.com/VirtoCommerce/vc-shell/commit/5724a1437f95e726216079f7a77b976434436b51))
7
+
8
+
9
+
1
10
  ## [1.0.246](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.245...v1.0.246) (2024-06-28)
2
11
 
3
12
 
@@ -14,6 +14,7 @@ export const useAppInsights = () => {
14
14
  const pageName = (route: { name: string }) => `${appName}${route.name as string}`;
15
15
 
16
16
  function beforeEach(route: { name: string }) {
17
+ if (!appInsights) return;
17
18
  const name = pageName(route);
18
19
  appInsights.context.telemetryTrace.traceID = generateW3CId();
19
20
  appInsights.context.telemetryTrace.name = route.name as string;
@@ -22,6 +23,7 @@ export const useAppInsights = () => {
22
23
  }
23
24
 
24
25
  function afterEach(route: { name: string; fullPath: string }) {
26
+ if (!appInsights) return;
25
27
  const name = pageName(route);
26
28
  const url = location.protocol + "//" + location.host + route.fullPath;
27
29
  appInsights.stopTrackPage(name, url, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useAppInsights/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;4BAUI;YAAE,MAAM,MAAM,CAAA;SAAE;2BAQjB;YAAE,MAAM,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE;;CAkB/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useAppInsights/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;4BAUI;YAAE,MAAM,MAAM,CAAA;SAAE;2BASjB;YAAE,MAAM,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE;;CAmB/D,CAAC"}
package/dist/framework.js CHANGED
@@ -52291,10 +52291,12 @@ const l8 = () => {
52291
52291
  function r() {
52292
52292
  const i = n?.appName ? `[${n.appName}] ` : "", a = (l) => `${i}${l.name}`;
52293
52293
  function o(l) {
52294
+ if (!t) return;
52294
52295
  const u = a(l);
52295
52296
  t.context.telemetryTrace.traceID = ms(), t.context.telemetryTrace.name = l.name, t.startTrackPage(u);
52296
52297
  }
52297
52298
  function s(l) {
52299
+ if (!t) return;
52298
52300
  const u = a(l), c = location.protocol + "//" + location.host + l.fullPath;
52299
52301
  t.stopTrackPage(u, c, {
52300
52302
  userId: e.value?.id ?? "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.246",
3
+ "version": "1.0.247",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -61,9 +61,9 @@
61
61
  "devDependencies": {
62
62
  "@types/dompurify": "^3.0.5",
63
63
  "@types/quill": "^2.0.14",
64
- "@vc-shell/api-client-generator": "^1.0.246",
65
- "@vc-shell/config-generator": "^1.0.246",
66
- "@vc-shell/ts-config": "^1.0.246",
64
+ "@vc-shell/api-client-generator": "^1.0.247",
65
+ "@vc-shell/config-generator": "^1.0.247",
66
+ "@vc-shell/ts-config": "^1.0.247",
67
67
  "@vitejs/plugin-vue": "^5.0.3",
68
68
  "cypress-signalr-mock": "^1.5.0",
69
69
  "sass": "^1.69.6",