@scayle/storefront-nuxt 7.66.2 → 7.66.4

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,19 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.66.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @scayle/storefront-core@7.49.1
9
+
10
+ ## 7.66.3
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @scayle/storefront-core@7.49.0
16
+
3
17
  ## 7.66.2
4
18
 
5
19
  ### Patch Changes
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "7.66.1",
3
+ "version": "7.66.3",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -40,7 +40,7 @@ export default {
40
40
  }`;
41
41
  }
42
42
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
43
- const PACKAGE_VERSION = "7.66.1";
43
+ const PACKAGE_VERSION = "7.66.3";
44
44
  const module = defineNuxtModule({
45
45
  meta: {
46
46
  name: PACKAGE_NAME,
package/dist/rpc.mjs CHANGED
@@ -4,7 +4,7 @@ const rpcCall = (nuxtApp, method, shop) => {
4
4
  const fetch = nuxtApp.ssrContext?.event.$fetch ?? $fetch;
5
5
  return async (params = void 0) => {
6
6
  const data = await fetch(`${shop.apiBasePath ?? "/api"}/rpc/${method}`, {
7
- // @ts-ignore
7
+ // @ts-expect-error Type '"POST"' is not assignable to type 'AvailableRouterMethod<`${string}/rpc/${N}`> | Uppercase<AvailableRouterMethod<`${string}/rpc/${N}`>> | undefined'.ts(2322)
8
8
  method: "POST",
9
9
  body: {
10
10
  payload: params
@@ -41,7 +41,7 @@ export const useRpc = async (method, key, params, options = { autoFetch: true, l
41
41
  const fetch2 = getFetch(nuxtApp, log);
42
42
  data.value = await unwrap(
43
43
  await fetch2(`/rpc/${method}`, {
44
- // @ts-ignore
44
+ // @ts-expect-error Type '"POST"' is not assignable to type 'AvailableRouterMethod<`/rpc/${N}`> | Uppercase<AvailableRouterMethod<`/rpc/${N}`>> | undefined'.ts(2322)
45
45
  method: "POST",
46
46
  body: {
47
47
  payload: toValue(params)
@@ -60,7 +60,7 @@ export const useRpc = async (method, key, params, options = { autoFetch: true, l
60
60
  }
61
61
  };
62
62
  if (isAutoFetchEnabled && status.value === "idle") {
63
- if (process.server) {
63
+ if (import.meta.server) {
64
64
  await fetch();
65
65
  } else {
66
66
  options.lazy ? fetch() : await fetch();
@@ -8,7 +8,7 @@ import {
8
8
  import { FetchError } from "ofetch";
9
9
  const parseErrorData = (error) => {
10
10
  if (error instanceof FetchError) {
11
- const url = error.request?.url ?? String(error.request) ?? "/";
11
+ const url = error.request?.url ?? error.request?.toString() ?? "/";
12
12
  return {
13
13
  statusCode: error.status ?? HttpStatusCode.INTERNAL_SERVER_ERROR,
14
14
  statusMessage: error.statusText ?? HttpStatusMessage.INTERNAL_SERVER_ERROR,
@@ -3,7 +3,7 @@ export interface LogEntry {
3
3
  level: LogLevel;
4
4
  space: string;
5
5
  message: string;
6
- data?: Object;
6
+ data?: object;
7
7
  }
8
8
  export type LogHandler = (entry: LogEntry) => void;
9
9
  export interface LogOptions {
@@ -4,7 +4,7 @@ import { useAvailableShops } from "../composables/core/useAvailableShops.mjs";
4
4
  export default defineNuxtPlugin((nuxtApp) => {
5
5
  const currentShop = useCurrentShop();
6
6
  const availableShops = useAvailableShops();
7
- if (process.server && nuxtApp.ssrContext) {
7
+ if (import.meta.server && nuxtApp.ssrContext) {
8
8
  currentShop.value = nuxtApp.ssrContext.event.context.$currentShop;
9
9
  availableShops.value = nuxtApp.ssrContext.event.context.$availableShops;
10
10
  }
@@ -3,7 +3,7 @@ export const rpcCall = (nuxtApp, method, shop) => {
3
3
  const fetch = nuxtApp.ssrContext?.event.$fetch ?? $fetch;
4
4
  return async (params = void 0) => {
5
5
  const data = await fetch(`${shop.apiBasePath ?? "/api"}/rpc/${method}`, {
6
- // @ts-ignore
6
+ // @ts-expect-error Type '"POST"' is not assignable to type 'AvailableRouterMethod<`${string}/rpc/${N}`> | Uppercase<AvailableRouterMethod<`${string}/rpc/${N}`>> | undefined'.ts(2322)
7
7
  method: "POST",
8
8
  body: {
9
9
  payload: params
@@ -56,7 +56,6 @@ async function bootstrap(event, $shopConfig, $storefrontConfig, apiBasePath, con
56
56
  await useSession(event, {
57
57
  ...sessionConfig,
58
58
  store: sessionStorage,
59
- // @ts-ignore
60
59
  genid: generateSessionId,
61
60
  saveUninitialized: true,
62
61
  cookie: {
@@ -1,4 +1,4 @@
1
- import { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  import type { ModuleOptions, PublicShopConfig, ShopConfig, ShopConfigIndexed } from '../../../module';
3
3
  export declare const convertStoresToList: (stores: ShopConfig[] | ShopConfigIndexed) => ShopConfig[];
4
4
  export declare function getCurrentShopForRequest(event: H3Event, config: Pick<ModuleOptions, 'stores' | 'shopSelector'>): ShopConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.66.2",
4
+ "version": "7.66.4",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -51,8 +51,8 @@
51
51
  "prep": "nuxi prepare playground",
52
52
  "format": "dprint check",
53
53
  "format:fix": "dprint fmt",
54
- "lint": "eslint . --format gitlab",
55
- "lint:fix": "eslint . --fix",
54
+ "lint": "nuxi prepare playground & eslint . --format gitlab",
55
+ "lint:fix": "nuxi prepare playground & eslint . --fix",
56
56
  "typecheck": "vue-tsc --noEmit -p tsconfig.check.json",
57
57
  "package:lint": "publint",
58
58
  "test": "vitest run",
@@ -63,7 +63,7 @@
63
63
  "@nuxt/kit": "3.11.1",
64
64
  "@opentelemetry/api": "1.8.0",
65
65
  "@scayle/h3-session": "0.3.6",
66
- "@scayle/storefront-core": "7.48.2",
66
+ "@scayle/storefront-core": "7.49.1",
67
67
  "@scayle/unstorage-compression-driver": "0.1.3",
68
68
  "@vueuse/core": "10.9.0",
69
69
  "consola": "3.2.3",
@@ -80,25 +80,27 @@
80
80
  "yn": "5.0.0"
81
81
  },
82
82
  "devDependencies": {
83
+ "@nuxt/eslint": "0.3.9",
83
84
  "@nuxt/module-builder": "0.5.5",
84
85
  "@nuxt/schema": "3.11.1",
85
86
  "@nuxt/test-utils": "3.12.1",
86
- "@scayle/eslint-config-storefront": "3.2.7",
87
+ "@scayle/eslint-config-storefront": "4.1.0",
87
88
  "@scayle/eslint-plugin-vue-composable": "0.1.1",
88
89
  "@types/node": "20.12.7",
89
90
  "dprint": "0.45.1",
90
- "eslint": "8.57.0",
91
+ "eslint": "9.0.0",
91
92
  "eslint-formatter-gitlab": "5.1.0",
92
93
  "h3": "1.11.1",
93
94
  "node-mocks-http": "1.14.1",
95
+ "nuxi": "3.11.1",
94
96
  "nuxt": "3.11.1",
95
97
  "publint": "0.2.7",
96
- "vitest": "1.5.0",
98
+ "vitest": "1.5.1",
97
99
  "vue-tsc": "2.0.14"
98
100
  },
99
101
  "peerDependencies": {
100
102
  "h3": "^1.10.0",
101
- "nuxt": ">=3.9.0",
103
+ "nuxt": ">=3.10.0",
102
104
  "unstorage": ">= 1.10.1",
103
105
  "vue": ">=3.4.0"
104
106
  },