@proventuslabs/nestjs-zod 1.1.0 → 1.2.0

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/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @proventuslabs/nestjs-zod
2
2
 
3
- A collection of NestJS modules to integrate Zod into your application with enhanced configuration management and type safety.
3
+ A collection of NestJS modules to integrate Zod v4 into your application with enhanced configuration management and type safety.
4
4
 
5
- ## Features
5
+ ## Features
6
6
 
7
- - 🔧 **Zod-powered Configuration**: Type-safe configuration management using Zod schemas
7
+ - 🔧 **Zod-powered Configuration**: Type-safe configuration management using Zod schemas (v4)
8
8
  - 🌍 **Environment Variable Support**: Automatic parsing and validation of environment variables
9
9
  - 📁 **Configuration Files**: Support for YAML configuration files
10
10
  - 🏗️ **Configurable Modules**: Enhanced NestJS configurable modules with Zod validation
@@ -12,61 +12,42 @@ A collection of NestJS modules to integrate Zod into your application with enhan
12
12
  - 🔄 **Merge Strategy**: Environment variables override configuration file values
13
13
  - 📝 **Descriptive Errors**: Enhanced error messages with schema descriptions
14
14
 
15
- ## Installation
15
+ ## 📦 Installation
16
16
 
17
17
  ```bash
18
- npm install @proventuslabs/nestjs-zod
18
+ npm install @proventuslabs/nestjs-zod zod
19
19
  ```
20
20
 
21
- ## Peer Dependencies
22
-
23
- This package requires the following peer dependencies:
21
+ **Peer Dependencies:**
24
22
 
25
23
  - `@nestjs/common` ^10.0.0 || ^11.0.0
26
24
  - `@nestjs/config` ^3.0.0 || ^4.0.0
27
- - `zod` ^3.0.0
28
-
29
- ## Quick Start
25
+ - `zod` ^3.25.0 || ^4.0.0
30
26
 
31
- ### Configuration Management
27
+ ## 🎯 Quick Start
32
28
 
33
29
  ```typescript
34
- import { Module } from '@nestjs/common';
35
- import { ConfigModule } from '@nestjs/config';
36
- import { registerConfig, type ConfigType } from '@proventuslabs/nestjs-zod';
37
- import { z } from 'zod';
38
-
39
- // Define your configuration schema
30
+ import { Module, Injectable } from "@nestjs/common";
31
+ import { ConfigModule, ConfigService } from "@nestjs/config";
32
+ import {
33
+ registerConfig,
34
+ type NamespacedConfigType,
35
+ } from "@proventuslabs/nestjs-zod";
36
+ import { z } from "zod";
37
+
38
+ // Define configuration schema
40
39
  const appConfig = registerConfig(
41
- 'app',
40
+ "app",
42
41
  z.object({
43
- port: z
44
- .number()
45
- .int()
46
- .min(0)
47
- .max(65535)
48
- .default(3000)
49
- .describe('The local HTTP port to bind the server to'),
50
- host: z
51
- .string()
52
- .default('localhost')
53
- .describe('The host to bind the server to'),
54
- environment: z
55
- .enum(['development', 'production', 'test'])
56
- .default('development')
57
- .describe('The application environment'),
58
- apiKey: z
59
- .string()
60
- .describe('API key for external services'),
42
+ port: z.number().default(3000).describe("Server port"),
43
+ host: z.string().default("localhost").describe("Server host"),
44
+ apiKey: z.string().describe("API key for external services"),
61
45
  }),
62
46
  {
63
- whitelistKeys: new Set(['API_KEY']), // Allow API_KEY without APP_ prefix
47
+ whitelistKeys: new Set(["API_KEY"]), // Allow API_KEY without APP_ prefix
64
48
  }
65
49
  );
66
50
 
67
- // Type inference
68
- type AppConfig = ConfigType<typeof appConfig>;
69
-
70
51
  @Module({
71
52
  imports: [
72
53
  ConfigModule.forRoot({
@@ -76,340 +57,203 @@ type AppConfig = ConfigType<typeof appConfig>;
76
57
  ],
77
58
  })
78
59
  export class AppModule {}
79
- ```
80
-
81
- ### Using Configuration
82
-
83
- ```typescript
84
- import { Injectable } from '@nestjs/common';
85
- import { ConfigService } from '@nestjs/config';
86
- import { type NamespacedConfigType } from '@proventuslabs/nestjs-zod';
87
60
 
88
61
  @Injectable()
89
62
  export class AppService {
90
63
  constructor(
91
- private configService: ConfigService<NamespacedConfigType<typeof appConfig>, true>
64
+ private configService: ConfigService<
65
+ NamespacedConfigType<typeof appConfig>,
66
+ true
67
+ >
92
68
  ) {}
93
69
 
94
- getPort(): number {
95
- return this.configService.get('app.port', { infer: true });
96
- }
97
-
98
- getHost(): string {
99
- return this.configService.get('app.host', { infer: true });
70
+ getAppConfig() {
71
+ return {
72
+ port: this.configService.get("app.port", { infer: true }),
73
+ host: this.configService.get("app.host", { infer: true }),
74
+ apiKey: this.configService.get("app.apiKey", { infer: true }),
75
+ };
100
76
  }
101
77
  }
102
78
  ```
