@jsnw/srv-utils 1.1.2 → 1.1.4

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.
@@ -37,7 +37,7 @@ class ConfigLoader {
37
37
  console.error(loadError.message);
38
38
  process.exit(1);
39
39
  }
40
- const [processedYaml, includeErrors] = loader.processIncludes((0, node_path_1.dirname)(path), yaml);
40
+ const [processedYaml, includeErrors] = loader.processIncludes((0, node_path_1.dirname)(loader.resolveFilePath(path)), yaml);
41
41
  if (includeErrors && includeErrors.length > 0) {
42
42
  for (const err of includeErrors)
43
43
  console.error(`$include error: ${err.message}`);
@@ -159,7 +159,7 @@ class ConfigLoader {
159
159
  }
160
160
  if (PKG_ROOT_REGEX.test(path))
161
161
  path = path.replace(PKG_ROOT_REGEX, (0, getRootPackageDirname_1.getRootPackageDirnameSync)() + node_path_1.sep);
162
- return (0, node_path_1.resolve)(process.cwd(), path);
162
+ return (0, node_path_1.resolve)(path);
163
163
  }
164
164
  /**
165
165
  * @param {string} fromDirname
@@ -6,10 +6,12 @@ const connection_schema_1 = require("./connection.schema");
6
6
  const mongodb_connection_schema_1 = require("./mongodb-connection.schema");
7
7
  const mysql_connection_schema_1 = require("./mysql-connection.schema");
8
8
  const redis_connection_schema_1 = require("./redis-connection.schema");
9
+ const rabbit_connection_schema_1 = require("./rabbit-connection.schema");
9
10
  exports.configSchemas = {
10
11
  timeString: timestring_schema_1.timeStringSchema,
11
12
  connection: connection_schema_1.connectionSchema,
12
13
  mongodbConnection: mongodb_connection_schema_1.mongodbConnectionSchema,
13
14
  mysqlConnection: mysql_connection_schema_1.mysqlConnectionSchema,
14
- redisConnection: redis_connection_schema_1.redisConnectionSchema
15
+ redisConnection: redis_connection_schema_1.redisConnectionSchema,
16
+ rabbitConnection: rabbit_connection_schema_1.rabbitConnectionSchema
15
17
  };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rabbitConnectionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const connection_schema_1 = require("./connection.schema");
6
+ exports.rabbitConnectionSchema = connection_schema_1.connectionSchema.extend({
7
+ vhost: zod_1.z.string().default('/')
8
+ });
@@ -47,4 +47,11 @@ export declare const configSchemas: {
47
47
  db: import("zod").ZodDefault<import("zod").ZodNumber>;
48
48
  keyPrefix: import("zod").ZodDefault<import("zod").ZodString>;
49
49
  }, import("zod/v4/core").$strip>;
50
+ rabbitConnection: import("zod").ZodObject<{
51
+ host: import("zod").ZodString;
52
+ port: import("zod").ZodNumber;
53
+ user: import("zod").ZodString;
54
+ pass: import("zod").ZodString;
55
+ vhost: import("zod").ZodDefault<import("zod").ZodString>;
56
+ }, import("zod/v4/core").$strip>;
50
57
  };
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const rabbitConnectionSchema: z.ZodObject<{
3
+ host: z.ZodString;
4
+ port: z.ZodNumber;
5
+ user: z.ZodString;
6
+ pass: z.ZodString;
7
+ vhost: z.ZodDefault<z.ZodString>;
8
+ }, z.core.$strip>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsnw/srv-utils",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Server-side utilities for Node.js/TypeScript: tsconfig paths, Nest helpers, and config loading.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",