@tsed/platform-test-sdk 7.70.1 → 7.71.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/.barrelsby.json +5 -0
- package/lib/cjs/components/PlatformTestSdk.js +2 -2
- package/lib/cjs/components/PlatformTestSdk.js.map +1 -1
- package/lib/cjs/index.js +40 -39
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/index.js +4 -4
- package/lib/cjs/interfaces/index.js.map +1 -1
- package/lib/cjs/modules/feature/FeatureModule.js +2 -2
- package/lib/cjs/modules/feature/FeatureModule.js.map +1 -1
- package/lib/cjs/tests/exports.js +58 -58
- package/lib/cjs/tests/exports.js.map +1 -1
- package/lib/cjs/tests/testErrors.js +6 -6
- package/lib/cjs/tests/testErrors.js.map +1 -1
- package/lib/cjs/tests/testModule.js +2 -2
- package/lib/cjs/tests/testModule.js.map +1 -1
- package/lib/cjs/tests/testMulter.js +1 -3
- package/lib/cjs/tests/testMulter.js.map +1 -1
- package/lib/cjs/tests/testResponse.js +0 -1
- package/lib/cjs/tests/testResponse.js.map +1 -1
- package/lib/cjs/tests/testStream.js +1 -3
- package/lib/cjs/tests/testStream.js.map +1 -1
- package/lib/esm/components/PlatformTestSdk.js.map +1 -1
- package/lib/esm/index.js +3 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/index.js +1 -1
- package/lib/esm/interfaces/index.js.map +1 -1
- package/lib/esm/modules/feature/FeatureModule.js.map +1 -1
- package/lib/esm/tests/exports.js.map +1 -1
- package/lib/esm/tests/testErrors.js.map +1 -1
- package/lib/esm/tests/testModule.js.map +1 -1
- package/lib/esm/tests/testMulter.js +2 -4
- package/lib/esm/tests/testMulter.js.map +1 -1
- package/lib/esm/tests/testResponse.js +0 -1
- package/lib/esm/tests/testResponse.js.map +1 -1
- package/lib/esm/tests/testStream.js +1 -3
- package/lib/esm/tests/testStream.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/components/PlatformTestSdk.d.ts +1 -1
- package/lib/types/index.d.ts +38 -37
- package/lib/types/interfaces/index.d.ts +2 -2
- package/lib/types/tests/exports.d.ts +1 -1
- package/lib/types/tests/testAcceptMime.d.ts +1 -1
- package/lib/types/tests/testAuth.d.ts +1 -1
- package/lib/types/tests/testBodyParams.d.ts +1 -1
- package/lib/types/tests/testCache.d.ts +1 -1
- package/lib/types/tests/testChildrenControllers.d.ts +1 -1
- package/lib/types/tests/testCookies.d.ts +1 -1
- package/lib/types/tests/testCustom404.d.ts +1 -1
- package/lib/types/tests/testDeepQueryParams.d.ts +1 -1
- package/lib/types/tests/testErrors.d.ts +1 -1
- package/lib/types/tests/testHandlers.d.ts +1 -1
- package/lib/types/tests/testHeaderParams.d.ts +1 -1
- package/lib/types/tests/testHeaders.d.ts +1 -1
- package/lib/types/tests/testInheritanceController.d.ts +1 -1
- package/lib/types/tests/testLocals.d.ts +1 -1
- package/lib/types/tests/testLocation.d.ts +1 -1
- package/lib/types/tests/testMiddlewares.d.ts +1 -1
- package/lib/types/tests/testModule.d.ts +1 -1
- package/lib/types/tests/testMulter.d.ts +1 -1
- package/lib/types/tests/testPathParams.d.ts +1 -1
- package/lib/types/tests/testQueryParams.d.ts +1 -1
- package/lib/types/tests/testRedirect.d.ts +1 -1
- package/lib/types/tests/testResponse.d.ts +1 -1
- package/lib/types/tests/testResponseFilter.d.ts +1 -1
- package/lib/types/tests/testRouting.d.ts +1 -1
- package/lib/types/tests/testScopeRequest.d.ts +1 -1
- package/lib/types/tests/testSession.d.ts +1 -1
- package/lib/types/tests/testStatics.d.ts +1 -1
- package/lib/types/tests/testStream.d.ts +1 -1
- package/lib/types/tests/testView.d.ts +1 -1
- package/package.json +17 -16
- package/src/components/PlatformTestSdk.ts +2 -2
- package/src/index.ts +38 -38
- package/src/interfaces/index.ts +2 -3
- package/src/modules/feature/FeatureModule.ts +1 -1
- package/src/tests/exports.ts +30 -30
- package/src/tests/testAcceptMime.ts +1 -1
- package/src/tests/testAuth.ts +1 -1
- package/src/tests/testBodyParams.ts +1 -1
- package/src/tests/testCache.ts +1 -1
- package/src/tests/testChildrenControllers.ts +1 -1
- package/src/tests/testCookies.ts +1 -1
- package/src/tests/testCustom404.ts +1 -1
- package/src/tests/testDeepQueryParams.ts +1 -1
- package/src/tests/testErrors.ts +3 -3
- package/src/tests/testHandlers.ts +1 -1
- package/src/tests/testHeaderParams.ts +1 -1
- package/src/tests/testHeaders.ts +1 -1
- package/src/tests/testInheritanceController.ts +1 -1
- package/src/tests/testLocals.ts +1 -1
- package/src/tests/testLocation.ts +1 -1
- package/src/tests/testMiddlewares.ts +1 -1
- package/src/tests/testModule.ts +2 -2
- package/src/tests/testMulter.ts +2 -4
- package/src/tests/testPathParams.ts +1 -1
- package/src/tests/testQueryParams.ts +1 -1
- package/src/tests/testRedirect.ts +1 -1
- package/src/tests/testResponse.ts +1 -3
- package/src/tests/testResponseFilter.ts +1 -1
- package/src/tests/testRouting.ts +1 -1
- package/src/tests/testScopeRequest.ts +1 -1
- package/src/tests/testSession.ts +1 -1
- package/src/tests/testStatics.ts +1 -1
- package/src/tests/testStream.ts +3 -4
- package/src/tests/testView.ts +1 -1
package/src/tests/testErrors.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {Env} from "@tsed/core";
|
|
|
4
4
|
import {BadRequest, InternalServerError} from "@tsed/exceptions";
|
|
5
5
|
import {Description, Name, Required, Returns, Summary} from "@tsed/schema";
|
|
6
6
|
import SuperTest from "supertest";
|
|
7
|
-
import {CustomBadRequest} from "../errors/CustomBadRequest";
|
|
8
|
-
import {CustomInternalError} from "../errors/CustomInternalError";
|
|
9
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
7
|
+
import {CustomBadRequest} from "../errors/CustomBadRequest.js";
|
|
8
|
+
import {CustomInternalError} from "../errors/CustomInternalError.js";
|
|
9
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
10
10
|
|
|
11
11
|
class CustomModel {
|
|
12
12
|
@Required() name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Context, Controller, Get, PathParams, PlatformTest} from "@tsed/common";
|
|
2
2
|
import {Property, Required, Title} from "@tsed/schema";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
export class MyModel {
|
|
7
7
|
@Title("ID")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Context, Controller, Get, HeaderParams, Locals, Middleware, PlatformTest, Post, Req, Use} from "@tsed/common";
|
|
2
2
|
import {Enum, Required} from "@tsed/schema";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
@Middleware()
|
|
7
7
|
class SetId {
|
package/src/tests/testHeaders.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {BodyParams, Controller, Get, PlatformResponse, PlatformTest, Res} from "@tsed/common";
|
|
2
2
|
import {Returns} from "@tsed/schema";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
@Controller("/headers")
|
|
7
7
|
export class HeadersCtrl {
|
|
@@ -2,7 +2,7 @@ import {BodyParams, Controller, Get, Middleware, PathParams, PlatformTest, Post,
|
|
|
2
2
|
import {NotFound} from "@tsed/exceptions";
|
|
3
3
|
import {Description, MaxLength, MinLength, Property, Returns, Summary} from "@tsed/schema";
|
|
4
4
|
import SuperTest from "supertest";
|
|
5
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
5
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
6
6
|
|
|
7
7
|
export class Resource {
|
|
8
8
|
@Property()
|
package/src/tests/testLocals.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Context, Controller, Get, Locals, Middleware, Next, PlatformContext, PlatformTest, Req, Request, Res, Use} from "@tsed/common";
|
|
2
2
|
import SuperTest from "supertest";
|
|
3
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
3
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
4
4
|
|
|
5
5
|
@Middleware()
|
|
6
6
|
class LocalsMiddleware {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Controller, Get, PlatformTest} from "@tsed/common";
|
|
2
2
|
import SuperTest from "supertest";
|
|
3
3
|
import {Location} from "@tsed/schema";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
@Controller("/location")
|
|
7
7
|
class LocationCtrl {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "@tsed/common";
|
|
15
15
|
import {BadRequest, Exception, Unauthorized} from "@tsed/exceptions";
|
|
16
16
|
import SuperTest from "supertest";
|
|
17
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
17
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
18
18
|
|
|
19
19
|
@Middleware()
|
|
20
20
|
class BeforeCustomMiddleware {
|
package/src/tests/testModule.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Controller, Get, PlatformTest} from "@tsed/common";
|
|
2
2
|
import SuperTest from "supertest";
|
|
3
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
-
import {FeatureModule} from "../modules/feature/FeatureModule";
|
|
3
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
4
|
+
import {FeatureModule} from "../modules/feature/FeatureModule.js";
|
|
5
5
|
|
|
6
6
|
@Controller("/root")
|
|
7
7
|
class TestRootCtrl {
|
package/src/tests/testMulter.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {BodyParams, Controller, MulterOptions, MultipartFile, PlatformMulterFile, PlatformTest} from "@tsed/common";
|
|
2
2
|
import {CollectionOf, Post, Property, Required, Status} from "@tsed/schema";
|
|
3
|
-
import filedirname from "filedirname";
|
|
4
3
|
import multer, {FileFilterCallback} from "multer";
|
|
5
4
|
import {dirname, join} from "path";
|
|
6
5
|
import readPkgUp from "read-pkg-up";
|
|
7
6
|
import SuperTest from "supertest";
|
|
8
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
7
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
9
8
|
|
|
10
|
-
//
|
|
11
|
-
const [, rootDir] = filedirname();
|
|
9
|
+
const rootDir = __dirname; // automatically replaced by import.meta.dirname on build
|
|
12
10
|
|
|
13
11
|
export class Task {
|
|
14
12
|
@Property()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Context, Controller, Get, PathParams, PlatformTest, Post} from "@tsed/common";
|
|
2
2
|
import {Pattern} from "@tsed/schema";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
@Controller("/path-params")
|
|
7
7
|
class TestPathParamsCtrl {
|
|
@@ -2,7 +2,7 @@ import "@tsed/ajv";
|
|
|
2
2
|
import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common";
|
|
3
3
|
import {Maximum, Minimum, Required} from "@tsed/schema";
|
|
4
4
|
import SuperTest from "supertest";
|
|
5
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
5
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
6
6
|
|
|
7
7
|
export class RandomStringModel {
|
|
8
8
|
@Maximum(250)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Context, Controller, Get, Location, PlatformTest, Redirect} from "@tsed/common";
|
|
2
2
|
import SuperTest from "supertest";
|
|
3
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
3
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
4
4
|
|
|
5
5
|
@Controller("/redirect")
|
|
6
6
|
class RedirectCtrl {
|
|
@@ -4,9 +4,7 @@ import axios from "axios";
|
|
|
4
4
|
import {of} from "rxjs";
|
|
5
5
|
import {agent, SuperAgentStatic} from "superagent";
|
|
6
6
|
import SuperTest from "supertest";
|
|
7
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
8
|
-
|
|
9
|
-
// FIXME remove when esm is ready
|
|
7
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
10
8
|
|
|
11
9
|
class Base {
|
|
12
10
|
@Ignore()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Controller, Get, PlatformContext, PlatformTest, ResponseFilter, ResponseFilterMethods} from "@tsed/common";
|
|
2
2
|
import {Property, Returns} from "@tsed/schema";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
4
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
5
5
|
|
|
6
6
|
class ResponseFilterModel {
|
|
7
7
|
@Property()
|
package/src/tests/testRouting.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Controller, Get, PathParams, PlatformTest, ProviderScope, Scope, Service} from "@tsed/common";
|
|
2
2
|
import SuperTest from "supertest";
|
|
3
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
3
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
4
4
|
|
|
5
5
|
@Service()
|
|
6
6
|
@Scope(ProviderScope.REQUEST)
|
package/src/tests/testSession.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {NotFound} from "@tsed/exceptions";
|
|
|
3
3
|
import {Allow, Email, Ignore, MinLength, Property, Required, Returns} from "@tsed/schema";
|
|
4
4
|
import SuperTest from "supertest";
|
|
5
5
|
import {promisify} from "util";
|
|
6
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
6
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
7
7
|
|
|
8
8
|
export class UserCreation {
|
|
9
9
|
@Property()
|
package/src/tests/testStatics.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {Configuration} from "@tsed/di";
|
|
|
4
4
|
import {PlatformRouter} from "@tsed/platform-router";
|
|
5
5
|
import {readFileSync} from "fs";
|
|
6
6
|
import SuperTest from "supertest";
|
|
7
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
7
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
8
8
|
|
|
9
9
|
@Controller("/statics")
|
|
10
10
|
class CustomStaticsCtrl {
|
package/src/tests/testStream.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {Controller, Get, PlatformTest} from "@tsed/common";
|
|
2
2
|
import {ContentType} from "@tsed/schema";
|
|
3
|
-
import filedirname from "filedirname";
|
|
4
3
|
import {createReadStream} from "fs";
|
|
5
4
|
import {join} from "path";
|
|
6
5
|
import SuperTest from "supertest";
|
|
7
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
8
|
-
|
|
9
|
-
const
|
|
6
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
7
|
+
|
|
8
|
+
const rootDir = __dirname; // automatically replaced by import.meta.dirname on build
|
|
10
9
|
|
|
11
10
|
@Controller("/stream")
|
|
12
11
|
class TestStreamCtrl {
|
package/src/tests/testView.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {Controller, Get, Locals, Middleware, PlatformTest, UseBefore} from "@tse
|
|
|
2
2
|
import {EOL} from "os";
|
|
3
3
|
import SuperTest from "supertest";
|
|
4
4
|
import {View} from "@tsed/platform-views";
|
|
5
|
-
import {PlatformTestingSdkOpts} from "../interfaces";
|
|
5
|
+
import {PlatformTestingSdkOpts} from "../interfaces/index.js";
|
|
6
6
|
|
|
7
7
|
@Middleware()
|
|
8
8
|
class LocalsMiddleware {
|