@tsed/common 6.71.1 → 7.0.0-alpha.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.
@@ -7,10 +7,8 @@ export * from "./method/location";
7
7
  export * from "./method/redirect";
8
8
  export * from "./method/endpointFn";
9
9
  export * from "./class/controller";
10
- export * from "./params/responseData";
11
10
  export * from "./params/response";
12
11
  export * from "./params/request";
13
12
  export * from "./params/next";
14
13
  export * from "./params/error";
15
- export * from "./params/endpointInfo";
16
14
  export * from "../utils/mapReturnedResponse";
@@ -4,4 +4,3 @@ export * from "./PlatformRouteDetails";
4
4
  export * from "./ControllerProvider";
5
5
  export * from "./EndpointMetadata";
6
6
  export * from "./HandlerMetadata";
7
- export * from "./PropertyMetadata";
package/lib/index.js CHANGED
@@ -1457,22 +1457,6 @@ tslib.__decorate([tslib.__param(0, platformParams.Context()), tslib.__metadata("
1457
1457
 
1458
1458
  exports.PlatformMulterMiddleware = PlatformMulterMiddleware_1 = tslib.__decorate([platformMiddlewares.Middleware()], exports.PlatformMulterMiddleware);
1459
1459
 
1460
- /**
1461
- * @deprecated Since 2020-11-30. Use PlatformAcceptMimesMiddleware.
1462
- * @ignore
1463
- */
1464
-
1465
- exports.GlobalAcceptMimesMiddleware = class GlobalAcceptMimesMiddleware {
1466
- use(ctx) {
1467
- return;
1468
- }
1469
-
1470
- };
1471
-
1472
- tslib.__decorate([tslib.__param(0, platformParams.Context()), tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [Object]), tslib.__metadata("design:returntype", void 0)], exports.GlobalAcceptMimesMiddleware.prototype, "use", null);
1473
-
1474
- exports.GlobalAcceptMimesMiddleware = tslib.__decorate([platformMiddlewares.Middleware()], exports.GlobalAcceptMimesMiddleware);
1475
-
1476
1460
  /**
1477
1461
  * @middleware
1478
1462
  * @platform
@@ -1499,23 +1483,6 @@ tslib.__decorate([tslib.__param(0, platformParams.Context()), tslib.__metadata("
1499
1483
 
1500
1484
  exports.PlatformAcceptMimesMiddleware = tslib.__decorate([platformMiddlewares.Middleware()], exports.PlatformAcceptMimesMiddleware);
1501
1485
 
1502
- /**
1503
- * @middleware
1504
- * @deprecated Since 2020-11-30. Use PlatformAcceptMimesMiddleware.
1505
- * @ignore
1506
- */
1507
-
1508
- exports.AcceptMimesMiddleware = class AcceptMimesMiddleware {
1509
- use(ctx) {
1510
- return;
1511
- }
1512
-
1513
- };
1514
-
1515
- tslib.__decorate([tslib.__param(0, platformParams.Context()), tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [Object]), tslib.__metadata("design:returntype", void 0)], exports.AcceptMimesMiddleware.prototype, "use", null);
1516
-
1517
- exports.AcceptMimesMiddleware = tslib.__decorate([platformMiddlewares.Middleware()], exports.AcceptMimesMiddleware);
1518
-
1519
1486
  /**
1520
1487
  * Create Ts.ED context handler
1521
1488
  * @param fn
@@ -2411,22 +2378,6 @@ class ControllerProvider extends di.Provider {
2411
2378
 
2412
2379
  }
2413
2380
 
2414
- exports.PropertyMetadata = class PropertyMetadata extends schema.JsonEntityStore {
2415
- static get(target, propertyKey) {
2416
- return schema.JsonEntityStore.from(core.prototypeOf(target), propertyKey);
2417
- }
2418
- /**
2419
- * @deprecated Since 2020-11-11. Use getProperties from @tsed/schema
2420
- */
2421
-
2422
-
2423
- static getProperties(target, options = {}) {
2424
- return schema.getProperties(target, options);
2425
- }
2426
-
2427
- };
2428
- exports.PropertyMetadata = tslib.__decorate([schema.JsonEntityComponent(core.DecoratorTypes.PROP)], exports.PropertyMetadata);
2429
-
2430
2381
  function getControllerPath(basePath, provider) {
2431
2382
  return (basePath === provider.path ? provider.path : (basePath || "") + provider.path).replace(/\/\//gi, "/");
2432
2383
  }
@@ -2750,16 +2701,6 @@ async function listenHttpsServer(injector) {
2750
2701
  }
2751
2702
  }
