@navios/core 0.5.0 → 0.6.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/docs/modules.md +126 -0
- package/docs/services.md +2 -3
- package/lib/_tsup-dts-rollup.d.mts +28 -9
- package/lib/_tsup-dts-rollup.d.ts +28 -9
- package/lib/index.d.mts +8 -4
- package/lib/index.d.ts +8 -4
- package/lib/index.js +30 -9
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +30 -10
- package/lib/index.mjs.map +1 -1
- package/package.json +7 -8
- package/src/decorators/multipart.decorator.mts +0 -1
- package/src/factories/index.mts +1 -0
- package/src/factories/xml-stream-adapter.factory.mts +20 -0
- package/src/tokens/index.mts +1 -0
- package/src/tokens/xml-stream-adapter.token.mts +8 -0
package/lib/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { inspect } from 'util';
|
|
|
8
8
|
var __create = Object.create;
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
-
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
11
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
12
12
|
var __typeError = (msg) => {
|
|
13
13
|
throw TypeError(msg);
|
|
14
14
|
};
|
|
@@ -545,7 +545,7 @@ __runInitializers(_init2, 1, LoggerInstance);
|
|
|
545
545
|
|
|
546
546
|
// src/config/config.service.mts
|
|
547
547
|
var ConfigServiceOptionsSchema = z$1.record(z$1.string(), z$1.unknown());
|
|
548
|
-
var ConfigServiceToken = InjectionToken.create(Symbol.for("ConfigService"), ConfigServiceOptionsSchema);
|
|
548
|
+
var ConfigServiceToken = InjectionToken.create(/* @__PURE__ */ Symbol.for("ConfigService"), ConfigServiceOptionsSchema);
|
|
549
549
|
var _ConfigService_decorators, _init3;
|
|
550
550
|
_ConfigService_decorators = [Injectable({
|
|
551
551
|
token: ConfigServiceToken
|
|
@@ -610,7 +610,7 @@ var EnvConfigProvider = InjectionToken.bound(ConfigServiceToken, {
|
|
|
610
610
|
});
|
|
611
611
|
|
|
612
612
|
// src/metadata/handler.metadata.mts
|
|
613
|
-
var EndpointMetadataKey = Symbol("EndpointMetadataKey");
|
|
613
|
+
var EndpointMetadataKey = /* @__PURE__ */ Symbol("EndpointMetadataKey");
|
|
614
614
|
function getAllEndpointMetadata(context) {
|
|
615
615
|
if (context.metadata) {
|
|
616
616
|
const metadata = context.metadata[EndpointMetadataKey];
|
|
@@ -654,7 +654,7 @@ function getEndpointMetadata(target, context) {
|
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
// src/metadata/controller.metadata.mts
|
|
657
|
-
var ControllerMetadataKey = Symbol("ControllerMetadataKey");
|
|
657
|
+
var ControllerMetadataKey = /* @__PURE__ */ Symbol("ControllerMetadataKey");
|
|
658
658
|
function getControllerMetadata(target, context) {
|
|
659
659
|
if (context.metadata) {
|
|
660
660
|
const metadata = context.metadata[ControllerMetadataKey];
|
|
@@ -689,7 +689,7 @@ function hasControllerMetadata(target) {
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
// src/metadata/module.metadata.mts
|
|
692
|
-
var ModuleMetadataKey = Symbol("ControllerMetadataKey");
|
|
692
|
+
var ModuleMetadataKey = /* @__PURE__ */ Symbol("ControllerMetadataKey");
|
|
693
693
|
function getModuleMetadata(target, context) {
|
|
694
694
|
if (context.metadata) {
|
|
695
695
|
const metadata = context.metadata[ModuleMetadataKey];
|
|
@@ -763,6 +763,9 @@ var Request = InjectionToken.create("RequestToken");
|
|
|
763
763
|
var StreamAdapterToken = InjectionToken.create(
|
|
764
764
|
"StreamAdapterToken"
|
|
765
765
|
);
|
|
766
|
+
var XmlStreamAdapterToken = InjectionToken.create(
|
|
767
|
+
"XmlStreamAdapterToken"
|
|
768
|
+
);
|
|
766
769
|
|
|
767
770
|
// src/decorators/endpoint.decorator.mts
|
|
768
771
|
function Endpoint(endpoint) {
|
|
@@ -1302,7 +1305,24 @@ var StreamAdapterFactory = class {
|
|
|
1302
1305
|
_init12 = __decoratorStart();
|
|
1303
1306
|
StreamAdapterFactory = __decorateElement(_init12, 0, "StreamAdapterFactory", _StreamAdapterFactory_decorators, StreamAdapterFactory);
|
|
1304
1307
|
__runInitializers(_init12, 1, StreamAdapterFactory);
|
|
1305
|
-
var
|
|
1308
|
+
var _XmlStreamAdapterFactory_decorators, _init13;
|
|
1309
|
+
_XmlStreamAdapterFactory_decorators = [Factory({
|
|
1310
|
+
token: XmlStreamAdapterToken
|
|
1311
|
+
})];
|
|
1312
|
+
var XmlStreamAdapterFactory = class {
|
|
1313
|
+
environment = inject(NaviosEnvironment);
|
|
1314
|
+
create(ctx) {
|
|
1315
|
+
const service = this.environment.getHttpToken(XmlStreamAdapterToken);
|
|
1316
|
+
if (!service) {
|
|
1317
|
+
throw new Error("XmlStreamAdapterToken service not found in environment");
|
|
1318
|
+
}
|
|
1319
|
+
return ctx.inject(service);
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
_init13 = __decoratorStart();
|
|
1323
|
+
XmlStreamAdapterFactory = __decorateElement(_init13, 0, "XmlStreamAdapterFactory", _XmlStreamAdapterFactory_decorators, XmlStreamAdapterFactory);
|
|
1324
|
+
__runInitializers(_init13, 1, XmlStreamAdapterFactory);
|
|
1325
|
+
var _NaviosApplication_decorators, _init14;
|
|
1306
1326
|
_NaviosApplication_decorators = [Injectable()];
|
|
1307
1327
|
var _NaviosApplication = class _NaviosApplication {
|
|
1308
1328
|
environment = inject(NaviosEnvironment);
|
|
@@ -1390,9 +1410,9 @@ var _NaviosApplication = class _NaviosApplication {
|
|
|
1390
1410
|
await this.dispose();
|
|
1391
1411
|
}
|
|
1392
1412
|
};
|
|
1393
|
-
|
|
1394
|
-
_NaviosApplication = __decorateElement(
|
|
1395
|
-
__runInitializers(
|
|
1413
|
+
_init14 = __decoratorStart();
|
|
1414
|
+
_NaviosApplication = __decorateElement(_init14, 0, "NaviosApplication", _NaviosApplication_decorators, _NaviosApplication);
|
|
1415
|
+
__runInitializers(_init14, 1, _NaviosApplication);
|
|
1396
1416
|
var NaviosApplication = _NaviosApplication;
|
|
1397
1417
|
var NaviosFactory = class {
|
|
1398
1418
|
static async create(appModule, options = {
|
|
@@ -1436,6 +1456,6 @@ var NaviosFactory = class {
|
|
|
1436
1456
|
}
|
|
1437
1457
|
};
|
|
1438
1458
|
|
|
1439
|
-
export { AttributeFactory, BadRequestException, ConfigProviderOptions, ConfigService, ConfigServiceOptionsSchema, ConfigServiceToken, ConflictException, ConsoleLogger, Controller, ControllerMetadataKey, Endpoint, EndpointAdapterFactory, EndpointAdapterToken, EndpointMetadataKey, EnvConfigProvider, ExecutionContext, ExecutionContextInjectionToken, ForbiddenException, GuardRunnerService, Header, HttpAdapterFactory, HttpAdapterToken, HttpCode, HttpException, InternalServerErrorException, LOG_LEVELS, Logger, LoggerInstance, LoggerOutput, Module, ModuleLoaderService, ModuleMetadataKey, Multipart, MultipartAdapterFactory, MultipartAdapterToken, NaviosApplication, NaviosFactory, NotFoundException, Reply, ReplyFactory, Request, RequestFactory, Stream, StreamAdapterFactory, StreamAdapterToken, UnauthorizedException, UseGuards, addLeadingSlash, clc, envInt, envString, extractControllerMetadata, extractModuleMetadata, filterLogLevels, getAllEndpointMetadata, getControllerMetadata, getEndpointMetadata, getModuleMetadata, hasControllerMetadata, hasModuleMetadata, isConstructor, isEmpty, isFunction, isLogLevel, isLogLevelEnabled, isNil, isNumber, isObject, isPlainObject, isString, isSymbol, isUndefined, loggerOptionsSchema, normalizePath, provideConfig, stripEndSlash, yellow };
|
|
1459
|
+
export { AttributeFactory, BadRequestException, ConfigProviderOptions, ConfigService, ConfigServiceOptionsSchema, ConfigServiceToken, ConflictException, ConsoleLogger, Controller, ControllerMetadataKey, Endpoint, EndpointAdapterFactory, EndpointAdapterToken, EndpointMetadataKey, EnvConfigProvider, ExecutionContext, ExecutionContextInjectionToken, ForbiddenException, GuardRunnerService, Header, HttpAdapterFactory, HttpAdapterToken, HttpCode, HttpException, InternalServerErrorException, LOG_LEVELS, Logger, LoggerInstance, LoggerOutput, Module, ModuleLoaderService, ModuleMetadataKey, Multipart, MultipartAdapterFactory, MultipartAdapterToken, NaviosApplication, NaviosFactory, NotFoundException, Reply, ReplyFactory, Request, RequestFactory, Stream, StreamAdapterFactory, StreamAdapterToken, UnauthorizedException, UseGuards, XmlStreamAdapterFactory, XmlStreamAdapterToken, addLeadingSlash, clc, envInt, envString, extractControllerMetadata, extractModuleMetadata, filterLogLevels, getAllEndpointMetadata, getControllerMetadata, getEndpointMetadata, getModuleMetadata, hasControllerMetadata, hasModuleMetadata, isConstructor, isEmpty, isFunction, isLogLevel, isLogLevelEnabled, isNil, isNumber, isObject, isPlainObject, isString, isSymbol, isUndefined, loggerOptionsSchema, normalizePath, provideConfig, stripEndSlash, yellow };
|
|
1440
1460
|
//# sourceMappingURL=index.mjs.map
|
|
1441
1461
|
//# sourceMappingURL=index.mjs.map
|