-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconsts.ts
114 lines (91 loc) · 2.38 KB
/
consts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
/**
* Docker max runtime in the engine
*/
export const MAX_CONTAINER_TIMEOUT = 30000
/**
* interval polling the file system status each docker volume
*/
export const CONTAINER_POLLING_INTERVAL = 200
/**
* given name for the text dump from the dos env
*/
export const resultsFileName = "TD.TXT"
/**
* given name for the compiled file from the dos env
*/
export const compiledFileName = "UC.EXE"
/**
* given name for the compiler dump from the dos env
*/
export const compilerDumpFileName = "CD.TXT"
/**
* given name for the linker dump from the dos env
*/
export const linkerDumpFileName = "LD.TXT"
/**
* given name for the linked obj file from the dos env
*/
export const linkObjName = "UCO.OBJ"
/**
* given name for the finished running flag from the dos env
*/
export const finishedRunningFile = 'RF.TXT'
/**
* given name for the user code file from the dos env
*/
export const asmFileName = 'UC.asm';
/**
* paths for the static script files in the host file system
*/
export const scriptFilePaths = [
'dos/RS.bat'
];
/**
* path for the masm lib on the host file system
*/
export const masmBineriesPath = "/root/masm"
/**
* docker execution command prefix
*/
export const executionCommandPrefix = `docker run -d`
/**
* docker image name
*/
export const dosboxDockerImage = `assemlearn-engine-docker:latest`
/**
* command to run the docker image with
*/
export const dockerRunCommand = '/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf'
/**
* dosbox drive to mount the masm lib to
*/
export const dosboxMasmBineriesDrive = `/dos/drive_c/`
/**
* dosbox drive to mount the source code to
*/
export const dosboxSrcDrive = `/dos/drive_d/`
/**
* post event endpoint url
*/
export const POST_EVENT_HANDLER_ENDPOINT = 'https://us-central1-asm-learn.cloudfunctions.net/resultFromEngine'
/**
* post event endpoint token
*/
export const POST_EVENT_HANDLER_ENDPOINT_TOKEN = "z^mp0a6tPS8hAQZ@RfZg^dvxKOCEw(Pc"
/**
* path for firebase config
*/
export const SERVICE_ACCOUNT_CONFIG = "./config/firebase/firebase.json"
/**
* service account url for firebase init
*/
export const SERVICE_ACCOUNT_URL = "https://asm-learn.firebaseio.com"
/**
* RTDB user submission table name
*/
export const USER_SUBMISSIONS_FOLDER = 'usersSubmissions'
/**
* storage bucket on firebase
*/
export const STORAGE_BUCKET = 'gs://asm-learn.appspot.com/'
export const DEFAULT_ENCODING = 'utf8'