2752
2703
 
2753
- /**
2754
- * @ignore
2755
- * @deprecated User injector.load(container, module) instead
2756
- */
2757
-
2758
- async function loadInjector(injector, container = di.createContainer()) {
2759
- injector.bootstrap(container);
2760
- return injector.load(container, exports.PlatformModule);
2761
- }
2762
-
2763
2704
  function printRoutes(routes) {
2764
2705
  const mapColor = {
2765
2706
  GET: "green",
@@ -3136,17 +3077,11 @@ class PlatformBuilder {
3136
3077
  }
3137
3078
 
3138
3079
  async loadRoutes() {
3139
- var _this$settings$accept;
3140
-
3141
3080
  // istanbul ignore next
3142
3081
  if (this.settings.logger.level !== "off") {
3143
3082
  this.app.use(exports.PlatformLogMiddleware);
3144
3083
  }
3145
3084
 
3146
- if ((_this$settings$accept = this.settings.acceptMimes) != null && _this$settings$accept.length) {
3147
- this.app.use(exports.GlobalAcceptMimesMiddleware);
3148
- }
3149
-
3150
3085
  this.log("Load routes");
3151
3086
  await this.callHook("$beforeRoutesInit");
3152
3087
  await this.callHook("$$loadRoutes");
@@ -3576,22 +3511,6 @@ function Controller(options) {
3576
3511
  };
3577
3512
  }
3578
3513
 
3579
- /**
3580
- * Return the current response data. Prefer the @@Context@@ decorator to get or set data.
3581
- *
3582
- * @decorator
3583
- * @operation
3584
- * @input
3585
- * @deprecated Use `@Context() $ctx: Context` then $ctx.data.
3586
- */
3587
-
3588
- function ResponseData() {
3589
- return platformParams.UseParam({
3590
- paramType: platformParams.ParamTypes.$CTX,
3591
- dataPath: "$ctx.data"
3592
- });
3593
- }
3594
-
3595
3514
  function getParamType$1(target, propertyKey, parameterIndex) {
3596
3515
  const type = core.Metadata.getOwnParamTypes(target, propertyKey)[parameterIndex];
3597
3516
 
@@ -3718,23 +3637,6 @@ function Err() {
3718
3637
  });
3719
3638
  }
3720
3639
 
3721
- /**
3722
- * Get the current endpoint metadata.
3723
- * @decorator
3724
- * @operation
3725
- * @input
3726
- * @deprecated Use `@Context() $ctx: Context` then `$ctx.endpoint` instead.
3727
- */
3728
-
3729
- function EndpointInfo() {
3730
- return platformParams.UseParam({
3731
- paramType: platformParams.ParamTypes.$CTX,
3732
- dataPath: "$ctx.endpoint",
3733
- useConverter: false,
3734
- useValidation: false
3735
- });
3736
- }
3737
-
3738
3640
  const _excluded = ["use", "collection"];
3739
3641
 
3740
3642
  /**
@@ -3984,7 +3886,6 @@ exports.Controller = Controller;
3984
3886
  exports.ControllerProvider = ControllerProvider;
3985
3887
  exports.Delete = Delete;
3986
3888
  exports.EndpointFn = EndpointFn;
3987
- exports.EndpointInfo = EndpointInfo;
3988
3889
  exports.Err = Err;
3989
3890
  exports.Get = Get;
3990
3891
  exports.HandlerMetadata = HandlerMetadata;
@@ -4010,7 +3911,6 @@ exports.Req = Req;
4010
3911
  exports.Request = Request;
4011
3912
  exports.Res = Res;
4012
3913
  exports.Response = Response;
4013
- exports.ResponseData = ResponseData;
4014
3914
  exports.bindEndpointMiddleware = bindEndpointMiddleware;
4015
3915
  exports.createContext = createContext;
4016
3916
  exports.createHttpServer = createHttpServer;
@@ -4020,7 +3920,6 @@ exports.createPlatformApplication = createPlatformApplication;
4020
3920
  exports.listenHttpServer = listenHttpServer;
4021
3921
  exports.listenHttpsServer = listenHttpsServer;
4022
3922
  exports.listenServer = listenServer;
4023
- exports.loadInjector = loadInjector;
4024
3923
  exports.mapReturnedResponse = mapReturnedResponse;
4025
3924
  exports.printRoutes = printRoutes;
4026
3925
  exports.useCtxHandler = useCtxHandler;