Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
d7b42f1c
U
uni-app
项目概览
DCloud
/
uni-app
5 天 前同步成功
通知
815
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d7b42f1c
编写于
11月 28, 2023
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(automator): 优化心跳检测间隔
上级
b7930d76
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
packages/uni-automator/dist/index.js
packages/uni-automator/dist/index.js
+1
-1
未找到文件。
packages/uni-automator/dist/index.js
浏览文件 @
d7b42f1c
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,{
value
:
!
0
});
var
t
=
require
(
"
fs
"
),
e
=
require
(
"
path
"
),
n
=
require
(
"
debug
"
),
s
=
require
(
"
merge
"
),
i
=
require
(
"
jsonc-parser
"
),
o
=
require
(
"
licia/isRelative
"
),
r
=
require
(
"
ws
"
),
a
=
require
(
"
events
"
),
c
=
require
(
"
licia/uuid
"
),
p
=
require
(
"
licia/stringify
"
),
l
=
require
(
"
licia/dateFormat
"
),
u
=
require
(
"
licia/waitUntil
"
),
h
=
require
(
"
os
"
),
d
=
require
(
"
address
"
),
m
=
require
(
"
default-gateway
"
),
g
=
require
(
"
licia/isStr
"
),
y
=
require
(
"
licia/getPort
"
),
f
=
require
(
"
qrcode-terminal
"
),
v
=
require
(
"
licia/fs
"
),
w
=
require
(
"
licia/isFn
"
),
P
=
require
(
"
licia/trim
"
),
M
=
require
(
"
licia/startWith
"
),
k
=
require
(
"
licia/isNum
"
),
E
=
require
(
"
licia/sleep
"
),
I
=
require
(
"
licia/isUndef
"
),
A
=
require
(
"
child_process
"
),
b
=
require
(
"
licia/toStr
"
);
function
C
(
t
){
return
t
&&
"
object
"
==
typeof
t
&&
"
default
"
in
t
?
t
:{
default
:
t
}}
var
T
=
C
(
t
),
_
=
C
(
e
),
U
=
C
(
n
),
N
=
C
(
o
),
S
=
C
(
r
),
D
=
C
(
c
),
O
=
C
(
p
),
R
=
C
(
l
),
j
=
C
(
u
),
x
=
C
(
h
),
$
=
C
(
d
),
q
=
C
(
m
),
L
=
C
(
g
),
F
=
C
(
y
),
H
=
C
(
f
),
B
=
C
(
v
),
W
=
C
(
w
),
X
=
C
(
P
),
J
=
C
(
M
),
V
=
C
(
k
),
G
=
C
(
E
),
z
=
C
(
I
),
K
=
C
(
b
);
class
Y
extends
a
.
EventEmitter
{
constructor
(
t
){
super
(),
this
.
ws
=
t
,
this
.
ws
.
addEventListener
(
"
message
"
,(
t
=>
{
this
.
emit
(
"
message
"
,
t
.
data
)})),
this
.
ws
.
addEventListener
(
"
close
"
,(()
=>
{
this
.
emit
(
"
close
"
)}))}
send
(
t
){
this
.
ws
.
send
(
t
)}
close
(){
this
.
ws
.
close
()}}
const
Q
=
new
Map
,
Z
=
[
"
onCompassChange
"
,
"
onThemeChange
"
,
"
onUserCaptureScreen
"
,
"
onWindowResize
"
,
"
onMemoryWarning
"
,
"
onAccelerometerChange
"
,
"
onKeyboardHeightChange
"
,
"
onNetworkStatusChange
"
,
"
onPushMessage
"
,
"
onLocationChange
"
,
"
onGetWifiList
"
,
"
onWifiConnected
"
,
"
onWifiConnectedWithPartialInfo
"
,
"
onSocketOpen
"
,
"
onSocketError
"
,
"
onSocketMessage
"
,
"
onSocketClose
"
];
const
tt
=
new
Map
;
function
et
(
t
,
e
){(
null
==
t
?
void
0
:
t
.
success
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
success
)
&&
(
e
?
t
.
success
(
e
):
t
.
success
()),(
null
==
t
?
void
0
:
t
.
complete
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
complete
)
&&
(
e
?
t
.
complete
(
e
):
t
.
complete
())}
function
nt
(
t
,
e
){(
null
==
t
?
void
0
:
t
.
fail
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
fail
)
&&
(
e
?
t
.
fail
(
e
):
t
.
fail
()),(
null
==
t
?
void
0
:
t
.
complete
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
complete
)
&&
(
e
?
t
.
complete
(
e
):
t
.
complete
())}
async
function
st
(
t
,
e
){
const
[
n
,
s
]
=
function
(
t
){
return
L
.
default
(
t
)?[
!
0
,[
t
]]:[
!
1
,
t
]}(
e
),
i
=
await
t
(
s
);
return
n
?
i
[
0
]:
i
}
function
it
(
t
){
try
{
return
require
(
t
)}
catch
(
e
){
return
require
(
require
.
resolve
(
t
,{
paths
:[
process
.
cwd
()]}))}}
/^win/
.
test
(
process
.
platform
);
const
ot
=
"
Connection closed
"
;
class
rt
extends
a
.
EventEmitter
{
constructor
(
t
,
e
,
n
){
super
(),
this
.
puppet
=
e
,
this
.
namespace
=
n
,
this
.
callbacks
=
new
Map
,
this
.
transport
=
t
,
this
.
isAlive
=!
0
,
this
.
id
=
Date
.
now
(),
this
.
debug
=
U
.
default
(
"
automator:protocol:
"
+
this
.
namespace
),
this
.
onMessage
=
t
=>
{
var
e
,
n
;
if
(
this
.
isAlive
=!
0
,
"
true
"
===
process
.
env
.
UNI_APP_X
&&
t
.
includes
(
"
pong
"
))
return
;
this
.
debug
(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
◀ RECV
${
t
}
`
);
const
{
id
:
s
,
method
:
i
,
error
:
o
,
result
:
r
,
params
:
a
}
=
JSON
.
parse
(
t
);
if
(
null
===
(
e
=
null
==
r
?
void
0
:
r
.
method
)
||
void
0
===
e
?
void
0
:
e
.
startsWith
(
"
on
"
))
return
void
((
t
,
e
)
=>
{
const
n
=
Q
.
get
(
t
.
method
);(
null
==
n
?
void
0
:
n
.
has
(
e
))
&&
n
.
get
(
e
)(
t
.
data
)})(
r
,
s
);
if
(
null
===
(
n
=
null
==
r
?
void
0
:
r
.
method
)
||
void
0
===
n
?
void
0
:
n
.
startsWith
(
"
Socket.
"
)){
return
void
((
t
,
e
,
n
)
=>
{
const
s
=
tt
.
get
(
e
);(
null
==
s
?
void
0
:
s
.
has
(
t
))
&&
s
.
get
(
t
)(
n
)})(
r
.
method
.
replace
(
"
Socket.
"
,
""
),
r
.
id
,
r
.
data
)}
if
(
!
s
)
return
this
.
puppet
.
emit
(
i
,
a
);
const
{
callbacks
:
c
}
=
this
;
if
(
s
&&
c
.
has
(
s
)){
const
t
=
c
.
get
(
s
);
c
.
delete
(
s
),
o
?
t
.
reject
(
Error
(
o
.
message
||
o
.
detailMessage
||
o
.
errMsg
)):
t
.
resolve
(
r
)}},
this
.
onClose
=
()
=>
{
this
.
callbacks
.
forEach
((
t
=>
{
t
.
reject
(
Error
(
ot
))}))},
this
.
transport
.
on
(
"
message
"
,
this
.
onMessage
),
this
.
transport
.
on
(
"
close
"
,
this
.
onClose
)}
send
(
t
,
e
=
{},
n
=!
0
){
if
(
n
&&
this
.
puppet
.
adapter
.
has
(
t
))
return
this
.
puppet
.
adapter
.
send
(
this
,
t
,
e
);
const
s
=
D
.
default
(),
i
=
O
.
default
({
id
:
s
,
method
:
t
,
params
:
e
});
return
"
ping
"
!==
t
&&
this
.
debug
(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
SEND ►
${
i
}
`
),
new
Promise
(((
t
,
e
)
=>
{
try
{
this
.
transport
.
send
(
i
)}
catch
(
t
){
e
(
Error
(
ot
))}
this
.
callbacks
.
set
(
s
,{
resolve
:
t
,
reject
:
e
})}))}
dispose
(){
this
.
transport
.
close
()}
startHeartbeat
(){
if
(
"
true
"
===
process
.
env
.
UNI_APP_X
&&
"
android
"
===
process
.
env
.
UNI_APP_PLATFORM
){
const
t
=
new
Map
,
e
=
it
(
"
adbkit
"
),
n
=
5
e3
,
s
=
x
.
default
.
platform
();
let
i
=
""
,
o
=
""
;
"
darwin
"
===
s
?(
i
=
'
dumpsys activity | grep "Run"
'
,
o
=
`logcat -b crash | grep -C 10
${
"
io.dcloud.uniappx
"
}
`
):
"
win32
"
===
s
&&
(
i
=
'
dumpsys activity | findstr "Run"
'
,
o
=
"
logcat | findstr UncaughtExceptionHandler
"
),
t
.
set
(
this
.
id
,
setInterval
((
async
()
=>
{
if
(
!
this
.
isAlive
){
const
n
=
e
.
createClient
(),
s
=
await
n
.
listDevices
();
if
(
!
s
.
length
)
throw
Error
(
"
Device not found
"
);
const
r
=
s
[
0
].
id
;
return
n
.
shell
(
r
,
i
).
then
((
function
(
t
){
let
e
,
n
=
""
;
t
.
on
(
"
data
"
,(
function
(
t
){
n
+=
t
.
toString
(),
e
&&
clearTimeout
(
e
),
e
=
setTimeout
((()
=>
{
n
.
includes
(
"
io.dcloud.uniapp
"
)
||
console
.
log
(
"
Stop the test process.
"
)}),
50
)}))})),
n
.
shell
(
r
,
o
).
then
((
t
=>
{
let
e
,
n
=
""
;
t
.
on
(
"
data
"
,(
t
=>
{
n
+=
t
.
toString
(),
e
&&
clearTimeout
(
e
),
e
=
setTimeout
((()
=>
{
console
.
log
(
`crash log:
${
n
}
`
)}),
50
)}))})),
clearInterval
(
t
.
get
(
this
.
id
)),
t
.
delete
(
this
.
id
),
void
this
.
dispose
()}
this
.
send
(
"
ping
"
),
this
.
isAlive
=!
1
}),
n
))}}
static
createDevtoolConnection
(
t
,
e
){
return
new
Promise
(((
n
,
s
)
=>
{
const
i
=
new
S
.
default
(
t
);
i
.
addEventListener
(
"
open
"
,(()
=>
{
n
(
new
rt
(
new
Y
(
i
),
e
,
"
devtool
"
))})),
i
.
addEventListener
(
"
error
"
,
s
)}))}
static
createRuntimeConnection
(
t
,
e
,
n
){
return
new
Promise
(((
s
,
i
)
=>
{
U
.
default
(
"
automator:runtime
"
)(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
port=
${
t
}
`
);
const
o
=
new
S
.
default
.
Server
({
port
:
t
});
j
.
default
((
async
()
=>
{
if
(
e
.
runtimeConnection
)
return
!
0
}),
n
,
1
e3
).
catch
((()
=>
{
o
.
close
(),
i
(
"
Failed to connect to runtime, please make sure the project is running
"
)})),
o
.
on
(
"
connection
"
,(
function
(
t
){
U
.
default
(
"
automator:runtime
"
)(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
connected`
);
const
n
=
new
rt
(
new
Y
(
t
),
e
,
"
runtime
"
);
e
.
setRuntimeConnection
(
n
),
n
.
startHeartbeat
(),
s
(
n
)})),
e
.
setRuntimeServer
(
o
)}))}}
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,{
value
:
!
0
});
var
t
=
require
(
"
fs
"
),
e
=
require
(
"
path
"
),
n
=
require
(
"
debug
"
),
s
=
require
(
"
merge
"
),
i
=
require
(
"
jsonc-parser
"
),
o
=
require
(
"
licia/isRelative
"
),
r
=
require
(
"
ws
"
),
a
=
require
(
"
events
"
),
c
=
require
(
"
licia/uuid
"
),
p
=
require
(
"
licia/stringify
"
),
l
=
require
(
"
licia/dateFormat
"
),
u
=
require
(
"
licia/waitUntil
"
),
h
=
require
(
"
os
"
),
d
=
require
(
"
address
"
),
m
=
require
(
"
default-gateway
"
),
g
=
require
(
"
licia/isStr
"
),
y
=
require
(
"
licia/getPort
"
),
f
=
require
(
"
qrcode-terminal
"
),
v
=
require
(
"
licia/fs
"
),
w
=
require
(
"
licia/isFn
"
),
P
=
require
(
"
licia/trim
"
),
M
=
require
(
"
licia/startWith
"
),
k
=
require
(
"
licia/isNum
"
),
E
=
require
(
"
licia/sleep
"
),
I
=
require
(
"
licia/isUndef
"
),
A
=
require
(
"
child_process
"
),
b
=
require
(
"
licia/toStr
"
);
function
C
(
t
){
return
t
&&
"
object
"
==
typeof
t
&&
"
default
"
in
t
?
t
:{
default
:
t
}}
var
T
=
C
(
t
),
_
=
C
(
e
),
U
=
C
(
n
),
N
=
C
(
o
),
S
=
C
(
r
),
D
=
C
(
c
),
O
=
C
(
p
),
R
=
C
(
l
),
j
=
C
(
u
),
x
=
C
(
h
),
$
=
C
(
d
),
q
=
C
(
m
),
L
=
C
(
g
),
F
=
C
(
y
),
H
=
C
(
f
),
B
=
C
(
v
),
W
=
C
(
w
),
X
=
C
(
P
),
J
=
C
(
M
),
V
=
C
(
k
),
G
=
C
(
E
),
z
=
C
(
I
),
K
=
C
(
b
);
class
Y
extends
a
.
EventEmitter
{
constructor
(
t
){
super
(),
this
.
ws
=
t
,
this
.
ws
.
addEventListener
(
"
message
"
,(
t
=>
{
this
.
emit
(
"
message
"
,
t
.
data
)})),
this
.
ws
.
addEventListener
(
"
close
"
,(()
=>
{
this
.
emit
(
"
close
"
)}))}
send
(
t
){
this
.
ws
.
send
(
t
)}
close
(){
this
.
ws
.
close
()}}
const
Q
=
new
Map
,
Z
=
[
"
onCompassChange
"
,
"
onThemeChange
"
,
"
onUserCaptureScreen
"
,
"
onWindowResize
"
,
"
onMemoryWarning
"
,
"
onAccelerometerChange
"
,
"
onKeyboardHeightChange
"
,
"
onNetworkStatusChange
"
,
"
onPushMessage
"
,
"
onLocationChange
"
,
"
onGetWifiList
"
,
"
onWifiConnected
"
,
"
onWifiConnectedWithPartialInfo
"
,
"
onSocketOpen
"
,
"
onSocketError
"
,
"
onSocketMessage
"
,
"
onSocketClose
"
];
const
tt
=
new
Map
;
function
et
(
t
,
e
){(
null
==
t
?
void
0
:
t
.
success
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
success
)
&&
(
e
?
t
.
success
(
e
):
t
.
success
()),(
null
==
t
?
void
0
:
t
.
complete
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
complete
)
&&
(
e
?
t
.
complete
(
e
):
t
.
complete
())}
function
nt
(
t
,
e
){(
null
==
t
?
void
0
:
t
.
fail
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
fail
)
&&
(
e
?
t
.
fail
(
e
):
t
.
fail
()),(
null
==
t
?
void
0
:
t
.
complete
)
&&
"
function
"
==
typeof
(
null
==
t
?
void
0
:
t
.
complete
)
&&
(
e
?
t
.
complete
(
e
):
t
.
complete
())}
async
function
st
(
t
,
e
){
const
[
n
,
s
]
=
function
(
t
){
return
L
.
default
(
t
)?[
!
0
,[
t
]]:[
!
1
,
t
]}(
e
),
i
=
await
t
(
s
);
return
n
?
i
[
0
]:
i
}
function
it
(
t
){
try
{
return
require
(
t
)}
catch
(
e
){
return
require
(
require
.
resolve
(
t
,{
paths
:[
process
.
cwd
()]}))}}
/^win/
.
test
(
process
.
platform
);
const
ot
=
"
Connection closed
"
;
class
rt
extends
a
.
EventEmitter
{
constructor
(
t
,
e
,
n
){
super
(),
this
.
puppet
=
e
,
this
.
namespace
=
n
,
this
.
callbacks
=
new
Map
,
this
.
transport
=
t
,
this
.
isAlive
=!
0
,
this
.
id
=
Date
.
now
(),
this
.
debug
=
U
.
default
(
"
automator:protocol:
"
+
this
.
namespace
),
this
.
onMessage
=
t
=>
{
var
e
,
n
;
if
(
this
.
isAlive
=!
0
,
"
true
"
===
process
.
env
.
UNI_APP_X
&&
t
.
includes
(
"
pong
"
))
return
;
this
.
debug
(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
◀ RECV
${
t
}
`
);
const
{
id
:
s
,
method
:
i
,
error
:
o
,
result
:
r
,
params
:
a
}
=
JSON
.
parse
(
t
);
if
(
null
===
(
e
=
null
==
r
?
void
0
:
r
.
method
)
||
void
0
===
e
?
void
0
:
e
.
startsWith
(
"
on
"
))
return
void
((
t
,
e
)
=>
{
const
n
=
Q
.
get
(
t
.
method
);(
null
==
n
?
void
0
:
n
.
has
(
e
))
&&
n
.
get
(
e
)(
t
.
data
)})(
r
,
s
);
if
(
null
===
(
n
=
null
==
r
?
void
0
:
r
.
method
)
||
void
0
===
n
?
void
0
:
n
.
startsWith
(
"
Socket.
"
)){
return
void
((
t
,
e
,
n
)
=>
{
const
s
=
tt
.
get
(
e
);(
null
==
s
?
void
0
:
s
.
has
(
t
))
&&
s
.
get
(
t
)(
n
)})(
r
.
method
.
replace
(
"
Socket.
"
,
""
),
r
.
id
,
r
.
data
)}
if
(
!
s
)
return
this
.
puppet
.
emit
(
i
,
a
);
const
{
callbacks
:
c
}
=
this
;
if
(
s
&&
c
.
has
(
s
)){
const
t
=
c
.
get
(
s
);
c
.
delete
(
s
),
o
?
t
.
reject
(
Error
(
o
.
message
||
o
.
detailMessage
||
o
.
errMsg
)):
t
.
resolve
(
r
)}},
this
.
onClose
=
()
=>
{
this
.
callbacks
.
forEach
((
t
=>
{
t
.
reject
(
Error
(
ot
))}))},
this
.
transport
.
on
(
"
message
"
,
this
.
onMessage
),
this
.
transport
.
on
(
"
close
"
,
this
.
onClose
)}
send
(
t
,
e
=
{},
n
=!
0
){
if
(
n
&&
this
.
puppet
.
adapter
.
has
(
t
))
return
this
.
puppet
.
adapter
.
send
(
this
,
t
,
e
);
const
s
=
D
.
default
(),
i
=
O
.
default
({
id
:
s
,
method
:
t
,
params
:
e
});
return
"
ping
"
!==
t
&&
this
.
debug
(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
SEND ►
${
i
}
`
),
new
Promise
(((
t
,
e
)
=>
{
try
{
this
.
transport
.
send
(
i
)}
catch
(
t
){
e
(
Error
(
ot
))}
this
.
callbacks
.
set
(
s
,{
resolve
:
t
,
reject
:
e
})}))}
dispose
(){
this
.
transport
.
close
()}
startHeartbeat
(){
if
(
"
true
"
===
process
.
env
.
UNI_APP_X
&&
"
android
"
===
process
.
env
.
UNI_APP_PLATFORM
){
const
t
=
new
Map
,
e
=
it
(
"
adbkit
"
),
n
=
9
e3
,
s
=
x
.
default
.
platform
();
let
i
=
""
,
o
=
""
;
"
darwin
"
===
s
?(
i
=
'
dumpsys activity | grep "Run"
'
,
o
=
`logcat -b crash | grep -C 10
${
"
io.dcloud.uniappx
"
}
`
):
"
win32
"
===
s
&&
(
i
=
'
dumpsys activity | findstr "Run"
'
,
o
=
"
logcat | findstr UncaughtExceptionHandler
"
),
t
.
set
(
this
.
id
,
setInterval
((
async
()
=>
{
if
(
!
this
.
isAlive
){
const
n
=
e
.
createClient
(),
s
=
await
n
.
listDevices
();
if
(
!
s
.
length
)
throw
Error
(
"
Device not found
"
);
const
r
=
s
[
0
].
id
;
return
n
.
shell
(
r
,
i
).
then
((
function
(
t
){
let
e
,
n
=
""
;
t
.
on
(
"
data
"
,(
function
(
t
){
n
+=
t
.
toString
(),
e
&&
clearTimeout
(
e
),
e
=
setTimeout
((()
=>
{
n
.
includes
(
"
io.dcloud.uniapp
"
)
||
console
.
log
(
"
Stop the test process.
"
)}),
50
)}))})),
n
.
shell
(
r
,
o
).
then
((
t
=>
{
let
e
,
n
=
""
;
t
.
on
(
"
data
"
,(
t
=>
{
n
+=
t
.
toString
(),
e
&&
clearTimeout
(
e
),
e
=
setTimeout
((()
=>
{
console
.
log
(
`crash log:
${
n
}
`
)}),
50
)}))})),
clearInterval
(
t
.
get
(
this
.
id
)),
t
.
delete
(
this
.
id
),
void
this
.
dispose
()}
this
.
send
(
"
ping
"
),
this
.
isAlive
=!
1
}),
n
))}}
static
createDevtoolConnection
(
t
,
e
){
return
new
Promise
(((
n
,
s
)
=>
{
const
i
=
new
S
.
default
(
t
);
i
.
addEventListener
(
"
open
"
,(()
=>
{
n
(
new
rt
(
new
Y
(
i
),
e
,
"
devtool
"
))})),
i
.
addEventListener
(
"
error
"
,
s
)}))}
static
createRuntimeConnection
(
t
,
e
,
n
){
return
new
Promise
(((
s
,
i
)
=>
{
U
.
default
(
"
automator:runtime
"
)(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
port=
${
t
}
`
);
const
o
=
new
S
.
default
.
Server
({
port
:
t
});
j
.
default
((
async
()
=>
{
if
(
e
.
runtimeConnection
)
return
!
0
}),
n
,
1
e3
).
catch
((()
=>
{
o
.
close
(),
i
(
"
Failed to connect to runtime, please make sure the project is running
"
)})),
o
.
on
(
"
connection
"
,(
function
(
t
){
U
.
default
(
"
automator:runtime
"
)(
`
${
R
.
default
(
"
yyyy-mm-dd HH:MM:ss:l
"
)}
connected`
);
const
n
=
new
rt
(
new
Y
(
t
),
e
,
"
runtime
"
);
e
.
setRuntimeConnection
(
n
),
n
.
startHeartbeat
(),
s
(
n
)})),
e
.
setRuntimeServer
(
o
)}))}}
/*! *****************************************************************************
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Copyright (c) Microsoft Corporation.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录