@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.
@@ -1,10 +1,11 @@
1
- export type TAction =
2
- | "test"
3
- | "log"
4
- | "reload"
5
- | "ready"
6
- | "clean"
7
- | "ask"
8
- | "file_change";
9
-
10
- export type ICallback = (...agrs: any[]) => any;
1
+ export type TAction =
2
+ | "test"
3
+ | "log"
4
+ | "reload"
5
+ | "ready"
6
+ | "clean"
7
+ | "ask"
8
+ | "file_change"
9
+ | "dialog";
10
+
11
+ export type ICallback = (...agrs: any[]) => any;
@@ -1,59 +1,60 @@
1
- import { IConfig } from "./config"
2
- import { Server } from "socket.io"
3
- import { DefaultEventsMap } from "socket.io/dist/typed-events"
4
- import { TAction, ICallback } from "./action"
5
- import { TStatus } from "./status"
6
-
7
- export type TPossibleActions =
8
- | "build"
9
- | "test"
10
- | "reset"
11
- | "tutorial"
12
- | "generate";
13
-
14
- export interface ISocket {
15
- socket: Server<
16
- DefaultEventsMap,
17
- DefaultEventsMap,
18
- DefaultEventsMap,
19
- any
20
- > | null;
21
- config: IConfig | null;
22
- allowedActions: Array<TPossibleActions>;
23
- actionCallBacks: { [key: string]: ICallback };
24
- possibleActions: Array<TPossibleActions>;
25
- isTestingEnvironment: boolean;
26
- addAllowed: (actions: any) => void;
27
- removeAllowed: (actions: any) => void;
28
- start: (config: IConfig, server: any, isTestingEnvironment: boolean) => void;
29
- on: (action: any, callBack: any) => void;
30
- clean: (_: string, logs: Array<any>) => void;
31
- complete: () => void;
32
- ask: (questions: Array<string>) => void;
33
- reload: (files: Array<string> | null, exercises: Array<string>) => void;
34
- openWindow: (id: string) => void;
35
- log: (
36
- status: TStatus,
37
- messages?: string | Array<string>,
38
- report?: Array<string>,
39
- data?: any
40
- ) => void;
41
- emit: (
42
- action: TAction,
43
- status: TStatus | string,
44
- logs: string | Array<string>,
45
- inputs?: Array<string>,
46
- report?: Array<string>,
47
- data?: any
48
- ) => void;
49
- ready: (message: string) => void;
50
- error: (type: any, stdout: string) => void;
51
- fatal: (msg: string) => void;
52
- success: (type: any, stdout: string) => void;
53
- onTestingFinished: (obj: any) => void;
54
- }
55
-
56
- export type TOpenWindowData = {
57
- url: string;
58
- exerciseSlug: string;
59
- };
1
+ import { IConfig } from "./config"
2
+ import { Server } from "socket.io"
3
+ import { DefaultEventsMap } from "socket.io/dist/typed-events"
4
+ import { TAction, ICallback } from "./action"
5
+ import { TStatus } from "./status"
6
+
7
+ export type TPossibleActions =
8
+ | "build"
9
+ | "test"
10
+ | "reset"
11
+ | "tutorial"
12
+ | "generate";
13
+
14
+ export interface ISocket {
15
+ socket: Server<
16
+ DefaultEventsMap,
17
+ DefaultEventsMap,
18
+ DefaultEventsMap,
19
+ any
20
+ > | null;
21
+ config: IConfig | null;
22
+ allowedActions: Array<TPossibleActions>;
23
+ actionCallBacks: { [key: string]: ICallback };
24
+ possibleActions: Array<TPossibleActions>;
25
+ isTestingEnvironment: boolean;
26
+ addAllowed: (actions: any) => void;
27
+ removeAllowed: (actions: any) => void;
28
+ start: (config: IConfig, server: any, isTestingEnvironment: boolean) => void;
29
+ on: (action: any, callBack: any) => void;
30
+ clean: (_: string, logs: Array<any>) => void;
31
+ complete: () => void;
32
+ ask: (questions: Array<string>) => void;
33
+ reload: (files: Array<string> | null, exercises: Array<string>) => void;
34
+ openWindow: (id: string) => void;
35
+ log: (
36
+ status: TStatus,
37
+ messages?: string | Array<string>,
38
+ report?: Array<string>,
39
+ data?: any
40
+ ) => void;
41
+ emit: (
42
+ action: TAction,
43
+ status: TStatus | string,
44
+ logs: string | Array<string>,
45
+ inputs?: Array<string>,
46
+ report?: Array<string>,
47
+ data?: any
48
+ ) => void;
49
+ ready: (message: string) => void;
50
+ error: (type: any, stdout: string) => void;
51
+ fatal: (msg: string) => void;
52
+ dialog: (message: string) => void;
53
+ success: (type: any, stdout: string) => void;
54
+ onTestingFinished: (obj: any) => void;
55
+ }
56
+
57
+ export type TOpenWindowData = {
58
+ url: string;
59
+ exerciseSlug: string;
60
+ };
@@ -1,16 +1,16 @@
1
- export type TStatus =
2
- | "ready"
3
- | "internal-error"
4
- | "compiler-success"
5
- | "testing-success"
6
- | "compiling"
7
- | "testing"
8
- | "start_exercise"
9
- | "initializing"
10
- | "configuration_loaded"
11
- | "connection_ended"
12
- | "reset_exercise"
13
- | "open_files"
14
- | "open_window"
15
- | "instructions_closed"
16
- | "completed";
1
+ export type TStatus =
2
+ | "ready"
3
+ | "internal-error"
4
+ | "compiler-success"
5
+ | "testing-success"
6
+ | "compiling"
7
+ | "testing"
8
+ | "start_exercise"
9
+ | "initializing"
10
+ | "configuration_loaded"
11
+ | "connection_ended"
12
+ | "reset_exercise"
13
+ | "open_files"
14
+ | "open_window"
15
+ | "instructions_closed"
16
+ | "completed";