@@ -14,7 +14,7 @@ import { openWorkspace, checkWorkspaceEmpty } from '../services/workspace'
14
14
import { readFile } from 'fs'
15
15
import { join } from 'path'
16
16
import { promisify } from 'util'
17
- import environment from '../environment'
17
+ import { WORKSPACE_ROOT } from '../environment'
18
18
19
19
const readFileAsync = promisify ( readFile )
20
20
@@ -45,12 +45,12 @@ class Channel implements Channel {
45
45
const actionType : string = typeof action === 'string' ? action : action . type
46
46
// const onError = (error: T.ErrorMessage) => this.send({ type: 'ERROR', payload: { error } })
47
47
48
- // console.log(`ACTION: ${actionType}`)
48
+ logger ( `EXT RECEIVED: " ${ actionType } " `)
49
49
50
50
switch ( actionType ) {
51
51
case 'EDITOR_STARTUP' :
52
52
// check if a workspace is open, otherwise nothing works
53
- const noActiveWorksapce = ! environment . WORKSPACE_ROOT . length
53
+ const noActiveWorksapce = ! WORKSPACE_ROOT . length
54
54
if ( noActiveWorksapce ) {
55
55
const error : E . ErrorMessage = {
56
56
type : 'NoWorkspaceFound' ,
@@ -260,7 +260,7 @@ class Channel implements Channel {
260
260
} )
261
261
262
262
// log error to console for safe keeping
263
- console . log ( `ERROR:\n ${ errorMarkdown } ` )
263
+ logger ( `ERROR:\n ${ errorMarkdown } ` )
264
264
265
265
if ( errorMarkdown ) {
266
266
// add a clearer error message for the user
@@ -270,6 +270,9 @@ class Channel implements Channel {
270
270
271
271
// action may be an object.type or plain string
272
272
const actionType : string = typeof action === 'string' ? action : action . type
273
+
274
+ logger ( `EXT TO CLIENT: "${ actionType } "` )
275
+
273
276
switch ( actionType ) {
274
277
case 'TEST_PASS' :
275
278
const tutorial = this . context . tutorial . get ( )
0 commit comments