@scayle/storefront-nuxt 7.60.0 → 7.61.0

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,25 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.61.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Expose the `loginWithIDP` function from the `useSession` composable.
8
+ - Add error logging to RPC handler
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+ - @scayle/storefront-core@7.44.0
14
+
15
+ ## 7.60.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Prioritize the execution of `bootstrap` middleware so storefront server middlewares can depend on the extended `event.context`
20
+
21
+ If your middleware depends on the `event.context` properties, it must be registered as a `serverHandler` and not automatically scanned from the `~/server/middleware` directory.
22
+
3
23
  ## 7.60.0
4
24
 
5
25
  ### Minor Changes
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.9.0"
6
6
  },
7
- "version": "7.59.0"
7
+ "version": "7.60.1"
8
8
  }
package/dist/module.mjs CHANGED
@@ -106,7 +106,7 @@ const module = defineNuxtModule({
106
106
  "slugify"
107
107
  );
108
108
  });
109
- addServerHandler({
109
+ nuxt.options.serverHandlers.unshift({
110
110
  middleware: true,
111
111
  handler: resolve("./runtime/server/middleware/bootstrap")
112
112
  });
@@ -11,7 +11,7 @@ export default defineEventHandler(async (event) => {
11
11
  try {
12
12
  return await handler(method, body?.payload, event.context.$rpcContext);
13
13
  } catch (e) {
14
- const data = resolveError(e);
15
- return createError(data);
14
+ event.context.$rpcContext.log.space("sfc").error(`RPC Handler failed: ${method}`, e);
15
+ return createError(resolveError(e));
16
16
  }
17
17
  });
@@ -6,7 +6,9 @@ export declare const useIDP: () => Promise<{
6
6
  fetch: () => Promise<void>;
7
7
  error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined>;
8
8
  status: import("vue").Ref<import("../core/useRpc").Status>;
9
- handleIDPLoginCallback: (params: string) => Promise<{
9
+ handleIDPLoginCallback: (params: {
10
+ code: string;
11
+ }) => Promise<{
10
12
  message: string;
11
13
  }>;
12
14
  }>;
@@ -21,6 +21,7 @@ export const useIDP = async () => {
21
21
  fetch,
22
22
  error,
23
23
  status,
24
+ // TODO: Deprecate the property here and remove it with the next major release
24
25
  handleIDPLoginCallback
25
26
  };
26
27
  };
@@ -14,4 +14,9 @@ export declare function useSession(): {
14
14
  success: boolean;
15
15
  }>;
16
16
  resetPasswordByHash: (params: import("utility-types").Optional<import("@scayle/storefront-core").UpdatePasswordByHashRequest, "shop_id">) => Promise<void | undefined>;
17
+ loginWithIDP: (params: {
18
+ code: string;
19
+ }) => Promise<{
20
+ message: string;
21
+ }>;
17
22
  };
@@ -16,6 +16,7 @@ export function useSession() {
16
16
  nuxtApp,
17
17
  "updatePasswordByHash",
18
18
  toValue(shop)
19
- )
19
+ ),
20
+ loginWithIDP: rpcCall(nuxtApp, "handleIDPLoginCallback", toValue(shop))
20
21
  };
21
22
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.60.0",
4
+ "version": "7.61.0",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -62,15 +62,15 @@
62
62
  "dependencies": {
63
63
  "@nuxt/kit": "3.10.2",
64
64
  "@scayle/h3-session": "0.3.5",
65
- "@scayle/storefront-core": "7.43.0",
65
+ "@scayle/storefront-core": "7.44.0",
66
66
  "@scayle/unstorage-compression-driver": "0.1.2",
67
- "@vueuse/core": "10.8.0",
67
+ "@vueuse/core": "10.9.0",
68
68
  "consola": "3.2.3",
69
69
  "core-js": "3.36.0",
70
70
  "defu": "6.1.4",
71
71
  "jose": "^5.2.0",
72
72
  "knitwork": "1.0.0",
73
- "nitropack": "2.8.1",
73
+ "nitropack": "2.9.1",
74
74
  "ofetch": "1.3.3",
75
75
  "radash": "12.0.0",
76
76
  "uncrypto": "0.1.3",
@@ -84,7 +84,7 @@
84
84
  "@nuxt/test-utils": "3.11.0",
85
85
  "@scayle/eslint-config-storefront": "3.2.6",
86
86
  "@scayle/prettier-config-storefront": "2.0.2",
87
- "@types/node": "20.11.20",
87
+ "@types/node": "20.11.24",
88
88
  "eslint": "8.57.0",
89
89
  "eslint-formatter-gitlab": "5.1.0",
90
90
  "h3": "1.11.1",