@elice/material-exercise 1.240614.0-cloudflare.0 → 1.240618.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/utils/runner.js +12 -5
- package/es/utils/runner.js +12 -5
- package/package.json +5 -5
package/cjs/utils/runner.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
const PythonRuntimeErrorRegex = new RegExp(/Traceback \(most recent call last\):\n\s*File "\S+", line \d+, in \S+\n\s*.*\n(.+\n)*\S+Error:\s.+/gm);
|
|
8
8
|
const PythonSyntaxErrorRegex = new RegExp(/File "(.*?)", line (\d+)\n\s*.+\n\s*(\^+)\n(.+)Error:\s(.+)/gm);
|
|
9
9
|
const CCCPCompileErrorRegex = new RegExp(/(.*?):(\d+):(\d+):\s+(warning|error|note):\s+(.*)(\n.+\n.+)?/gm);
|
|
10
|
+
const CCCPSyntaxCompileErrorRegex = new RegExp(/(.*?\.cpp.*?)+error:\s+(.*)?/gm);
|
|
10
11
|
const CCCPRuntimeErrorRegex = new RegExp(/(\w+ fault)\s+\(.*\)/gm);
|
|
11
12
|
const JavaCompileErrorRegex = new RegExp(/(.*?):(\d+):\s+error:\s+(.*)\n.+\n.+(\n\s*symbol.+)?(\n\s*location.+)?/gm);
|
|
12
13
|
const JavaRuntimeErrorRegex = new RegExp(/^Exception in thread ".+" (.+)$\n((?:\s+at .+$\n)+)/gm);
|
|
@@ -15,7 +16,7 @@ const JavascriptRuntimeErrorRegex = new RegExp(/(Uncaught )?(\w+Error):\s+(.*)\n
|
|
|
15
16
|
* Get Programming Error Results from text.
|
|
16
17
|
*/
|
|
17
18
|
function getProgrammingErrorResult(text) {
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
19
20
|
const escapedText = text.replace(/[\r|\\]/gm, '');
|
|
20
21
|
switch (true) {
|
|
21
22
|
case PythonRuntimeErrorRegex.test(escapedText):
|
|
@@ -36,27 +37,33 @@ function getProgrammingErrorResult(text) {
|
|
|
36
37
|
errorLangType: 'c/cpp',
|
|
37
38
|
errorType: 'compile'
|
|
38
39
|
};
|
|
40
|
+
case CCCPSyntaxCompileErrorRegex.test(escapedText):
|
|
41
|
+
return {
|
|
42
|
+
errorCode: (_h = (_g = escapedText.match(CCCPSyntaxCompileErrorRegex)) === null || _g === void 0 ? void 0 : _g.reduce((acc, curr) => acc + '\n' + curr)) !== null && _h !== void 0 ? _h : '',
|
|
43
|
+
errorLangType: 'c/cpp',
|
|
44
|
+
errorType: 'compile'
|
|
45
|
+
};
|
|
39
46
|
case CCCPRuntimeErrorRegex.test(escapedText):
|
|
40
47
|
return {
|
|
41
|
-
errorCode: (
|
|
48
|
+
errorCode: (_k = (_j = escapedText.match(CCCPRuntimeErrorRegex)) === null || _j === void 0 ? void 0 : _j.reduce((acc, curr) => acc + '\n' + curr)) !== null && _k !== void 0 ? _k : '',
|
|
42
49
|
errorLangType: 'c/cpp',
|
|
43
50
|
errorType: 'runtime'
|
|
44
51
|
};
|
|
45
52
|
case JavaCompileErrorRegex.test(escapedText):
|
|
46
53
|
return {
|
|
47
|
-
errorCode: (
|
|
54
|
+
errorCode: (_m = (_l = escapedText.match(JavaCompileErrorRegex)) === null || _l === void 0 ? void 0 : _l.reduce((acc, curr) => acc + '\n' + curr)) !== null && _m !== void 0 ? _m : '',
|
|
48
55
|
errorLangType: 'java',
|
|
49
56
|
errorType: 'compile'
|
|
50
57
|
};
|
|
51
58
|
case JavaRuntimeErrorRegex.test(escapedText):
|
|
52
59
|
return {
|
|
53
|
-
errorCode: (
|
|
60
|
+
errorCode: (_p = (_o = escapedText.match(JavaRuntimeErrorRegex)) === null || _o === void 0 ? void 0 : _o.reduce((acc, curr) => acc + '\n' + curr)) !== null && _p !== void 0 ? _p : '',
|
|
54
61
|
errorLangType: 'java',
|
|
55
62
|
errorType: 'runtime'
|
|
56
63
|
};
|
|
57
64
|
case JavascriptRuntimeErrorRegex.test(escapedText):
|
|
58
65
|
return {
|
|
59
|
-
errorCode: (
|
|
66
|
+
errorCode: (_r = (_q = escapedText.match(JavascriptRuntimeErrorRegex)) === null || _q === void 0 ? void 0 : _q.reduce((acc, curr) => acc + '\n' + curr)) !== null && _r !== void 0 ? _r : '',
|
|
60
67
|
errorLangType: 'javascript',
|
|
61
68
|
errorType: 'runtime'
|
|
62
69
|
};
|
package/es/utils/runner.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
const PythonRuntimeErrorRegex = new RegExp(/Traceback \(most recent call last\):\n\s*File "\S+", line \d+, in \S+\n\s*.*\n(.+\n)*\S+Error:\s.+/gm);
|
|
6
6
|
const PythonSyntaxErrorRegex = new RegExp(/File "(.*?)", line (\d+)\n\s*.+\n\s*(\^+)\n(.+)Error:\s(.+)/gm);
|
|
7
7
|
const CCCPCompileErrorRegex = new RegExp(/(.*?):(\d+):(\d+):\s+(warning|error|note):\s+(.*)(\n.+\n.+)?/gm);
|
|
8
|
+
const CCCPSyntaxCompileErrorRegex = new RegExp(/(.*?\.cpp.*?)+error:\s+(.*)?/gm);
|
|
8
9
|
const CCCPRuntimeErrorRegex = new RegExp(/(\w+ fault)\s+\(.*\)/gm);
|
|
9
10
|
const JavaCompileErrorRegex = new RegExp(/(.*?):(\d+):\s+error:\s+(.*)\n.+\n.+(\n\s*symbol.+)?(\n\s*location.+)?/gm);
|
|
10
11
|
const JavaRuntimeErrorRegex = new RegExp(/^Exception in thread ".+" (.+)$\n((?:\s+at .+$\n)+)/gm);
|
|
@@ -13,7 +14,7 @@ const JavascriptRuntimeErrorRegex = new RegExp(/(Uncaught )?(\w+Error):\s+(.*)\n
|
|
|
13
14
|
* Get Programming Error Results from text.
|
|
14
15
|
*/
|
|
15
16
|
function getProgrammingErrorResult(text) {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
17
18
|
const escapedText = text.replace(/[\r|\\]/gm, '');
|
|
18
19
|
switch (true) {
|
|
19
20
|
case PythonRuntimeErrorRegex.test(escapedText):
|
|
@@ -34,27 +35,33 @@ function getProgrammingErrorResult(text) {
|
|
|
34
35
|
errorLangType: 'c/cpp',
|
|
35
36
|
errorType: 'compile'
|
|
36
37
|
};
|
|
38
|
+
case CCCPSyntaxCompileErrorRegex.test(escapedText):
|
|
39
|
+
return {
|
|
40
|
+
errorCode: (_h = (_g = escapedText.match(CCCPSyntaxCompileErrorRegex)) === null || _g === void 0 ? void 0 : _g.reduce((acc, curr) => acc + '\n' + curr)) !== null && _h !== void 0 ? _h : '',
|
|
41
|
+
errorLangType: 'c/cpp',
|
|
42
|
+
errorType: 'compile'
|
|
43
|
+
};
|
|
37
44
|
case CCCPRuntimeErrorRegex.test(escapedText):
|
|
38
45
|
return {
|
|
39
|
-
errorCode: (
|
|
46
|
+
errorCode: (_k = (_j = escapedText.match(CCCPRuntimeErrorRegex)) === null || _j === void 0 ? void 0 : _j.reduce((acc, curr) => acc + '\n' + curr)) !== null && _k !== void 0 ? _k : '',
|
|
40
47
|
errorLangType: 'c/cpp',
|
|
41
48
|
errorType: 'runtime'
|
|
42
49
|
};
|
|
43
50
|
case JavaCompileErrorRegex.test(escapedText):
|
|
44
51
|
return {
|
|
45
|
-
errorCode: (
|
|
52
|
+
errorCode: (_m = (_l = escapedText.match(JavaCompileErrorRegex)) === null || _l === void 0 ? void 0 : _l.reduce((acc, curr) => acc + '\n' + curr)) !== null && _m !== void 0 ? _m : '',
|
|
46
53
|
errorLangType: 'java',
|
|
47
54
|
errorType: 'compile'
|
|
48
55
|
};
|
|
49
56
|
case JavaRuntimeErrorRegex.test(escapedText):
|
|
50
57
|
return {
|
|
51
|
-
errorCode: (
|
|
58
|
+
errorCode: (_p = (_o = escapedText.match(JavaRuntimeErrorRegex)) === null || _o === void 0 ? void 0 : _o.reduce((acc, curr) => acc + '\n' + curr)) !== null && _p !== void 0 ? _p : '',
|
|
52
59
|
errorLangType: 'java',
|
|
53
60
|
errorType: 'runtime'
|
|
54
61
|
};
|
|
55
62
|
case JavascriptRuntimeErrorRegex.test(escapedText):
|
|
56
63
|
return {
|
|
57
|
-
errorCode: (
|
|
64
|
+
errorCode: (_r = (_q = escapedText.match(JavascriptRuntimeErrorRegex)) === null || _q === void 0 ? void 0 : _q.reduce((acc, curr) => acc + '\n' + curr)) !== null && _r !== void 0 ? _r : '',
|
|
58
65
|
errorLangType: 'javascript',
|
|
59
66
|
errorType: 'runtime'
|
|
60
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240618.0",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@elice/blocks": "^1",
|
|
30
30
|
"@elice/design-tokens": "^1",
|
|
31
31
|
"@elice/icons": "^1",
|
|
32
|
-
"@elice/intl": "
|
|
32
|
+
"@elice/intl": "^0",
|
|
33
33
|
"@elice/markdown": "^1",
|
|
34
34
|
"@elice/material-shared-types": "*",
|
|
35
35
|
"@elice/material-shared-utils": "*",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@elice/icons": "^1.230814.0",
|
|
86
86
|
"@elice/intl": "0.240425.0-rc.2",
|
|
87
87
|
"@elice/markdown": "^1.220815.0",
|
|
88
|
-
"@elice/material-shared-types": "1.
|
|
89
|
-
"@elice/material-shared-utils": "1.
|
|
88
|
+
"@elice/material-shared-types": "1.240618.0",
|
|
89
|
+
"@elice/material-shared-utils": "1.240618.0",
|
|
90
90
|
"@elice/mui-elements": "^5.230825.0",
|
|
91
91
|
"@elice/mui-system": "^5.230825.0",
|
|
92
92
|
"@elice/types": "^1.240208.0",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"recoil": "^0.6.1",
|
|
117
117
|
"styled-components": "^5.2.0"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "63d4bb89b897e3f211035a7b3c7d8677ab43e4ff"
|
|
120
120
|
}
|