-
Notifications
You must be signed in to change notification settings - Fork 0
Update all dependencies and fix all audit problems #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
ea7d490
7f9e3b1
0de77f3
8f4bd00
36d7617
37cd99f
103f515
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| import * as debug from 'debug'; | ||
| import debug from 'debug'; | ||
| import { Errors } from '../typescript-rest'; | ||
| import { ParamType, ServiceProperty } from './model/metadata'; | ||
| import { ParameterConverter, ServiceContext } from './model/server-types'; | ||
|
|
@@ -85,7 +85,7 @@ export class ParameterProcessor { | |
| return parameterMapper; | ||
| } | ||
|
|
||
| private convertType(paramValue: string | boolean, paramType: Function): any { | ||
| private convertType(paramValue: string | boolean | string[], paramType: Function): any { | ||
| const serializedType = paramType['name']; | ||
| this.debugger.runtime('Processing parameter. received type: %s, received value:', serializedType, paramValue); | ||
| switch (serializedType) { | ||
|
|
@@ -94,6 +94,9 @@ export class ParameterProcessor { | |
| case 'Boolean': | ||
| if (paramValue === undefined) return paramValue; | ||
| if (typeof paramValue === 'boolean') return paramValue; | ||
| if (Array.isArray(paramValue)) { | ||
| throw new Errors.BadRequestError('Multiple values not allowed for boolean parameters'); | ||
| } | ||
|
Comment on lines
88
to
+99
|
||
|
|
||
| return paramValue.toLowerCase() === 'true'; | ||
| default: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it have to be /src now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the update of TypeScript, the "rootDir" option became mandatory and therefore created the "src" directory in the dist folder.