-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmeta.ts
More file actions
99 lines (99 loc) · 2.84 KB
/
meta.ts
File metadata and controls
99 lines (99 loc) · 2.84 KB
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
export default {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "https://coderoad.io/tutorial-schema.json",
definitions: {
semantic_version: {
type: "string",
description:
'A semantic version, such as "1.0.0". Learn more at https://semver.org/',
pattern: "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$",
minLength: 5,
maxLength: 14,
examples: ["0.1.0", "1.0.0"],
},
sha1_hash: {
type: "string",
description: "A SHA1 hash created by Git",
pattern: "^[0-9a-f]{5,40}$",
minLength: 5,
maxLength: 40,
},
title: {
type: "string",
minLength: 1,
maxLength: 40,
},
file_path: {
type: "string",
description: "A path to a file",
pattern: "(\\\\?([^\\/]*[\\/])*)([^\\/]+)$",
minLength: 4,
examples: ["src/file.js"],
},
file_array: {
type: "array",
description:
"An array of files which will be opened by the editor when entering the level or step",
items: {
$ref: "#/definitions/file_path",
// uniqueItems: true,
},
},
command_array: {
type: "array",
description:
"An array of command line commands that will be called when the user enters the level or step. Currently commands are limited for security purposes",
items: {
type: "string",
},
},
commit_array: {
type: "array",
description:
"An array of git commits which will be loaded when the level/step or solution is loaded",
items: {
$ref: "#/definitions/sha1_hash",
// uniqueItems: true,
},
minItems: 1,
},
setup_action: {
type: "object",
description:
"A collection of files/commits/commands that run when a level/step or solution is loaded",
properties: {
files: {
$ref: "#/definitions/file_array",
},
commits: {
$ref: "#/definitions/commit_array",
},
commands: {
$ref: "#/definitions/command_array",
},
watchers: {
type: "array",
items: {
$ref: "#/definitions/file_path",
// uniqueItems: true,
},
description:
"An array file paths that, when updated, will trigger the test runner to run",
},
filter: {
type: "string",
description:
"A regex pattern that will be passed to the test runner to limit the number of tests running",
examples: ["^TestSuiteName"],
},
subtasks: {
type: "boolean",
description:
'A feature that shows subtasks: all active test names and the status of the tests (pass/fail). Use together with "filter"',
examples: [true],
},
},
additionalProperties: false,
},
},
};