File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ export class Auth extends Emittery<AuthEventTypes> {
38
38
}
39
39
40
40
async initialize ( ) {
41
- // Conn.on('change:ref', async () => {
42
- // const authCode = await this.getAuthCode().catch(() => null);
43
- // if (authCode) {
44
- // this.emit('change', authCode);
45
- // }
46
- // });
41
+ Conn . on ( 'change:ref' , async ( ) => {
42
+ const authCode = await this . getAuthCode ( ) . catch ( ( ) => null ) ;
43
+ if ( authCode ) {
44
+ this . emit ( 'change' , authCode ) ;
45
+ }
46
+ } ) ;
47
47
48
48
State . on ( 'change:state' , async ( ) => {
49
49
const isIdle = this . isIdle ( ) ;
@@ -52,8 +52,6 @@ export class Auth extends Emittery<AuthEventTypes> {
52
52
}
53
53
} ) ;
54
54
55
- State . on ( 'all' , console . log ) ;
56
-
57
55
Cmd . on ( 'logout' , ( ) => this . emit ( 'logout' ) ) ;
58
56
}
59
57
Original file line number Diff line number Diff line change @@ -53,8 +53,10 @@ async function start() {
53
53
54
54
let content = body . toString ( 'utf8' ) ;
55
55
56
- content = content . replace ( / \B ! 1 \b / g, 'false' ) ;
57
- content = content . replace ( / \B ! 0 \b / g, 'true' ) ;
56
+ content = content . replace ( / ( [ , : ; = > ( ) { } [ \] | & ] ) ! 1 \b / g, '$1false' ) ;
57
+ content = content . replace ( / ( [ , : ; = > ( ) { } [ \] | & ] ) ! 0 \b / g, '$1true' ) ;
58
+ content = content . replace ( / \b ( r e t u r n | c a s e ) \s * ! 1 \b / g, '$1 false' ) ;
59
+ content = content . replace ( / \b ( r e t u r n | c a s e ) \s * ! 0 \b / g, '$1 true' ) ;
58
60
content = content . replace ( / \b v o i d 0 \b / g, 'undefined' ) ;
59
61
60
62
fs . writeFileSync ( filePath , content , { encoding : 'utf8' } ) ;
You can’t perform that action at this time.
0 commit comments