103
79
 
104
- ## Configuration Sources
80
+ ## 🔧 Configuration and Options
105
81
 
106
- The package supports multiple configuration sources with a clear precedence order:
82
+ It comes out of the box with the support for env variables and yaml files.
107
83
 
108
- 1. **Environment Variables** (highest priority)
109
- 2. **Configuration Files** (YAML)
110
- 3. **Schema Defaults** (lowest priority)
84
+ Priority order: **Environment Variables** > **YAML Files** > **Schema Defaults**
111
85
 
112
86
  ### Environment Variables
113
87
 
114
- Environment variables are automatically parsed and validated. Use the namespace prefix followed by underscores:
88
+ Variables are automatically parsed using the namespace prefix:
115
89
 
116
90
  ```bash
117
- # For the 'app' namespace
91
+ # Standard namespaced variables
118
92
  APP_PORT=8080
119
93
  APP_HOST=0.0.0.0
120
- APP_ENVIRONMENT=production
121
94
 
122
- # Nested configuration using double underscores
95
+ # Nested objects using double underscores
123
96
  APP_DATABASE__HOST=localhost
124
97
  APP_DATABASE__PORT=5432
125
- APP_DATABASE__NAME=myapp
126
- ```
127
-
128
- #### Whitelist Keys
129
-
130
- By default, only environment variables with the namespace prefix are processed. You can whitelist additional environment variables to bypass this restriction:
131
-
132
- ```typescript
133
- const appConfig = registerConfig(
134
- 'app',
135
- z.object({
136
- port: z.number().default(3000),
137
- apiKey: z.string().describe('API key from environment'),
138
- }),
139
- {
140
- whitelistKeys: new Set(['API_KEY']), // Allow API_KEY without APP_ prefix
141
- }
142
- );
143
- ```
144
-
145
- This allows you to use environment variables like:
146
- ```bash
147
- API_KEY=your-secret-key # Will be mapped to app.apiKey
148
- APP_PORT=8080 # Standard namespaced variable
149
98
  ```
150
99
 
151
100
  ### Configuration Files
152
101
 
153
- Support for YAML configuration files via environment variables:
102
+ Support for YAML files via environment variables:
154
103
 
155
104
  ```bash
156
- # Specify a configuration file
157
- CONFIG_FILE=./config/app.yaml
158
-
159
- # Or provide inline YAML content
160
- CONFIG_CONTENT="app:
161
- port: 8080
162
- host: 0.0.0.0
163
- environment: production
164
- database:
165
- host: localhost
166
- port: 5432
167
- name: myapp"
105
+ CONFIG_FILE=./config/app.yaml # Load from file
106
+ CONFIG_CONTENT="..." # Inline YAML content
168
107
  ```
169
108
 
170
- Example `config/app.yaml`:
171
-
172
- ```yaml
173
- app:
174
- port: 8080
175
- host: 0.0.0.0
176
- environment: production
177
- database:
178
- host: localhost
179
- port: 5432
180
- name: myapp
181
- redis:
182
- host: localhost
183
- port: 6379
184
- ```
185
-
186
- ## Configurable Modules
187
-
188
- Create type-safe configurable modules with Zod validation:
109
+ ### Schema defaults
189
110
 
