flowrix 1.0.1-beta.16 → 1.0.1-beta.17

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.16",
4
+ "version": "1.0.1-beta.17",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -7,24 +7,27 @@ const module = defineNuxtModule({
7
7
  },
8
8
  defaults: {},
9
9
  async setup(_options, nuxt) {
10
- nuxt.options.runtimeConfig = {
11
- ...nuxt.options.runtimeConfig,
12
- // Server-only key
13
- FLOWRIX_API_KEY: nuxt.options.runtimeConfig.FLOWRIX_API_KEY || process.env.FLOWRIX_API_KEY || "",
14
- FLOWRIX_API_SECRET: nuxt.options.runtimeConfig.FLOWRIX_API_SECRET || process.env.FLOWRIX_API_SECRET || "",
15
- FLOWRIX_API_ORIGIN: nuxt.options.runtimeConfig.FLOWRIX_API_ORIGIN || process.env.FLOWRIX_API_ORIGIN || "",
16
- FLOWRIX_API_BASE: nuxt.options.runtimeConfig.FLOWRIX_API_BASE || process.env.FLOWRIX_API_BASE || "",
17
- FLOWRIX_API_BASE_V2: nuxt.options.runtimeConfig.FLOWRIX_API_BASE_V2 || process.env.FLOWRIX_API_BASE_V2 || "",
18
- public: {
19
- ...nuxt.options.runtimeConfig.public,
20
- // Client-exposed key
21
- FLOWRIX_API_KEY: nuxt.options.runtimeConfig.public?.FLOWRIX_API_KEY || process.env.FLOWRIX_API_KEY || "",
22
- FLOWRIX_API_SECRET: nuxt.options.runtimeConfig.public?.FLOWRIX_API_SECRET || process.env.FLOWRIX_API_SECRET || "",
23
- FLOWRIX_API_ORIGIN: nuxt.options.runtimeConfig.public?.FLOWRIX_API_ORIGIN || process.env.FLOWRIX_API_ORIGIN || "",
24
- FLOWRIX_API_BASE: nuxt.options.runtimeConfig.public?.FLOWRIX_API_BASE || process.env.FLOWRIX_API_BASE || "",
25
- FLOWRIX_API_BASE_V2: nuxt.options.runtimeConfig.public?.FLOWRIX_API_BASE_V2 || process.env.FLOWRIX_API_BASE_V2 || ""
26
- }
27
- };
10
+ const env = process.env;
11
+ const runtimeConfig = nuxt.options.runtimeConfig;
12
+ if (!runtimeConfig.public) {
13
+ runtimeConfig.public = {};
14
+ }
15
+ runtimeConfig.FLOWRIX_API_KEY ||= env.FLOWRIX_API_KEY || "";
16
+ runtimeConfig.FLOWRIX_API_SECRET ||= env.FLOWRIX_API_SECRET || "";
17
+ runtimeConfig.FLOWRIX_API_ORIGIN ||= env.FLOWRIX_API_ORIGIN || "";
18
+ runtimeConfig.FLOWRIX_API_BASE ||= env.FLOWRIX_API_BASE || "";
19
+ runtimeConfig.FLOWRIX_API_BASE_V2 ||= env.FLOWRIX_API_BASE_V2 || "";
20
+ Object.assign(runtimeConfig.public, {
21
+ FLOWRIX_API_KEY: runtimeConfig.public.FLOWRIX_API_KEY || env.FLOWRIX_API_KEY || "",
22
+ FLOWRIX_API_SECRET: runtimeConfig.public.FLOWRIX_API_SECRET || env.FLOWRIX_API_SECRET || "",
23
+ FLOWRIX_API_ORIGIN: runtimeConfig.public.FLOWRIX_API_ORIGIN || env.FLOWRIX_API_ORIGIN || "",
24
+ FLOWRIX_API_BASE: runtimeConfig.public.FLOWRIX_API_BASE || env.FLOWRIX_API_BASE || "",
25
+ FLOWRIX_API_BASE_V2: runtimeConfig.public.FLOWRIX_API_BASE_V2 || env.FLOWRIX_API_BASE_V2 || ""
26
+ });
27
+ console.info("\u2705 Flowrix runtime config loaded:", {
28
+ apiKey: runtimeConfig.public.FLOWRIX_API_KEY,
29
+ apiBase: runtimeConfig.public.FLOWRIX_API_BASE
30
+ });
28
31
  const resolver = createResolver(import.meta.url);
29
32
  await installModule("@pinia/nuxt");
30
33
  addServerHandler({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.16",
3
+ "version": "1.0.1-beta.17",
4
4
  "description": "lug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",