flowrix 1.0.1-beta.110 → 1.0.1-beta.111

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flowrix",
3
3
  "configKey": "flowrix",
4
- "version": "1.0.1-beta.110",
4
+ "version": "1.0.1-beta.111",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -9,19 +9,19 @@ const module$1 = defineNuxtModule({
9
9
  async setup(_options, nuxt) {
10
10
  const env = process.env;
11
11
  const runtimeConfig = nuxt.options.runtimeConfig;
12
- runtimeConfig.FLOWRIX_API_KEY = env.KEY || runtimeConfig.FLOWRIX_API_KEY || "";
13
- runtimeConfig.FLOWRIX_API_SECRET = env.SECRET || runtimeConfig.FLOWRIX_API_SECRET || "";
14
- runtimeConfig.FLOWRIX_API_ORIGIN = env.ORIGIN || runtimeConfig.FLOWRIX_API_ORIGIN || "";
15
- runtimeConfig.FLOWRIX_API_BASE = env.BASE || runtimeConfig.FLOWRIX_API_BASE || "";
16
- runtimeConfig.FLOWRIX_CACHE = env.CACHE || runtimeConfig.FLOWRIX_CACHE || "false";
17
- runtimeConfig.FLOWRIX_CDN = env.CDN || runtimeConfig.FLOWRIX_CDN || "";
12
+ runtimeConfig.FLOWRIX_API_KEY = env.KEY || "";
13
+ runtimeConfig.FLOWRIX_API_SECRET = env.SECRET || "";
14
+ runtimeConfig.FLOWRIX_API_ORIGIN = env.ORIGIN || "";
15
+ runtimeConfig.FLOWRIX_API_BASE = env.BASE || "";
16
+ runtimeConfig.FLOWRIX_CACHE = env.CACHE || "false";
17
+ runtimeConfig.FLOWRIX_CDN = env.CDN || "";
18
18
  Object.assign(runtimeConfig.public, {
19
19
  ...runtimeConfig.public,
20
- FLOWRIX_API_KEY: runtimeConfig.public.FLOWRIX_API_KEY || env.KEY || runtimeConfig.FLOWRIX_API_KEY || "",
21
- FLOWRIX_API_ORIGIN: runtimeConfig.public.FLOWRIX_API_ORIGIN || env.ORIGIN || runtimeConfig.FLOWRIX_API_ORIGIN || "",
22
- FLOWRIX_API_BASE: runtimeConfig.public.FLOWRIX_API_BASE || env.BASE || runtimeConfig.FLOWRIX_API_BASE || "",
23
- FLOWRIX_CACHE: runtimeConfig.public.FLOWRIX_CACHE || env.CACHE || runtimeConfig.FLOWRIX_CACHE || "false",
24
- FLOWRIX_CDN: runtimeConfig.public.FLOWRIX_CDN || env.FCDN || runtimeConfig.FLOWRIX_CDN || ""
20
+ FLOWRIX_API_KEY: env.KEY || runtimeConfig.FLOWRIX_API_KEY || runtimeConfig.public.FLOWRIX_API_KEY || "",
21
+ FLOWRIX_API_ORIGIN: env.ORIGIN || runtimeConfig.FLOWRIX_API_ORIGIN || runtimeConfig.public.FLOWRIX_API_ORIGIN || "",
22
+ FLOWRIX_API_BASE: env.BASE || runtimeConfig.FLOWRIX_API_BASE || runtimeConfig.public.FLOWRIX_API_BASE || "",
23
+ FLOWRIX_CACHE: env.CACHE || runtimeConfig.FLOWRIX_CACHE || runtimeConfig.public.FLOWRIX_CACHE || "false",
24
+ FLOWRIX_CDN: env.FCDN || runtimeConfig.FLOWRIX_CDN || runtimeConfig.public.FLOWRIX_CDN || ""
25
25
  });
26
26
  console.log("runtimeConfig", runtimeConfig);
27
27
  const resolver = createResolver(import.meta.url);
@@ -1,4 +1,4 @@
1
- export declare const useCategoryIndex: (props: any) => {
1
+ export declare const useCategoryIndex: (props: any, ProductTypes?: string[]) => {
2
2
  catData: any;
3
3
  pending: any;
4
4
  error: any;
@@ -1,11 +1,15 @@
1
1
  import { useHead, useRoute, useAsyncData } from "#imports";
2
2
  import { computed } from "vue";
3
- export const useCategoryIndex = (props) => {
3
+ export const useCategoryIndex = (props, ProductTypes = ["custom", "simple", "bundle"]) => {
4
4
  const route = useRoute();
5
5
  const slug = route.params.slug;
6
+ let query = {
7
+ ...route.query,
8
+ ProductTypes
9
+ };
6
10
  const { data: catData, pending, error, refresh } = useAsyncData(
7
11
  `category-${slug}-${JSON.stringify(route.query)}`,
8
- () => $fetch(`/api/category/${slug}`, { query: route.query })
12
+ () => $fetch(`/api/category/${slug}`, { query })
9
13
  );
10
14
  const meta = computed(() => {
11
15
  const category = catData.value?.category || {};
@@ -18,14 +18,10 @@ export default defineEventHandler(async (event) => {
18
18
  }
19
19
  };
20
20
  const page = await flowrixApi.get(`permalink/${slug}`, apiConfig, options);
21
- console.log("config.FLOWRIX_CACHE", config);
22
21
  if (config.FLOWRIX_CACHE != "true" || config.public?.FLOWRIX_CACHE != "true") {
23
22
  const CACHE_DIR = join("/tmp", ".cache");
24
- console.log("\u{1F9F9} CACHE_DIR0", CACHE_DIR);
25
23
  if (existsSync(CACHE_DIR)) {
26
- console.log("\u{1F9F9} Flowrix: .cache folder found \u2014 removing entire folder...");
27
24
  await rm(CACHE_DIR, { recursive: true, force: true });
28
- console.log("\u2705 Flowrix: Entire .cache folder removed.");
29
25
  } else {
30
26
  console.log("\u2139\uFE0F Flowrix: No .cache folder found \u2014 skipping cleanup.");
31
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.110",
3
+ "version": "1.0.1-beta.111",
4
4
  "description": "Plug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",