@tsed/platform-test-sdk 7.79.4 → 7.80.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/cjs/tests/testHeaders.js +8 -24
- package/lib/cjs/tests/testHeaders.js.map +1 -1
- package/lib/cjs/tests/testInheritanceController.js +2 -1
- package/lib/cjs/tests/testInheritanceController.js.map +1 -1
- package/lib/cjs/tests/testMulter.js +5 -3
- package/lib/cjs/tests/testMulter.js.map +1 -1
- package/lib/cjs/tests/testRouting.js +4 -2
- package/lib/cjs/tests/testRouting.js.map +1 -1
- package/lib/cjs/tests/testStream.js +1 -1
- package/lib/esm/tests/testHeaders.js +8 -24
- package/lib/esm/tests/testHeaders.js.map +1 -1
- package/lib/esm/tests/testInheritanceController.js +2 -1
- package/lib/esm/tests/testInheritanceController.js.map +1 -1
- package/lib/esm/tests/testMulter.js +6 -4
- package/lib/esm/tests/testMulter.js.map +1 -1
- package/lib/esm/tests/testRouting.js +4 -2
- package/lib/esm/tests/testRouting.js.map +1 -1
- package/lib/esm/tests/testStream.js +1 -1
- package/lib/types-esm/components/PlatformTestSdk.d.ts +9 -0
- package/lib/types-esm/errors/CustomBadRequest.d.ts +8 -0
- package/lib/types-esm/errors/CustomInternalError.d.ts +8 -0
- package/lib/types-esm/interfaces/PlatformTestingSdkOpts.d.ts +8 -0
- package/lib/types-esm/modules/feature/FeatureModule.d.ts +2 -0
- package/lib/types-esm/modules/feature/controllers/FeatureController.d.ts +3 -0
- package/lib/types-esm/tests/exports.d.ts +2 -0
- package/lib/types-esm/tests/testAcceptMime.d.ts +2 -0
- package/lib/types-esm/tests/testAuth.d.ts +8 -0
- package/lib/types-esm/tests/testBodyParams.d.ts +3 -0
- package/lib/types-esm/tests/testCache.d.ts +2 -0
- package/lib/types-esm/tests/testChildrenControllers.d.ts +2 -0
- package/lib/types-esm/tests/testCookies.d.ts +11 -0
- package/lib/types-esm/tests/testCustom404.d.ts +2 -0
- package/lib/types-esm/tests/testDeepQueryParams.d.ts +3 -0
- package/lib/types-esm/tests/testErrors.d.ts +19 -0
- package/lib/types-esm/tests/testHandlers.d.ts +12 -0
- package/lib/types-esm/tests/testHeaderParams.d.ts +16 -0
- package/lib/types-esm/tests/testHeaders.d.ts +8 -0
- package/lib/types-esm/tests/testInheritanceController.d.ts +42 -0
- package/lib/types-esm/tests/testLocals.d.ts +2 -0
- package/lib/types-esm/tests/testLocation.d.ts +2 -0
- package/lib/types-esm/tests/testMiddlewares.d.ts +8 -0
- package/lib/types-esm/tests/testModule.d.ts +2 -0
- package/lib/types-esm/tests/testMulter.d.ts +21 -0
- package/lib/types-esm/tests/testPathParams.d.ts +2 -0
- package/lib/types-esm/tests/testQueryParams.d.ts +6 -0
- package/lib/types-esm/tests/testRedirect.d.ts +2 -0
- package/lib/types-esm/tests/testResponse.d.ts +16 -0
- package/lib/types-esm/tests/testResponseFilter.d.ts +2 -0
- package/lib/types-esm/tests/testRouting.d.ts +7 -0
- package/lib/types-esm/tests/testScopeRequest.d.ts +12 -0
- package/lib/types-esm/tests/testSession.d.ts +16 -0
- package/lib/types-esm/tests/testStatics.d.ts +2 -0
- package/lib/types-esm/tests/testStream.d.ts +2 -0
- package/lib/types-esm/tests/testView.d.ts +2 -0
- package/package.json +22 -20
- package/lib/cjs/package.json +0 -3
- package/lib/esm/package.json +0 -3
- package/lib/tsconfig.esm.tsbuildinfo +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/src/components/PlatformTestSdk.ts +0 -29
- package/src/data/file.txt +0 -1
- package/src/data/response.data.json +0 -3
- package/src/data/swagger.json +0 -32
- package/src/errors/CustomBadRequest.ts +0 -16
- package/src/errors/CustomInternalError.ts +0 -16
- package/src/interfaces/PlatformTestingSdkOpts.ts +0 -10
- package/src/modules/feature/FeatureModule.ts +0 -9
- package/src/modules/feature/controllers/FeatureController.ts +0 -11
- package/src/tests/exports.ts +0 -71
- package/src/tests/testAcceptMime.ts +0 -95
- package/src/tests/testAuth.ts +0 -339
- package/src/tests/testBodyParams.ts +0 -483
- package/src/tests/testCache.ts +0 -279
- package/src/tests/testChildrenControllers.ts +0 -55
- package/src/tests/testCookies.ts +0 -36
- package/src/tests/testCustom404.ts +0 -33
- package/src/tests/testDeepQueryParams.ts +0 -120
- package/src/tests/testErrors.ts +0 -226
- package/src/tests/testHandlers.ts +0 -90
- package/src/tests/testHeaderParams.ts +0 -152
- package/src/tests/testHeaders.ts +0 -91
- package/src/tests/testInheritanceController.ts +0 -200
- package/src/tests/testLocals.ts +0 -46
- package/src/tests/testLocation.ts +0 -37
- package/src/tests/testMiddlewares.ts +0 -159
- package/src/tests/testModule.ts +0 -46
- package/src/tests/testMulter.ts +0 -151
- package/src/tests/testPathParams.ts +0 -123
- package/src/tests/testQueryParams.ts +0 -233
- package/src/tests/testRedirect.ts +0 -124
- package/src/tests/testResponse.ts +0 -528
- package/src/tests/testResponseFilter.ts +0 -101
- package/src/tests/testRouting.ts +0 -65
- package/src/tests/testScopeRequest.ts +0 -111
- package/src/tests/testSession.ts +0 -103
- package/src/tests/testStatics.ts +0 -61
- package/src/tests/testStream.ts +0 -59
- package/src/tests/testView.ts +0 -68
- package/tsconfig.esm.json +0 -63
- package/tsconfig.json +0 -63
- /package/{src/index.ts → lib/types-esm/index.d.ts} +0 -0
- /package/{src/interfaces/index.ts → lib/types-esm/interfaces/index.d.ts} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
+
export declare class Resource {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class BaseController<T extends {
|
|
7
|
+
id: string;
|
|
8
|
+
}> {
|
|
9
|
+
resources: T[];
|
|
10
|
+
get(id: string): Promise<any>;
|
|
11
|
+
list(): Promise<any[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class ResourcesCtrl extends BaseController<Resource> {
|
|
14
|
+
resources: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}[];
|
|
18
|
+
get(id: string): Promise<any>;
|
|
19
|
+
post(resource: Resource): Resource;
|
|
20
|
+
}
|
|
21
|
+
declare abstract class AttachmentController {
|
|
22
|
+
getAll(parentID: string): string;
|
|
23
|
+
}
|
|
24
|
+
export declare class FindingsController extends AttachmentController {
|
|
25
|
+
get(): string;
|
|
26
|
+
}
|
|
27
|
+
export declare abstract class TestBaseController {
|
|
28
|
+
scenario3(search: string): {
|
|
29
|
+
search: string;
|
|
30
|
+
};
|
|
31
|
+
scenario5(q: string): {
|
|
32
|
+
data: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare class TestChildController extends TestBaseController {
|
|
36
|
+
scenario4(id: string): any;
|
|
37
|
+
scenario5(s: string): {
|
|
38
|
+
data: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare function testInheritanceController(options: PlatformTestingSdkOpts): void;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@tsed/ajv";
|
|
2
|
+
import { MiddlewareMethods } from "@tsed/common";
|
|
3
|
+
import { Exception } from "@tsed/exceptions";
|
|
4
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
5
|
+
export declare class CatchErrorMiddleware implements MiddlewareMethods {
|
|
6
|
+
use(err: Exception): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function testMiddlewares(options: PlatformTestingSdkOpts): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PlatformMulterFile } from "@tsed/common";
|
|
2
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
+
export declare class Task {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class Event {
|
|
8
|
+
id: string;
|
|
9
|
+
tasks: Task[];
|
|
10
|
+
}
|
|
11
|
+
export declare class TestMulterController {
|
|
12
|
+
uploadWithName(media: PlatformMulterFile): string;
|
|
13
|
+
uploadWithPayload(media: PlatformMulterFile, formId: string): {
|
|
14
|
+
file: string;
|
|
15
|
+
formId: string;
|
|
16
|
+
};
|
|
17
|
+
uploadWithOptions(media: PlatformMulterFile): {
|
|
18
|
+
file: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare function testMulter(options: PlatformTestingSdkOpts): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
+
export declare enum EnumValue {
|
|
3
|
+
One = "one",
|
|
4
|
+
Two = "two"
|
|
5
|
+
}
|
|
6
|
+
export declare class NestedEnum {
|
|
7
|
+
value: EnumValue;
|
|
8
|
+
}
|
|
9
|
+
export declare class TestNestedEnum {
|
|
10
|
+
nested: NestedEnum;
|
|
11
|
+
}
|
|
12
|
+
export declare class ModelGroup {
|
|
13
|
+
id: string;
|
|
14
|
+
groups: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function testResponse(options: PlatformTestingSdkOpts): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
+
export declare class ScopeRequestService {
|
|
3
|
+
user: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class ScopeRequestCtrl {
|
|
6
|
+
scopeRequestService: ScopeRequestService;
|
|
7
|
+
userId: string | null;
|
|
8
|
+
constructor(scopeRequestService: ScopeRequestService);
|
|
9
|
+
$onDestroy(): void;
|
|
10
|
+
testPerRequest(userId: string): Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
export declare function testScopeRequest(options: PlatformTestingSdkOpts): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
+
export declare class UserCreation {
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class User extends UserCreation {
|
|
8
|
+
password: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class SessionCtrl {
|
|
11
|
+
platformName: string;
|
|
12
|
+
connect(session: any, user: UserCreation): Promise<UserCreation>;
|
|
13
|
+
userInfo(user: User): Promise<User>;
|
|
14
|
+
logout(req: any): any;
|
|
15
|
+
}
|
|
16
|
+
export declare function testSession(options: PlatformTestingSdkOpts): void;
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-test-sdk",
|
|
3
|
-
"version": "7.79.4",
|
|
4
3
|
"description": "Package to test platform adapter integration with Ts.ED",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"version": "7.80.0",
|
|
5
6
|
"source": "./src/index.ts",
|
|
6
7
|
"main": "./lib/cjs/index.js",
|
|
7
8
|
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/types/index.d.ts",
|
|
13
|
+
"import": "./lib/esm/index.js",
|
|
14
|
+
"default": "./lib/cjs/index.js"
|
|
15
|
+
}
|
|
14
16
|
},
|
|
15
17
|
"scripts": {
|
|
16
18
|
"build": "yarn barrels && yarn build:ts",
|
|
17
19
|
"barrels": "barrels",
|
|
18
|
-
"build:ts": "tsc --build tsconfig.json
|
|
20
|
+
"build:ts": "tsc --build tsconfig.json"
|
|
19
21
|
},
|
|
20
22
|
"keywords": [
|
|
21
23
|
"Ts.ED",
|
|
@@ -25,25 +27,25 @@
|
|
|
25
27
|
"Adapter"
|
|
26
28
|
],
|
|
27
29
|
"dependencies": {
|
|
28
|
-
"@tsed/ajv": "7.
|
|
29
|
-
"@tsed/common": "7.
|
|
30
|
-
"@tsed/core": "7.
|
|
31
|
-
"@tsed/di": "7.
|
|
32
|
-
"@tsed/json-mapper": "7.
|
|
30
|
+
"@tsed/ajv": "7.80.0",
|
|
31
|
+
"@tsed/common": "7.80.0",
|
|
32
|
+
"@tsed/core": "7.80.0",
|
|
33
|
+
"@tsed/di": "7.80.0",
|
|
34
|
+
"@tsed/json-mapper": "7.80.0",
|
|
33
35
|
"@tsed/logger": "6.6.3",
|
|
34
|
-
"@tsed/platform-cache": "7.
|
|
35
|
-
"@tsed/platform-params": "7.
|
|
36
|
-
"@tsed/platform-router": "7.
|
|
37
|
-
"@tsed/platform-views": "7.
|
|
38
|
-
"@tsed/schema": "7.
|
|
39
|
-
"@tsed/swagger": "7.
|
|
36
|
+
"@tsed/platform-cache": "7.80.0",
|
|
37
|
+
"@tsed/platform-params": "7.80.0",
|
|
38
|
+
"@tsed/platform-router": "7.80.0",
|
|
39
|
+
"@tsed/platform-views": "7.80.0",
|
|
40
|
+
"@tsed/schema": "7.80.0",
|
|
41
|
+
"@tsed/swagger": "7.80.0",
|
|
40
42
|
"ajv": "^8.12.0",
|
|
41
|
-
"axios": "1.
|
|
43
|
+
"axios": "1.7.4",
|
|
42
44
|
"read-pkg-up": "7.0.1"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@tsed/barrels": "7.
|
|
46
|
-
"@tsed/typescript": "7.
|
|
47
|
+
"@tsed/barrels": "7.80.0",
|
|
48
|
+
"@tsed/typescript": "7.80.0",
|
|
47
49
|
"eslint": "^8.57.0",
|
|
48
50
|
"jest": "^29.7.0",
|
|
49
51
|
"typescript": "4.9.5"
|
package/lib/cjs/package.json
DELETED
package/lib/esm/package.json
DELETED