-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(common): Move domain code to @tsed/schema
- Loading branch information
Showing
77 changed files
with
784 additions
and
905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
packages/platform/common/src/builder/PlatformControllerBuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/platform/common/src/decorators/multer/multipartFile.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
packages/platform/common/src/decorators/params/endpointInfo.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import {ParamMetadata, ParamTypes} from "@tsed/platform-params"; | ||
import {ParamTypes} from "@tsed/platform-params"; | ||
import {expect} from "chai"; | ||
import {EndpointInfo} from "./endpointInfo"; | ||
import {JsonParameterStore} from "@tsed/schema"; | ||
|
||
describe("@EndpointInfo", () => { | ||
it("should register a new ParamMetadata instance with the correct property", () => { | ||
it("should register a new parameter instance with the correct property", () => { | ||
class Ctrl { | ||
test(@EndpointInfo() arg: EndpointInfo) {} | ||
} | ||
|
||
const param = ParamMetadata.get(Ctrl, "test", 0); | ||
const param = JsonParameterStore.get(Ctrl, "test", 0); | ||
expect(param.paramType).to.eq(ParamTypes.$CTX); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import {ParamMetadata, ParamTypes} from "@tsed/platform-params"; | ||
import {ParamTypes} from "@tsed/platform-params"; | ||
import {Err} from "./error"; | ||
import {expect} from "chai"; | ||
import {JsonParameterStore} from "@tsed/schema"; | ||
|
||
describe("@Err", () => { | ||
it("should register a new ParamMetadata instance with the correct property", () => { | ||
it("should register a new parameter instance with the correct property", () => { | ||
class Ctrl { | ||
test(@Err() arg: unknown) {} | ||
} | ||
|
||
const param = ParamMetadata.get(Ctrl, "test", 0); | ||
const param = JsonParameterStore.get(Ctrl, "test", 0); | ||
expect(param.paramType).to.eq(ParamTypes.ERR); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import {ParamMetadata, ParamTypes} from "@tsed/platform-params"; | ||
import {ParamTypes} from "@tsed/platform-params"; | ||
import {JsonParameterStore} from "@tsed/schema"; | ||
import {expect} from "chai"; | ||
import {Next} from "./next"; | ||
|
||
describe("@Next", () => { | ||
it("should register a new ParamMetadata instance with the correct property", () => { | ||
it("should register a new parameter instance with the correct property", () => { | ||
class Ctrl { | ||
test(@Next() arg: any) {} | ||
} | ||
|
||
const param = ParamMetadata.get(Ctrl, "test", 0); | ||
const param = JsonParameterStore.get(Ctrl, "test", 0); | ||
expect(param.paramType).to.eq(ParamTypes.NEXT_FN); | ||
}); | ||
}); |
19 changes: 10 additions & 9 deletions
19
packages/platform/common/src/decorators/params/request.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
packages/platform/common/src/decorators/params/response.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
packages/platform/common/src/decorators/params/responseData.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.