@scayle/storefront-nuxt 8.10.0 → 8.10.2

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,20 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 8.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-core@8.7.1
10
+
11
+ ## 8.10.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Added dependency `@vercel/nft@0.29.1`
16
+ - Add necessary runtime dependencies to nitro's external.inline config
17
+
3
18
  ## 8.10.0
4
19
 
5
20
  ### Minor Changes
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "8.10.0",
3
+ "version": "8.10.2",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -5,6 +5,7 @@ import { defu } from 'defu';
5
5
  import { genImport, genSafeVariableName, genExport } from 'knitwork';
6
6
  import { builtinDrivers } from 'unstorage';
7
7
  import { createConsola } from 'consola';
8
+ import { nodeFileTrace } from '@vercel/nft';
8
9
  import { getApiBasePath } from '../dist/runtime/server/middleware/bootstrap-utils.js';
9
10
 
10
11
  function stringToBoolean(value, defaultValue = false) {
@@ -45,7 +46,7 @@ export default {
45
46
  }`;
46
47
  }
47
48
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
48
- const PACKAGE_VERSION = "8.10.0";
49
+ const PACKAGE_VERSION = "8.10.2";
49
50
  const logger = createConsola({
50
51
  fancy: true,
51
52
  formatOptions: {
@@ -80,8 +81,8 @@ function createRpcMethodTypeDeclaration(customRpcImports) {
80
81
  }
81
82
  export {}`;
82
83
  }
83
- function nitroSetup(nitroConfig, config) {
84
- const { resolve } = createResolver(import.meta.url);
84
+ async function nitroSetup(nitroConfig, config) {
85
+ const { resolve, resolvePath } = createResolver(import.meta.url);
85
86
  const { apiBasePath, customRpcImports, coreMethodNames, usedDrivers } = config;
86
87
  nitroConfig.replace = nitroConfig.replace || {};
87
88
  nitroConfig.replace["process.env.SFC_OMIT_MD5"] = stringToBoolean(
@@ -150,6 +151,21 @@ function nitroSetup(nitroConfig, config) {
150
151
  resolve("./runtime/nitro/plugins/cacheRuntimeConfig")
151
152
  );
152
153
  }
154
+ const base = resolve(`./`);
155
+ const handlerPaths = nitroConfig.handlers.filter(
156
+ (h) => h?.handler && h?.handler.startsWith(base)
157
+ ).map((h) => h?.handler);
158
+ const pluginPaths = nitroConfig.plugins.filter(
159
+ (p) => p && p?.startsWith(base)
160
+ );
161
+ const runtimeEntries = await Promise.all(
162
+ [...handlerPaths, ...pluginPaths].map((p) => resolvePath(p))
163
+ );
164
+ const trace = await nodeFileTrace(runtimeEntries, { base });
165
+ const tracedImports = [...trace.fileList].map((p) => resolve(p));
166
+ nitroConfig.externals = nitroConfig.externals ?? {};
167
+ nitroConfig.externals.inline = nitroConfig.externals.inline ?? [];
168
+ nitroConfig.externals.inline.push(...tracedImports);
153
169
  }
154
170
  function validateRpcMethodOverrides(rpcMethodOverrides, customRpcNames, coreRpcNames) {
155
171
  const overriddenRPCMethodNames = new Set(rpcMethodOverrides);
@@ -299,8 +315,8 @@ const module = defineNuxtModule({
299
315
  }
300
316
  export {}`
301
317
  });
302
- nuxt.hooks.hook("nitro:config", (nitroConfig) => {
303
- nitroSetup(nitroConfig, {
318
+ nuxt.hooks.hook("nitro:config", async (nitroConfig) => {
319
+ await nitroSetup(nitroConfig, {
304
320
  apiBasePath,
305
321
  customRpcImports,
306
322
  coreMethodNames: [...rpcMethodNames],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "8.10.0",
4
+ "version": "8.10.2",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -72,8 +72,9 @@
72
72
  "dependencies": {
73
73
  "@opentelemetry/api": "^1.9.0",
74
74
  "@scayle/h3-session": "0.6.0",
75
- "@scayle/storefront-core": "8.7.0",
75
+ "@scayle/storefront-core": "8.7.1",
76
76
  "@scayle/unstorage-compression-driver": "^0.2.3",
77
+ "@vercel/nft": "0.29.1",
77
78
  "@vueuse/core": "12.7.0",
78
79
  "consola": "^3.2.3",
79
80
  "core-js": "^3.37.1",
@@ -90,7 +91,7 @@
90
91
  "schema-dts": "1.1.2"
91
92
  },
92
93
  "devDependencies": {
93
- "@nuxt/eslint": "1.0.1",
94
+ "@nuxt/eslint": "1.1.0",
94
95
  "@nuxt/kit": "3.14.1592",
95
96
  "@nuxt/module-builder": "0.8.4",
96
97
  "@nuxt/schema": "3.14.1592",
@@ -128,6 +129,6 @@
128
129
  "@nuxt/schema": "3.14.1592"
129
130
  },
130
131
  "volta": {
131
- "node": "22.13.1"
132
+ "node": "22.14.0"
132
133
  }
133
134
  }