@learnpack/learnpack 2.1.53 → 2.1.54
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +10 -10
- package/lib/commands/start.js +22 -0
- package/lib/managers/socket.js +7 -0
- package/lib/managers/telemetry.d.ts +1 -1
- package/lib/managers/telemetry.js +10 -2
- package/lib/models/action.d.ts +1 -1
- package/lib/models/socket.d.ts +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/commands/start.ts +355 -320
- package/src/managers/socket.ts +9 -0
- package/src/managers/telemetry.ts +353 -346
- package/src/models/action.ts +11 -10
- package/src/models/socket.ts +60 -59
- package/src/models/status.ts +16 -16
package/src/managers/socket.ts
CHANGED
@@ -213,6 +213,7 @@ actions = [actions]
|
|
213
213
|
},
|
214
214
|
success: function (type: TSuccessType, stdout: string) {
|
215
215
|
const types = ["compiler", "testing"]
|
216
|
+
|
216
217
|
if (!types.includes(type))
|
217
218
|
this.fatal(`Invalid socket success type "${type}" on socket`)
|
218
219
|
else if (stdout === "")
|
@@ -235,6 +236,14 @@ this.log((type + "-success") as TSuccessType, [stdout])
|
|
235
236
|
complete: function () {
|
236
237
|
console.log("complete")
|
237
238
|
},
|
239
|
+
dialog: function (message: string, format = "md") {
|
240
|
+
if (!this.socket) {
|
241
|
+
this.fatal("Socket is not initialized")
|
242
|
+
return
|
243
|
+
}
|
244
|
+
|
245
|
+
this.emit("dialog", "talk", [], undefined, undefined, { message, format })
|
246
|
+
},
|
238
247
|
|
239
248
|
fatal: function (msg: string) {
|
240
249
|
this.log("internal-error", [msg])
|