Skip to content

Commit

Permalink
fix(cli): add ajv.returnsCoercedValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Dec 14, 2023
1 parent 9db80d7 commit 6ef2482
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/cli-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module.exports = {
},
coverageThreshold: {
global: {
statements: 71.15,
branches: 72.9,
functions: 48.9,
lines: 71.15
statements: 71.34,
branches: 72.93,
functions: 49.63,
lines: 71.34
}
},
};
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@
"@tsed/openspec": ">=7.14.2",
"@tsed/schema": ">=7.14.2"
}
}
}
3 changes: 3 additions & 0 deletions packages/cli/templates/generate/server.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import {PlatformApplication} from "@tsed/common";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
"{{route}}": [
...Object.values(rest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import * as pages from \\"./pages/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down Expand Up @@ -76,6 +79,9 @@ import * as pages from \\"./controllers/pages/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down Expand Up @@ -133,6 +139,9 @@ import * as rest from \\"./controllers/rest/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down Expand Up @@ -183,6 +192,9 @@ import * as pages from \\"./controllers/pages/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down Expand Up @@ -240,6 +252,9 @@ import * as rest from \\"./controllers/rest/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down Expand Up @@ -288,6 +303,9 @@ import * as rest from \\"./controllers/rest/index\\";
httpPort: process.env.PORT || 8083,
httpsPort: false, // CHANGE
disableComponentsScan: true,
ajv: {
returnsCoercedValues: true
},
mount: {
\\"/rest\\": [
...Object.values(rest)
Expand Down

0 comments on commit 6ef2482

Please sign in to comment.