190
111
  ```typescript
191
- import { Module } from '@nestjs/common';
192
- import { ZodConfigurableModuleBuilder } from '@proventuslabs/nestjs-zod';
193
- import { z } from 'zod';
194
-
195
- const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } = new ZodConfigurableModuleBuilder(
112
+ // Multiple configuration sources
113
+ const dbConfig = registerConfig(
114
+ "database",
196
115
  z.object({
197
- apiKey: z.string().min(1),
198
- baseUrl: z.string().url().default('https://api.example.com'),
199
- timeout: z.number().positive().default(5000),
116
+ host: z.string().default("localhost"),
117
+ port: z.number().default(5432),
118
+ ssl: z.boolean().default(false),
200
119
  })
201
- ).build();
202
-
203
- @Module({
204
- providers: [
205
- {
206
- provide: 'EXTERNAL_SERVICE',
207
- useFactory: (options) => {
208
- // options is fully typed and validated
209
- return new ExternalService(options);
210
- },
211
- inject: [MODULE_OPTIONS_TOKEN],
212
- },
213
- ],
214
- exports: ['EXTERNAL_SERVICE'],
215
- })
216
- export class ExternalServiceModule extends ConfigurableModuleClass {}
217
- ```
218
-
219
- ### Using Configurable Modules
220
-
221
- ```typescript
222
- // Static configuration
223
- ExternalServiceModule.register({
224
- apiKey: 'your-api-key',
225
- baseUrl: 'https://custom-api.example.com',
226
- timeout: 10000,
227
- });
228
-
229
- // Async configuration
230
- ExternalServiceModule.registerAsync({
231
- useFactory: (configService: ConfigService) => ({
232
- apiKey: configService.get('EXTERNAL_API_KEY'),
233
- baseUrl: configService.get('EXTERNAL_BASE_URL'),
234
- timeout: configService.get('EXTERNAL_TIMEOUT'),
235
- }),
236
- inject: [ConfigService],
237
- });
120
+ );
238
121
  ```
239
122
 
240
- ## API Reference
123
+ ## 📋 API Reference
241
124
 
242
125
  ### `registerConfig`
243
126
 
244
- Registers a configuration with the `ConfigModule.forFeature` for partial configuration under the provided namespace.
127
+ Registers a type-safe configuration with automatic validation and environment variable parsing.
245
128
 
246
129
  ```typescript
247
- function registerConfig<N extends string, C extends ConfigObject, I extends JsonValue>(
248
- namespace: ConfigNamespace<N>,
249
- configSchema: ZodType<C, ZodTypeDef, I>,
250
- options?: {
251
- whitelistKeys?: Set<string>;
252
- variables?: Record<string, string | undefined>;
253
- }
254
- ): ReturnType<typeof registerAs<C>> & { NAMESPACE: N }
130
+ registerConfig(namespace, zodSchema, options?)
255
131
  ```
256
132
 
257
133
  **Parameters:**
258
- - `namespace`: The namespace for the configuration (camelCase)
259
- - `configSchema`: Zod schema for validation
260
- - `options`: Configuration options
261
- - `whitelistKeys`: Set of environment variable names to allow without namespace prefix
262
- - `variables`: Environment variables object (defaults to `process.env`)
263
134
 
264
- **Returns:** A configuration provider that can be used with `ConfigModule.forRoot()`
135
+ - `namespace`: Configuration namespace (camelCase)
136
+ - `zodSchema`: Zod schema for validation
137
+ - `options.whitelistKeys`: Environment variables to allow without namespace prefix
138
+
139
+ #### Whitelist Keys
140
+
141
+ By default, only environment variables with the namespace prefix are processed. You can whitelist additional environment variables to bypass this restriction:
265
142
 
266
- **Example:**
267
143
  ```typescript
268
144
  const appConfig = registerConfig(
269
- 'app',
145
+ "app",
270
146
  z.object({
271
147
  port: z.number().default(3000),
272
- apiKey: z.string(),
273
- database: z.object({
274
- host: z.string().default('localhost'),
275
- port: z.number().default(5432),
276
- }),
148
+ apiKey: z.string().describe("API key from environment"),
277
149
  }),
278
150
  {
279
- whitelistKeys: new Set(['API_KEY', 'DATABASE_URL']),
151
+ whitelistKeys: new Set(["API_KEY"]), // Allow API_KEY without APP_ prefix
280
152
  }
281
153
  );
282
154
  ```
283
155
 
284
- ### `ConfigType<T>`
285
-
286
- Extracts the inferred type from a configuration schema.
287
-
288
- ```typescript
289
- type ConfigType<T extends (...args: unknown[]) => unknown> = NestConfigType<T>;
156
+ ```bash
157
+ API_KEY=your-secret-key # Will be mapped to app.apiKey
158
+ APP_PORT=8080 # Standard namespaced variable
290
159
  ```
291
160
 
292
- ### `NamespacedConfigType<T>`
161
+ ### `ZodConfigurableModuleBuilder`
293
162
 
294
- Extracts the namespaced configuration type.
163
+ Create type-safe configurable modules with Zod validation:
295
164
 
296
165
  ```typescript
