cli: add key watch for proxy mode

This commit is contained in:
pengfei.zhou
2023-08-11 17:29:51 +08:00
committed by jingpeng
parent aa7820a3b3
commit e638c29ac3
6 changed files with 38 additions and 5 deletions

View File

@@ -5479,7 +5479,11 @@ function initNativeEnvironment(source) {
return __awaiter(this, void 0, void 0, function* () {
// dev kit client
return new Promise((resolve, reject) => {
const ws = new WebSocket__default["default"]('ws://localhost:7777')
const ws = new WebSocket__default["default"]('ws://localhost:7777', {
headers: {
"role": "DEBUGGER"
}
})
.on('open', () => {
console.log('Connectted Devkit on port', '7777');
ws.send(JSON.stringify({

View File

@@ -42,7 +42,11 @@ global.doric = doric
async function initNativeEnvironment(source: string) {
// dev kit client
return new Promise<string>((resolve, reject) => {
const ws = new WebSocket('ws://localhost:7777')
const ws = new WebSocket('ws://localhost:7777', {
headers: {
"role": "DEBUGGER"
}
})
.on('open', () => {
console.log('Connectted Devkit on port', '7777')
ws.send(JSON.stringify({

View File

@@ -42,7 +42,11 @@ function initNativeEnvironment(source) {
return __awaiter(this, void 0, void 0, function* () {
// dev kit client
return new Promise((resolve, reject) => {
const ws = new WebSocket('ws://localhost:7777')
const ws = new WebSocket('ws://localhost:7777', {
headers: {
"role": "DEBUGGER"
}
})
.on('open', () => {
console.log('Connectted Devkit on port', '7777');
ws.send(JSON.stringify({