@scayle/omnichannel-nuxt 4.4.0 → 4.6.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 +15 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/rpc/storeLocator.d.ts +4 -5
- package/dist/runtime/rpc/storeLocator.js +7 -6
- package/package.json +18 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @scayle/omnichannel-nuxt
|
|
2
2
|
|
|
3
|
+
## 4.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **[RPC]** Updated built-in RPC methods to use `GET` for safe, cacheable reads and `PUT`/`POST`/`DELETE` for mutations, enabling CDN and browser caching for public data fetches.
|
|
8
|
+
|
|
9
|
+
## 4.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- All packages now require Node.js 22 or later, in line with the current Node.js LTS release schedule. See the [Node.js release schedule](https://nodejs.org/en/about/previous-releases#release-schedule) for details.
|
|
14
|
+
|
|
15
|
+
If your project is still running an older Node.js version, now is a good time to upgrade to Node.js 22 at minimum, or ideally Node.js 24, for the latest security patches and stability improvements.
|
|
16
|
+
|
|
3
17
|
## 4.4.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -145,7 +159,7 @@
|
|
|
145
159
|
refreshStoreVariant,
|
|
146
160
|
variantStoresData,
|
|
147
161
|
refreshVariantStores,
|
|
148
|
-
} = useStoreLocator(
|
|
162
|
+
} = useStoreLocator("useStoreLocator", ["openingTimes", "settings"]);
|
|
149
163
|
```
|
|
150
164
|
|
|
151
165
|
## 2.1.4
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule, isNuxtMajorVersion, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const PACKAGE_NAME = "@scayle/omnichannel-nuxt";
|
|
4
|
-
const PACKAGE_VERSION = "4.
|
|
4
|
+
const PACKAGE_VERSION = "4.6.0";
|
|
5
5
|
const module$1 = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: PACKAGE_NAME,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const getStoreVariantById: (options: FetchStoreVariantByIdParams, context: RpcContext) => Promise<StoreAvailabilityCheckResponse>;
|
|
1
|
+
import type { StoreLocatorSearchParams, FetchStoreVariantByIdParams, GetStoresForVariantOptions } from '../types/index.js';
|
|
2
|
+
export declare const getStores: import("@scayle/storefront-core").ParamRpcHandler<StoreLocatorSearchParams, import("../types/index.js").StoreLocationResponse>;
|
|
3
|
+
export declare const getStoresForVariant: import("@scayle/storefront-core").ParamRpcHandler<GetStoresForVariantOptions, import("../types/index.js").VariantLocationResponse>;
|
|
4
|
+
export declare const getStoreVariantById: import("@scayle/storefront-core").ParamRpcHandler<FetchStoreVariantByIdParams, import("../types/index.js").StoreAvailabilityCheckResponse>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineRpcHandler } from "@scayle/storefront-nuxt";
|
|
1
2
|
import { init } from "../lib/init.js";
|
|
2
3
|
const noClientMessage = "Client not configured";
|
|
3
4
|
function getOmnichannelConfig(runtimeConfig) {
|
|
@@ -17,7 +18,7 @@ function getOmnichannelConfig(runtimeConfig) {
|
|
|
17
18
|
} : {}
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
|
-
export const getStores = async
|
|
21
|
+
export const getStores = defineRpcHandler(async (options, context) => {
|
|
21
22
|
const storeLocator = getOmnichannelConfig(
|
|
22
23
|
context.runtimeConfiguration
|
|
23
24
|
);
|
|
@@ -26,8 +27,8 @@ export const getStores = async function getStores2(options, context) {
|
|
|
26
27
|
throw new Error(noClientMessage);
|
|
27
28
|
}
|
|
28
29
|
return await omnichannelClient.getStores(options);
|
|
29
|
-
};
|
|
30
|
-
export const getStoresForVariant = async
|
|
30
|
+
}, { method: "GET" });
|
|
31
|
+
export const getStoresForVariant = defineRpcHandler(async (options, context) => {
|
|
31
32
|
const storeLocator = getOmnichannelConfig(
|
|
32
33
|
context.runtimeConfiguration
|
|
33
34
|
);
|
|
@@ -42,8 +43,8 @@ export const getStoresForVariant = async function getStoresForVariant2(options,
|
|
|
42
43
|
throw new Error(noClientMessage);
|
|
43
44
|
}
|
|
44
45
|
return await omnichannelClient.getStoresForVariant(fetchOptions);
|
|
45
|
-
};
|
|
46
|
-
export const getStoreVariantById = async
|
|
46
|
+
}, { method: "GET" });
|
|
47
|
+
export const getStoreVariantById = defineRpcHandler(async (options, context) => {
|
|
47
48
|
const storeLocator = getOmnichannelConfig(
|
|
48
49
|
context.runtimeConfiguration
|
|
49
50
|
);
|
|
@@ -52,4 +53,4 @@ export const getStoreVariantById = async function getStoreVariantById2(options,
|
|
|
52
53
|
throw new Error(noClientMessage);
|
|
53
54
|
}
|
|
54
55
|
return await omnichannelClient.getStoreVariantById(options);
|
|
55
|
-
};
|
|
56
|
+
}, { method: "GET" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/omnichannel-nuxt",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Collection of essential utilities to work with omnichannel",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist/**"
|
|
34
34
|
],
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": ">=
|
|
36
|
+
"node": ">= 22.0.0"
|
|
37
37
|
},
|
|
38
38
|
"compatibility": {
|
|
39
39
|
"nuxt": "^3.9.0"
|
|
@@ -49,24 +49,23 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@arethetypeswrong/cli": "0.18.2",
|
|
51
51
|
"@nuxt/module-builder": "1.0.2",
|
|
52
|
-
"@nuxt/schema": "3.20.
|
|
53
|
-
"@
|
|
54
|
-
"@types/
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"eslint-formatter-gitlab": "7.0
|
|
58
|
-
"eslint": "
|
|
59
|
-
"h3": "1.15.
|
|
60
|
-
"nuxt": "3.20.
|
|
61
|
-
"publint": "0.3.
|
|
52
|
+
"@nuxt/schema": "^3.20.2",
|
|
53
|
+
"@scayle/eslint-config-storefront": "^4.8.0",
|
|
54
|
+
"@types/node": "22.19.17",
|
|
55
|
+
"@types/qs": "6.15.0",
|
|
56
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
57
|
+
"eslint-formatter-gitlab": "7.1.0",
|
|
58
|
+
"eslint": "10.2.1",
|
|
59
|
+
"h3": "1.15.11",
|
|
60
|
+
"nuxt": "^3.20.2",
|
|
61
|
+
"publint": "0.3.18",
|
|
62
62
|
"typescript": "5.9.3",
|
|
63
63
|
"unbuild": "3.6.1",
|
|
64
|
-
"vitest": "4.
|
|
65
|
-
"vue-tsc": "3.2.
|
|
66
|
-
"vue": "3.5.
|
|
67
|
-
"@scayle/
|
|
68
|
-
"@scayle/vitest-config-storefront": "1.0.0"
|
|
69
|
-
"@scayle/storefront-nuxt": "8.58.0"
|
|
64
|
+
"vitest": "4.1.5",
|
|
65
|
+
"vue-tsc": "3.2.6",
|
|
66
|
+
"vue": "3.5.32",
|
|
67
|
+
"@scayle/storefront-nuxt": "8.61.0",
|
|
68
|
+
"@scayle/vitest-config-storefront": "1.0.0"
|
|
70
69
|
},
|
|
71
70
|
"scripts": {
|
|
72
71
|
"clean": "rimraf ./dist",
|
|
@@ -74,16 +73,11 @@
|
|
|
74
73
|
"dev": "nuxt dev playground",
|
|
75
74
|
"dev:build": "nuxt build playground",
|
|
76
75
|
"prep": "nuxt-module-build prepare && nuxt prepare playground",
|
|
77
|
-
"format": "dprint check",
|
|
78
|
-
"format:fix": "dprint fmt",
|
|
79
76
|
"lint": "eslint .",
|
|
80
77
|
"lint:ci": "eslint . --format gitlab",
|
|
81
78
|
"lint:fix": "eslint . --fix",
|
|
82
79
|
"package:lint": "publint",
|
|
83
80
|
"verify-packaging": "attw --pack . --profile esm-only",
|
|
84
|
-
"typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
85
|
-
"test": "vitest --run --passWithNoTests",
|
|
86
|
-
"test:watch": "vitest --passWithNoTests",
|
|
87
|
-
"test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit --outputFile=./coverage/junit.xml"
|
|
81
|
+
"typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
88
82
|
}
|
|
89
83
|
}
|