297
- type NamespacedConfigType<R> = {
298
- [K in R["NAMESPACE"]]: NestConfigType<R>;
299
- };
300
- ```
301
-
302
- ### `ZodConfigurableModuleBuilder`
166
+ import { Module } from "@nestjs/common";
167
+ import { ZodConfigurableModuleBuilder } from "@proventuslabs/nestjs-zod";
168
+ import { z } from "zod";
169
+
170
+ const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
171
+ new ZodConfigurableModuleBuilder(
172
+ z.object({
173
+ apiKey: z.string(),
174
+ baseUrl: z.string().url().default("https://api.example.com"),
175
+ timeout: z.number().default(5000),
176
+ })
177
+ ).build();
303
178
 
304
- Builder class for creating configurable modules with Zod validation.
179
+ @Module({
180
+ providers: [
181
+ {
182
+ provide: "EXTERNAL_SERVICE",
183
+ useFactory: (options) => new ExternalService(options), // fully typed
184
+ inject: [MODULE_OPTIONS_TOKEN],
185
+ },
186
+ ],
187
+ })
188
+ export class ExternalServiceModule extends ConfigurableModuleClass {}
305
189
 
306
- ```typescript
307
- class ZodConfigurableModuleBuilder<
308
- ModuleOptions,
309
- ModuleOptionsInput = unknown,
310
- StaticMethodKey extends string = string,
311
- FactoryClassMethodKey extends string = string,
312
- ExtraModuleDefinitionOptions = object
313
- >
190
+ // Usage
191
+ ExternalServiceModule.register({
192
+ apiKey: "your-key",
193
+ timeout: 10000,
194
+ });
314
195
  ```
315
196
 
316
- ## Error Handling
197
+ Offers identical API to the standard NestJS `ConfigurableModuleBuilder`, consult [their docs](https://docs.nestjs.com/fundamentals/dynamic-modules#configurable-module-builder) for usage.
198
+
199
+ ## 🚨 Error Handling
317
200
 
318
- The package provides enhanced error messages that include:
201
+ Enhanced validation errors with detailed information:
319
202
 
320
- - Schema descriptions when available
203
+ - Schema descriptions and validation paths
321
204
  - Original environment variable names
322
- - Detailed validation error paths
323
- - Helpful suggestions for fixing configuration issues
205
+ - Uses Zod errors under the hood
324
206
 
325
- Example error output:
207
+ ## 🎭 Types
326
208
 
327
- ```
328
- TypeError: Configuration validation failed for 'app' namespace
209
+ ```typescript
210
+ // Configuration type extraction
211
+ type AppConfig = ConfigType<typeof appConfig>;
329
212
 
330
- app.port: Expected number, received string
331
- Description: The local HTTP port to bind the server to
332
- Environment Variable: APP_PORT
213
+ // Namespaced configuration for ConfigService
214
+ type NamespacedConfig = NamespacedConfigType<typeof appConfig>;
333
215
 
334
- app.database.host: Required
335
- Description: Database host address
336
- Environment Variable: APP_DATABASE__HOST
216
+ // Usage with ConfigService
217
+ constructor(
218
+ private configService: ConfigService<NamespacedConfig, true>,
219
+ @Inject(appConfig.KEY)
220
+ private appConfigObject: AppConfig,
221
+ ) {}
337
222
  ```
338
223
 
339
- ## Examples
224
+ ## ⚡ Best Practices
340
225
 
341
- ### Basic Configuration with Whitelist Keys
226
+ - Use descriptive schema descriptions for better error messages
227
+ - Leverage whitelist keys for common environment variables
228
+ - Combine multiple configuration namespaces for organized settings
229
+ - Utilize schema defaults to reduce required environment variables
342
230
 
