@scayle/storefront-product-detail 1.4.1 → 1.4.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
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const PACKAGE_NAME = "@scayle/storefront-product-detail";
|
|
4
|
-
const PACKAGE_VERSION = "1.4.
|
|
4
|
+
const PACKAGE_VERSION = "1.4.2";
|
|
5
5
|
const module = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: PACKAGE_NAME,
|
|
@@ -14,7 +14,7 @@ const module = defineNuxtModule({
|
|
|
14
14
|
},
|
|
15
15
|
defaults: {},
|
|
16
16
|
setup(options, nuxt) {
|
|
17
|
-
const { resolve } = createResolver(import.meta.url);
|
|
17
|
+
const { resolve, resolvePath } = createResolver(import.meta.url);
|
|
18
18
|
nuxt.options.alias["#storefront-product-detail"] = resolve("./runtime");
|
|
19
19
|
nuxt.options.build.transpile.push("#storefront-product-detail/runtime");
|
|
20
20
|
nuxt.hook("storefront:custom-rpc:extend", async (customRpcs) => {
|
|
@@ -23,6 +23,11 @@ const module = defineNuxtModule({
|
|
|
23
23
|
names: ["getAllShopProductsForId"]
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
+
nuxt.options.optimization.keyedComposables.push({
|
|
27
|
+
name: "useAllShopProductsForId",
|
|
28
|
+
argumentLength: 2,
|
|
29
|
+
source: "#storefront-product-detail"
|
|
30
|
+
});
|
|
26
31
|
if (options.autoImports) {
|
|
27
32
|
addImportsDir(resolve("./runtime/composables"));
|
|
28
33
|
addImportsDir(resolve("./runtime/utils"));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type { KeysOf, NormalizedRpcResponse, UseRpcReturn } from '@scayle/storefront-nuxt/composables';
|
|
1
|
+
import type { KeysOf, NormalizedRpcResponse, UseRpcOptions, UseRpcReturn } from '@scayle/storefront-nuxt/composables';
|
|
2
2
|
import type { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import type { RpcMethodParameters } from '@scayle/storefront-nuxt';
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function useAllShopProductsForId<DataT = NormalizedRpcResponse<'getAllShopProductsForId'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, }?: Partial<{
|
|
5
|
+
params: MaybeRefOrGetter<RpcMethodParameters<'getAllShopProductsForId'>>;
|
|
6
|
+
options: UseRpcOptions<'getAllShopProductsForId', DataT, PickKeys, DefaultT>;
|
|
7
|
+
}>, key?: string): UseRpcReturn<'getAllShopProductsForId', DataT, PickKeys, DefaultT>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { useRpc } from "@scayle/storefront-nuxt/composables";
|
|
2
|
-
export function
|
|
2
|
+
export function useAllShopProductsForId({
|
|
3
|
+
params,
|
|
4
|
+
options
|
|
5
|
+
} = {}, key = "useAllShopProductsById") {
|
|
3
6
|
return useRpc(
|
|
4
7
|
"getAllShopProductsForId",
|
|
5
8
|
key,
|
|
6
|
-
params
|
|
9
|
+
params,
|
|
10
|
+
options
|
|
7
11
|
);
|
|
8
12
|
}
|
package/package.json
CHANGED