nvent 0.5.13 → 0.5.15

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,6 +1,6 @@
1
1
  {
2
2
  "name": "nvent",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "configKey": "nvent",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -1194,7 +1194,7 @@ const module$1 = defineNuxtModule().with({
1194
1194
  });
1195
1195
  });
1196
1196
  const runtimeConfig = nuxt.options.runtimeConfig;
1197
- runtimeConfig.nvent = defu(runtimeConfig.nvent || {}, toRuntimeConfig(config));
1197
+ runtimeConfig.nvent = defu(toRuntimeConfig(config), runtimeConfig.nvent || {});
1198
1198
  if (!runtimeConfig.nvent) runtimeConfig.nvent = {};
1199
1199
  runtimeConfig.nvent.rootDir = nuxt.options.rootDir;
1200
1200
  const layerInfos = nuxt.options._layers.map((l) => ({
@@ -14,12 +14,6 @@ export declare function toRuntimeConfig(normalizedOptions: Required<ModuleOption
14
14
  * Uses shared connections.redis as primary source.
15
15
  */
16
16
  export declare function getRedisStorageConfig(normalizedOptions: Required<ModuleOptions>): {
17
- host: string;
18
- port: number;
19
- username?: undefined;
20
- password?: undefined;
21
- db?: undefined;
22
- } | {
23
17
  host: string | undefined;
24
18
  port: number | undefined;
25
19
  username: string | undefined;
@@ -67,6 +67,12 @@ export function normalizeModuleOptions(options) {
67
67
  }
68
68
  };
69
69
  const normalized = defu(options, defaults);
70
+ if (normalized.connections?.redis) {
71
+ console.log("[nvent-config] Redis connection after normalization:", {
72
+ host: normalized.connections.redis.host,
73
+ port: normalized.connections.redis.port
74
+ });
75
+ }
70
76
  const neededConnections = /* @__PURE__ */ new Set();
71
77
  const queueAdapter = normalized.queue.adapter;
72
78
  if (queueAdapter === "redis") {
@@ -97,8 +103,11 @@ export function normalizeModuleOptions(options) {
97
103
  }
98
104
  if (neededConnections.has("redis") && !normalized.connections.redis) {
99
105
  normalized.connections.redis = {
100
- host: "127.0.0.1",
101
- port: 6379
106
+ host: process.env.REDIS_HOST || "127.0.0.1",
107
+ port: Number.parseInt(process.env.REDIS_PORT || "6379", 10),
108
+ password: process.env.REDIS_PASSWORD,
109
+ username: process.env.REDIS_USERNAME,
110
+ db: process.env.REDIS_DB ? Number.parseInt(process.env.REDIS_DB, 10) : 0
102
111
  };
103
112
  }
104
113
  if (neededConnections.has("postgres") && !normalized.connections.postgres) {
@@ -174,8 +183,11 @@ export function getRedisStorageConfig(normalizedOptions) {
174
183
  const redisConfig = normalizedOptions.connections.redis;
175
184
  if (!redisConfig) {
176
185
  return {
177
- host: "127.0.0.1",
178
- port: 6379
186
+ host: process.env.REDIS_HOST || "127.0.0.1",
187
+ port: Number.parseInt(process.env.REDIS_PORT || "6379", 10),
188
+ username: process.env.REDIS_USERNAME,
189
+ password: process.env.REDIS_PASSWORD,
190
+ db: process.env.REDIS_DB ? Number.parseInt(process.env.REDIS_DB, 10) : 0
179
191
  };
180
192
  }
181
193
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nvent",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "Event-driven workflows for Nuxt",
5
5
  "repository": "DevJoghurt/nvent",
6
6
  "license": "MIT",