343
231
  ```typescript
344
- import { Module } from '@nestjs/common';
345
- import { ConfigModule } from '@nestjs/config';
346
- import { registerConfig, type ConfigType } from '@proventuslabs/nestjs-zod';
347
- import { z } from 'zod';
348
-
349
- // Configuration with whitelist support
232
+ // Good: Descriptive and well-structured
350
233
  const appConfig = registerConfig(
351
- 'app',
234
+ "app",
352
235
  z.object({
353
- port: z.number().default(3000),
354
- host: z.string().default('localhost'),
355
- apiKey: z.string().describe('External API key'),
356
- database: z.object({
357
- url: z.string().describe('Database connection URL'),
358
- poolSize: z.number().default(10),
359
- }),
236
+ port: z.number().default(3000).describe("HTTP server port"),
237
+ apiKey: z.string().describe("Third-party API authentication key"),
360
238
  }),
361
- {
362
- whitelistKeys: new Set(['API_KEY', 'DATABASE_URL']),
363
- }
239
+ { whitelistKeys: new Set(["API_KEY"]) }
364
240
  );
365
241
 
366
- @Module({
367
- imports: [
368
- ConfigModule.forRoot({
369
- isGlobal: true,
370
- load: [appConfig],
371
- }),
372
- ],
373
- })
374
- export class AppModule {}
242
+ // ✅ Good: Multiple namespaces for organization
243
+ const dbConfig = registerConfig("database", dbSchema);
244
+ const redisConfig = registerConfig("redis", redisSchema);
375
245
  ```
376
246
 
377
- With this configuration, you can use environment variables like:
378
- ```bash
379
- # Standard namespaced variables
380
- APP_PORT=8080
381
- APP_HOST=0.0.0.0
247
+ ## 🤝 Contributing
382
248
 
383
- # Whitelisted variables (no namespace prefix required)
384
- API_KEY=your-secret-key
385
- DATABASE_URL=postgresql://user:pass@localhost:5432/db
386
- ```
249
+ We welcome contributions! Please see our [Contributing Guidelines](../../CONTRIBUTING.md) for details.
387
250
 
388
- ### Advanced Configuration with Multiple Sources
251
+ ## 📄 License
389
252
 
390
- ```typescript
391
- const databaseConfig = registerConfig(
392
- 'database',
393
- z.object({
394
- host: z.string().default('localhost'),
395
- port: z.number().default(5432),
396
- name: z.string(),
397
- username: z.string(),
398
- password: z.string(),
399
- ssl: z.boolean().default(false),
400
- }),
401
- {
402
- whitelistKeys: new Set(['DB_HOST', 'DB_PORT', 'DB_NAME']),
403
- }
404
- );
405
- ```
406
-
407
- See the [examples](./examples) directory for complete working examples.
408
-
409
- ## Contributing
410
-
411
- Contributions are welcome! Please feel free to submit a Pull Request.
253
+ This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.
412
254
 
413
- ## License
255
+ ## 🔗 Links
414
256
 
