@scayle/storefront-nuxt 8.12.2 → 8.12.3

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,5 +1,11 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 8.12.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [OTEL] Ensure the correct tracer is used when creating spans.
8
+
3
9
  ## 8.12.2
4
10
 
5
11
  ### Patch Changes
package/dist/module.d.mts CHANGED
@@ -58,4 +58,5 @@ declare module '@nuxt/schema' {
58
58
  */
59
59
  declare const _default: _nuxt_schema.NuxtModule<ModuleBaseOptions, ModuleBaseOptions, false>;
60
60
 
61
- export { ModuleBaseOptions, type ModuleHooks, _default as default };
61
+ export { ModuleBaseOptions, _default as default };
62
+ export type { ModuleHooks };
package/dist/module.d.ts CHANGED
@@ -58,4 +58,5 @@ declare module '@nuxt/schema' {
58
58
  */
59
59
  declare const _default: _nuxt_schema.NuxtModule<ModuleBaseOptions, ModuleBaseOptions, false>;
60
60
 
61
- export { ModuleBaseOptions, type ModuleHooks, _default as default };
61
+ export { ModuleBaseOptions, _default as default };
62
+ export type { ModuleHooks };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "8.12.2",
3
+ "version": "8.12.3",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -53,7 +53,7 @@ export default {
53
53
  }`;
54
54
  }
55
55
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
56
- const PACKAGE_VERSION = "8.12.2";
56
+ const PACKAGE_VERSION = "8.12.3";
57
57
  const logger = createConsola({
58
58
  fancy: true,
59
59
  formatOptions: {
@@ -4,10 +4,6 @@ import { trace, SpanStatusCode } from "@opentelemetry/api";
4
4
  import { handler } from "../handler.js";
5
5
  import { resolveError } from "../error/handler.js";
6
6
  import { useNitroApp } from "nitropack/runtime";
7
- const tracer = trace.getTracer(
8
- "storefront-nuxt",
9
- "__sfc_version"
10
- );
11
7
  export default defineEventHandler(async (event) => {
12
8
  const $rpcContext = event.context.$rpcContext;
13
9
  if (!$rpcContext) {
@@ -15,6 +11,10 @@ export default defineEventHandler(async (event) => {
15
11
  status: HttpStatusCode.INTERNAL_SERVER_ERROR
16
12
  });
17
13
  }
14
+ const tracer = trace.getTracer(
15
+ "storefront-nuxt",
16
+ "__sfc_version"
17
+ );
18
18
  const pathComponents = event.path.split("?")[0].split("/");
19
19
  const method = pathComponents[pathComponents.length - 1];
20
20
  const body = await readBody(event);
@@ -26,10 +26,6 @@ const generateSessionId = (event) => {
26
26
  }
27
27
  return userId ? `${userId}:${randomUUID()}` : randomUUID();
28
28
  };
29
- const tracer = trace.getTracer(
30
- "storefront-nuxt",
31
- "__sfc_version"
32
- );
33
29
  async function getOldSessionData(event, cookieName, store, secret) {
34
30
  const rawCookie = getCookie(event, cookieName);
35
31
  const normalizedSecrets = Array.isArray(secret) ? secret : [secret];
@@ -143,6 +139,10 @@ export default defineEventHandler(async (event) => {
143
139
  const config = useRuntimeConfig(event);
144
140
  const url = getRequestURL(event);
145
141
  const { path, originalPath } = getBootstrapPath(url, config.app.baseURL);
142
+ const tracer = trace.getTracer(
143
+ "storefront-nuxt",
144
+ "__sfc_version"
145
+ );
146
146
  if (path.startsWith(joinURL(config.app.baseURL, "/__nuxt"))) {
147
147
  return;
148
148
  }
@@ -197,6 +197,7 @@ export default defineEventHandler(async (event) => {
197
197
  span.end();
198
198
  throw e;
199
199
  }
200
+ span.setStatus({ code: SpanStatusCode.OK });
200
201
  span.end();
201
202
  }
202
203
  );
package/dist/types.d.mts CHANGED
@@ -1,9 +1,8 @@
1
1
  import type { NuxtModule } from '@nuxt/schema'
2
2
 
3
- import type { default as Module, ModuleHooks, ModulePublicRuntimeConfig } from './module.js'
3
+ import type { default as Module, ModulePublicRuntimeConfig } from './module.js'
4
4
 
5
5
  declare module '@nuxt/schema' {
6
- interface NuxtHooks extends ModuleHooks {}
7
6
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
8
7
  }
9
8
 
package/dist/types.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import type { NuxtModule } from '@nuxt/schema'
2
2
 
3
- import type { default as Module, ModuleHooks, ModulePublicRuntimeConfig } from './module'
3
+ import type { default as Module, ModulePublicRuntimeConfig } from './module'
4
4
 
5
5
  declare module '@nuxt/schema' {
6
- interface NuxtHooks extends ModuleHooks {}
7
6
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
8
7
  }
9
8
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "8.12.2",
4
+ "version": "8.12.3",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -100,7 +100,7 @@
100
100
  "schema-dts": "1.1.5"
101
101
  },
102
102
  "devDependencies": {
103
- "@eslint/eslintrc": "3.3.0",
103
+ "@eslint/eslintrc": "3.3.1",
104
104
  "@nuxt/eslint": "1.2.0",
105
105
  "@nuxt/kit": "3.15.4",
106
106
  "@nuxt/module-builder": "0.8.4",
@@ -109,13 +109,13 @@
109
109
  "@scayle/eslint-config-storefront": "4.4.1",
110
110
  "@scayle/eslint-plugin-vue-composable": "0.2.1",
111
111
  "@scayle/unstorage-scayle-kv-driver": "0.1.1",
112
- "@types/node": "22.13.10",
112
+ "@types/node": "22.13.13",
113
113
  "dprint": "0.49.1",
114
114
  "eslint-formatter-gitlab": "5.1.0",
115
- "eslint": "9.22.0",
115
+ "eslint": "9.23.0",
116
116
  "fishery": "2.2.3",
117
117
  "h3": "1.15.0",
118
- "nitropack": "2.9.7",
118
+ "nitropack": "2.10.4",
119
119
  "node-mocks-http": "1.16.2",
120
120
  "nuxi": "3.23.1",
121
121
  "nuxt": "3.15.4",