@learnpack/learnpack 2.1.25 → 2.1.27
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +16 -16
- package/bin/run +17 -17
- package/bin/run.cmd +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +139 -138
- package/src/commands/audit.ts +134 -109
- package/src/commands/clean.ts +29 -29
- package/src/commands/download.ts +62 -62
- package/src/commands/init.ts +39 -39
- package/src/commands/login.ts +42 -42
- package/src/commands/logout.ts +43 -43
- package/src/commands/publish.ts +107 -107
- package/src/commands/start.ts +264 -234
- package/src/commands/test.ts +85 -85
- package/src/index.ts +1 -1
- package/src/managers/config/allowed_files.ts +29 -29
- package/src/managers/config/defaults.ts +4 -2
- package/src/managers/config/exercise.ts +309 -302
- package/src/managers/config/index.ts +159 -138
- package/src/managers/file.ts +178 -169
- package/src/managers/gitpod.ts +84 -84
- package/src/managers/server/index.ts +78 -69
- package/src/managers/server/routes.ts +139 -90
- package/src/managers/session.ts +147 -118
- package/src/managers/socket.ts +252 -239
- package/src/managers/test.ts +83 -83
- package/src/models/action.ts +10 -3
- package/src/models/config-manager.ts +23 -23
- package/src/models/config.ts +9 -2
- package/src/models/counter.ts +11 -11
- package/src/models/errors.ts +22 -22
- package/src/models/exercise-obj.ts +6 -3
- package/src/models/file.ts +5 -5
- package/src/models/findings.ts +18 -18
- package/src/models/flags.ts +10 -10
- package/src/models/front-matter.ts +11 -11
- package/src/models/gitpod-data.ts +19 -19
- package/src/models/language.ts +4 -4
- package/src/models/package.ts +7 -7
- package/src/models/plugin-config.ts +17 -17
- package/src/models/session.ts +29 -26
- package/src/models/socket.ts +54 -48
- package/src/models/status.ts +16 -15
- package/src/models/success-types.ts +1 -1
- package/src/plugin/command/compile.ts +17 -17
- package/src/plugin/command/test.ts +30 -30
- package/src/plugin/index.ts +6 -6
- package/src/plugin/plugin.ts +94 -94
- package/src/plugin/utils.ts +87 -87
- package/src/types/node-fetch.d.ts +1 -1
- package/src/ui/download.ts +71 -71
- package/src/utils/BaseCommand.ts +48 -48
- package/src/utils/SessionCommand.ts +48 -48
- package/src/utils/api.ts +246 -194
- package/src/utils/audit.ts +392 -395
- package/src/utils/console.ts +24 -24
- package/src/utils/errors.ts +117 -117
- package/src/utils/exercisesQueue.ts +51 -51
- package/src/utils/fileQueue.ts +198 -198
- package/src/utils/misc.ts +23 -23
- package/src/utils/templates/gitignore.txt +19 -19
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +24 -24
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +24 -24
- package/src/utils/templates/incremental/README.ejs +4 -4
- package/src/utils/templates/incremental/README.es.ejs +4 -4
- package/src/utils/templates/isolated/01-hello-world/README.es.md +26 -26
- package/src/utils/templates/isolated/01-hello-world/README.md +26 -26
- package/src/utils/templates/isolated/README.ejs +4 -4
- package/src/utils/templates/isolated/README.es.ejs +4 -4
- package/src/utils/templates/no-grading/README.ejs +4 -4
- package/src/utils/templates/no-grading/README.es.ejs +4 -4
- package/src/utils/validators.ts +18 -18
- package/src/utils/watcher.ts +14 -14
- package/lib/commands/audit.d.ts +0 -6
- package/lib/commands/audit.js +0 -317
- package/lib/commands/clean.d.ts +0 -8
- package/lib/commands/clean.js +0 -25
- package/lib/commands/download.d.ts +0 -13
- package/lib/commands/download.js +0 -55
- package/lib/commands/init.d.ts +0 -9
- package/lib/commands/init.js +0 -123
- package/lib/commands/login.d.ts +0 -14
- package/lib/commands/login.js +0 -37
- package/lib/commands/logout.d.ts +0 -14
- package/lib/commands/logout.js +0 -37
- package/lib/commands/publish.d.ts +0 -14
- package/lib/commands/publish.js +0 -82
- package/lib/commands/start.d.ts +0 -7
- package/lib/commands/start.js +0 -165
- package/lib/commands/test.d.ts +0 -6
- package/lib/commands/test.js +0 -62
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -4
- package/lib/managers/config/allowed_files.d.ts +0 -5
- package/lib/managers/config/allowed_files.js +0 -30
- package/lib/managers/config/defaults.d.ts +0 -37
- package/lib/managers/config/defaults.js +0 -38
- package/lib/managers/config/exercise.d.ts +0 -36
- package/lib/managers/config/exercise.js +0 -230
- package/lib/managers/config/index.d.ts +0 -3
- package/lib/managers/config/index.js +0 -302
- package/lib/managers/file.d.ts +0 -13
- package/lib/managers/file.js +0 -134
- package/lib/managers/gitpod.d.ts +0 -3
- package/lib/managers/gitpod.js +0 -67
- package/lib/managers/server/index.d.ts +0 -6
- package/lib/managers/server/index.js +0 -51
- package/lib/managers/server/routes.d.ts +0 -4
- package/lib/managers/server/routes.js +0 -167
- package/lib/managers/session.d.ts +0 -3
- package/lib/managers/session.js +0 -104
- package/lib/managers/socket.d.ts +0 -3
- package/lib/managers/socket.js +0 -164
- package/lib/managers/test.d.ts +0 -0
- package/lib/managers/test.js +0 -84
- package/lib/models/action.d.ts +0 -2
- package/lib/models/action.js +0 -2
- package/lib/models/audit.d.ts +0 -15
- package/lib/models/audit.js +0 -2
- package/lib/models/config-manager.d.ts +0 -21
- package/lib/models/config-manager.js +0 -2
- package/lib/models/config.d.ts +0 -60
- package/lib/models/config.js +0 -2
- package/lib/models/counter.d.ts +0 -11
- package/lib/models/counter.js +0 -2
- package/lib/models/errors.d.ts +0 -15
- package/lib/models/errors.js +0 -2
- package/lib/models/exercise-obj.d.ts +0 -27
- package/lib/models/exercise-obj.js +0 -2
- package/lib/models/file.d.ts +0 -5
- package/lib/models/file.js +0 -2
- package/lib/models/findings.d.ts +0 -17
- package/lib/models/findings.js +0 -2
- package/lib/models/flags.d.ts +0 -10
- package/lib/models/flags.js +0 -2
- package/lib/models/front-matter.d.ts +0 -11
- package/lib/models/front-matter.js +0 -2
- package/lib/models/gitpod-data.d.ts +0 -16
- package/lib/models/gitpod-data.js +0 -2
- package/lib/models/language.d.ts +0 -4
- package/lib/models/language.js +0 -2
- package/lib/models/package.d.ts +0 -7
- package/lib/models/package.js +0 -2
- package/lib/models/plugin-config.d.ts +0 -16
- package/lib/models/plugin-config.js +0 -2
- package/lib/models/session.d.ts +0 -23
- package/lib/models/session.js +0 -2
- package/lib/models/socket.d.ts +0 -31
- package/lib/models/socket.js +0 -2
- package/lib/models/status.d.ts +0 -1
- package/lib/models/status.js +0 -2
- package/lib/models/success-types.d.ts +0 -1
- package/lib/models/success-types.js +0 -2
- package/lib/plugin/command/compile.d.ts +0 -6
- package/lib/plugin/command/compile.js +0 -18
- package/lib/plugin/command/test.d.ts +0 -6
- package/lib/plugin/command/test.js +0 -25
- package/lib/plugin/index.d.ts +0 -27
- package/lib/plugin/index.js +0 -7
- package/lib/plugin/plugin.d.ts +0 -8
- package/lib/plugin/plugin.js +0 -68
- package/lib/plugin/utils.d.ts +0 -16
- package/lib/plugin/utils.js +0 -58
- package/lib/ui/download.d.ts +0 -5
- package/lib/ui/download.js +0 -61
- package/lib/utils/BaseCommand.d.ts +0 -8
- package/lib/utils/BaseCommand.js +0 -41
- package/lib/utils/SessionCommand.d.ts +0 -10
- package/lib/utils/SessionCommand.js +0 -47
- package/lib/utils/api.d.ts +0 -12
- package/lib/utils/api.js +0 -173
- package/lib/utils/audit.d.ts +0 -16
- package/lib/utils/audit.js +0 -302
- package/lib/utils/console.d.ts +0 -12
- package/lib/utils/console.js +0 -19
- package/lib/utils/errors.d.ts +0 -17
- package/lib/utils/errors.js +0 -100
- package/lib/utils/exercisesQueue.d.ts +0 -9
- package/lib/utils/exercisesQueue.js +0 -38
- package/lib/utils/fileQueue.d.ts +0 -40
- package/lib/utils/fileQueue.js +0 -168
- package/lib/utils/misc.d.ts +0 -1
- package/lib/utils/misc.js +0 -23
- package/lib/utils/validators.d.ts +0 -5
- package/lib/utils/validators.js +0 -17
- package/lib/utils/watcher.d.ts +0 -2
- package/lib/utils/watcher.js +0 -23
package/src/commands/start.ts
CHANGED
@@ -1,234 +1,264 @@
|
|
1
|
-
// import path from "path";
|
2
|
-
import { flags } from "@oclif/command"
|
3
|
-
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
import {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}),
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}),
|
33
|
-
|
34
|
-
char: "
|
35
|
-
description: "
|
36
|
-
|
37
|
-
}),
|
38
|
-
|
39
|
-
char: "
|
40
|
-
description: "
|
41
|
-
|
42
|
-
}),
|
43
|
-
|
44
|
-
char: "
|
45
|
-
description: "
|
46
|
-
|
47
|
-
}),
|
48
|
-
|
49
|
-
char: "
|
50
|
-
description: "
|
51
|
-
|
52
|
-
}),
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
async
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
})
|
118
|
-
|
119
|
-
socket.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
1
|
+
// import path from "path";
|
2
|
+
import { flags } from "@oclif/command"
|
3
|
+
|
4
|
+
import SessionCommand from "../utils/SessionCommand"
|
5
|
+
import Console from "../utils/console"
|
6
|
+
import socket from "../managers/socket"
|
7
|
+
import queue from "../utils/fileQueue"
|
8
|
+
import {
|
9
|
+
decompress,
|
10
|
+
downloadEditor,
|
11
|
+
checkIfDirectoryExists,
|
12
|
+
} from "../managers/file"
|
13
|
+
import { prioritizeHTMLFile } from "../utils/misc"
|
14
|
+
|
15
|
+
import createServer from "../managers/server"
|
16
|
+
|
17
|
+
import { IGitpodData } from "../models/gitpod-data"
|
18
|
+
import { IExercise, IExerciseData } from "../models/exercise-obj"
|
19
|
+
|
20
|
+
export default class StartCommand extends SessionCommand {
|
21
|
+
static description = "Runs a small server with all the exercise instructions"
|
22
|
+
|
23
|
+
static flags = {
|
24
|
+
...SessionCommand.flags,
|
25
|
+
port: flags.string({ char: "p", description: "server port" }),
|
26
|
+
host: flags.string({ char: "h", description: "server host" }),
|
27
|
+
disableGrading: flags.boolean({
|
28
|
+
char: "D",
|
29
|
+
description: "disble grading functionality",
|
30
|
+
default: false,
|
31
|
+
}),
|
32
|
+
// disableGrading: flags.boolean({char: 'dg', description: 'disble grading functionality', default: false }),
|
33
|
+
watch: flags.boolean({
|
34
|
+
char: "w",
|
35
|
+
description: "Watch for file changes",
|
36
|
+
default: false,
|
37
|
+
}),
|
38
|
+
editor: flags.string({
|
39
|
+
char: "e",
|
40
|
+
description: "[standalone, gitpod]",
|
41
|
+
options: ["standalone", "gitpod"],
|
42
|
+
}),
|
43
|
+
version: flags.string({
|
44
|
+
char: "v",
|
45
|
+
description: "E.g: 1.0.1",
|
46
|
+
default: undefined,
|
47
|
+
}),
|
48
|
+
grading: flags.string({
|
49
|
+
char: "g",
|
50
|
+
description: "[isolated, incremental]",
|
51
|
+
options: ["isolated", "incremental"],
|
52
|
+
}),
|
53
|
+
debug: flags.boolean({
|
54
|
+
char: "d",
|
55
|
+
description: "debugger mode for more verbage",
|
56
|
+
default: false,
|
57
|
+
}),
|
58
|
+
}
|
59
|
+
|
60
|
+
// 🛑 IMPORTANT
|
61
|
+
// Every command that will use the configManager needs this init method
|
62
|
+
async init() {
|
63
|
+
const { flags } = this.parse(StartCommand)
|
64
|
+
await this.initSession(flags)
|
65
|
+
}
|
66
|
+
|
67
|
+
async run() {
|
68
|
+
// get configuration object
|
69
|
+
const configObject = this.configManager?.get()
|
70
|
+
const config = configObject?.config
|
71
|
+
|
72
|
+
if (configObject) {
|
73
|
+
const { config } = configObject
|
74
|
+
|
75
|
+
// build exerises
|
76
|
+
this.configManager?.buildIndex()
|
77
|
+
|
78
|
+
Console.debug(
|
79
|
+
`Grading: ${config?.grading} ${
|
80
|
+
config?.disabledActions?.includes("test") ? "(disabled)" : ""
|
81
|
+
}, editor: ${config?.editor.mode} ${config?.editor.version}, for ${
|
82
|
+
Array.isArray(configObject?.exercises) ?
|
83
|
+
configObject?.exercises.length :
|
84
|
+
0
|
85
|
+
} exercises found`
|
86
|
+
)
|
87
|
+
|
88
|
+
const appAlreadyExists = checkIfDirectoryExists(
|
89
|
+
`${config?.dirPath}/_app`
|
90
|
+
)
|
91
|
+
|
92
|
+
if (!appAlreadyExists) {
|
93
|
+
// download app and decompress
|
94
|
+
await downloadEditor(
|
95
|
+
config?.editor.version,
|
96
|
+
`${config?.dirPath}/app.tar.gz`
|
97
|
+
)
|
98
|
+
|
99
|
+
Console.info("Decompressing LearnPack UI, this may take a minute...")
|
100
|
+
await decompress(
|
101
|
+
`${config?.dirPath}/app.tar.gz`,
|
102
|
+
`${config?.dirPath}/_app/`
|
103
|
+
)
|
104
|
+
}
|
105
|
+
|
106
|
+
// listen to socket commands
|
107
|
+
if (config && this.configManager) {
|
108
|
+
const server = await createServer(
|
109
|
+
configObject,
|
110
|
+
this.configManager,
|
111
|
+
process.env.NODE_ENV === "test"
|
112
|
+
)
|
113
|
+
|
114
|
+
const dispatcher = queue.dispatcher({
|
115
|
+
create: true,
|
116
|
+
path: `${config.dirPath}/vscode_queue.json`,
|
117
|
+
})
|
118
|
+
|
119
|
+
socket.start(config, server, false)
|
120
|
+
|
121
|
+
socket.on("open", (data: IGitpodData) => {
|
122
|
+
Console.debug("Opening these files: ", data)
|
123
|
+
console.log("Opening files", data)
|
124
|
+
|
125
|
+
const files = prioritizeHTMLFile(data.files)
|
126
|
+
// console.log("files",files);
|
127
|
+
|
128
|
+
dispatcher.enqueue(dispatcher.events.OPEN_FILES, files)
|
129
|
+
socket.ready("Ready to compile...")
|
130
|
+
})
|
131
|
+
|
132
|
+
socket.on("open_window", (data: IGitpodData) => {
|
133
|
+
Console.debug("Opening window: ", data)
|
134
|
+
dispatcher.enqueue(dispatcher.events.OPEN_WINDOW, data)
|
135
|
+
console.log(data)
|
136
|
+
|
137
|
+
socket.ready("Ready to compile...")
|
138
|
+
})
|
139
|
+
|
140
|
+
socket.on("reset", (exercise: IExerciseData) => {
|
141
|
+
try {
|
142
|
+
this.configManager?.reset(exercise.exerciseSlug)
|
143
|
+
dispatcher.enqueue(
|
144
|
+
dispatcher.events.RESET_EXERCISE,
|
145
|
+
exercise.exerciseSlug
|
146
|
+
)
|
147
|
+
socket.ready("Ready to compile...")
|
148
|
+
} catch (error) {
|
149
|
+
socket.error(
|
150
|
+
"compiler-error",
|
151
|
+
(error as TypeError).message ||
|
152
|
+
"There was an error reseting the exercise"
|
153
|
+
)
|
154
|
+
setTimeout(() => socket.ready("Ready to compile..."), 2000)
|
155
|
+
}
|
156
|
+
})
|
157
|
+
// socket.on("preview", (data) => {
|
158
|
+
// Console.debug("Preview triggered, removing the 'preview' action ")
|
159
|
+
// socket.removeAllowed("preview")
|
160
|
+
// socket.log('ready',['Ready to compile...'])
|
161
|
+
// })
|
162
|
+
|
163
|
+
socket.on("build", async (data: IExerciseData) => {
|
164
|
+
const exercise = this.configManager?.getExercise(data.exerciseSlug)
|
165
|
+
|
166
|
+
if (!exercise?.language) {
|
167
|
+
socket.error(
|
168
|
+
"compiler-error",
|
169
|
+
"Impossible to detect language to build for " +
|
170
|
+
data.exerciseSlug +
|
171
|
+
"..."
|
172
|
+
)
|
173
|
+
return
|
174
|
+
}
|
175
|
+
|
176
|
+
socket.log(
|
177
|
+
"compiling",
|
178
|
+
"Building exercise " +
|
179
|
+
data.exerciseSlug +
|
180
|
+
" with " +
|
181
|
+
exercise.language +
|
182
|
+
"..."
|
183
|
+
)
|
184
|
+
await this.config.runHook("action", {
|
185
|
+
action: "compile",
|
186
|
+
socket,
|
187
|
+
configuration: config,
|
188
|
+
exercise,
|
189
|
+
})
|
190
|
+
})
|
191
|
+
|
192
|
+
socket.on("generate", async (data: IExerciseData) => {
|
193
|
+
console.log("data", data)
|
194
|
+
})
|
195
|
+
|
196
|
+
socket.on("test", async (data: IExerciseData) => {
|
197
|
+
const exercise = this.configManager?.getExercise(data.exerciseSlug)
|
198
|
+
|
199
|
+
console.log("data", data)
|
200
|
+
|
201
|
+
if (!exercise?.language) {
|
202
|
+
socket.error(
|
203
|
+
"compiler-error",
|
204
|
+
"Impossible to detect engine language for testing for " +
|
205
|
+
data.exerciseSlug +
|
206
|
+
"..."
|
207
|
+
)
|
208
|
+
return
|
209
|
+
}
|
210
|
+
|
211
|
+
if (
|
212
|
+
config?.disabledActions!.includes("test") ||
|
213
|
+
config?.disableGrading
|
214
|
+
) {
|
215
|
+
socket.ready("Grading is disabled on configuration")
|
216
|
+
return true
|
217
|
+
}
|
218
|
+
|
219
|
+
socket.log(
|
220
|
+
"testing",
|
221
|
+
"Testing your exercise using the " + exercise.language + " engine."
|
222
|
+
)
|
223
|
+
|
224
|
+
console.log("About to call runHook")
|
225
|
+
|
226
|
+
await this.config.runHook("action", {
|
227
|
+
action: "test",
|
228
|
+
socket,
|
229
|
+
configuration: config,
|
230
|
+
exercise,
|
231
|
+
})
|
232
|
+
|
233
|
+
this.configManager?.save()
|
234
|
+
|
235
|
+
return true
|
236
|
+
})
|
237
|
+
|
238
|
+
const terminate = () => {
|
239
|
+
Console.debug("Terminating Learnpack...")
|
240
|
+
server.terminate(() => {
|
241
|
+
this.configManager?.noCurrentExercise()
|
242
|
+
dispatcher.enqueue(dispatcher.events.END)
|
243
|
+
process.exit()
|
244
|
+
})
|
245
|
+
}
|
246
|
+
|
247
|
+
server.on("close", terminate)
|
248
|
+
process.on("SIGINT", terminate)
|
249
|
+
process.on("SIGTERM", terminate)
|
250
|
+
process.on("SIGHUP", terminate)
|
251
|
+
|
252
|
+
// finish the server startup
|
253
|
+
setTimeout(() => dispatcher.enqueue(dispatcher.events.RUNNING), 1000)
|
254
|
+
|
255
|
+
// start watching for file changes
|
256
|
+
|
257
|
+
if (StartCommand.flags.watch)
|
258
|
+
this.configManager.watchIndex(_exercises =>
|
259
|
+
socket.reload(null, _exercises)
|
260
|
+
)
|
261
|
+
}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|