415
- This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.
257
+ - [ProventusLabs](https://proventuslabs.com)
258
+ - [NestJS Documentation](https://nestjs.com)
259
+ - [Zod Documentation](https://zod.dev)
@@ -1,6 +1,6 @@
1
1
  import { type ConfigObject, type ConfigType as NestConfigType } from "@nestjs/config";
2
2
  import type { CamelCase, JsonValue } from "type-fest";
3
- import { type ZodType, type ZodTypeDef } from "zod";
3
+ import { type $ZodType } from "zod/v4/core";
4
4
  /**
5
5
  * Simple type alias for config namespace.
6
6
  */
@@ -51,7 +51,7 @@ export type NamespacedConfigType<R extends ReturnType<typeof registerConfig<stri
51
51
  * export type AppConfigNamespaced = NamespacedConfigType<typeof appConfig>;
52
52
  * export type AppConfig = ConfigType<typeof appConfig>;
53
53
  */
54
- export declare function registerConfig<N extends string, C extends ConfigObject, I extends JsonValue>(namespace: ConfigNamespace<N>, configSchema: ZodType<C, ZodTypeDef, I>, options?: {
54
+ export declare function registerConfig<N extends string, C extends ConfigObject, I extends JsonValue | unknown>(namespace: ConfigNamespace<N>, configSchema: $ZodType<C, I>, options?: {
55
55
  whitelistKeys?: Set<string>;
56
56
  variables?: Record<string, string | undefined>;
57
57
  }): import("@nestjs/config").ConfigFactory<C> & import("@nestjs/config").ConfigFactoryKeyHost<C | Promise<C>> & {
@@ -7,7 +7,7 @@ exports.registerConfig = registerConfig;
7
7
  const node_process_1 = __importDefault(require("node:process"));
8
8
  const config_1 = require("@nestjs/config");
9
9
  const lodash_1 = require("lodash");
10
- const zod_1 = require("zod");
10
+ const core_1 = require("zod/v4/core");
11
11
  const internal_1 = require("../internal");
12
12
  /**
13
13
  * Registers a config with the `ConfigModule.forFeature` for partial configuration under the provided namespace.
@@ -40,13 +40,10 @@ function registerConfig(namespace, configSchema, options = {}) {
40
40
  const service = (0, config_1.registerAs)(namespace, async () => {
41
41
  const [decodedEnv, envKeys] = (0, internal_1.decodeVariables)(variables, namespace, whitelistKeys);
42
42
  const decodedConfig = (0, internal_1.decodeConfig)(variables.CONFIG_CONTENT, variables.CONFIG_FILE);
43
- const namespacedSchema = zod_1.z.object({
44
- [namespace]: configSchema,
45
- });
46
- const parsedConfig = await namespacedSchema.safeParseAsync((0, lodash_1.merge)({ [namespace]: {} }, decodedConfig, decodedEnv));
43
+ const parsedConfig = await (0, core_1.safeParseAsync)(configSchema, (0, lodash_1.merge)({}, decodedConfig[namespace], decodedEnv[namespace]));
47
44
  if (!parsedConfig.success)
48
- throw (0, internal_1.zodErrorToTypeError)(parsedConfig.error, namespacedSchema, namespace, envKeys);
49
- const config = parsedConfig.data[namespace];
45
+ throw new TypeError(`Invalid config for "${namespace}":\n${(0, internal_1.typifyError)(configSchema, parsedConfig.error, namespace, envKeys)}`, { cause: parsedConfig.error });
46
+ const config = parsedConfig.data;
50
47
  return config;
51
48
  });
52
49
  // we add the namespace to the object itself for runtime access too
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":";;;;;AAkEA,wCAgCC;AAlGD,gEAAmC;AAEnC,2CAAkG;AAElG,mCAA+B;AAE/B,6BAAuD;AAEvD,0CAAiF;AAgCjF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,cAAc,CAC7B,SAA6B,EAC7B,YAAuC,EACvC,UAGI,EAAE;IAEN,MAAM,EAAE,SAAS,GAAG,sBAAO,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAE3D,MAAM,OAAO,GAAG,IAAA,mBAAU,EAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,IAAA,0BAAe,EAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QACnF,MAAM,aAAa,GAAG,IAAA,uBAAY,EAAC,SAAS,CAAC,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QAEpF,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;YACjC,CAAC,SAAS,CAAC,EAAE,YAAY;SACzB,CAAC,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,gBAAgB,CAAC,cAAc,CACzD,IAAA,cAAK,EAAC,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,CACrD,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,OAAO;YACxB,MAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACrF,MAAM,MAAM,GAAM,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAE/C,OAAO,MAAM,CAAC;IACf,CAAC,CAAwD,CAAC;IAE1D,mEAAmE;IACnE,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE;QAClD,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":";;;;;AAkEA,wCAqCC;AAvGD,gEAAmC;AAEnC,2CAAkG;AAElG,mCAA+B;AAE/B,sCAA4D;AAE5D,0CAAyE;AAgCzE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,cAAc,CAK7B,SAA6B,EAC7B,YAA4B,EAC5B,UAGI,EAAE;IAEN,MAAM,EAAE,SAAS,GAAG,sBAAO,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAE3D,MAAM,OAAO,GAAG,IAAA,mBAAU,EAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,IAAA,0BAAe,EAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QACnF,MAAM,aAAa,GAAG,IAAA,uBAAY,EAAC,SAAS,CAAC,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QAEpF,MAAM,YAAY,GAAG,MAAM,IAAA,qBAAc,EACxC,YAAY,EACZ,IAAA,cAAK,EAAC,EAAE,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAC1D,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,OAAO;YACxB,MAAM,IAAI,SAAS,CAClB,uBAAuB,SAAS,OAAO,IAAA,sBAAW,EAAC,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAC1G,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,CAC7B,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC;QAEjC,OAAO,MAAM,CAAC;IACf,CAAC,CAAwD,CAAC;IAE1D,mEAAmE;IACnE,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE;QAClD,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,cAAc,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./config/config";
2
+ export { typifyError } from "./internal";
2
3
  export * from "./module/module";
package/dist/index.js CHANGED
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.typifyError = void 0;
17
18
  __exportStar(require("./config/config"), exports);
19
+ var internal_1 = require("./internal");
20
+ Object.defineProperty(exports, "typifyError", { enumerable: true, get: function () { return internal_1.typifyError; } });
18
21
  __exportStar(require("./module/module"), exports);
19
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AACpB,kDAAgC"}