File tree 4 files changed +6
-9
lines changed
4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ class Channel implements Channel {
83
83
84
84
// load continued tutorial position & progress
85
85
const { position, progress } = await this . context . setTutorial ( this . workspaceState , tutorial )
86
+ logger ( 'CONTINUE STATE' , position , progress )
86
87
87
88
if ( progress . complete ) {
88
89
// tutorial is already complete
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class Progress {
53
53
throw new Error ( `setStepComplete level not found for stepId ${ stepId } ` )
54
54
}
55
55
56
- if ( currentLevel . steps [ currentLevel . steps . length - 1 ] ) {
56
+ if ( currentLevel . steps [ currentLevel . steps . length - 1 ] . id === stepId ) {
57
57
// final step for level is complete
58
58
next . levels [ currentLevel . id ] = true
59
59
Original file line number Diff line number Diff line change 1
- require ( 'dotenv' ) . config ( {
2
- path : './web-app/.env' ,
3
- } )
4
-
5
1
import { getWorkspaceRoot } from './services/workspace'
6
2
import * as os from 'os'
7
3
8
4
// CodeRoad version
9
- export const VERSION : string = process . env . npm_package_version || 'unknown'
5
+ export const VERSION = 'unknown'
10
6
11
7
// Node env
12
8
export type Env = 'test' | 'local' | 'development' | 'production'
13
9
// @ts -ignore
14
10
export const NODE_ENV : Env = process . env . NODE_ENV || 'production'
15
11
16
12
// toggle logging in development
17
- export const LOG : boolean = ( process . env . REACT_APP_LOG || '' ) . toLowerCase ( ) === 'true'
13
+ export const LOG = false
18
14
19
15
// error logging tool
20
- export const SENTRY_DSN : string | null = process . env . SENTRY_DSN || null
16
+ export const SENTRY_DSN : string | null = null
21
17
22
18
// uri path to the users project workspace
23
19
export const WORKSPACE_ROOT : string = getWorkspaceRoot ( )
Original file line number Diff line number Diff line change 1
1
import { LOG } from '../../environment'
2
2
3
- export type Log = string | object | null | undefined
3
+ export type Log = string | number | object | null | undefined
4
4
5
5
const logger = ( ...messages : Log [ ] ) : void => {
6
6
if ( ! LOG ) {
You can’t perform that action at this time.
0 commit comments