@navios/core 0.2.1 → 0.2.2

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.
Files changed (33) hide show
  1. package/docs/README.md +6 -0
  2. package/docs/recipes/prisma.md +60 -0
  3. package/examples/simple-test/api/index.mts +64 -0
  4. package/examples/simple-test/config/config.service.mts +14 -0
  5. package/examples/simple-test/config/configuration.mts +7 -0
  6. package/examples/simple-test/index.mts +16 -0
  7. package/examples/simple-test/src/acl/acl-modern.guard.mts +15 -0
  8. package/examples/simple-test/src/acl/acl.guard.mts +14 -0
  9. package/examples/simple-test/src/acl/app.guard.mts +27 -0
  10. package/examples/simple-test/src/acl/one-more.guard.mts +15 -0
  11. package/examples/simple-test/src/acl/public.attribute.mts +21 -0
  12. package/examples/simple-test/src/app.module.mts +9 -0
  13. package/examples/simple-test/src/user/user.controller.mts +72 -0
  14. package/examples/simple-test/src/user/user.module.mts +14 -0
  15. package/examples/simple-test/src/user/user.service.mts +14 -0
  16. package/{dist → lib}/_tsup-dts-rollup.d.mts +71 -50
  17. package/{dist → lib}/_tsup-dts-rollup.d.ts +71 -50
  18. package/{dist → lib}/index.d.mts +13 -4
  19. package/{dist → lib}/index.d.ts +13 -4
  20. package/{dist → lib}/index.js +270 -490
  21. package/lib/index.js.map +1 -0
  22. package/{dist → lib}/index.mjs +140 -353
  23. package/lib/index.mjs.map +1 -0
  24. package/package.json +10 -11
  25. package/project.json +53 -0
  26. package/src/__tests__/config.service.spec.mts +41 -0
  27. package/src/config/config-service.interface.mts +1 -1
  28. package/src/config/config.provider.mts +22 -50
  29. package/src/config/config.service.mts +25 -8
  30. package/src/decorators/endpoint.decorator.mts +0 -5
  31. package/tsconfig.json +16 -0
  32. package/tsup.config.mts +12 -0
  33. package/vitest.config.mts +9 -0
@@ -1,174 +1,59 @@
1
- "use strict";
1
+ 'use strict';
2
+
3
+ var di = require('@navios/di');
4
+ var zod = require('zod');
5
+ var process$1 = require('process');
6
+ var common = require('@navios/common');
7
+ var util = require('util');
8
+ var cors = require('@fastify/cors');
9
+ var multipart = require('@fastify/multipart');
10
+ var fastify = require('fastify');
11
+ var fastifyTypeProviderZod = require('fastify-type-provider-zod');
12
+
13
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
+
15
+ var cors__default = /*#__PURE__*/_interopDefault(cors);
16
+ var multipart__default = /*#__PURE__*/_interopDefault(multipart);
17
+
2
18
  var __create = Object.create;
3
19
  var __defProp = Object.defineProperty;
4
20
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
21
  var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
9
22
  var __typeError = (msg) => {
10
23
  throw TypeError(msg);
11
24
  };
12
25
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
26
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
- var __export = (target, all) => {
15
- for (var name in all)
16
- __defProp(target, name, { get: all[name], enumerable: true });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
- // If the importer is in node compatibility mode or this is not an ESM
29
- // file that has been converted to a CommonJS file using a Babel-
30
- // compatible transform (i.e. "__esModule" has not been set), then set
31
- // "default" to the CommonJS "module.exports" for node compatibility.
32
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
- mod
34
- ));
35
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
- var __decoratorStart = (base) => [, , , __create((base == null ? void 0 : base[__knownSymbol("metadata")]) ?? null)];
27
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
37
28
  var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
38
29
  var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
39
30
  var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
40
31
  var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
41
32
  var __runInitializers = (array, flags, self, value) => {
42
- for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
33
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) fns[i].call(self) ;
43
34
  return value;
44
35
  };
45
36
  var __decorateElement = (array, flags, name, decorators, target, extra) => {
46
- var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
47
- var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
48
- var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
49
- var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
50
- return __privateGet(this, extra);
51
- }, set [name](x) {
52
- return __privateSet(this, extra, x);
53
- } }, name));
54
- k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
37
+ var it, done, ctx, k = flags & 7, p = false;
38
+ var j = 0;
39
+ var extraInitializers = array[j] || (array[j] = []);
40
+ var desc = k && ((target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(target , name));
41
+ __name(target, name);
55
42
  for (var i = decorators.length - 1; i >= 0; i--) {
56
43
  ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
57
- if (k) {
58
- ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
59
- if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
60
- if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
61
- }
62
- it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
63
- if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
64
- else if (typeof it !== "object" || it === null) __typeError("Object expected");
65
- else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
44
+ it = (0, decorators[i])(target, ctx), done._ = 1;
45
+ __expectFn(it) && (target = it);
66
46
  }
67
- return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
47
+ return __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
68
48
  };
