|
1 | 1 | import express, { Request, Response, NextFunction } from 'express'; |
2 | 2 | import https from 'https'; |
3 | 3 | import WebSocket, { WebSocketServer } from 'ws'; |
4 | | -import { createSelfSignedCert, generateToken } from '../utils/security'; |
| 4 | +import { createSelfSignedCertAsync, generateToken } from '../utils/security'; |
5 | 5 | import { extensionLogOutputChannel } from '../utils/logging'; |
6 | 6 | import { AspireResourceDebugSession, DcpServerConnectionInfo, ErrorDetails, ErrorResponse, ProcessRestartedNotification, RunSessionNotification, RunSessionPayload, ServiceLogsNotification, SessionMessageNotification, SessionTerminatedNotification } from './types'; |
7 | 7 | import { AspireDebugSession } from '../debugger/AspireDebugSession'; |
@@ -38,7 +38,7 @@ export default class AspireDcpServer { |
38 | 38 | const wsBySession = new Map<string, WebSocket>(); |
39 | 39 | const pendingNotificationQueueByDcpId = new Map<string, RunSessionNotification[]>(); |
40 | 40 |
|
41 | | - return new Promise((resolve, reject) => { |
| 41 | + return new Promise(async (resolve, reject) => { |
42 | 42 | const token = generateToken(); |
43 | 43 |
|
44 | 44 | const app = express(); |
@@ -174,7 +174,7 @@ export default class AspireDcpServer { |
174 | 174 | }); |
175 | 175 |
|
176 | 176 |
|
177 | | - const { key, cert, certBase64 } = createSelfSignedCert(); |
| 177 | + const { key, cert, certBase64 } = await createSelfSignedCertAsync(); |
178 | 178 | const server = https.createServer({ key, cert }, app); |
179 | 179 | const wss = new WebSocketServer({ noServer: true }); |
180 | 180 |
|
|
0 commit comments