File tree 4 files changed +53
-16
lines changed
4 files changed +53
-16
lines changed Original file line number Diff line number Diff line change 1
- FROM node:16.20 .1-alpine
1
+ FROM node:18.17 .1-alpine
2
2
3
3
RUN apk update && apk upgrade && apk add --no-cache bash mc
4
4
RUN mkdir -p /debugger
@@ -10,7 +10,8 @@ COPY package.json ./
10
10
COPY yarn.lock ./
11
11
# install cf-runtime required binaries
12
12
RUN apk add --no-cache --virtual buildDeps make python3 g++ git && \
13
- yarn install --forzen-lockfile --production
13
+ npm update -g npm && \
14
+ yarn install --frozen-lockfile --production
14
15
15
16
RUN yarn cache clean && \
16
17
apk del buildDeps && \
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cf-debugger" ,
3
- "version" : " 1.3.3 " ,
3
+ "version" : " 1.3.4 " ,
4
4
"main" : " index.js" ,
5
5
"license" : " MIT" ,
6
+ "resolutions" : {
7
+ "nan" : " 2.17.0" ,
8
+ "semver" : " 7.5.4"
9
+ },
6
10
"dependencies" : {
7
- "node-pty" : " git+https://github.com/microsoft/node-pty.git "
11
+ "node-pty" : " ^1.0.0 "
8
12
}
9
13
}
Original file line number Diff line number Diff line change 1
1
const pty = require ( 'node-pty' ) ;
2
2
const Resizer = require ( './Resizer.js' ) ;
3
3
4
+ let exit = false ;
5
+
4
6
const shell = pty . spawn ( '/bin/bash' , [ ] , {
5
- name : 'xterm' ,
7
+ name : 'xterm-color ' ,
6
8
cwd : process . env . PWD ,
7
9
env : process . env
8
10
} ) ;
9
- shell . on ( 'exit' , ( code ) => {
10
- process . exit ( code ) ;
11
+
12
+ process . on ( 'uncaughtException' , ( err ) => {
13
+ if ( exit ) {
14
+ process . exit ( 0 )
15
+ }
16
+ console . error ( err . message ) ;
17
+ console . error ( err . stack ) ;
11
18
} ) ;
12
19
13
20
const resizerStream = new Resizer ( shell . resize . bind ( shell ) ) ;
21
+
22
+ shell . on ( 'close' , ( ) => {
23
+ exit = true
24
+ } )
25
+
14
26
process . stdin
15
27
. pipe ( resizerStream )
16
28
. pipe ( shell )
Original file line number Diff line number Diff line change 2
2
# yarn lockfile v1
3
3
4
4
5
- nan@^2.14.0 :
6
- version "2.16.0"
7
- resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916"
8
- integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==
9
-
10
- " node-pty@git+https://github.com/microsoft/node-pty.git " :
11
- version "0.10.0"
12
- resolved "git+https://github.com/microsoft/node-pty.git#1674722e1caf3ff4dd52438b70ed68d46af83a6d"
5
+ lru-cache@^6.0.0 :
6
+ version "6.0.0"
7
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
8
+ integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
13
9
dependencies :
14
- nan "^2.14.0"
10
+ yallist "^4.0.0"
11
+
12
+
13
+ version "2.17.0"
14
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
15
+ integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
16
+
17
+ node-pty@^1.0.0 :
18
+ version "1.0.0"
19
+ resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.0.0.tgz#7daafc0aca1c4ca3de15c61330373af4af5861fd"
20
+ integrity sha512-wtBMWWS7dFZm/VgqElrTvtfMq4GzJ6+edFI0Y0zyzygUSZMgZdraDUMUhCIvkjhJjme15qWmbyJbtAx4ot4uZA==
21
+ dependencies :
22
+ nan "^2.17.0"
23
+
24
+
25
+ version "7.5.4"
26
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
27
+ integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
28
+ dependencies :
29
+ lru-cache "^6.0.0"
30
+
31
+ yallist@^4.0.0 :
32
+ version "4.0.0"
33
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
34
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
You can’t perform that action at this time.
0 commit comments