@scayle/storefront-nuxt 7.92.0 → 7.94.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 +28 -0
- package/dist/index.d.mts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.mjs +240 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -1
- package/dist/runtime/api/rpcHandler.d.ts +2 -2
- package/dist/runtime/plugin/shop.d.ts +4 -4
- package/dist/runtime/utils/zodSchema.d.ts +415 -415
- package/package.json +3 -7
- package/dist/test-factories/category.d.ts +0 -3
- package/dist/test-factories/category.mjs +0 -18
- package/dist/test-factories/index.d.ts +0 -4
- package/dist/test-factories/index.mjs +0 -4
- package/dist/test-factories/moduleOptions.d.ts +0 -7
- package/dist/test-factories/moduleOptions.mjs +0 -27
- package/dist/test-factories/rpcContext.d.ts +0 -7
- package/dist/test-factories/rpcContext.mjs +0 -57
- package/dist/test-factories/shopConfig.d.ts +0 -3
- package/dist/test-factories/shopConfig.mjs +0 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.94.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,10 +29,6 @@
|
|
|
29
29
|
"types": "./dist/runtime/composables/index.d.ts",
|
|
30
30
|
"import": "./dist/runtime/composables/index.js"
|
|
31
31
|
},
|
|
32
|
-
"./test-factories": {
|
|
33
|
-
"types": "./dist/test-factories/index.d.ts",
|
|
34
|
-
"default": "./dist/test-factories/index.mjs"
|
|
35
|
-
},
|
|
36
32
|
".": {
|
|
37
33
|
"types": "./dist/index.d.ts",
|
|
38
34
|
"default": "./dist/index.mjs"
|
|
@@ -104,8 +100,8 @@
|
|
|
104
100
|
"nuxi": "3.15.0",
|
|
105
101
|
"nuxt": "3.13.2",
|
|
106
102
|
"publint": "0.2.12",
|
|
107
|
-
"
|
|
108
|
-
"
|
|
103
|
+
"vue-tsc": "2.1.10",
|
|
104
|
+
"vitest": "2.1.4"
|
|
109
105
|
},
|
|
110
106
|
"peerDependencies": {
|
|
111
107
|
"fishery": "^2.2.2",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Factory } from "fishery";
|
|
2
|
-
export const categoryFactory = Factory.define(() => {
|
|
3
|
-
return {
|
|
4
|
-
id: 1,
|
|
5
|
-
path: "/women",
|
|
6
|
-
name: "women",
|
|
7
|
-
slug: "test",
|
|
8
|
-
parentId: 2048,
|
|
9
|
-
rootlineIds: [2045, 2048, 2058],
|
|
10
|
-
childrenIds: [],
|
|
11
|
-
properties: [],
|
|
12
|
-
isHidden: false,
|
|
13
|
-
depth: 3,
|
|
14
|
-
supportedFilter: ["color", "brand", "size"],
|
|
15
|
-
shopLevelCustomData: {},
|
|
16
|
-
countryLevelCustomData: {}
|
|
17
|
-
};
|
|
18
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Factory } from 'fishery';
|
|
2
|
-
import type { ModuleBaseOptions, ShopConfig } from '../../src/module';
|
|
3
|
-
interface ModuleOptionsFactoryParams {
|
|
4
|
-
shops: ShopConfig[];
|
|
5
|
-
}
|
|
6
|
-
export declare const moduleOptionsFactory: Factory<ModuleBaseOptions, ModuleOptionsFactoryParams, ModuleBaseOptions>;
|
|
7
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Factory } from "fishery";
|
|
2
|
-
import { HashAlgorithm } from "@scayle/storefront-core";
|
|
3
|
-
export const moduleOptionsFactory = Factory.define(({ transientParams }) => {
|
|
4
|
-
return {
|
|
5
|
-
sapi: {
|
|
6
|
-
host: "sapiHost",
|
|
7
|
-
token: "sapiToken"
|
|
8
|
-
},
|
|
9
|
-
oauth: {
|
|
10
|
-
apiHost: "oauthHost",
|
|
11
|
-
clientId: "clientId",
|
|
12
|
-
clientSecret: "clientSecret"
|
|
13
|
-
},
|
|
14
|
-
appKeys: {
|
|
15
|
-
basketKey: "basketKey",
|
|
16
|
-
wishlistKey: "wishlistKey",
|
|
17
|
-
hashAlgorithm: HashAlgorithm.MD5
|
|
18
|
-
},
|
|
19
|
-
shopSelector: "path",
|
|
20
|
-
shops: (transientParams?.shops || []).reduce((acc, curr) => {
|
|
21
|
-
return {
|
|
22
|
-
[curr.shopId]: curr,
|
|
23
|
-
...acc
|
|
24
|
-
};
|
|
25
|
-
}, {})
|
|
26
|
-
};
|
|
27
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Factory } from 'fishery';
|
|
2
|
-
import { type RpcContext } from '@scayle/storefront-core';
|
|
3
|
-
interface RpcContextFactoryParams {
|
|
4
|
-
isLoggedIn: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const rpcContextFactory: Factory<RpcContext, RpcContextFactoryParams, RpcContext>;
|
|
7
|
-
export {};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Factory } from "fishery";
|
|
2
|
-
import { vi } from "vitest";
|
|
3
|
-
import {
|
|
4
|
-
StorefrontAPIClient
|
|
5
|
-
} from "@scayle/storefront-core";
|
|
6
|
-
import { Log } from "../../src";
|
|
7
|
-
export const rpcContextFactory = Factory.define(({ transientParams }) => {
|
|
8
|
-
return {
|
|
9
|
-
locale: "de",
|
|
10
|
-
checkout: {
|
|
11
|
-
url: "",
|
|
12
|
-
token: "",
|
|
13
|
-
secret: "",
|
|
14
|
-
user: ""
|
|
15
|
-
},
|
|
16
|
-
bapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
|
|
17
|
-
sapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
|
|
18
|
-
cached: (fn, _options) => {
|
|
19
|
-
return async (...args) => {
|
|
20
|
-
return await fn(...args);
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
isCmsPreview: false,
|
|
24
|
-
shopId: 1001,
|
|
25
|
-
domain: "localhost",
|
|
26
|
-
destroySessionsForUserId: vi.fn(),
|
|
27
|
-
generateBasketKeyForUserId: (userId) => Promise.resolve(`basket-${userId}`),
|
|
28
|
-
generateWishlistKeyForUserId: (userId) => Promise.resolve(`wishlist-${userId}`),
|
|
29
|
-
log: new Log(),
|
|
30
|
-
auth: {},
|
|
31
|
-
runtimeConfiguration: {},
|
|
32
|
-
headers: new Headers(),
|
|
33
|
-
...transientParams.isLoggedIn ? {
|
|
34
|
-
wishlistKey: "wishlistKey",
|
|
35
|
-
basketKey: "basketKey",
|
|
36
|
-
sessionId: "sessionId",
|
|
37
|
-
user: void 0,
|
|
38
|
-
accessToken: void 0,
|
|
39
|
-
refreshToken: void 0,
|
|
40
|
-
destroySession: vi.fn(),
|
|
41
|
-
createUserBoundSession: vi.fn(),
|
|
42
|
-
updateUser: vi.fn(),
|
|
43
|
-
updateTokens: vi.fn()
|
|
44
|
-
} : {
|
|
45
|
-
wishlistKey: void 0,
|
|
46
|
-
basketKey: void 0,
|
|
47
|
-
sessionId: void 0,
|
|
48
|
-
user: void 0,
|
|
49
|
-
accessToken: void 0,
|
|
50
|
-
refreshToken: void 0,
|
|
51
|
-
destroySession: void 0,
|
|
52
|
-
createUserBoundSession: void 0,
|
|
53
|
-
updateUser: void 0,
|
|
54
|
-
updateTokens: void 0
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Factory } from "fishery";
|
|
2
|
-
export const shopConfigFactory = Factory.define(() => {
|
|
3
|
-
return {
|
|
4
|
-
shopId: 1,
|
|
5
|
-
domain: "localhost",
|
|
6
|
-
locale: "en-US",
|
|
7
|
-
currency: "USD",
|
|
8
|
-
checkout: {
|
|
9
|
-
host: "checkoutHost",
|
|
10
|
-
secret: "checkoutSecret",
|
|
11
|
-
token: "checkoutToken",
|
|
12
|
-
user: "checkoutUser"
|
|
13
|
-
},
|
|
14
|
-
auth: {
|
|
15
|
-
resetPasswordUrl: "resetPasswordUrl"
|
|
16
|
-
},
|
|
17
|
-
paymentProviders: []
|
|
18
|
-
};
|
|
19
|
-
});
|