@navios/core 0.2.2 → 0.4.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/lib/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { InjectionToken, Injectable, InjectableType, getGlobalServiceLocator, inject, syncInject, InjectableScope } from '@navios/di';
2
2
  export * from '@navios/di';
3
- import { z, ZodOptional, ZodArray, ZodObject } from 'zod';
4
- import { env } from 'node:process';
5
- import { NaviosException } from '@navios/common';
3
+ import { z, ZodOptional, ZodArray, ZodObject } from 'zod/v4';
4
+ import { env } from 'process';
5
+ import { NaviosException } from '@navios/builder';
6
6
  import { inspect } from 'util';
7
7
  import cors from '@fastify/cors';
8
8
  import multipart from '@fastify/multipart';
@@ -178,7 +178,7 @@ var MultipartAdapterService = class extends (_a2 = EndpointAdapterService) {
178
178
  });
179
179
  }
180
180
  const requestSchema = config.requestSchema;
181
- const shape = requestSchema._def.shape();
181
+ const shape = requestSchema._zod.def.shape;
182
182
  const structure = this.analyzeSchema(shape);
183
183
  getters.push(async (target, request) => {
184
184
  const req = {};
@@ -196,9 +196,13 @@ var MultipartAdapterService = class extends (_a2 = EndpointAdapterService) {
196
196
  }
197
197
  let value;
198
198
  if (part.type === "file") {
199
- value = new File([await part.toBuffer()], part.filename, {
200
- type: part.mimetype
201
- });
199
+ value = new File(
200
+ [await part.toBuffer()],
201
+ part.filename,
202
+ {
203
+ type: part.mimetype
204
+ }
205
+ );
202
206
  } else {
203
207
  value = part.value;
204
208
  if (isObject2 && typeof value === "string") {
@@ -1365,7 +1369,7 @@ var PinoWrapper = class _PinoWrapper {
1365
1369
  };
1366
1370
 
1367
1371
  // src/config/config.service.mts
1368
- var ConfigServiceOptionsSchema = z.record(z.unknown());
1372
+ var ConfigServiceOptionsSchema = z.record(z.string(), z.unknown());
1369
1373
  var ConfigServiceToken = InjectionToken.create(Symbol.for("ConfigService"), ConfigServiceOptionsSchema);
1370
1374
  var _ConfigService_decorators, _init10;
1371
1375
  _ConfigService_decorators = [Injectable({
@@ -1421,7 +1425,7 @@ var ConfigService = _ConfigService;
1421
1425
 
1422
1426
  // src/config/config.provider.mts
1423
1427
  var ConfigProviderOptions = z.object({
1424
- load: z.function().returns(ConfigServiceOptionsSchema)
1428
+ load: z.function({ output: ConfigServiceOptionsSchema })
1425
1429
  });
1426
1430
  function provideConfig(options) {
1427
1431
  return InjectionToken.factory(ConfigServiceToken, async () => options.load());