69
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
70
- var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
71
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
72
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
73
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
74
-
75
- // packages/core/src/index.mts
76
- var src_exports = {};
77
- __export(src_exports, {
78
- Application: () => Application,
79
- AttributeFactory: () => AttributeFactory,
80
- BadRequestException: () => BadRequestException,
81
- ConfigProvider: () => ConfigProvider,
82
- ConfigProviderFactory: () => ConfigProviderFactory,
83
- ConfigProviderOptions: () => ConfigProviderOptions,
84
- ConfigServiceInstance: () => ConfigServiceInstance,
85
- ConflictException: () => ConflictException,
86
- ConsoleLogger: () => ConsoleLogger,
87
- Controller: () => Controller,
88
- ControllerAdapterService: () => ControllerAdapterService,
89
- ControllerMetadataKey: () => ControllerMetadataKey,
90
- Endpoint: () => Endpoint,
91
- EndpointAdapterService: () => EndpointAdapterService,
92
- EndpointAdapterToken: () => EndpointAdapterToken,
93
- EndpointMetadataKey: () => EndpointMetadataKey,
94
- ExecutionContext: () => ExecutionContext,
95
- ExecutionContextInjectionToken: () => ExecutionContextInjectionToken,
96
- ExecutionContextToken: () => ExecutionContextToken,
97
- ForbiddenException: () => ForbiddenException,
98
- GuardRunnerService: () => GuardRunnerService,
99
- Header: () => Header,
100
- HttpCode: () => HttpCode,
101
- HttpException: () => HttpException,
102
- InternalServerErrorException: () => InternalServerErrorException,
103
- LOG_LEVELS: () => LOG_LEVELS,
104
- Logger: () => Logger,
105
- LoggerFactory: () => LoggerFactory,
106
- LoggerInjectionToken: () => LoggerInjectionToken,
107
- LoggerInstance: () => LoggerInstance,
108
- LoggerOptions: () => LoggerOptions,
109
- Module: () => Module,
110
- ModuleLoaderService: () => ModuleLoaderService,
111
- ModuleMetadataKey: () => ModuleMetadataKey,
112
- Multipart: () => Multipart,
113
- MultipartAdapterService: () => MultipartAdapterService,
114
- MultipartAdapterToken: () => MultipartAdapterToken,
115
- NaviosApplication: () => NaviosApplication,
116
- NaviosFactory: () => NaviosFactory,
117
- NotFoundException: () => NotFoundException,
118
- PinoWrapper: () => PinoWrapper,
119
- Reply: () => Reply,
120
- Request: () => Request,
121
- Stream: () => Stream,
122
- StreamAdapterService: () => StreamAdapterService,
123
- StreamAdapterToken: () => StreamAdapterToken,
124
- UnauthorizedException: () => UnauthorizedException,
125
- UseGuards: () => UseGuards,
126
- addLeadingSlash: () => addLeadingSlash,
127
- clc: () => clc,
128
- envInt: () => envInt,
129
- envString: () => envString,
130
- extractControllerMetadata: () => extractControllerMetadata,
131
- extractModuleMetadata: () => extractModuleMetadata,
132
- filterLogLevels: () => filterLogLevels,
133
- getAllEndpointMetadata: () => getAllEndpointMetadata,
134
- getControllerMetadata: () => getControllerMetadata,
135
- getEndpointMetadata: () => getEndpointMetadata,
136
- getModuleMetadata: () => getModuleMetadata,
137
- hasControllerMetadata: () => hasControllerMetadata,
138
- hasModuleMetadata: () => hasModuleMetadata,
139
- isConstructor: () => isConstructor,
140
- isEmpty: () => isEmpty,
141
- isFunction: () => isFunction,
142
- isLogLevel: () => isLogLevel,
143
- isLogLevelEnabled: () => isLogLevelEnabled,
144
- isNil: () => isNil,
145
- isNumber: () => isNumber,
146
- isObject: () => isObject,
147
- isPlainObject: () => isPlainObject,
148
- isString: () => isString,
149
- isSymbol: () => isSymbol,
150
- isUndefined: () => isUndefined,
151
- normalizePath: () => normalizePath,
152
- provideConfig: () => provideConfig,
153
- stripEndSlash: () => stripEndSlash,
154
- yellow: () => yellow
155
- });
156
- module.exports = __toCommonJS(src_exports);
157
- __reExport(src_exports, require("@navios/di"), module.exports);
158
-
159
- // packages/core/src/adapters/endpoint-adapter.service.mts
160
- var import_di2 = require("@navios/di");
161
-
162
- // packages/core/src/adapters/stream-adapter.service.mts
163
- var import_di = require("@navios/di");
164
- var StreamAdapterToken = import_di.InjectionToken.create(
49
+ var StreamAdapterToken = di.InjectionToken.create(
165
50
  Symbol.for("StreamAdapterService")
166
51
  );
167
52
  var _StreamAdapterService_decorators, _init;
168
- _StreamAdapterService_decorators = [(0, import_di.Injectable)({
53
+ _StreamAdapterService_decorators = [di.Injectable({
169
54
  token: StreamAdapterToken
170
55
  })];
171
- var StreamAdapterService = class {
56
+ exports.StreamAdapterService = class StreamAdapterService {
172
57
  hasSchema(handlerMetadata) {
173
58
  const config = handlerMetadata.config;
174
59
  return !!config.requestSchema || !!config.querySchema;
@@ -208,7 +93,7 @@ var StreamAdapterService = class {
208
93
  return argument;
209
94
  };
210
95
  return async function(request, reply) {
211
- const controllerInstance = await (0, import_di.inject)(controller);
96
+ const controllerInstance = await di.inject(controller);
212
97
  const argument = await formatArguments(request);
213
98
  await controllerInstance[handlerMetadata.classMethod](argument, reply);
214
99
  };
@@ -226,18 +111,18 @@ var StreamAdapterService = class {
226
111
  }
227
112
  };
228
113
  _init = __decoratorStart(null);
229
- StreamAdapterService = __decorateElement(_init, 0, "StreamAdapterService", _StreamAdapterService_decorators, StreamAdapterService);
230
- __runInitializers(_init, 1, StreamAdapterService);
114
+ exports.StreamAdapterService = __decorateElement(_init, 0, "StreamAdapterService", _StreamAdapterService_decorators, exports.StreamAdapterService);
115
+ __runInitializers(_init, 1, exports.StreamAdapterService);
231
116
 
232
- // packages/core/src/adapters/endpoint-adapter.service.mts
233
- var EndpointAdapterToken = import_di2.InjectionToken.create(
117
+ // src/adapters/endpoint-adapter.service.mts
118
+ var EndpointAdapterToken = di.InjectionToken.create(
234
119
  Symbol.for("EndpointAdapterService")
235
120
  );
236
121
  var _EndpointAdapterService_decorators, _init2, _a;
237
- _EndpointAdapterService_decorators = [(0, import_di2.Injectable)({
122
+ _EndpointAdapterService_decorators = [di.Injectable({
238
123
  token: EndpointAdapterToken
239
124
  })];
240
- var EndpointAdapterService = class extends (_a = StreamAdapterService) {
125
+ exports.EndpointAdapterService = class EndpointAdapterService extends (_a = exports.StreamAdapterService) {
241
126
  hasSchema(handlerMetadata) {
242
127
  const config = handlerMetadata.config;
243
128
  return super.hasSchema(handlerMetadata) || !!config.responseSchema;
@@ -267,7 +152,7 @@ var EndpointAdapterService = class extends (_a = StreamAdapterService) {
267
152
  return argument;
268
153
  };
269
154
  return async function(request, reply) {
270
- const controllerInstance = await (0, import_di2.inject)(controller);
155
+ const controllerInstance = await di.inject(controller);
271
156
  const argument = await formatArguments(request);
272
157
  const result = await controllerInstance[handlerMetadata.classMethod](argument);
273
158
  reply.status(handlerMetadata.successStatusCode).headers(handlerMetadata.headers).send(result);
@@ -275,20 +160,16 @@ var EndpointAdapterService = class extends (_a = StreamAdapterService) {
275
160
  }
276
161
  };
277
162
  _init2 = __decoratorStart(_a);
278
- EndpointAdapterService = __decorateElement(_init2, 0, "EndpointAdapterService", _EndpointAdapterService_decorators, EndpointAdapterService);
279
- __runInitializers(_init2, 1, EndpointAdapterService);
280
-
281
- // packages/core/src/adapters/multipart-adapter.service.mts
282
- var import_di3 = require("@navios/di");
283
- var import_zod = require("zod");
284
- var MultipartAdapterToken = import_di3.InjectionToken.create(
163
+ exports.EndpointAdapterService = __decorateElement(_init2, 0, "EndpointAdapterService", _EndpointAdapterService_decorators, exports.EndpointAdapterService);
164
+ __runInitializers(_init2, 1, exports.EndpointAdapterService);
165
+ var MultipartAdapterToken = di.InjectionToken.create(
285
166
  Symbol.for("MultipartAdapterService")
286
167
  );
287
168
  var _MultipartAdapterService_decorators, _init3, _a2;
288
- _MultipartAdapterService_decorators = [(0, import_di3.Injectable)({
169
+ _MultipartAdapterService_decorators = [di.Injectable({
289
170
  token: MultipartAdapterToken
290
171
  })];
291
- var MultipartAdapterService = class extends (_a2 = EndpointAdapterService) {
172
+ exports.MultipartAdapterService = class MultipartAdapterService extends (_a2 = exports.EndpointAdapterService) {
292
173
  prepareArguments(handlerMetadata) {
293
174
  const config = handlerMetadata.config;
294
175
  const getters = [];
@@ -340,15 +221,15 @@ var MultipartAdapterService = class extends (_a2 = EndpointAdapterService) {
340
221
  return Object.keys(shape).reduce(
341
222
  (target, key) => {
342
223
  let schema = shape[key];
343
- const isOptional = schema instanceof import_zod.ZodOptional;
224
+ const isOptional = schema instanceof zod.ZodOptional;
344
225
  if (isOptional) {
345
226
  schema = schema.unwrap();
346
227
  }
347
- const isArray = schema instanceof import_zod.ZodArray;
228
+ const isArray = schema instanceof zod.ZodArray;
348
229
  if (isArray) {
349
230
  schema = schema.element;
350
231
  }
351
- const isObject2 = schema instanceof import_zod.ZodObject;
232
+ const isObject2 = schema instanceof zod.ZodObject;
352
233
  return {
353
234
  ...target,
354
235
  [key]: {
@@ -376,24 +257,17 @@ var MultipartAdapterService = class extends (_a2 = EndpointAdapterService) {
376
257
  }
377
258
  };
378
259
  _init3 = __decoratorStart(_a2);
379
- MultipartAdapterService = __decorateElement(_init3, 0, "MultipartAdapterService", _MultipartAdapterService_decorators, MultipartAdapterService);
380
- __runInitializers(_init3, 1, MultipartAdapterService);
381
-
382
- // packages/core/src/config/utils/helpers.mts
383
- var import_node_process = require("process");
260
+ exports.MultipartAdapterService = __decorateElement(_init3, 0, "MultipartAdapterService", _MultipartAdapterService_decorators, exports.MultipartAdapterService);
261
+ __runInitializers(_init3, 1, exports.MultipartAdapterService);
384
262
  function envInt(key, defaultValue) {
385
- const envKey = import_node_process.env[key] || process.env[key];
263
+ const envKey = process$1.env[key] || process.env[key];
386
264
  return envKey ? parseInt(envKey, 10) : defaultValue;
387
265
  }
388
266
  function envString(key, defaultValue) {
389
- return import_node_process.env[key] || process.env[key] || defaultValue || void 0;
267
+ return process$1.env[key] || process.env[key] || defaultValue || void 0;
390
268
  }
391
269
 
392
- // packages/core/src/config/config.provider.mts
393
- var import_di14 = require("@navios/di");
394
- var import_zod3 = require("zod");
395
-
396
- // packages/core/src/logger/utils/cli-colors.util.mts
270
+ // src/logger/utils/cli-colors.util.mts
397
271
  var isColorAllowed = () => !process.env.NO_COLOR;
398
272
  var colorIfAllowed = (colorFn) => (text) => isColorAllowed() ? colorFn(text) : text;
399
273
  var clc = {
@@ -408,7 +282,7 @@ var yellow = colorIfAllowed(
408
282
  (text) => `\x1B[38;5;3m${text}\x1B[39m`
409
283
  );
410
284
 
411
- // packages/core/src/logger/log-levels.mts
285
+ // src/logger/log-levels.mts
412
286
  var LOG_LEVELS = [
413
287
  "verbose",
414
288
  "debug",
@@ -418,12 +292,12 @@ var LOG_LEVELS = [
418
292
  "fatal"
419
293
  ];
420
294
 
421
- // packages/core/src/logger/utils/is-log-level.util.mts
295
+ // src/logger/utils/is-log-level.util.mts
422
296
  function isLogLevel(maybeLogLevel) {
423
297
  return LOG_LEVELS.includes(maybeLogLevel);
424
298
  }
425
299
 
426
- // packages/core/src/logger/utils/filter-log-levelts.util.mts
300
+ // src/logger/utils/filter-log-levelts.util.mts
427
301
  function filterLogLevels(parseableString = "") {
428
302
  const sanitizedString = parseableString.replaceAll(" ", "").toLowerCase();
429
303
  if (sanitizedString[0] === ">") {
@@ -441,7 +315,7 @@ function filterLogLevels(parseableString = "") {
441
315
  return isLogLevel(sanitizedString) ? [sanitizedString] : LOG_LEVELS;
442
316
  }
443
317
 
444
- // packages/core/src/logger/utils/is-log-level-enabled.mts
318
+ // src/logger/utils/is-log-level-enabled.mts
445
319
  var LOG_LEVEL_VALUES = {
446
320
  verbose: 0,
447
321
  debug: 1,
@@ -451,19 +325,18 @@ var LOG_LEVEL_VALUES = {
451
325
  fatal: 5
452
326
  };
453
327
  function isLogLevelEnabled(targetLevel, logLevels) {
454
- var _a3;
455
- if (!logLevels || Array.isArray(logLevels) && (logLevels == null ? void 0 : logLevels.length) === 0) {
328
+ if (!logLevels || Array.isArray(logLevels) && logLevels?.length === 0) {
456
329
  return false;
457
330
  }
458
331
  if (logLevels.includes(targetLevel)) {
459
332
  return true;
460
333
  }
461
- const highestLogLevelValue = (_a3 = logLevels.map((level) => LOG_LEVEL_VALUES[level]).sort((a, b) => b - a)) == null ? void 0 : _a3[0];
334
+ const highestLogLevelValue = logLevels.map((level) => LOG_LEVEL_VALUES[level]).sort((a, b) => b - a)?.[0];
462
335
  const targetLevelValue = LOG_LEVEL_VALUES[targetLevel];
463
336
  return targetLevelValue >= highestLogLevelValue;
464
337
  }
465
338
 
466
- // packages/core/src/logger/utils/shared.utils.mts
339
+ // src/logger/utils/shared.utils.mts
467
340
  var isUndefined = (obj) => typeof obj === "undefined";
468
341
  var isObject = (fn) => !isNil(fn) && typeof fn === "object";
469
342
  var isPlainObject = (fn) => {
@@ -487,25 +360,12 @@ var isConstructor = (val) => val === "constructor";
487
360
  var isNil = (val) => isUndefined(val) || val === null;
488
361
  var isEmpty = (array) => !(array && array.length > 0);
489
362
  var isSymbol = (val) => typeof val === "symbol";
490
-
491
- // packages/core/src/logger/console-logger.service.mts
492
- var import_util = require("util");
493
- var import_di11 = require("@navios/di");
494
-
495
- // packages/core/src/tokens/application.token.mts
496
- var import_di4 = require("@navios/di");
497
363
  var ApplicationInjectionToken = "ApplicationInjectionToken";
498
- var Application = import_di4.InjectionToken.create(
364
+ var Application = di.InjectionToken.create(
499
365
  ApplicationInjectionToken
500
366
  );
501
367
 
502
- // packages/core/src/tokens/execution-context.token.mts
503
- var import_di8 = require("@navios/di");
504
-
505
- // packages/core/src/services/controller-adapter.service.mts
506
- var import_di6 = require("@navios/di");
507
-
508
- // packages/core/src/metadata/handler.metadata.mts
368
+ // src/metadata/handler.metadata.mts
509
369
  var EndpointMetadataKey = Symbol("EndpointMetadataKey");
510
370
  function getAllEndpointMetadata(context) {
511
371
  if (context.metadata) {
@@ -549,7 +409,7 @@ function getEndpointMetadata(target, context) {
549
409
  throw new Error("[Navios] Wrong environment.");
550
410
  }
551
411
 
552
- // packages/core/src/metadata/controller.metadata.mts
412
+ // src/metadata/controller.metadata.mts
553
413
  var ControllerMetadataKey = Symbol("ControllerMetadataKey");
554
414
  function getControllerMetadata(target, context) {
555
415
  if (context.metadata) {
@@ -584,7 +444,7 @@ function hasControllerMetadata(target) {
584
444
  return !!metadata;
585
445
  }
586
446
 
587
- // packages/core/src/metadata/module.metadata.mts
447
+ // src/metadata/module.metadata.mts
588
448
  var ModuleMetadataKey = Symbol("ControllerMetadataKey");
589
449
  function getModuleMetadata(target, context) {
590
450
  if (context.metadata) {
@@ -618,10 +478,10 @@ function hasModuleMetadata(target) {
618
478
  return !!target[ModuleMetadataKey];
619
479
  }
620
480
 
621
- // packages/core/src/services/execution-context.mts
481
+ // src/services/execution-context.mts
622
482
  var ExecutionContext = class {
623
- constructor(module2, controller, handler) {
624
- this.module = module2;
483
+ constructor(module, controller, handler) {
484
+ this.module = module;
625
485
  this.controller = controller;
626
486
  this.handler = handler;
627
487
  }
@@ -660,10 +520,7 @@ var ExecutionContext = class {
660
520
  }
661
521
  };
662
522
 
663
- // packages/core/src/services/guard-runner.service.mts
664
- var import_di5 = require("@navios/di");
665
-
666
- // packages/core/src/exceptions/http.exception.mts
523
+ // src/exceptions/http.exception.mts
667
524
  var HttpException = class {
668
525
  constructor(statusCode, response, error) {
669
526
  this.statusCode = statusCode;
@@ -672,28 +529,28 @@ var HttpException = class {
672
529
  }
673
530
  };
674
531
 
675
- // packages/core/src/exceptions/bad-request.exception.mts
532
+ // src/exceptions/bad-request.exception.mts
676
533
  var BadRequestException = class extends HttpException {
677
534
  constructor(message) {
678
535
  super(400, message);
679
536
  }
680
537
  };
681
538
 
682
- // packages/core/src/exceptions/forbidden.exception.mts
539
+ // src/exceptions/forbidden.exception.mts
683
540
  var ForbiddenException = class extends HttpException {
684
541
  constructor(message) {
685
542
  super(403, message);
686
543
  }
687
544
  };
688
545
 
689
- // packages/core/src/exceptions/internal-server-error.exception.mts
546
+ // src/exceptions/internal-server-error.exception.mts
690
547
  var InternalServerErrorException = class extends HttpException {
691
548
  constructor(message, error) {
692
549
  super(500, message, error);
693
550
  }
694
551
  };
695
552
 
696
- // packages/core/src/exceptions/not-found.exception.mts
553
+ // src/exceptions/not-found.exception.mts
697
554
  var NotFoundException = class extends HttpException {
698
555
  constructor(response, error) {
699
556
  super(404, response, error);
@@ -702,28 +559,28 @@ var NotFoundException = class extends HttpException {
702
559
  }
703
560
  };
704
561
 
705
- // packages/core/src/exceptions/unauthorized.exception.mts
562
+ // src/exceptions/unauthorized.exception.mts
706
563
  var UnauthorizedException = class extends HttpException {
707
564
  constructor(message, error) {
708
565
  super(401, message, error);
709
566
  }
710
567
  };
711
568
 
712
- // packages/core/src/exceptions/conflict.exception.mts
569
+ // src/exceptions/conflict.exception.mts
713
570
  var ConflictException = class extends HttpException {
714
571
  constructor(message, error) {
715
572
  super(409, message, error);
716
573
  }
717
574
  };
718
575
 
719
- // packages/core/src/services/guard-runner.service.mts
576
+ // src/services/guard-runner.service.mts
720
577
  var _GuardRunnerService_decorators, _init4;
721
- _GuardRunnerService_decorators = [(0, import_di5.Injectable)()];
722
- var GuardRunnerService = class {
578
+ _GuardRunnerService_decorators = [di.Injectable()];
579
+ exports.GuardRunnerService = class GuardRunnerService {
723
580
  async runGuards(allGuards, executionContext) {
724
581
  let canActivate = true;
725
582
  for (const guard of Array.from(allGuards).reverse()) {
726
- const guardInstance = await (0, import_di5.inject)(
583
+ const guardInstance = await di.inject(
727
584
  guard
728
585
  );
729
586
  if (!guardInstance.canActivate) {
@@ -781,19 +638,18 @@ var GuardRunnerService = class {
781
638
  }
782
639
  };
783
640
  _init4 = __decoratorStart(null);
784
- GuardRunnerService = __decorateElement(_init4, 0, "GuardRunnerService", _GuardRunnerService_decorators, GuardRunnerService);
785
- __runInitializers(_init4, 1, GuardRunnerService);
641
+ exports.GuardRunnerService = __decorateElement(_init4, 0, "GuardRunnerService", _GuardRunnerService_decorators, exports.GuardRunnerService);
642
+ __runInitializers(_init4, 1, exports.GuardRunnerService);
786
643
 
787
- // packages/core/src/services/controller-adapter.service.mts
644
+ // src/services/controller-adapter.service.mts
788
645
  var _ControllerAdapterService_decorators, _init5;
789
- _ControllerAdapterService_decorators = [(0, import_di6.Injectable)()];
646
+ _ControllerAdapterService_decorators = [di.Injectable()];
790
647
  var _ControllerAdapterService = class _ControllerAdapterService {
791
- guardRunner = (0, import_di6.syncInject)(GuardRunnerService);
792
- logger = (0, import_di6.syncInject)(Logger, {
648
+ guardRunner = di.syncInject(exports.GuardRunnerService);
649
+ logger = di.syncInject(Logger, {
793
650
  context: _ControllerAdapterService.name
794
651
  });
795
652
  async setupController(controller, instance, moduleMetadata) {
796
- var _a3, _b;
797
653
  const controllerMetadata = extractControllerMetadata(controller);
798
654
  for (const endpoint of controllerMetadata.endpoints) {
799
655
  const { classMethod, url, httpMethod, adapterToken } = endpoint;
@@ -802,7 +658,7 @@ var _ControllerAdapterService = class _ControllerAdapterService {
802
658
  `[Navios] Malformed Endpoint ${controller.name}:${classMethod}`
803
659
  );
804
660
  }
805
- const adapter = await (0, import_di6.inject)(
661
+ const adapter = await di.inject(
806
662
  adapterToken
807
663
  );
808
664
  const executionContext = new ExecutionContext(
@@ -810,12 +666,12 @@ var _ControllerAdapterService = class _ControllerAdapterService {
810
666
  controllerMetadata,
811
667
  endpoint
812
668
  );
813
- const hasSchema = ((_a3 = adapter.hasSchema) == null ? void 0 : _a3.call(adapter, endpoint)) ?? false;
669
+ const hasSchema = adapter.hasSchema?.(endpoint) ?? false;
814
670
  if (hasSchema) {
815
671
  instance.withTypeProvider().route({
816
672
  method: httpMethod,
817
673
  url: url.replaceAll("$", ":"),
818
- schema: ((_b = adapter.provideSchema) == null ? void 0 : _b.call(adapter, endpoint)) ?? {},
674
+ schema: adapter.provideSchema?.(endpoint) ?? {},
819
675
  preHandler: this.providePreHandler(executionContext),
820
676
  handler: this.wrapHandler(
821
677
  executionContext,
@@ -855,7 +711,7 @@ var _ControllerAdapterService = class _ControllerAdapterService {
855
711
  ) : void 0;
856
712
  }
857
713
  wrapHandler(executionContext, handler) {
858
- const locator = (0, import_di6.getGlobalServiceLocator)();
714
+ const locator = di.getGlobalServiceLocator();
859
715
  return async (request, reply) => {
860
716
  locator.storeInstance(request, Request);
861
717
  locator.storeInstance(reply, Reply);
@@ -880,13 +736,10 @@ _init5 = __decoratorStart(null);
880
736
  _ControllerAdapterService = __decorateElement(_init5, 0, "ControllerAdapterService", _ControllerAdapterService_decorators, _ControllerAdapterService);
881
737
  __runInitializers(_init5, 1, _ControllerAdapterService);
882
738
  var ControllerAdapterService = _ControllerAdapterService;
883
-
884
- // packages/core/src/services/module-loader.service.mts
885
- var import_di7 = require("@navios/di");
886
739
  var _ModuleLoaderService_decorators, _init6;
887
- _ModuleLoaderService_decorators = [(0, import_di7.Injectable)()];
740
+ _ModuleLoaderService_decorators = [di.Injectable()];
888
741
  var _ModuleLoaderService = class _ModuleLoaderService {
889
- logger = (0, import_di7.syncInject)(Logger, {
742
+ logger = di.syncInject(Logger, {
890
743
  context: _ModuleLoaderService.name
891
744
  });
892
745
  modulesMetadata = /* @__PURE__ */ new Map();
@@ -899,12 +752,12 @@ var _ModuleLoaderService = class _ModuleLoaderService {
899
752
  await this.traverseModules(appModule);
900
753
  this.initialized = true;
901
754
  }
902
- async traverseModules(module2, parentMetadata) {
903
- const metadata = extractModuleMetadata(module2);
755
+ async traverseModules(module, parentMetadata) {
756
+ const metadata = extractModuleMetadata(module);
904
757
  if (parentMetadata) {
905
758
  this.mergeMetadata(metadata, parentMetadata);
906
759
  }
907
- const moduleName = module2.name;
760
+ const moduleName = module.name;
908
761
  if (this.modulesMetadata.has(moduleName)) {
909
762
  return;
910
763
  }
@@ -914,7 +767,7 @@ var _ModuleLoaderService = class _ModuleLoaderService {
914
767
  async (importedModule) => this.traverseModules(importedModule, metadata)
915
768
  );
916
769
  await Promise.all(loadingPromises);
917
- const instance = await (0, import_di7.inject)(module2);
770
+ const instance = await di.inject(module);
918
771
  if (instance.onModuleInit) {
919
772
  await instance.onModuleInit();
920
773
  }
@@ -950,25 +803,19 @@ _ModuleLoaderService = __decorateElement(_init6, 0, "ModuleLoaderService", _Modu
950
803
  __runInitializers(_init6, 1, _ModuleLoaderService);
951
804
  var ModuleLoaderService = _ModuleLoaderService;
952
805
 
953
- // packages/core/src/tokens/execution-context.token.mts
806
+ // src/tokens/execution-context.token.mts
954
807
  var ExecutionContextInjectionToken = "ExecutionContextInjectionToken";
955
- var ExecutionContextToken = import_di8.InjectionToken.create(
808
+ var ExecutionContextToken = di.InjectionToken.create(
956
809
  ExecutionContextInjectionToken
957
810
  );
958
-
959
- // packages/core/src/tokens/reply.token.mts
960
- var import_di9 = require("@navios/di");
961
811
  var ReplyInjectionToken = "ReplyInjectionToken";
962
- var Reply = import_di9.InjectionToken.create(ReplyInjectionToken);
963
-
964
- // packages/core/src/tokens/request.token.mts
965
- var import_di10 = require("@navios/di");
812
+ var Reply = di.InjectionToken.create(ReplyInjectionToken);
966
813
  var RequestInjectionToken = "RequestInjectionToken";
967
- var Request = import_di10.InjectionToken.create(
814
+ var Request = di.InjectionToken.create(
968
815
  RequestInjectionToken
969
816
  );
970
817
 
971
- // packages/core/src/logger/console-logger.service.mts
818
+ // src/logger/console-logger.service.mts
972
819
  var DEFAULT_DEPTH = 5;
973
820
  var DEFAULT_LOG_LEVELS = [
974
821
  "log",
@@ -987,7 +834,7 @@ var dateTimeFormatter = new Intl.DateTimeFormat(void 0, {
987
834
  month: "2-digit"
988
835
  });
989
836
  var _ConsoleLogger_decorators, _init7;
990
- _ConsoleLogger_decorators = [(0, import_di11.Injectable)()];
837
+ _ConsoleLogger_decorators = [di.Injectable()];
991
838
  var _ConsoleLogger = class _ConsoleLogger {
992
839
  /**
993
840
  * The options of the logger.
@@ -1014,7 +861,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1014
861
  */
1015
862
  static lastTimestampAt;
1016
863
  constructor(contextOrOptions, options) {
1017
- let [context, opts] = isString(contextOrOptions) ? [contextOrOptions, options] : options ? [void 0, options] : [contextOrOptions == null ? void 0 : contextOrOptions.context, contextOrOptions];
864
+ let [context, opts] = isString(contextOrOptions) ? [contextOrOptions, options] : options ? [void 0, options] : [contextOrOptions?.context, contextOrOptions];
1018
865
  opts = opts ?? {};
1019
866
  opts.logLevels ??= DEFAULT_LOG_LEVELS;
1020
867
  opts.colors ??= opts.colors ?? (opts.json ? false : true);
@@ -1025,11 +872,11 @@ var _ConsoleLogger = class _ConsoleLogger {
1025
872
  this.context = context;
1026
873
  this.originalContext = context;
1027
874
  }
1028
- if (opts == null ? void 0 : opts.requestId) {
1029
- const locator = (0, import_di11.getGlobalServiceLocator)();
875
+ if (opts?.requestId) {
876
+ const locator = di.getGlobalServiceLocator();
1030
877
  locator.getEventBus().on(locator.getInstanceIdentifier(Request, void 0), "create", () => {
1031
878
  const request = locator.getSyncInstance(Request, void 0);
1032
- this.requestId = (request == null ? void 0 : request.id) ?? null;
879
+ this.requestId = request?.id ?? null;
1033
880
  });
1034
881
  locator.getEventBus().on(
1035
882
  locator.getInstanceIdentifier(Request, void 0),
@@ -1122,8 +969,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1122
969
  this.context = this.originalContext;
1123
970
  }
1124
971
  isLevelEnabled(level) {
1125
- var _a3;
1126
- const logLevels = (_a3 = this.options) == null ? void 0 : _a3.logLevels;
972
+ const logLevels = this.options?.logLevels;
1127
973
  return isLogLevelEnabled(level, logLevels);
1128
974
  }
1129
975
  getTimestamp() {
@@ -1171,7 +1017,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1171
1017
  if (this.options.requestId && this.requestId) {
1172
1018
  logObject.requestId = this.requestId;
1173
1019
  }
1174
- const formattedMessage = !this.options.colors && this.inspectOptions.compact === true ? JSON.stringify(logObject, this.stringifyReplacer) : (0, import_util.inspect)(logObject, this.inspectOptions);
1020
+ const formattedMessage = !this.options.colors && this.inspectOptions.compact === true ? JSON.stringify(logObject, this.stringifyReplacer) : util.inspect(logObject, this.inspectOptions);
1175
1021
  process[options.writeStreamType ?? "stdout"].write(`${formattedMessage}
1176
1022
  `);
1177
1023
  }
@@ -1210,7 +1056,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1210
1056
  if (typeof message === "string") {
1211
1057
  return this.colorize(message, logLevel);
1212
1058
  }
1213
- const outputText = (0, import_util.inspect)(message, this.inspectOptions);
1059
+ const outputText = util.inspect(message, this.inspectOptions);
1214
1060
  if (isPlainObject(message)) {
1215
1061
  return `Object(${Object.keys(message).length}) ${outputText}`;
1216
1062
  }
@@ -1234,8 +1080,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1234
1080
  `);
1235
1081
  }
1236
1082
  updateAndGetTimestampDiff() {
1237
- var _a3;
1238
- const includeTimestamp = _ConsoleLogger.lastTimestampAt && ((_a3 = this.options) == null ? void 0 : _a3.timestamp);
1083
+ const includeTimestamp = _ConsoleLogger.lastTimestampAt && this.options?.timestamp;
1239
1084
  const result = includeTimestamp ? this.formatTimestampDiff(Date.now() - _ConsoleLogger.lastTimestampAt) : "";
1240
1085
  _ConsoleLogger.lastTimestampAt = Date.now();
1241
1086
  return result;
@@ -1273,12 +1118,12 @@ var _ConsoleLogger = class _ConsoleLogger {
1273
1118
  return value.toString();
1274
1119
  }
1275
1120
  if (value instanceof Map || value instanceof Set || value instanceof Error) {
1276
- return `${(0, import_util.inspect)(value, this.inspectOptions)}`;
1121
+ return `${util.inspect(value, this.inspectOptions)}`;
1277
1122
  }
1278
1123
  return value;
1279
1124
  }
1280
1125
  getContextAndMessagesToPrint(args) {
1281
- if ((args == null ? void 0 : args.length) <= 1) {
1126
+ if (args?.length <= 1) {
1282
1127
  return { messages: args, context: this.context };
1283
1128
  }
1284
1129
  const lastElement = args[args.length - 1];
@@ -1303,7 +1148,7 @@ var _ConsoleLogger = class _ConsoleLogger {
1303
1148
  };
1304
1149
  }
1305
1150
  const { messages, context } = this.getContextAndMessagesToPrint(args);
1306
- if ((messages == null ? void 0 : messages.length) <= 1) {
1151
+ if (messages?.length <= 1) {
1307
1152
  return { messages, context };
1308
1153
  }
1309
1154
  const lastElement = messages[messages.length - 1];
@@ -1344,13 +1189,6 @@ _init7 = __decoratorStart(null);
1344
1189
  _ConsoleLogger = __decorateElement(_init7, 0, "ConsoleLogger", _ConsoleLogger_decorators, _ConsoleLogger);
1345
1190
  __runInitializers(_init7, 1, _ConsoleLogger);
1346
1191
  var ConsoleLogger = _ConsoleLogger;
1347
-
1348
- // packages/core/src/logger/logger.factory.mts
1349
- var import_di13 = require("@navios/di");
1350
- var import_zod2 = require("zod");
1351
-
1352
- // packages/core/src/logger/logger.service.mts
1353
- var import_di12 = require("@navios/di");
1354
1192
  var DEFAULT_LOGGER = new ConsoleLogger();
1355
1193
  var dateTimeFormatter2 = new Intl.DateTimeFormat(void 0, {
1356
1194
  year: "numeric",
@@ -1361,7 +1199,7 @@ var dateTimeFormatter2 = new Intl.DateTimeFormat(void 0, {
1361
1199
  month: "2-digit"
1362
1200
  });
1363
1201
  var _LoggerInstance_decorators, _init8;
1364
- _LoggerInstance_decorators = [(0, import_di12.Injectable)()];
1202
+ _LoggerInstance_decorators = [di.Injectable()];
1365
1203
  var _LoggerInstance = class _LoggerInstance {
1366
1204
  constructor(context, options = {}) {
1367
1205
  this.context = context;
@@ -1382,69 +1220,56 @@ var _LoggerInstance = class _LoggerInstance {
1382
1220
  return _LoggerInstance.staticInstanceRef;
1383
1221
  }
1384
1222
  error(message, ...optionalParams) {
1385
- var _a3;
1386
1223
  optionalParams = this.context ? (optionalParams.length ? optionalParams : [void 0]).concat(
1387
1224
  this.context
1388
1225
  ) : optionalParams;
1389
- (_a3 = this.localInstance) == null ? void 0 : _a3.error(message, ...optionalParams);
1226
+ this.localInstance?.error(message, ...optionalParams);
1390
1227
  }
1391
1228
  log(message, ...optionalParams) {
1392
- var _a3;
1393
1229
  optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams;
1394
- (_a3 = this.localInstance) == null ? void 0 : _a3.log(message, ...optionalParams);
1230
+ this.localInstance?.log(message, ...optionalParams);
1395
1231
  }
1396
1232
  warn(message, ...optionalParams) {
1397
- var _a3;
1398
1233
  optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams;
1399
- (_a3 = this.localInstance) == null ? void 0 : _a3.warn(message, ...optionalParams);
1234
+ this.localInstance?.warn(message, ...optionalParams);
1400
1235
  }
1401
1236
  debug(message, ...optionalParams) {
1402
- var _a3, _b;
1403
1237
  optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams;
1404
- (_b = (_a3 = this.localInstance) == null ? void 0 : _a3.debug) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1238
+ this.localInstance?.debug?.(message, ...optionalParams);
1405
1239
  }
1406
1240
  verbose(message, ...optionalParams) {
1407
- var _a3, _b;
1408
1241
  optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams;
1409
- (_b = (_a3 = this.localInstance) == null ? void 0 : _a3.verbose) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1242
+ this.localInstance?.verbose?.(message, ...optionalParams);
1410
1243
  }
1411
1244
  fatal(message, ...optionalParams) {
1412
- var _a3, _b;
1413
1245
  optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams;
1414
- (_b = (_a3 = this.localInstance) == null ? void 0 : _a3.fatal) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1246
+ this.localInstance?.fatal?.(message, ...optionalParams);
1415
1247
  }
1416
1248
  static error(message, ...optionalParams) {
1417
- var _a3;
1418
- (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.error(message, ...optionalParams);
1249
+ this.staticInstanceRef?.error(message, ...optionalParams);
1419
1250
  }
1420
1251
  static log(message, ...optionalParams) {
1421
- var _a3;
1422
- (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.log(message, ...optionalParams);
1252
+ this.staticInstanceRef?.log(message, ...optionalParams);
1423
1253
  }
1424
1254
  static warn(message, ...optionalParams) {
1425
- var _a3;
1426
- (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.warn(message, ...optionalParams);
1255
+ this.staticInstanceRef?.warn(message, ...optionalParams);
1427
1256
  }
1428
1257
  static debug(message, ...optionalParams) {
1429
- var _a3, _b;
1430
- (_b = (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.debug) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1258
+ this.staticInstanceRef?.debug?.(message, ...optionalParams);
1431
1259
  }
1432
1260
  static verbose(message, ...optionalParams) {
1433
- var _a3, _b;
1434
- (_b = (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.verbose) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1261
+ this.staticInstanceRef?.verbose?.(message, ...optionalParams);
1435
1262
  }
1436
1263
  static fatal(message, ...optionalParams) {
1437
- var _a3, _b;
1438
- (_b = (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.fatal) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1264
+ this.staticInstanceRef?.fatal?.(message, ...optionalParams);
1439
1265
  }
1440
1266
  static getTimestamp() {
1441
1267
  return dateTimeFormatter2.format(Date.now());
1442
1268
  }
1443
1269
  static overrideLogger(logger) {
1444
- var _a3, _b;
1445
1270
  if (Array.isArray(logger)) {
1446
1271
  _LoggerInstance.logLevels = logger;
1447
- return (_b = (_a3 = this.staticInstanceRef) == null ? void 0 : _a3.setLogLevels) == null ? void 0 : _b.call(_a3, logger);
1272
+ return this.staticInstanceRef?.setLogLevels?.(logger);
1448
1273
  }
1449
1274
  if (isObject(logger)) {
1450
1275
  this.staticInstanceRef = logger;
@@ -1457,12 +1282,11 @@ var _LoggerInstance = class _LoggerInstance {
1457
1282
  return isLogLevelEnabled(level, logLevels);
1458
1283
  }
1459
1284
  registerLocalInstanceRef() {
1460
- var _a3;
1461
1285
  if (this.localInstanceRef) {
1462
1286
  return this.localInstanceRef;
1463
1287
  }
1464
1288
  this.localInstanceRef = new ConsoleLogger(this.context, {
1465
- timestamp: (_a3 = this.options) == null ? void 0 : _a3.timestamp,
1289
+ timestamp: this.options?.timestamp,
1466
1290
  logLevels: _LoggerInstance.logLevels
1467
1291
  });
1468
1292
  return this.localInstanceRef;
@@ -1473,30 +1297,30 @@ _LoggerInstance = __decorateElement(_init8, 0, "LoggerInstance", _LoggerInstance
1473
1297
  __runInitializers(_init8, 1, _LoggerInstance);
1474
1298
  var LoggerInstance = _LoggerInstance;
1475
1299
 
1476
- // packages/core/src/logger/logger.factory.mts
1300
+ // src/logger/logger.factory.mts
1477
1301
  var LoggerInjectionToken = "LoggerInjectionToken";
1478
- var LoggerOptions = import_zod2.z.object({
1479
- context: import_zod2.z.string().optional(),
1480
- options: import_zod2.z.object({
1481
- timestamp: import_zod2.z.boolean().optional()
1302
+ var LoggerOptions = zod.z.object({
1303
+ context: zod.z.string().optional(),
1304
+ options: zod.z.object({
1305
+ timestamp: zod.z.boolean().optional()
1482
1306
  }).optional()
1483
1307
  }).optional();
1484
- var Logger = import_di13.InjectionToken.create(LoggerInjectionToken, LoggerOptions);
1308
+ var Logger = di.InjectionToken.create(LoggerInjectionToken, LoggerOptions);
1485
1309
  var _LoggerFactory_decorators, _init9;
1486
- _LoggerFactory_decorators = [(0, import_di13.Injectable)({
1487
- type: import_di13.InjectableType.Factory,
1310
+ _LoggerFactory_decorators = [di.Injectable({
1311
+ type: di.InjectableType.Factory,
1488
1312
  token: Logger
1489
1313
  })];
1490
- var LoggerFactory = class {
1314
+ exports.LoggerFactory = class LoggerFactory {
1491
1315
  create(ctx, args) {
1492
- return new LoggerInstance(args == null ? void 0 : args.context, args == null ? void 0 : args.options);
1316
+ return new LoggerInstance(args?.context, args?.options);
1493
1317
  }
1494
1318
  };
1495
1319
  _init9 = __decoratorStart(null);
1496
- LoggerFactory = __decorateElement(_init9, 0, "LoggerFactory", _LoggerFactory_decorators, LoggerFactory);
1497
- __runInitializers(_init9, 1, LoggerFactory);
1320
+ exports.LoggerFactory = __decorateElement(_init9, 0, "LoggerFactory", _LoggerFactory_decorators, exports.LoggerFactory);
1321
+ __runInitializers(_init9, 1, exports.LoggerFactory);
1498
1322
 
1499
- // packages/core/src/logger/pino-wrapper.mts
1323
+ // src/logger/pino-wrapper.mts
1500
1324
  var PinoWrapper = class _PinoWrapper {
1501
1325
  constructor(logger) {
1502
1326
  this.logger = logger;
@@ -1516,12 +1340,10 @@ var PinoWrapper = class _PinoWrapper {
1516
1340
  info() {
1517
1341
  }
1518
1342
  debug(message, ...optionalParams) {
1519
- var _a3, _b;
1520
- (_b = (_a3 = this.logger).debug) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1343
+ this.logger.debug?.(message, ...optionalParams);
1521
1344
  }
1522
1345
  trace(message, ...optionalParams) {
1523
- var _a3, _b;
1524
- (_b = (_a3 = this.logger).verbose) == null ? void 0 : _b.call(_a3, message, ...optionalParams);
1346
+ this.logger.verbose?.(message, ...optionalParams);
1525
1347
  }
1526
1348
  silent() {
1527
1349
  }
@@ -1548,18 +1370,24 @@ var PinoWrapper = class _PinoWrapper {
1548
1370
  }
1549
1371
  };
1550
1372
 
1551
- // packages/core/src/config/config.service.mts
1552
- var import_common = require("@navios/common");
1553
- var ConfigServiceInstance = class {
1554
- constructor(config = {}, logger) {
1373
+ // src/config/config.service.mts
1374
+ var ConfigServiceOptionsSchema = zod.z.record(zod.z.unknown());
1375
+ var ConfigServiceToken = di.InjectionToken.create(Symbol.for("ConfigService"), ConfigServiceOptionsSchema);
1376
+ var _ConfigService_decorators, _init10;
1377
+ _ConfigService_decorators = [di.Injectable({
1378
+ token: ConfigServiceToken
1379
+ })];
1380
+ var _ConfigService = class _ConfigService {
1381
+ constructor(config = {}) {
1555
1382
  this.config = config;
1556
- this.logger = logger;
1557
1383
  }
1384
+ logger = di.syncInject(Logger, {
1385
+ context: _ConfigService.name
1386
+ });
1558
1387
  getConfig() {
1559
1388
  return this.config;
1560
1389
  }
1561
1390
  get(key) {
1562
- var _a3, _b;
1563
1391
  try {
1564
1392
  const parts = String(key).split(".");
1565
1393
  let value = this.config;
@@ -1571,8 +1399,7 @@ var ConfigServiceInstance = class {
1571
1399
  }
1572
1400
  return value ?? null;
1573
1401
  } catch (error) {
1574
- (_b = (_a3 = this.logger).debug) == null ? void 0 : _b.call(
1575
- _a3,
1402
+ this.logger.debug?.(
1576
1403
  `Failed to get config value for key ${String(key)}`,
1577
1404
  error
1578
1405
  );
@@ -1588,50 +1415,26 @@ var ConfigServiceInstance = class {
1588
1415
  if (value === null) {
1589
1416
  const message = errorMessage || `Configuration value for key "${String(key)}" is not defined`;
1590
1417
  this.logger.error(message);
1591
- throw new import_common.NaviosException(message);
1418
+ throw new common.NaviosException(message);
1592
1419
  }
1593
1420
  return value;
1594
1421
  }
1595
1422
  };
1423
+ _init10 = __decoratorStart(null);
1424
+ _ConfigService = __decorateElement(_init10, 0, "ConfigService", _ConfigService_decorators, _ConfigService);
1425
+ __runInitializers(_init10, 1, _ConfigService);
1426
+ var ConfigService = _ConfigService;
1596
1427
 
1597
- // packages/core/src/config/config.provider.mts
1598
- var ConfigProviderOptions = import_zod3.z.object({
1599
- load: import_zod3.z.function()
1428
+ // src/config/config.provider.mts
1429
+ var ConfigProviderOptions = zod.z.object({
1430
+ load: zod.z.function().returns(ConfigServiceOptionsSchema)
1600
1431
  });
1601
- var ConfigProvider = import_di14.InjectionToken.create(ConfigServiceInstance, ConfigProviderOptions);
1602
- var _ConfigProviderFactory_decorators, _init10;
1603
- _ConfigProviderFactory_decorators = [(0, import_di14.Injectable)({
1604
- token: ConfigProvider,
1605
- type: import_di14.InjectableType.Factory
1606
- })];
1607
- var ConfigProviderFactory = class {
1608
- logger = (0, import_di14.syncInject)(Logger, {
1609
- context: "ConfigService"
1610
- });
1611
- async create(ctx, args) {
1612
- const { load } = args;
1613
- const logger = this.logger;
1614
- try {
1615
- const config = await load();
1616
- return new ConfigServiceInstance(
1617
- config,
1618
- logger
1619
- );
1620
- } catch (error) {
1621
- logger.error("Error loading config", error);
1622
- throw error;
1623
- }
1624
- }
1625
- };
1626
- _init10 = __decoratorStart(null);
1627
- ConfigProviderFactory = __decorateElement(_init10, 0, "ConfigProviderFactory", _ConfigProviderFactory_decorators, ConfigProviderFactory);
1628
- __runInitializers(_init10, 1, ConfigProviderFactory);
1629
1432
  function provideConfig(options) {
1630
- return import_di14.InjectionToken.bound(ConfigProvider, options);
1433
+ return di.InjectionToken.factory(ConfigServiceToken, async () => options.load());
1631
1434
  }
1632
-
1633
- // packages/core/src/decorators/controller.decorator.mts
1634
- var import_di15 = require("@navios/di");
1435
+ var EnvConfigProvider = di.InjectionToken.bound(ConfigServiceToken, {
1436
+ ...process$1.env
1437
+ });
1635
1438
  function Controller({ guards } = {}) {
1636
1439
  return function(target, context) {
1637
1440
  if (context.kind !== "class") {
@@ -1639,7 +1442,7 @@ function Controller({ guards } = {}) {
1639
1442
  "[Navios] @Controller decorator can only be used on classes."
1640
1443
  );
1641
1444
  }
1642
- const token = import_di15.InjectionToken.create(target);
1445
+ const token = di.InjectionToken.create(target);
1643
1446
  if (context.metadata) {
1644
1447
  const controllerMetadata = getControllerMetadata(target, context);
1645
1448
  if (guards) {
@@ -1648,22 +1451,14 @@ function Controller({ guards } = {}) {
1648
1451
  }
1649
1452
  }
1650
1453
  }
1651
- return (0, import_di15.Injectable)({
1454
+ return di.Injectable({
1652
1455
  token,
1653
- scope: import_di15.InjectableScope.Instance
1456
+ scope: di.InjectableScope.Instance
1654
1457
  })(target, context);
1655
1458
  };
1656
1459
  }
1657
-
1658
- // packages/core/src/decorators/endpoint.decorator.mts
1659
- var import_zod4 = require("zod");
1660
1460
  function Endpoint(endpoint) {
1661
1461
  return (target, context) => {
1662
- if (typeof target !== "function") {
1663
- throw new Error(
1664
- "[Navios] Endpoint decorator can only be used on functions."
1665
- );
1666
- }
1667
1462
  if (context.kind !== "method") {
1668
1463
  throw new Error(
1669
1464
  "[Navios] Endpoint decorator can only be used on methods."
@@ -1690,7 +1485,7 @@ function Endpoint(endpoint) {
1690
1485
  };
1691
1486
  }
1692
1487
 
1693
- // packages/core/src/decorators/header.decorator.mts
1488
+ // src/decorators/header.decorator.mts
1694
1489
  function Header(name, value) {
1695
1490
  return (target, context) => {
1696
1491
  if (context.kind !== "method") {
@@ -1702,7 +1497,7 @@ function Header(name, value) {
1702
1497
  };
1703
1498
  }
1704
1499
 
1705
- // packages/core/src/decorators/http-code.decorator.mts
1500
+ // src/decorators/http-code.decorator.mts
1706
1501
  function HttpCode(code) {
1707
1502
  return (target, context) => {
1708
1503
  if (context.kind !== "method") {
@@ -1715,9 +1510,6 @@ function HttpCode(code) {
1715
1510
  return target;
1716
1511
  };
1717
1512
  }
1718
-
1719
- // packages/core/src/decorators/module.decorator.mts
1720
- var import_di16 = require("@navios/di");
1721
1513
  function Module({ controllers = [], imports = [], guards = [] } = {
1722
1514
  controllers: [],
1723
1515
  imports: [],
@@ -1727,7 +1519,7 @@ function Module({ controllers = [], imports = [], guards = [] } = {
1727
1519
  if (context.kind !== "class") {
1728
1520
  throw new Error("[Navios] @Module decorator can only be used on classes.");
1729
1521
  }
1730
- const token = import_di16.InjectionToken.create(target);
1522
+ const token = di.InjectionToken.create(target);
1731
1523
  const moduleMetadata = getModuleMetadata(target, context);
1732
1524
  for (const controller of controllers) {
1733
1525
  moduleMetadata.controllers.add(controller);
@@ -1738,15 +1530,12 @@ function Module({ controllers = [], imports = [], guards = [] } = {
1738
1530
  for (const guard of Array.from(guards).reverse()) {
1739
1531
  moduleMetadata.guards.add(guard);
1740
1532
  }
1741
- return (0, import_di16.Injectable)({
1533
+ return di.Injectable({
1742
1534
  token,
1743
- scope: import_di16.InjectableScope.Singleton
1535
+ scope: di.InjectableScope.Singleton
1744
1536
  })(target, context);
1745
1537
  };
1746
1538
  }
1747
-
1748
- // packages/core/src/decorators/multipart.decorator.mts
1749
- var import_zod5 = require("zod");
1750
1539
  function Multipart(endpoint) {
1751
1540
  return (target, context) => {
1752
1541
  if (typeof target !== "function") {
@@ -1780,7 +1569,7 @@ function Multipart(endpoint) {
1780
1569
  };
1781
1570
  }
1782
1571
 
1783
- // packages/core/src/decorators/stream.decorator.mts
1572
+ // src/decorators/stream.decorator.mts
1784
1573
  function Stream(endpoint) {
1785
1574
  return (target, context) => {
1786
1575
  if (typeof target !== "function") {
@@ -1814,7 +1603,7 @@ function Stream(endpoint) {
1814
1603
  };
1815
1604
  }
1816
1605
 
1817
- // packages/core/src/decorators/use-guards.decorator.mts
1606
+ // src/decorators/use-guards.decorator.mts
1818
1607
  function UseGuards(...guards) {
1819
1608
  return function(target, context) {
1820
1609
  if (context.kind === "class") {
@@ -1839,7 +1628,7 @@ function UseGuards(...guards) {
1839
1628
  };
1840
1629
  }
1841
1630
 
1842
- // packages/core/src/attribute.factory.mts
1631
+ // src/attribute.factory.mts
1843
1632
  var AttributeFactory = class {
1844
1633
  static createAttribute(token, schema) {
1845
1634
  const res = (value) => (target, context) => {
@@ -1895,19 +1684,12 @@ var AttributeFactory = class {
1895
1684
  return target.customAttributes.has(attribute.token);
1896
1685
  }
1897
1686
  };
1898
-
1899
- // packages/core/src/navios.application.mts
1900
- var import_di17 = require("@navios/di");
1901
- var import_cors = __toESM(require("@fastify/cors"), 1);
1902
- var import_multipart = __toESM(require("@fastify/multipart"), 1);
1903
- var import_fastify = require("fastify");
1904
- var import_fastify_type_provider_zod = require("fastify-type-provider-zod");
1905
1687
  var _NaviosApplication_decorators, _init11;
1906
- _NaviosApplication_decorators = [(0, import_di17.Injectable)()];
1688
+ _NaviosApplication_decorators = [di.Injectable()];
1907
1689
  var _NaviosApplication = class _NaviosApplication {
1908
- moduleLoader = (0, import_di17.syncInject)(ModuleLoaderService);
1909
- controllerAdapter = (0, import_di17.syncInject)(ControllerAdapterService);
1910
- logger = (0, import_di17.syncInject)(Logger, {
1690
+ moduleLoader = di.syncInject(ModuleLoaderService);
1691
+ controllerAdapter = di.syncInject(ControllerAdapterService);
1692
+ logger = di.syncInject(Logger, {
1911
1693
  context: _NaviosApplication.name
1912
1694
  });
1913
1695
  server = null;
@@ -1928,11 +1710,11 @@ var _NaviosApplication = class _NaviosApplication {
1928
1710
  await this.moduleLoader.loadModules(this.appModule);
1929
1711
  this.server = await this.getFastifyInstance(this.options);
1930
1712
  this.configureFastifyInstance(this.server);
1931
- (0, import_di17.getGlobalServiceLocator)().storeInstance(this.server, Application);
1932
- this.server.setValidatorCompiler(import_fastify_type_provider_zod.validatorCompiler);
1933
- this.server.setSerializerCompiler(import_fastify_type_provider_zod.serializerCompiler);
1713
+ di.getGlobalServiceLocator().storeInstance(this.server, Application);
1714
+ this.server.setValidatorCompiler(fastifyTypeProviderZod.validatorCompiler);
1715
+ this.server.setSerializerCompiler(fastifyTypeProviderZod.serializerCompiler);
1934
1716
  if (this.corsOptions) {
1935
- await this.server.register(import_cors.default, this.corsOptions);
1717
+ await this.server.register(cors__default.default, this.corsOptions);
1936
1718
  }
1937
1719
  if (this.multipartOptions) {
1938
1720
  await this.configureMultipart(this.server, this.multipartOptions);
@@ -1952,17 +1734,17 @@ var _NaviosApplication = class _NaviosApplication {
1952
1734
  }
1953
1735
  } else {
1954
1736
  fastifyOptions.loggerInstance = new PinoWrapper(
1955
- await (0, import_di17.inject)(Logger, {
1737
+ await di.inject(Logger, {
1956
1738
  context: "FastifyAdapter"
1957
1739
  })
1958
1740
  );
1959
1741
  }
1960
- return (0, import_fastify.fastify)(fastifyOptions);
1742
+ return fastify.fastify(fastifyOptions);
1961
1743
  } else {
1962
- return (0, import_fastify.fastify)({
1744
+ return fastify.fastify({
1963
1745
  ...options,
1964
1746
  loggerInstance: new PinoWrapper(
1965
- await (0, import_di17.inject)(Logger, {
1747
+ await di.inject(Logger, {
1966
1748
  context: "FastifyAdapter"
1967
1749
  })
1968
1750
  )
@@ -2001,7 +1783,7 @@ var _NaviosApplication = class _NaviosApplication {
2001
1783
  async configureMultipart(server, options) {
2002
1784
  if (options) {
2003
1785
  await server.register(
2004
- import_multipart.default,
1786
+ multipart__default.default,
2005
1787
  typeof options === "object" ? options : {}
2006
1788
  );
2007
1789
  }
@@ -2071,12 +1853,9 @@ _init11 = __decoratorStart(null);
2071
1853
  _NaviosApplication = __decorateElement(_init11, 0, "NaviosApplication", _NaviosApplication_decorators, _NaviosApplication);
2072
1854
  __runInitializers(_init11, 1, _NaviosApplication);
2073
1855
  var NaviosApplication = _NaviosApplication;
2074
-
2075
- // packages/core/src/navios.factory.mts
2076
- var import_di18 = require("@navios/di");
2077
1856
  var NaviosFactory = class {
2078
1857
  static async create(appModule, options = {}) {
2079
- const app = await (0, import_di18.inject)(NaviosApplication);
1858
+ const app = await di.inject(NaviosApplication);
2080
1859
  this.registerLoggerConfiguration(options);
2081
1860
  app.setup(appModule, options);
2082
1861
  return app;
@@ -2091,84 +1870,85 @@ var NaviosFactory = class {
2091
1870
  }
2092
1871
  }
2093
1872
  };
2094
- // Annotate the CommonJS export names for ESM import in node:
2095
- 0 && (module.exports = {
2096
- Application,
2097
- AttributeFactory,
2098
- BadRequestException,
2099
- ConfigProvider,
2100
- ConfigProviderFactory,
2101
- ConfigProviderOptions,
2102
- ConfigServiceInstance,
2103
- ConflictException,
2104
- ConsoleLogger,
2105
- Controller,
2106
- ControllerAdapterService,
2107
- ControllerMetadataKey,
2108
- Endpoint,
2109
- EndpointAdapterService,
2110
- EndpointAdapterToken,
2111
- EndpointMetadataKey,
2112
- ExecutionContext,
2113
- ExecutionContextInjectionToken,
2114
- ExecutionContextToken,
2115
- ForbiddenException,
2116
- GuardRunnerService,
2117
- Header,
2118
- HttpCode,
2119
- HttpException,
2120
- InternalServerErrorException,
2121
- LOG_LEVELS,
2122
- Logger,
2123
- LoggerFactory,
2124
- LoggerInjectionToken,
2125
- LoggerInstance,
2126
- LoggerOptions,
2127
- Module,
2128
- ModuleLoaderService,
2129
- ModuleMetadataKey,
2130
- Multipart,
2131
- MultipartAdapterService,
2132
- MultipartAdapterToken,
2133
- NaviosApplication,
2134
- NaviosFactory,
2135
- NotFoundException,
2136
- PinoWrapper,
2137
- Reply,
2138
- Request,
2139
- Stream,
2140
- StreamAdapterService,
2141
- StreamAdapterToken,
2142
- UnauthorizedException,
2143
- UseGuards,
2144
- addLeadingSlash,
2145
- clc,
2146
- envInt,
2147
- envString,
2148
- extractControllerMetadata,
2149
- extractModuleMetadata,
2150
- filterLogLevels,
2151
- getAllEndpointMetadata,
2152
- getControllerMetadata,
2153
- getEndpointMetadata,
2154
- getModuleMetadata,
2155
- hasControllerMetadata,
2156
- hasModuleMetadata,
2157
- isConstructor,
2158
- isEmpty,
2159
- isFunction,
2160
- isLogLevel,
2161
- isLogLevelEnabled,
2162
- isNil,
2163
- isNumber,
2164
- isObject,
2165
- isPlainObject,
2166
- isString,
2167
- isSymbol,
2168
- isUndefined,
2169
- normalizePath,
2170
- provideConfig,
2171
- stripEndSlash,
2172
- yellow,
2173
- ...require("@navios/di")
1873
+
1874
+ exports.Application = Application;
1875
+ exports.AttributeFactory = AttributeFactory;
1876
+ exports.BadRequestException = BadRequestException;
1877
+ exports.ConfigProviderOptions = ConfigProviderOptions;
1878
+ exports.ConfigService = ConfigService;
1879
+ exports.ConfigServiceOptionsSchema = ConfigServiceOptionsSchema;
1880
+ exports.ConfigServiceToken = ConfigServiceToken;
1881
+ exports.ConflictException = ConflictException;
1882
+ exports.ConsoleLogger = ConsoleLogger;
1883
+ exports.Controller = Controller;
1884
+ exports.ControllerAdapterService = ControllerAdapterService;
1885
+ exports.ControllerMetadataKey = ControllerMetadataKey;
1886
+ exports.Endpoint = Endpoint;
1887
+ exports.EndpointAdapterToken = EndpointAdapterToken;
1888
+ exports.EndpointMetadataKey = EndpointMetadataKey;
1889
+ exports.EnvConfigProvider = EnvConfigProvider;
1890
+ exports.ExecutionContext = ExecutionContext;
1891
+ exports.ExecutionContextInjectionToken = ExecutionContextInjectionToken;
1892
+ exports.ExecutionContextToken = ExecutionContextToken;
1893
+ exports.ForbiddenException = ForbiddenException;
1894
+ exports.Header = Header;
1895
+ exports.HttpCode = HttpCode;
1896
+ exports.HttpException = HttpException;
1897
+ exports.InternalServerErrorException = InternalServerErrorException;
1898
+ exports.LOG_LEVELS = LOG_LEVELS;
1899
+ exports.Logger = Logger;
1900
+ exports.LoggerInjectionToken = LoggerInjectionToken;
1901
+ exports.LoggerInstance = LoggerInstance;
1902
+ exports.LoggerOptions = LoggerOptions;
1903
+ exports.Module = Module;
1904
+ exports.ModuleLoaderService = ModuleLoaderService;
1905
+ exports.ModuleMetadataKey = ModuleMetadataKey;
1906
+ exports.Multipart = Multipart;
1907
+ exports.MultipartAdapterToken = MultipartAdapterToken;
1908
+ exports.NaviosApplication = NaviosApplication;
1909
+ exports.NaviosFactory = NaviosFactory;
1910
+ exports.NotFoundException = NotFoundException;
1911
+ exports.PinoWrapper = PinoWrapper;
1912
+ exports.Reply = Reply;
1913
+ exports.Request = Request;
1914
+ exports.Stream = Stream;
1915
+ exports.StreamAdapterToken = StreamAdapterToken;
1916
+ exports.UnauthorizedException = UnauthorizedException;
1917
+ exports.UseGuards = UseGuards;
1918
+ exports.addLeadingSlash = addLeadingSlash;
1919
+ exports.clc = clc;
1920
+ exports.envInt = envInt;
1921
+ exports.envString = envString;
1922
+ exports.extractControllerMetadata = extractControllerMetadata;
1923
+ exports.extractModuleMetadata = extractModuleMetadata;
1924
+ exports.filterLogLevels = filterLogLevels;
1925
+ exports.getAllEndpointMetadata = getAllEndpointMetadata;
1926
+ exports.getControllerMetadata = getControllerMetadata;
1927
+ exports.getEndpointMetadata = getEndpointMetadata;
1928
+ exports.getModuleMetadata = getModuleMetadata;
1929
+ exports.hasControllerMetadata = hasControllerMetadata;
1930
+ exports.hasModuleMetadata = hasModuleMetadata;
1931
+ exports.isConstructor = isConstructor;
1932
+ exports.isEmpty = isEmpty;
1933
+ exports.isFunction = isFunction;
1934
+ exports.isLogLevel = isLogLevel;
1935
+ exports.isLogLevelEnabled = isLogLevelEnabled;
1936
+ exports.isNil = isNil;
1937
+ exports.isNumber = isNumber;
1938
+ exports.isObject = isObject;
1939
+ exports.isPlainObject = isPlainObject;
1940
+ exports.isString = isString;
1941
+ exports.isSymbol = isSymbol;
1942
+ exports.isUndefined = isUndefined;
1943
+ exports.normalizePath = normalizePath;
1944
+ exports.provideConfig = provideConfig;
1945
+ exports.stripEndSlash = stripEndSlash;
1946
+ exports.yellow = yellow;
1947
+ Object.keys(di).forEach(function (k) {
1948
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
1949
+ enumerable: true,
1950
+ get: function () { return di[k]; }
1951
+ });
2174
1952
  });
1953
+ //# sourceMappingURL=index.js.map
1954
+ //# sourceMappingURL=index.js.map