@tsed/common 6.102.7 → 6.102.8-rc.1
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/cjs/package.json +3 -0
- package/lib/esm/builder/PlatformBuilder.js +7 -7
- package/lib/esm/builder/PlatformControllerBuilder.js +3 -3
- package/lib/esm/config/index.js +3 -3
- package/lib/esm/config/interfaces/index.js +4 -4
- package/lib/esm/decorators/index.js +11 -11
- package/lib/esm/decorators/multer/index.js +3 -3
- package/lib/esm/decorators/multer/multerFileSize.js +1 -1
- package/lib/esm/decorators/multer/multerOptions.js +1 -1
- package/lib/esm/decorators/multer/multipartFile.js +1 -1
- package/lib/esm/domain/ControllerProvider.js +1 -1
- package/lib/esm/domain/HandlerMetadata.js +1 -1
- package/lib/esm/domain/PlatformContext.js +3 -3
- package/lib/esm/domain/index.js +7 -7
- package/lib/esm/index.js +11 -11
- package/lib/esm/interfaces/index.js +17 -17
- package/lib/esm/middlewares/PlatformMulterMiddleware.js +1 -1
- package/lib/esm/middlewares/index.js +5 -5
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/Platform.js +4 -4
- package/lib/esm/services/PlatformApplication.js +3 -3
- package/lib/esm/services/PlatformHandler.js +5 -5
- package/lib/esm/services/PlatformMiddlewaresChain.js +4 -4
- package/lib/esm/services/PlatformRouter.js +2 -2
- package/lib/esm/services/PlatformTest.js +5 -5
- package/lib/esm/services/index.js +8 -8
- package/lib/esm/utils/createContext.js +3 -3
- package/lib/esm/utils/createHandlerMetadata.js +2 -2
- package/lib/esm/utils/createHttpServer.js +2 -2
- package/lib/esm/utils/createHttpsServer.js +2 -2
- package/lib/esm/utils/createInjector.js +7 -7
- package/lib/esm/utils/index.js +9 -9
- package/lib/esm/utils/useCtxHandler.js +1 -1
- package/package.json +18 -17
|
@@ -3,13 +3,13 @@ import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
|
3
3
|
import { nameOf } from "@tsed/core";
|
|
4
4
|
import { colors, createContainer, ProviderScope, setLoggerLevel } from "@tsed/di";
|
|
5
5
|
import { getMiddlewaresForHook } from "@tsed/platform-middlewares";
|
|
6
|
-
import { GlobalAcceptMimesMiddleware } from "../middlewares";
|
|
7
|
-
import { Platform } from "../services/Platform";
|
|
8
|
-
import { PlatformApplication } from "../services/PlatformApplication";
|
|
9
|
-
import { createHttpServer, createHttpsServer, createInjector, printRoutes } from "../utils";
|
|
10
|
-
import { getStaticsOptions } from "../utils/getStaticsOptions";
|
|
11
|
-
import { getConfiguration } from "../utils/getConfiguration";
|
|
12
|
-
import { importProviders } from "../utils/importProviders";
|
|
6
|
+
import { GlobalAcceptMimesMiddleware } from "../middlewares.js";
|
|
7
|
+
import { Platform } from "../services/Platform.js";
|
|
8
|
+
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
9
|
+
import { createHttpServer, createHttpsServer, createInjector, printRoutes } from "../utils.js";
|
|
10
|
+
import { getStaticsOptions } from "../utils/getStaticsOptions.js";
|
|
11
|
+
import { getConfiguration } from "../utils/getConfiguration.js";
|
|
12
|
+
import { importProviders } from "../utils/importProviders.js";
|
|
13
13
|
/**
|
|
14
14
|
* @platform
|
|
15
15
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GlobalProviders, ProviderType } from "@tsed/di";
|
|
2
2
|
import { getOperationsRoutes, OperationMethods } from "@tsed/schema";
|
|
3
|
-
import { ControllerProvider } from "../domain/ControllerProvider";
|
|
4
|
-
import { PlatformRouter } from "../services/PlatformRouter";
|
|
5
|
-
import { PlatformMiddlewaresChain } from "../services/PlatformMiddlewaresChain";
|
|
3
|
+
import { ControllerProvider } from "../domain/ControllerProvider.js";
|
|
4
|
+
import { PlatformRouter } from "../services/PlatformRouter.js";
|
|
5
|
+
import { PlatformMiddlewaresChain } from "../services/PlatformMiddlewaresChain.js";
|
|
6
6
|
GlobalProviders.createRegistry(ProviderType.CONTROLLER, ControllerProvider, {
|
|
7
7
|
onInvoke(provider, locals, { injector }) {
|
|
8
8
|
const router = createRouter(injector, provider);
|
package/lib/esm/config/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./interfaces";
|
|
2
|
-
export * from "./services/PlatformConfiguration";
|
|
3
|
-
export * from "./services/PlatformConfiguration";
|
|
1
|
+
export * from "./interfaces.js";
|
|
2
|
+
export * from "./services/PlatformConfiguration.js";
|
|
3
|
+
export * from "./services/PlatformConfiguration.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./PlatformLoggerSettings";
|
|
2
|
-
export * from "./EndpointDirectoriesSettings";
|
|
3
|
-
export * from "./PlatformStaticsSettings";
|
|
4
|
-
export * from "./PlatformMulterSettings";
|
|
1
|
+
export * from "./PlatformLoggerSettings.js";
|
|
2
|
+
export * from "./EndpointDirectoriesSettings.js";
|
|
3
|
+
export * from "./PlatformStaticsSettings.js";
|
|
4
|
+
export * from "./PlatformMulterSettings.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from "./httpServer";
|
|
2
|
-
export * from "./httpsServer";
|
|
3
|
-
export * from "./multer";
|
|
1
|
+
export * from "./httpServer.js";
|
|
2
|
+
export * from "./httpsServer.js";
|
|
3
|
+
export * from "./multer.js";
|
|
4
4
|
// Method
|
|
5
5
|
export { AcceptMime, Location, Redirect, View, Get, Post, Put, Patch, Delete, Head, Options, All } from "@tsed/schema";
|
|
6
|
-
export * from "./method/endpointFn";
|
|
6
|
+
export * from "./method/endpointFn.js";
|
|
7
7
|
// Params
|
|
8
|
-
export * from "./params/responseData";
|
|
9
|
-
export * from "./params/response";
|
|
10
|
-
export * from "./params/request";
|
|
11
|
-
export * from "./params/next";
|
|
12
|
-
export * from "./params/error";
|
|
13
|
-
export * from "./params/endpointInfo";
|
|
8
|
+
export * from "./params/responseData.js";
|
|
9
|
+
export * from "./params/response.js";
|
|
10
|
+
export * from "./params/request.js";
|
|
11
|
+
export * from "./params/next.js";
|
|
12
|
+
export * from "./params/error.js";
|
|
13
|
+
export * from "./params/endpointInfo.js";
|
|
14
14
|
// utils
|
|
15
|
-
export * from "../utils/mapReturnedResponse";
|
|
15
|
+
export * from "../utils/mapReturnedResponse.js";
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./multerFileSize";
|
|
2
|
-
export * from "./multerOptions";
|
|
3
|
-
export * from "./multipartFile";
|
|
1
|
+
export * from "./multerFileSize.js";
|
|
2
|
+
export * from "./multerOptions.js";
|
|
3
|
+
export * from "./multipartFile.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoreMerge } from "@tsed/core";
|
|
2
|
-
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware";
|
|
2
|
+
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware.js";
|
|
3
3
|
/**
|
|
4
4
|
* Define multer option for all MultipartFile
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Metadata, StoreMerge, useDecorators, useMethodDecorators } from "@tsed/core";
|
|
2
2
|
import { ParamTypes, UseParam } from "@tsed/platform-params";
|
|
3
3
|
import { InFile } from "@tsed/schema";
|
|
4
|
-
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware";
|
|
4
|
+
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware.js";
|
|
5
5
|
function mapOptions(name, maxCount) {
|
|
6
6
|
return {
|
|
7
7
|
fields: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Provider, ProviderType } from "@tsed/di";
|
|
2
|
-
import { ROUTER_OPTIONS } from "../constants/routerOptions";
|
|
2
|
+
import { ROUTER_OPTIONS } from "../constants/routerOptions.js";
|
|
3
3
|
let AUTO_INC = 0;
|
|
4
4
|
export class ControllerProvider extends Provider {
|
|
5
5
|
constructor(provide, options = {}) {
|
|
@@ -2,7 +2,7 @@ import { nameOf } from "@tsed/core";
|
|
|
2
2
|
import { ProviderScope } from "@tsed/di";
|
|
3
3
|
import { ParamTypes } from "@tsed/platform-params";
|
|
4
4
|
import { JsonParameterStore } from "@tsed/schema";
|
|
5
|
-
import { HandlerType } from "../interfaces/HandlerType";
|
|
5
|
+
import { HandlerType } from "../interfaces/HandlerType.js";
|
|
6
6
|
export class HandlerMetadata {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
this.injectable = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DIContext } from "@tsed/di";
|
|
2
|
-
import { PlatformApplication } from "../services/PlatformApplication";
|
|
3
|
-
import { PlatformRequest } from "../services/PlatformRequest";
|
|
4
|
-
import { PlatformResponse } from "../services/PlatformResponse";
|
|
2
|
+
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
3
|
+
import { PlatformRequest } from "../services/PlatformRequest.js";
|
|
4
|
+
import { PlatformResponse } from "../services/PlatformResponse.js";
|
|
5
5
|
export class PlatformContext extends DIContext {
|
|
6
6
|
constructor({ event, endpoint, ignoreUrlPatterns = [], ResponseKlass = PlatformResponse, RequestKlass = PlatformRequest, ...options }) {
|
|
7
7
|
super({
|
package/lib/esm/domain/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./AnyToPromiseWithCtx";
|
|
2
|
-
export * from "./PlatformContext";
|
|
3
|
-
export * from "./PlatformRouteDetails";
|
|
4
|
-
export * from "./ControllerProvider";
|
|
5
|
-
export * from "./EndpointMetadata";
|
|
6
|
-
export * from "./HandlerMetadata";
|
|
7
|
-
export * from "./PropertyMetadata";
|
|
1
|
+
export * from "./AnyToPromiseWithCtx.js";
|
|
2
|
+
export * from "./PlatformContext.js";
|
|
3
|
+
export * from "./PlatformRouteDetails.js";
|
|
4
|
+
export * from "./ControllerProvider.js";
|
|
5
|
+
export * from "./EndpointMetadata.js";
|
|
6
|
+
export * from "./HandlerMetadata.js";
|
|
7
|
+
export * from "./PropertyMetadata.js";
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js
CHANGED
|
@@ -9,23 +9,23 @@ export * from "@tsed/platform-middlewares";
|
|
|
9
9
|
export * from "@tsed/components-scan";
|
|
10
10
|
export * from "@tsed/platform-log-middleware";
|
|
11
11
|
export { $log, Logger } from "@tsed/logger";
|
|
12
|
-
export * from "./config";
|
|
12
|
+
export * from "./config.js";
|
|
13
13
|
// builder
|
|
14
|
-
export * from "./builder/PlatformBuilder";
|
|
15
|
-
export * from "./builder/PlatformControllerBuilder";
|
|
14
|
+
export * from "./builder/PlatformBuilder.js";
|
|
15
|
+
export * from "./builder/PlatformControllerBuilder.js";
|
|
16
16
|
// decorators
|
|
17
|
-
export * from "./decorators";
|
|
17
|
+
export * from "./decorators.js";
|
|
18
18
|
// interfaces
|
|
19
|
-
export * from "./constants/routerOptions";
|
|
20
|
-
export * from "./interfaces";
|
|
19
|
+
export * from "./constants/routerOptions.js";
|
|
20
|
+
export * from "./interfaces.js";
|
|
21
21
|
// middlewares
|
|
22
|
-
export * from "./middlewares";
|
|
22
|
+
export * from "./middlewares.js";
|
|
23
23
|
// domain
|
|
24
|
-
export * from "./domain";
|
|
24
|
+
export * from "./domain.js";
|
|
25
25
|
// providers
|
|
26
|
-
export * from "./services";
|
|
26
|
+
export * from "./services.js";
|
|
27
27
|
// utils
|
|
28
|
-
export * from "./utils";
|
|
28
|
+
export * from "./utils.js";
|
|
29
29
|
// Module
|
|
30
|
-
export * from "./PlatformModule";
|
|
30
|
+
export * from "./PlatformModule.js";
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./ResponseErrorObject";
|
|
2
|
-
export * from "./HandlerType";
|
|
3
|
-
export * from "./PlatformRouteOptions";
|
|
4
|
-
export * from "./BeforeInit";
|
|
5
|
-
export * from "./AfterInit";
|
|
6
|
-
export * from "./AfterRoutesInit";
|
|
7
|
-
export * from "./BeforeListen";
|
|
8
|
-
export * from "./AfterListen";
|
|
9
|
-
export * from "./BeforeRoutesInit";
|
|
10
|
-
export * from "./AfterRoutesInit";
|
|
11
|
-
export * from "./OnRoutesInit";
|
|
12
|
-
export * from "./OnReady";
|
|
13
|
-
export * from "./OnRequest";
|
|
14
|
-
export * from "./OnResponse";
|
|
15
|
-
export * from "./Route";
|
|
16
|
-
export * from "./IncomingEvent";
|
|
17
|
-
export * from "./PlatformAdapter";
|
|
1
|
+
export * from "./ResponseErrorObject.js";
|
|
2
|
+
export * from "./HandlerType.js";
|
|
3
|
+
export * from "./PlatformRouteOptions.js";
|
|
4
|
+
export * from "./BeforeInit.js";
|
|
5
|
+
export * from "./AfterInit.js";
|
|
6
|
+
export * from "./AfterRoutesInit.js";
|
|
7
|
+
export * from "./BeforeListen.js";
|
|
8
|
+
export * from "./AfterListen.js";
|
|
9
|
+
export * from "./BeforeRoutesInit.js";
|
|
10
|
+
export * from "./AfterRoutesInit.js";
|
|
11
|
+
export * from "./OnRoutesInit.js";
|
|
12
|
+
export * from "./OnReady.js";
|
|
13
|
+
export * from "./OnRequest.js";
|
|
14
|
+
export * from "./OnResponse.js";
|
|
15
|
+
export * from "./Route.js";
|
|
16
|
+
export * from "./IncomingEvent.js";
|
|
17
|
+
export * from "./PlatformAdapter.js";
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ import { Constant, Inject } from "@tsed/di";
|
|
|
4
4
|
import { Exception } from "@tsed/exceptions";
|
|
5
5
|
import { Middleware } from "@tsed/platform-middlewares";
|
|
6
6
|
import { Context } from "@tsed/platform-params";
|
|
7
|
-
import { PlatformApplication } from "../services/PlatformApplication";
|
|
7
|
+
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
8
8
|
/**
|
|
9
9
|
* @middleware
|
|
10
10
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./bindEndpointMiddleware";
|
|
2
|
-
export * from "./PlatformMulterMiddleware";
|
|
3
|
-
export * from "./GlobalAcceptMimesMiddleware";
|
|
4
|
-
export * from "./PlatformAcceptMimesMiddleware";
|
|
5
|
-
export * from "./AcceptMimesMiddleware";
|
|
1
|
+
export * from "./bindEndpointMiddleware.js";
|
|
2
|
+
export * from "./PlatformMulterMiddleware.js";
|
|
3
|
+
export * from "./GlobalAcceptMimesMiddleware.js";
|
|
4
|
+
export * from "./PlatformAcceptMimesMiddleware.js";
|
|
5
|
+
export * from "./AcceptMimesMiddleware.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Injectable, InjectorService, ProviderScope, ProviderType } from "@tsed/di";
|
|
3
3
|
import { concatPath, getOperationsRoutes, JsonEntityStore } from "@tsed/schema";
|
|
4
|
-
import { buildRouter, createRouter, getRouter } from "../builder/PlatformControllerBuilder";
|
|
5
|
-
import { PlatformRouteDetails } from "../domain";
|
|
6
|
-
import { PlatformApplication } from "./PlatformApplication";
|
|
7
|
-
import { PlatformMiddlewaresChain } from "./PlatformMiddlewaresChain";
|
|
4
|
+
import { buildRouter, createRouter, getRouter } from "../builder/PlatformControllerBuilder.js";
|
|
5
|
+
import { PlatformRouteDetails } from "../domain.js";
|
|
6
|
+
import { PlatformApplication } from "./PlatformApplication.js";
|
|
7
|
+
import { PlatformMiddlewaresChain } from "./PlatformMiddlewaresChain.js";
|
|
8
8
|
/**
|
|
9
9
|
* `Platform` is used to provide all routes collected by annotation `@Controller`.
|
|
10
10
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var PlatformApplication_1;
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
3
|
import { Injectable, ProviderScope } from "@tsed/di";
|
|
4
|
-
import { createFakeRawDriver } from "./FakeRawDriver";
|
|
5
|
-
import { PlatformHandler } from "./PlatformHandler";
|
|
6
|
-
import { PlatformRouter } from "./PlatformRouter";
|
|
4
|
+
import { createFakeRawDriver } from "./FakeRawDriver.js";
|
|
5
|
+
import { PlatformHandler } from "./PlatformHandler.js";
|
|
6
|
+
import { PlatformRouter } from "./PlatformRouter.js";
|
|
7
7
|
/**
|
|
8
8
|
* `PlatformApplication` is used to provide all routes collected by annotation `@Controller`.
|
|
9
9
|
*
|
|
@@ -4,11 +4,11 @@ import { Inject, Injectable, InjectorService, ProviderScope } from "@tsed/di";
|
|
|
4
4
|
import { $log } from "@tsed/logger";
|
|
5
5
|
import { PlatformParams } from "@tsed/platform-params";
|
|
6
6
|
import { PlatformResponseFilter } from "@tsed/platform-response-filter";
|
|
7
|
-
import { AnyToPromiseWithCtx } from "../domain/AnyToPromiseWithCtx";
|
|
8
|
-
import { HandlerMetadata } from "../domain/HandlerMetadata";
|
|
9
|
-
import { HandlerType } from "../interfaces/HandlerType";
|
|
10
|
-
import { createHandlerMetadata } from "../utils/createHandlerMetadata";
|
|
11
|
-
import { setResponseHeaders } from "../utils/setResponseHeaders";
|
|
7
|
+
import { AnyToPromiseWithCtx } from "../domain/AnyToPromiseWithCtx.js";
|
|
8
|
+
import { HandlerMetadata } from "../domain/HandlerMetadata.js";
|
|
9
|
+
import { HandlerType } from "../interfaces/HandlerType.js";
|
|
10
|
+
import { createHandlerMetadata } from "../utils/createHandlerMetadata.js";
|
|
11
|
+
import { setResponseHeaders } from "../utils/setResponseHeaders.js";
|
|
12
12
|
/**
|
|
13
13
|
* Platform Handler abstraction layer. Wrap original class method to a pure platform handler (Express, Koa, etc...).
|
|
14
14
|
* @platform
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { Constant, Injectable } from "@tsed/di";
|
|
3
3
|
import { ParamTypes } from "@tsed/platform-params";
|
|
4
|
-
import { bindEndpointMiddleware } from "../middlewares/bindEndpointMiddleware";
|
|
5
|
-
import { PlatformAcceptMimesMiddleware } from "../middlewares/PlatformAcceptMimesMiddleware";
|
|
6
|
-
import { PlatformMulterMiddleware } from "../middlewares/PlatformMulterMiddleware";
|
|
7
|
-
import { useCtxHandler } from "../utils/useCtxHandler";
|
|
4
|
+
import { bindEndpointMiddleware } from "../middlewares/bindEndpointMiddleware.js";
|
|
5
|
+
import { PlatformAcceptMimesMiddleware } from "../middlewares/PlatformAcceptMimesMiddleware.js";
|
|
6
|
+
import { PlatformMulterMiddleware } from "../middlewares/PlatformMulterMiddleware.js";
|
|
7
|
+
import { useCtxHandler } from "../utils/useCtxHandler.js";
|
|
8
8
|
let PlatformMiddlewaresChain = class PlatformMiddlewaresChain {
|
|
9
9
|
get(provider, operationRoute) {
|
|
10
10
|
const { endpoint } = operationRoute;
|
|
@@ -3,8 +3,8 @@ var PlatformRouter_1;
|
|
|
3
3
|
import { __classPrivateFieldGet, __classPrivateFieldSet, __decorate, __metadata } from "tslib";
|
|
4
4
|
import { Inject, Injectable, InjectorService, ProviderScope } from "@tsed/di";
|
|
5
5
|
import { promisify } from "util";
|
|
6
|
-
import { createFakeRawDriver } from "./FakeRawDriver";
|
|
7
|
-
import { PlatformHandler } from "./PlatformHandler";
|
|
6
|
+
import { createFakeRawDriver } from "./FakeRawDriver.js";
|
|
7
|
+
import { PlatformHandler } from "./PlatformHandler.js";
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
10
10
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DITest } from "@tsed/di";
|
|
2
|
-
import { PlatformBuilder } from "../builder/PlatformBuilder";
|
|
3
|
-
import { PlatformContext } from "../domain/PlatformContext";
|
|
4
|
-
import { createInjector } from "../utils/createInjector";
|
|
5
|
-
import { PlatformApplication } from "./PlatformApplication";
|
|
6
|
-
import { getConfiguration } from "../utils/getConfiguration";
|
|
2
|
+
import { PlatformBuilder } from "../builder/PlatformBuilder.js";
|
|
3
|
+
import { PlatformContext } from "../domain/PlatformContext.js";
|
|
4
|
+
import { createInjector } from "../utils/createInjector.js";
|
|
5
|
+
import { PlatformApplication } from "./PlatformApplication.js";
|
|
6
|
+
import { getConfiguration } from "../utils/getConfiguration.js";
|
|
7
7
|
import accepts from "accepts";
|
|
8
8
|
/**
|
|
9
9
|
* @platform
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./Platform";
|
|
2
|
-
export * from "./PlatformApplication";
|
|
3
|
-
export * from "./PlatformHandler";
|
|
4
|
-
export * from "./PlatformRequest";
|
|
5
|
-
export * from "./PlatformResponse";
|
|
6
|
-
export * from "./PlatformRouter";
|
|
7
|
-
export * from "./PlatformTest";
|
|
8
|
-
export * from "./PlatformMiddlewaresChain";
|
|
1
|
+
export * from "./Platform.js";
|
|
2
|
+
export * from "./PlatformApplication.js";
|
|
3
|
+
export * from "./PlatformHandler.js";
|
|
4
|
+
export * from "./PlatformRequest.js";
|
|
5
|
+
export * from "./PlatformResponse.js";
|
|
6
|
+
export * from "./PlatformRouter.js";
|
|
7
|
+
export * from "./PlatformTest.js";
|
|
8
|
+
export * from "./PlatformMiddlewaresChain.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PlatformContext } from "../domain/PlatformContext";
|
|
2
|
-
import { PlatformRequest } from "../services/PlatformRequest";
|
|
3
|
-
import { PlatformResponse } from "../services/PlatformResponse";
|
|
1
|
+
import { PlatformContext } from "../domain/PlatformContext.js";
|
|
2
|
+
import { PlatformRequest } from "../services/PlatformRequest.js";
|
|
3
|
+
import { PlatformResponse } from "../services/PlatformResponse.js";
|
|
4
4
|
import { v4 } from "uuid";
|
|
5
5
|
const defaultReqIdBuilder = (req) => req.get("x-request-id") || v4().replace(/-/gi, "");
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EndpointMetadata } from "@tsed/schema";
|
|
2
|
-
import { HandlerMetadata } from "../domain/HandlerMetadata";
|
|
3
|
-
import { HandlerType } from "../interfaces/HandlerType";
|
|
2
|
+
import { HandlerMetadata } from "../domain/HandlerMetadata.js";
|
|
3
|
+
import { HandlerType } from "../interfaces/HandlerType.js";
|
|
4
4
|
function isMetadata(input) {
|
|
5
5
|
return input instanceof HandlerMetadata;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ProviderScope } from "@tsed/di";
|
|
2
2
|
import { getHostInfoFromPort } from "@tsed/core";
|
|
3
3
|
import Http from "http";
|
|
4
|
-
import { HttpServer } from "../decorators/httpServer";
|
|
5
|
-
import { listenServer } from "./listenServer";
|
|
4
|
+
import { HttpServer } from "../decorators/httpServer.js";
|
|
5
|
+
import { listenServer } from "./listenServer.js";
|
|
6
6
|
export function createHttpServer(injector, requestListener) {
|
|
7
7
|
const { settings } = injector;
|
|
8
8
|
const httpPort = settings.getRaw("httpPort");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ProviderScope } from "@tsed/di";
|
|
2
2
|
import { getHostInfoFromPort } from "@tsed/core";
|
|
3
3
|
import Https from "https";
|
|
4
|
-
import { HttpsServer } from "../decorators/httpsServer";
|
|
5
|
-
import { listenServer } from "./listenServer";
|
|
4
|
+
import { HttpsServer } from "../decorators/httpsServer.js";
|
|
5
|
+
import { listenServer } from "./listenServer.js";
|
|
6
6
|
export function createHttpsServer(injector, requestListener) {
|
|
7
7
|
const { settings } = injector;
|
|
8
8
|
const httpsPort = settings.getRaw("httpsPort");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { InjectorService, setLoggerLevel } from "@tsed/di";
|
|
2
2
|
import { $log } from "@tsed/logger";
|
|
3
3
|
import { toMap } from "@tsed/core";
|
|
4
|
-
import { PlatformConfiguration } from "../config/services/PlatformConfiguration";
|
|
5
|
-
import { PlatformHandler } from "../services/PlatformHandler";
|
|
6
|
-
import { PlatformResponse } from "../services/PlatformResponse";
|
|
7
|
-
import { PlatformRouter } from "../services/PlatformRouter";
|
|
8
|
-
import { PlatformApplication } from "../services/PlatformApplication";
|
|
9
|
-
import { Platform } from "../services/Platform";
|
|
10
|
-
import { PlatformRequest } from "../services/PlatformRequest";
|
|
4
|
+
import { PlatformConfiguration } from "../config/services/PlatformConfiguration.js";
|
|
5
|
+
import { PlatformHandler } from "../services/PlatformHandler.js";
|
|
6
|
+
import { PlatformResponse } from "../services/PlatformResponse.js";
|
|
7
|
+
import { PlatformRouter } from "../services/PlatformRouter.js";
|
|
8
|
+
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
9
|
+
import { Platform } from "../services/Platform.js";
|
|
10
|
+
import { PlatformRequest } from "../services/PlatformRequest.js";
|
|
11
11
|
$log.name = "TSED";
|
|
12
12
|
const DEFAULT_PROVIDERS = [
|
|
13
13
|
{ provide: PlatformHandler },
|
package/lib/esm/utils/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./createInjector";
|
|
2
|
-
export * from "./createHttpServer";
|
|
3
|
-
export * from "./createHttpsServer";
|
|
4
|
-
export * from "./loadInjector";
|
|
5
|
-
export * from "./printRoutes";
|
|
6
|
-
export * from "./listenServer";
|
|
7
|
-
export * from "./createContext";
|
|
8
|
-
export * from "./useCtxHandler";
|
|
9
|
-
export * from "./importProviders";
|
|
1
|
+
export * from "./createInjector.js";
|
|
2
|
+
export * from "./createHttpServer.js";
|
|
3
|
+
export * from "./createHttpsServer.js";
|
|
4
|
+
export * from "./loadInjector.js";
|
|
5
|
+
export * from "./printRoutes.js";
|
|
6
|
+
export * from "./listenServer.js";
|
|
7
|
+
export * from "./createContext.js";
|
|
8
|
+
export * from "./useCtxHandler.js";
|
|
9
|
+
export * from "./importProviders.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/common",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.1",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
"types": "./lib/types/index.d.ts",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"bugs": {
|
|
47
48
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
48
49
|
},
|
|
49
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
50
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/common",
|
|
50
51
|
"repository": "https://github.com/tsedio/tsed",
|
|
51
52
|
"funding": [
|
|
52
53
|
{
|
|
@@ -59,21 +60,21 @@
|
|
|
59
60
|
}
|
|
60
61
|
],
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@tsed/components-scan": "6.102.
|
|
63
|
-
"@tsed/core": "6.102.
|
|
64
|
-
"@tsed/exceptions": "6.102.
|
|
65
|
-
"@tsed/json-mapper": "6.102.
|
|
63
|
+
"@tsed/components-scan": "6.102.8-rc.1",
|
|
64
|
+
"@tsed/core": "6.102.8-rc.1",
|
|
65
|
+
"@tsed/exceptions": "6.102.8-rc.1",
|
|
66
|
+
"@tsed/json-mapper": "6.102.8-rc.1",
|
|
66
67
|
"@tsed/logger": ">=6.0.2",
|
|
67
68
|
"@tsed/logger-file": ">=6.0.2",
|
|
68
|
-
"@tsed/perf": "6.102.
|
|
69
|
-
"@tsed/platform-cache": "6.102.
|
|
70
|
-
"@tsed/platform-exceptions": "6.102.
|
|
71
|
-
"@tsed/platform-log-middleware": "6.102.
|
|
72
|
-
"@tsed/platform-middlewares": "6.102.
|
|
73
|
-
"@tsed/platform-params": "6.102.
|
|
74
|
-
"@tsed/platform-response-filter": "6.102.
|
|
75
|
-
"@tsed/platform-views": "6.102.
|
|
76
|
-
"@tsed/schema": "6.102.
|
|
69
|
+
"@tsed/perf": "6.102.8-rc.1",
|
|
70
|
+
"@tsed/platform-cache": "6.102.8-rc.1",
|
|
71
|
+
"@tsed/platform-exceptions": "6.102.8-rc.1",
|
|
72
|
+
"@tsed/platform-log-middleware": "6.102.8-rc.1",
|
|
73
|
+
"@tsed/platform-middlewares": "6.102.8-rc.1",
|
|
74
|
+
"@tsed/platform-params": "6.102.8-rc.1",
|
|
75
|
+
"@tsed/platform-response-filter": "6.102.8-rc.1",
|
|
76
|
+
"@tsed/platform-views": "6.102.8-rc.1",
|
|
77
|
+
"@tsed/schema": "6.102.8-rc.1",
|
|
77
78
|
"@types/json-schema": "7.0.7",
|
|
78
79
|
"@types/on-finished": "2.3.1",
|
|
79
80
|
"on-finished": "2.3.0",
|
|
@@ -81,10 +82,10 @@
|
|
|
81
82
|
"uuid": "8.3.2"
|
|
82
83
|
},
|
|
83
84
|
"devDependencies": {
|
|
84
|
-
"@tsed/core": "6.102.
|
|
85
|
+
"@tsed/core": "6.102.8-rc.1"
|
|
85
86
|
},
|
|
86
87
|
"peerDependencies": {
|
|
87
|
-
"@tsed/di": "^6.102.
|
|
88
|
+
"@tsed/di": "^6.102.8-rc.1",
|
|
88
89
|
"@tsed/logger": ">=6.0.2",
|
|
89
90
|
"@tsed/logger-file": ">=6.0.2"
|
|
90
91
|
}
|