@scayle/storefront-nuxt 8.24.0 → 8.24.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 +28 -0
- package/dist/index.d.mts +1 -5
- package/dist/module.d.mts +3 -7
- package/dist/module.json +2 -2
- package/dist/module.mjs +5 -1
- package/dist/runtime/composables/core/useAvailableShops.d.ts +1 -1
- package/dist/runtime/composables/core/useCurrentShop.d.ts +1 -1
- package/dist/runtime/composables/core/useRpc.js +3 -3
- package/dist/runtime/context.js +1 -1
- package/dist/runtime/nitro/plugins/internalFetch.d.ts +21 -0
- package/dist/runtime/nitro/plugins/internalFetch.js +18 -0
- package/dist/runtime/rpc/rpcCall.d.ts +1 -1
- package/dist/runtime/rpc/rpcCall.js +1 -1
- package/dist/{shared/storefront-nuxt.CRtTNUi9.d.mts → runtime/types/module.d.ts} +21 -23
- package/dist/runtime/types/module.js +0 -0
- package/dist/test/factories.d.mts +1 -5
- package/dist/types.d.mts +4 -7
- package/package.json +19 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.24.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix `.d.ts` validation errors reported by AreTheTypesWrong.
|
|
8
|
+
- Fix an issue caused by Nitro 2.11.7 which caused the context to be lost between RPC requests.
|
|
9
|
+
|
|
10
|
+
**Dependencies**
|
|
11
|
+
|
|
12
|
+
- Updated dependency to @scayle/h3-session@0.6.1
|
|
13
|
+
|
|
14
|
+
**@scayle/storefront-core v8.24.2**
|
|
15
|
+
|
|
16
|
+
- Patch
|
|
17
|
+
- **\[Code Style\]** Refactored brands and navigation tree RPCs to avoid destructuring the RPC context within function signatures
|
|
18
|
+
|
|
19
|
+
## 8.24.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependency `@scayle/storefront-core@8.23.0` to `@scayle/storefront-core@8.24.0`
|
|
24
|
+
|
|
25
|
+
**Dependencies**
|
|
26
|
+
|
|
27
|
+
**@scayle/storefront-core v8.24.1**
|
|
28
|
+
|
|
29
|
+
- No changes in this release.
|
|
30
|
+
|
|
3
31
|
## 8.24.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '../dist/runtime/types/module.js';
|
|
2
2
|
export { ModuleHooks } from './module.mjs';
|
|
3
3
|
export { rpcCall } from '../dist/runtime/rpc/rpcCall.js';
|
|
4
4
|
export { extendPromise } from '../dist/runtime/utils/promise.js';
|
|
5
5
|
export * from '../dist/runtime/utils/seo.js';
|
|
6
6
|
export * from '@scayle/storefront-core';
|
|
7
|
-
export { LogLevel } from '@scayle/storefront-core';
|
|
8
7
|
export { unwrap } from '@scayle/storefront-core/dist/utils/response';
|
|
9
|
-
import '@scayle/unstorage-compression-driver';
|
|
10
|
-
import 'unstorage';
|
|
11
|
-
import '../dist/runtime/utils/zodSchema.js';
|
|
12
8
|
import '@nuxt/schema';
|
|
13
9
|
|
|
14
10
|
interface RpcMethodsStorefront {
|
package/dist/module.d.mts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { HookResult } from '@nuxt/schema';
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
export { LogLevel } from '@scayle/storefront-core';
|
|
6
|
-
import '@scayle/unstorage-compression-driver';
|
|
7
|
-
import 'unstorage';
|
|
8
|
-
import '../dist/runtime/utils/zodSchema.js';
|
|
3
|
+
import { ModuleBaseOptions } from '../dist/runtime/types/module.js';
|
|
4
|
+
export * from '../dist/runtime/types/module.js';
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
7
|
* Definition of a custom RPC import
|
|
@@ -58,5 +54,5 @@ declare module '@nuxt/schema' {
|
|
|
58
54
|
*/
|
|
59
55
|
declare const _default: _nuxt_schema.NuxtModule<ModuleBaseOptions, ModuleBaseOptions, false>;
|
|
60
56
|
|
|
61
|
-
export {
|
|
57
|
+
export { _default as default };
|
|
62
58
|
export type { ModuleHooks };
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
|
-
"version": "8.24.
|
|
3
|
+
"version": "8.24.2",
|
|
4
4
|
"configKey": "storefront",
|
|
5
5
|
"compatibility": {
|
|
6
6
|
"nuxt": "^3.9.0"
|
|
7
7
|
},
|
|
8
8
|
"builder": {
|
|
9
9
|
"@nuxt/module-builder": "1.0.1",
|
|
10
|
-
"unbuild": "
|
|
10
|
+
"unbuild": "3.5.0"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { builtinDrivers } from 'unstorage';
|
|
|
7
7
|
import { createConsola } from 'consola';
|
|
8
8
|
import { nodeFileTrace } from '@vercel/nft';
|
|
9
9
|
import { getApiBasePath } from '../dist/runtime/server/middleware/bootstrap-utils.js';
|
|
10
|
+
export * from '../dist/runtime/types/module.js';
|
|
10
11
|
|
|
11
12
|
function stringToBoolean(value, defaultValue = false) {
|
|
12
13
|
return value ? value.toLowerCase() === "true" : defaultValue;
|
|
@@ -53,7 +54,7 @@ export default {
|
|
|
53
54
|
}`;
|
|
54
55
|
}
|
|
55
56
|
const PACKAGE_NAME = "@scayle/storefront-nuxt";
|
|
56
|
-
const PACKAGE_VERSION = "8.24.
|
|
57
|
+
const PACKAGE_VERSION = "8.24.2";
|
|
57
58
|
const logger = createConsola({
|
|
58
59
|
fancy: true,
|
|
59
60
|
formatOptions: {
|
|
@@ -141,6 +142,9 @@ async function nitroSetup(nitroConfig, config) {
|
|
|
141
142
|
nitroConfig.plugins.push(
|
|
142
143
|
resolve("./runtime/nitro/plugins/nitroRuntimeStorageConfig")
|
|
143
144
|
);
|
|
145
|
+
nitroConfig.plugins.push(
|
|
146
|
+
resolve("./runtime/nitro/plugins/internalFetch")
|
|
147
|
+
);
|
|
144
148
|
if (stringToBoolean(process.env.SFC_PLUGIN_CONFIG_VALIDATION_ENABLED, true)) {
|
|
145
149
|
logger.debug("Installing config validation plugin");
|
|
146
150
|
nitroConfig.plugins.push(
|
|
@@ -8,9 +8,9 @@ import { useCurrentShop } from "./useCurrentShop.js";
|
|
|
8
8
|
import { toValue, isRef } from "vue";
|
|
9
9
|
import { useRuntimeConfig } from "#app/nuxt";
|
|
10
10
|
function getFetch(nuxtApp, log) {
|
|
11
|
-
const fetch = nuxtApp.ssrContext?.event.$
|
|
12
|
-
if (nuxtApp.ssrContext?.event && !nuxtApp.ssrContext?.event.$
|
|
13
|
-
log.error("event.$
|
|
11
|
+
const fetch = nuxtApp.ssrContext?.event.context.$fetchWithContext ?? $fetch;
|
|
12
|
+
if (nuxtApp.ssrContext?.event && !nuxtApp.ssrContext?.event.context.$fetchWithContext) {
|
|
13
|
+
log.error("event.$fetchWithContext was not found!");
|
|
14
14
|
}
|
|
15
15
|
return fetch;
|
|
16
16
|
}
|
package/dist/runtime/context.js
CHANGED
|
@@ -31,7 +31,7 @@ async function getBasketKey(appKeys, session, $log, $shopConfig) {
|
|
|
31
31
|
}) : session?.id;
|
|
32
32
|
}
|
|
33
33
|
function buildRpcCall(event, shopConfig, apiBasePath) {
|
|
34
|
-
const fetch = event.$
|
|
34
|
+
const fetch = event.context.$fetchWithContext;
|
|
35
35
|
return async function rpcCall(method, params = void 0) {
|
|
36
36
|
const data = await fetch(`${apiBasePath}/rpc/${method}`, {
|
|
37
37
|
// @ts-expect-error Type '"POST"' is not assignable to type 'AvailableRouterMethod<`${string}/rpc/${N}`> | Uppercase<AvailableRouterMethod<`${string}/rpc/${N}`>> | undefined'.ts(2322)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare module 'h3' {
|
|
2
|
+
interface H3EventContext {
|
|
3
|
+
$fetchWithContext: typeof globalThis.$fetch;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Nitro plugin to provide an internal fetch function on the event.
|
|
8
|
+
*
|
|
9
|
+
* Nitro includes an `event.$fetch` function for internal fetch requests to allow sharing the headers and
|
|
10
|
+
* context across requests. However, as of 2.11.7, the context is no longer shared, just the headers. As our
|
|
11
|
+
* bootstrapping depends on this behavior, we create a custom function with the pre-2.11.7 behavior. This enables
|
|
12
|
+
* compability with 2.11.7 as well as earlier versions.
|
|
13
|
+
*
|
|
14
|
+
* @see https://nitro.build/guide/plugins
|
|
15
|
+
*
|
|
16
|
+
* @param nitroApp The nitro app instance.
|
|
17
|
+
*
|
|
18
|
+
* @returns Nitro plugin function
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: import("nitropack").NitroAppPlugin;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineNitroPlugin } from "nitropack/runtime/plugin";
|
|
2
|
+
import { fetchWithEvent } from "h3";
|
|
3
|
+
export default defineNitroPlugin((nitroApp) => {
|
|
4
|
+
nitroApp.hooks.hook("request", (event) => {
|
|
5
|
+
const $fetch = globalThis.$fetch;
|
|
6
|
+
const envContext = (
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
event.node.req?.__unenv__
|
|
9
|
+
);
|
|
10
|
+
if (envContext) {
|
|
11
|
+
Object.assign(event.context, envContext);
|
|
12
|
+
}
|
|
13
|
+
event.context.$fetchWithContext = (req, init) => fetchWithEvent(event, req, init, {
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
fetch: $fetch
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RpcContext, RpcMethodName, RpcMethodParameters, RpcMethodReturnType } from '@scayle/storefront-core';
|
|
2
2
|
import type { NuxtApp } from 'nuxt/app';
|
|
3
|
-
import type { PublicShopConfig } from '
|
|
3
|
+
import type { PublicShopConfig } from '../types/module.js';
|
|
4
4
|
/**
|
|
5
5
|
* Invokes an RPC method on the client or server.
|
|
6
6
|
* Uses an HTTP request on the client and a direct call on the server via `$fetch`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unwrap } from "@scayle/storefront-core/dist/utils/response";
|
|
2
2
|
export const rpcCall = (nuxtApp, method, shop) => {
|
|
3
|
-
const fetch = nuxtApp.ssrContext?.event.$
|
|
3
|
+
const fetch = nuxtApp.ssrContext?.event.context.$fetchWithContext ?? $fetch;
|
|
4
4
|
return async (params = void 0) => {
|
|
5
5
|
const data = await fetch(`${shop.apiBasePath ?? "/api"}/rpc/${method}`, {
|
|
6
6
|
// @ts-expect-error Type '"POST"' is not assignable to type 'AvailableRouterMethod<`${string}/rpc/${N}`> | Uppercase<AvailableRouterMethod<`${string}/rpc/${N}`>> | undefined'.ts(2322)
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { WithParams, rpcMethods, StorefrontHooks,
|
|
2
|
-
import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
|
-
import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
|
-
import {
|
|
5
|
-
import { HookResult } from '@nuxt/schema';
|
|
6
|
-
|
|
1
|
+
import type { HashAlgorithm, ShopUser, WithParams, rpcMethods, StorefrontHooks, RpcMethodName, RpcContext } from '@scayle/storefront-core';
|
|
2
|
+
import type { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
|
+
import type { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
|
+
import type { CheckoutShopConfigType, SessionType, StorageType, SapiConfigType, ShopConfigType, StorefrontConfigType, ShopSelectorType, ModulePublicRuntimeConfigType, RedirectType, IdpType } from '../utils/zodSchema.js';
|
|
5
|
+
import type { HookResult } from '@nuxt/schema';
|
|
6
|
+
export type { LogLevel } from '@scayle/storefront-core';
|
|
7
7
|
/**
|
|
8
8
|
* Represents shop-specific configuration relating to the SCAYLE Checkout.
|
|
9
9
|
*
|
|
10
10
|
* @see https://scayle.dev/en/checkout-guide/authentication-accounts/general#create-api-client
|
|
11
11
|
*/
|
|
12
|
-
type CheckoutShopConfig = CheckoutShopConfigType;
|
|
12
|
+
export type CheckoutShopConfig = CheckoutShopConfigType;
|
|
13
13
|
/**
|
|
14
14
|
* Representation of options to configure how the storefront core manages sessions
|
|
15
15
|
*
|
|
16
16
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/sessions#configuration
|
|
17
17
|
*/
|
|
18
|
-
type SessionConfig = SessionType;
|
|
18
|
+
export type SessionConfig = SessionType;
|
|
19
19
|
/**
|
|
20
20
|
* Representation of a custom [Unstorage](https://unstorage.unjs.io/) driver name.
|
|
21
21
|
*
|
|
@@ -32,7 +32,7 @@ type CustomDriverName = string & {
|
|
|
32
32
|
*
|
|
33
33
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/caching#storefront-storage-cache-configuration
|
|
34
34
|
*/
|
|
35
|
-
type StorageEntity<Driver extends SupportedDriverName | CustomDriverName | unknown = unknown, DriverOptions = Driver extends keyof BuiltinDriverOptions ? BuiltinDriverOptions[Driver] : unknown> = {
|
|
35
|
+
export type StorageEntity<Driver extends SupportedDriverName | CustomDriverName | unknown = unknown, DriverOptions = Driver extends keyof BuiltinDriverOptions ? BuiltinDriverOptions[Driver] : unknown> = {
|
|
36
36
|
driver: Driver;
|
|
37
37
|
compression?: CompressionEncodings;
|
|
38
38
|
} & DriverOptions;
|
|
@@ -43,7 +43,7 @@ type StorageEntity<Driver extends SupportedDriverName | CustomDriverName | unkno
|
|
|
43
43
|
*
|
|
44
44
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/introduction#storage
|
|
45
45
|
*/
|
|
46
|
-
interface StorageConfig {
|
|
46
|
+
export interface StorageConfig {
|
|
47
47
|
/**
|
|
48
48
|
* The cache storage configuration.
|
|
49
49
|
*
|
|
@@ -69,14 +69,14 @@ interface StorageConfig {
|
|
|
69
69
|
* @see https://scayle.dev/en/api-guides/storefront-api/getting-started/authentication
|
|
70
70
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/introduction#storefront-api
|
|
71
71
|
*/
|
|
72
|
-
type SapiConfig = SapiConfigType;
|
|
72
|
+
export type SapiConfig = SapiConfigType;
|
|
73
73
|
/**
|
|
74
74
|
* Representation of Application-specific keys,
|
|
75
75
|
* defining how keys are generated for baskets and wishlists.
|
|
76
76
|
*
|
|
77
77
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/authentication#app-keys-for-baskets-and-wishlists
|
|
78
78
|
*/
|
|
79
|
-
interface AppKeys {
|
|
79
|
+
export interface AppKeys {
|
|
80
80
|
/** The wishlist key used as prefix to generate user-specific wishlist identifier. */
|
|
81
81
|
wishlistKey: string;
|
|
82
82
|
/** The basket key used as prefix to generate user-specific basket identifier. */
|
|
@@ -91,20 +91,20 @@ interface AppKeys {
|
|
|
91
91
|
*
|
|
92
92
|
* @see https://scayle.dev/en/storefront-guide/developer-guide/basic-setup/introduction#additional-shop-data
|
|
93
93
|
*/
|
|
94
|
-
interface AdditionalShopConfig {
|
|
94
|
+
export interface AdditionalShopConfig {
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Shop configuration.
|
|
98
98
|
*/
|
|
99
|
-
type ShopConfig = ShopConfigType & AdditionalShopConfig;
|
|
99
|
+
export type ShopConfig = ShopConfigType & AdditionalShopConfig;
|
|
100
100
|
/**
|
|
101
101
|
* Shop configuration indexed by shop ID.
|
|
102
102
|
*/
|
|
103
|
-
type ShopConfigIndexed = Record<string, ShopConfig>;
|
|
103
|
+
export type ShopConfigIndexed = Record<string, ShopConfig>;
|
|
104
104
|
/**
|
|
105
105
|
* Public shop configuration. This configuration is accessible on the client-side.
|
|
106
106
|
*/
|
|
107
|
-
interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'locale' | 'currency' | 'currencyFractionDigits'> {
|
|
107
|
+
export interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'locale' | 'currency' | 'currencyFractionDigits'> {
|
|
108
108
|
/** Checkout configuration. */
|
|
109
109
|
checkout: Pick<CheckoutShopConfig, 'host'>;
|
|
110
110
|
/** API base path. */
|
|
@@ -117,7 +117,7 @@ interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'local
|
|
|
117
117
|
/**
|
|
118
118
|
* Storefront configuration.
|
|
119
119
|
*/
|
|
120
|
-
type StorefrontConfig = StorefrontConfigType & {
|
|
120
|
+
export type StorefrontConfig = StorefrontConfigType & {
|
|
121
121
|
/**
|
|
122
122
|
* Default "with" parameters for Storefront API requests. These are used as defaults
|
|
123
123
|
* within composables like `useWishlist` and can be overridden if needed. Some
|
|
@@ -185,11 +185,11 @@ type ModuleOption = {
|
|
|
185
185
|
*/
|
|
186
186
|
shops: ShopConfigIndexed;
|
|
187
187
|
};
|
|
188
|
-
type SupportedDriverName = BuiltinDriverName | 'scayleKv';
|
|
188
|
+
export type SupportedDriverName = BuiltinDriverName | 'scayleKv';
|
|
189
189
|
/**
|
|
190
190
|
* Module base options. Extends `StorefrontConfig` and `ModuleOption`.
|
|
191
191
|
*/
|
|
192
|
-
type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
|
|
192
|
+
export type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
|
|
193
193
|
/**
|
|
194
194
|
* The RPC directory where the custom application RPCs are defined.
|
|
195
195
|
* The directory should have an `index.ts` file where all RPCs are exported using their name.
|
|
@@ -209,7 +209,7 @@ type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
|
|
|
209
209
|
*
|
|
210
210
|
* @see https://scayle.dev/en/checkout-guide/integration/webcomponent#tracking
|
|
211
211
|
*/
|
|
212
|
-
interface CheckoutEvent {
|
|
212
|
+
export interface CheckoutEvent {
|
|
213
213
|
/** Action. */
|
|
214
214
|
action?: 'authenticated';
|
|
215
215
|
/** Type. */
|
|
@@ -237,7 +237,7 @@ interface CheckoutEvent {
|
|
|
237
237
|
status: 'successful' | 'error';
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
interface ModulePublicRuntimeConfig extends ModulePublicRuntimeConfigType {
|
|
240
|
+
export interface ModulePublicRuntimeConfig extends ModulePublicRuntimeConfigType {
|
|
241
241
|
}
|
|
242
242
|
declare module '@nuxt/schema' {
|
|
243
243
|
interface RuntimeConfig {
|
|
@@ -264,5 +264,3 @@ declare module 'nitropack' {
|
|
|
264
264
|
'storefront:rpc:error': (rpcName: RpcMethodName, context: RpcContext, error: unknown) => HookResult;
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
|
|
268
|
-
export type { AppKeys as A, CheckoutShopConfig as C, ModuleBaseOptions as M, PublicShopConfig as P, SessionConfig as S, StorageEntity as a, StorageConfig as b, SapiConfig as c, AdditionalShopConfig as d, ShopConfig as e, ShopConfigIndexed as f, StorefrontConfig as g, SupportedDriverName as h, CheckoutEvent as i, ModulePublicRuntimeConfig as j };
|
|
File without changes
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Factory } from 'fishery';
|
|
2
|
-
import {
|
|
2
|
+
import { ModuleBaseOptions, ShopConfig } from '../../dist/runtime/types/module.js';
|
|
3
3
|
import { RpcContext } from '@scayle/storefront-core';
|
|
4
4
|
import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
|
|
5
5
|
export * from '@scayle/storefront-core/dist/test/factories';
|
|
6
|
-
import '@scayle/unstorage-compression-driver';
|
|
7
|
-
import 'unstorage';
|
|
8
|
-
import '../../dist/runtime/utils/zodSchema.js';
|
|
9
|
-
import '@nuxt/schema';
|
|
10
6
|
|
|
11
7
|
interface ModuleOptionsFactoryParams {
|
|
12
8
|
shops: ShopConfig[];
|
package/dist/types.d.mts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import type { NuxtModule } from '@nuxt/schema'
|
|
2
2
|
|
|
3
|
-
import type { default as Module, ModuleHooks
|
|
3
|
+
import type { default as Module, ModuleHooks } from './module.mjs'
|
|
4
4
|
|
|
5
5
|
declare module '@nuxt/schema' {
|
|
6
6
|
interface NuxtHooks extends ModuleHooks {}
|
|
7
|
-
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
11
10
|
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
export { type LogLevel } from '@scayle/storefront-core'
|
|
15
|
-
|
|
16
|
-
export { type ModuleBaseOptions, default } from './module.mjs'
|
|
11
|
+
export { default } from './module.mjs'
|
|
17
12
|
|
|
18
13
|
export { type ModuleHooks } from './module.mjs'
|
|
14
|
+
|
|
15
|
+
export * from '../dist/runtime/types/module.js'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.24.
|
|
4
|
+
"version": "8.24.2",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"build": "nuxt-module-build build",
|
|
66
66
|
"dev": "nuxi dev playground",
|
|
67
67
|
"dev:build": "nuxi build playground",
|
|
68
|
-
"prep": "nuxt-module-build
|
|
68
|
+
"prep": "nuxt-module-build prepare && nuxi prepare playground",
|
|
69
69
|
"format": "dprint check",
|
|
70
70
|
"format:fix": "dprint fmt",
|
|
71
71
|
"lint": "eslint .",
|
|
@@ -73,14 +73,15 @@
|
|
|
73
73
|
"lint:fix": "eslint . --fix",
|
|
74
74
|
"typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
75
75
|
"package:lint": "publint",
|
|
76
|
+
"verify-packaging": "attw --pack . --profile esm-only",
|
|
76
77
|
"test": "vitest run",
|
|
77
78
|
"test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit --outputFile=./coverage/junit.xml",
|
|
78
79
|
"test:watch": "vitest watch"
|
|
79
80
|
},
|
|
80
81
|
"dependencies": {
|
|
81
82
|
"@opentelemetry/api": "^1.9.0",
|
|
82
|
-
"@scayle/h3-session": "0.6.
|
|
83
|
-
"@scayle/storefront-core": "8.24.
|
|
83
|
+
"@scayle/h3-session": "0.6.1",
|
|
84
|
+
"@scayle/storefront-core": "8.24.2",
|
|
84
85
|
"@scayle/unstorage-compression-driver": "^0.2.6",
|
|
85
86
|
"@vercel/nft": "0.29.2",
|
|
86
87
|
"@vueuse/core": "13.1.0",
|
|
@@ -99,30 +100,32 @@
|
|
|
99
100
|
"schema-dts": "1.1.5"
|
|
100
101
|
},
|
|
101
102
|
"devDependencies": {
|
|
103
|
+
"@arethetypeswrong/cli": "0.17.4",
|
|
102
104
|
"@eslint/eslintrc": "3.3.1",
|
|
103
105
|
"@nuxt/eslint": "1.3.0",
|
|
104
|
-
"@nuxt/kit": "3.
|
|
106
|
+
"@nuxt/kit": "3.16.2",
|
|
105
107
|
"@nuxt/module-builder": "1.0.1",
|
|
106
|
-
"@nuxt/schema": "3.
|
|
108
|
+
"@nuxt/schema": "3.16.2",
|
|
107
109
|
"@nuxt/test-utils": "3.17.2",
|
|
108
110
|
"@scayle/eslint-config-storefront": "4.5.0",
|
|
109
111
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
110
112
|
"@scayle/unstorage-scayle-kv-driver": "0.1.1",
|
|
111
|
-
"@types/node": "22.
|
|
113
|
+
"@types/node": "22.15.2",
|
|
112
114
|
"dprint": "0.49.1",
|
|
113
|
-
"eslint-formatter-gitlab": "
|
|
114
|
-
"eslint": "9.
|
|
115
|
+
"eslint-formatter-gitlab": "6.0.0",
|
|
116
|
+
"eslint": "9.25.1",
|
|
115
117
|
"fishery": "2.2.3",
|
|
116
|
-
"h3": "1.15.
|
|
117
|
-
"nitropack": "2.
|
|
118
|
+
"h3": "1.15.1",
|
|
119
|
+
"nitropack": "2.11.9",
|
|
120
|
+
"nitro-test-utils": "0.9.2",
|
|
118
121
|
"node-mocks-http": "1.16.2",
|
|
119
|
-
"nuxi": "3.
|
|
120
|
-
"nuxt": "3.
|
|
122
|
+
"nuxi": "3.25.0",
|
|
123
|
+
"nuxt": "3.16.2",
|
|
121
124
|
"publint": "0.2.12",
|
|
122
125
|
"typescript": "5.8.3",
|
|
123
|
-
"unbuild": "
|
|
124
|
-
"vitest": "3.1.
|
|
125
|
-
"vue-tsc": "2.2.
|
|
126
|
+
"unbuild": "3.5.0",
|
|
127
|
+
"vitest": "3.1.2",
|
|
128
|
+
"vue-tsc": "2.2.10"
|
|
126
129
|
},
|
|
127
130
|
"peerDependencies": {
|
|
128
131
|
"@nuxt/kit": ">=3.12.2",
|