Update to use promise router, which doesn't throw.

Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
Aramis Sennyey
2023-02-22 18:42:36 -05:00
committed by Fredrik Adelöw
parent a71d26fabf
commit 57cd529ba9
5 changed files with 7 additions and 3 deletions
@@ -24,7 +24,8 @@ import {
} from '@backstage/catalog-model';
import { Config } from '@backstage/config';
import { NotFoundError, serializeError } from '@backstage/errors';
import express, { Router } from 'express';
import express from 'express';
import Router from 'express-promise-router';
import { Logger } from 'winston';
import yn from 'yn';
import { z } from 'zod';
@@ -32,6 +32,7 @@
"dependencies": {
"@backstage/backend-common": "workspace:^",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"json-schema-to-ts": "^2.6.2",
"openapi-types": "^12.1.0",
"openapi3-ts": "^3.1.2",
+2 -1
View File
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import express, { Router } from 'express';
import express from 'express';
import Router from 'express-promise-router';
import { ApiRouter, DeepWriteable } from './router';
import doc from './schema/petstore';
+1 -1
View File
@@ -20,5 +20,5 @@
* @packageDocumentation
*/
export type { ApiRouter } from './router';
export type { ApiRouter, DeepWriteable } from './router';
export * from './types';
+1
View File
@@ -7801,6 +7801,7 @@ __metadata:
"@backstage/backend-common": "workspace:^"
"@backstage/cli": "workspace:^"
express: ^4.17.1
express-promise-router: ^4.1.0
json-schema-to-ts: ^2.6.2
openapi-types: ^12.1.0
openapi3-ts: ^3.1.2