-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmeta.ts
More file actions
155 lines (155 loc) · 4.47 KB
/
meta.ts
File metadata and controls
155 lines (155 loc) · 4.47 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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: 100
},
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'
}
},
vscode_command_array: {
type: 'array',
description:
'An array of VSCode commands that can be called using the vscode commands API.',
items: {
anyOf: [
{
type: 'string',
description: 'A VSCode command without params'
},
{
type: 'array',
description: 'A VSCode command with params',
minLength: 2,
maxLength: 2
}
]
}
},
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,
}
},
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
},
setup_action_without_commits: {
type: 'object',
description:
'A collection of files/commands that run when a level/step or solution is loaded',
properties: {
files: {
$ref: '#/definitions/file_array'
},
commands: {
$ref: '#/definitions/command_array'
},
vscodeCommands: {
$ref: '#/definitions/vscode_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
}
}
}