@chalksurf/cli 0.2.1 → 0.2.3

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.
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/knowledge-maps/chalksurf/blob/main/packages/cli/schemas/exercise-sheet-solution-import-manifest.schema.json",
4
+ "title": "ChalkSurf Exercise Sheet Solution Import Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["sources"],
8
+ "properties": {
9
+ "organizationId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "exerciseSheetId": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "wait": {
18
+ "type": "boolean"
19
+ },
20
+ "sources": {
21
+ "type": "array",
22
+ "minItems": 1,
23
+ "items": {
24
+ "$ref": "#/$defs/source"
25
+ }
26
+ }
27
+ },
28
+ "$defs": {
29
+ "nonEmptyString": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "localSource": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["kind", "path"],
37
+ "properties": {
38
+ "sourceId": {
39
+ "$ref": "#/$defs/nonEmptyString"
40
+ },
41
+ "kind": {
42
+ "const": "local"
43
+ },
44
+ "path": {
45
+ "$ref": "#/$defs/nonEmptyString"
46
+ },
47
+ "relativePath": {
48
+ "$ref": "#/$defs/nonEmptyString"
49
+ }
50
+ }
51
+ },
52
+ "directorySource": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["kind", "path"],
56
+ "properties": {
57
+ "sourceId": {
58
+ "$ref": "#/$defs/nonEmptyString"
59
+ },
60
+ "kind": {
61
+ "const": "directory"
62
+ },
63
+ "path": {
64
+ "$ref": "#/$defs/nonEmptyString"
65
+ },
66
+ "relativeRoot": {
67
+ "$ref": "#/$defs/nonEmptyString"
68
+ }
69
+ }
70
+ },
71
+ "urlSource": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["kind", "url"],
75
+ "properties": {
76
+ "sourceId": {
77
+ "$ref": "#/$defs/nonEmptyString"
78
+ },
79
+ "kind": {
80
+ "const": "url"
81
+ },
82
+ "url": {
83
+ "$ref": "#/$defs/nonEmptyString"
84
+ },
85
+ "relativePath": {
86
+ "$ref": "#/$defs/nonEmptyString"
87
+ }
88
+ }
89
+ },
90
+ "source": {
91
+ "oneOf": [
92
+ {
93
+ "$ref": "#/$defs/localSource"
94
+ },
95
+ {
96
+ "$ref": "#/$defs/directorySource"
97
+ },
98
+ {
99
+ "$ref": "#/$defs/urlSource"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ }
@@ -40,6 +40,37 @@
40
40
  "type": "string",
41
41
  "enum": ["english", "hungarian", "german", "french", "spanish", "italian"]
42
42
  },
43
+ "componentId": {
44
+ "type": "string",
45
+ "pattern": "^[a-zA-Z0-9_-]{1,80}$"
46
+ },
47
+ "component": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["componentId", "description"],
51
+ "properties": {
52
+ "componentId": {
53
+ "$ref": "#/$defs/componentId"
54
+ },
55
+ "description": {
56
+ "$ref": "#/$defs/nonEmptyString"
57
+ },
58
+ "targetFolderPath": {
59
+ "$ref": "#/$defs/targetFolderPath"
60
+ },
61
+ "title": {
62
+ "$ref": "#/$defs/nonEmptyString"
63
+ },
64
+ "translateTo": {
65
+ "type": "array",
66
+ "minItems": 1,
67
+ "uniqueItems": true,
68
+ "items": {
69
+ "$ref": "#/$defs/translateLanguage"
70
+ }
71
+ }
72
+ }
73
+ },
43
74
  "localSource": {
44
75
  "type": "object",
45
76
  "additionalProperties": false,
@@ -111,32 +142,57 @@
111
142
  ]
112
143
  },
113
144
  "sheet": {
114
- "type": "object",
115
- "additionalProperties": false,
116
- "required": ["targetFolderPath", "sources"],
117
- "properties": {
118
- "targetFolderPath": {
119
- "$ref": "#/$defs/targetFolderPath"
120
- },
121
- "title": {
122
- "$ref": "#/$defs/nonEmptyString"
123
- },
124
- "translateTo": {
125
- "type": "array",
126
- "minItems": 1,
127
- "uniqueItems": true,
128
- "items": {
129
- "$ref": "#/$defs/translateLanguage"
145
+ "oneOf": [
146
+ {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": ["targetFolderPath", "sources"],
150
+ "properties": {
151
+ "targetFolderPath": {
152
+ "$ref": "#/$defs/targetFolderPath"
153
+ },
154
+ "title": {
155
+ "$ref": "#/$defs/nonEmptyString"
156
+ },
157
+ "translateTo": {
158
+ "type": "array",
159
+ "minItems": 1,
160
+ "uniqueItems": true,
161
+ "items": {
162
+ "$ref": "#/$defs/translateLanguage"
163
+ }
164
+ },
165
+ "sources": {
166
+ "type": "array",
167
+ "minItems": 1,
168
+ "items": {
169
+ "$ref": "#/$defs/source"
170
+ }
171
+ }
130
172
  }
131
173
  },
132
- "sources": {
133
- "type": "array",
134
- "minItems": 1,
135
- "items": {
136
- "$ref": "#/$defs/source"
174
+ {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": ["sources", "components"],
178
+ "properties": {
179
+ "sources": {
180
+ "type": "array",
181
+ "minItems": 1,
182
+ "items": {
183
+ "$ref": "#/$defs/source"
184
+ }
185
+ },
186
+ "components": {
187
+ "type": "array",
188
+ "minItems": 1,
189
+ "items": {
190
+ "$ref": "#/$defs/component"
191
+ }
192
+ }
137
193
  }
138
194
  }
139
- }
195
+ ]
140
196
  }
141
197
  }
142
198
  }