@chalksurf/cli 0.3.6 → 0.4.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.
@@ -1,104 +1,132 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/knowledge-maps/chalksurf/blob/main/packages/cli/schemas/exercise-solution-import-manifest.schema.json",
4
- "title": "ChalkSurf Exercise Solution Import Manifest",
5
3
  "type": "object",
6
- "additionalProperties": false,
7
- "required": ["sources"],
8
4
  "properties": {
9
- "organizationId": {
5
+ "schemaVersion": {
10
6
  "type": "string",
11
- "minLength": 1
7
+ "const": "v1"
12
8
  },
13
- "exerciseId": {
9
+ "operation": {
14
10
  "type": "string",
15
- "minLength": 1
11
+ "const": "exercise.solution.import"
16
12
  },
17
- "wait": {
18
- "type": "boolean"
19
- },
20
- "sources": {
21
- "type": "array",
13
+ "items": {
22
14
  "minItems": 1,
15
+ "maxItems": 100,
16
+ "type": "array",
23
17
  "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"
18
+ "type": "object",
19
+ "properties": {
20
+ "itemId": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 100
24
+ },
25
+ "sources": {
26
+ "minItems": 1,
27
+ "type": "array",
28
+ "items": {
29
+ "oneOf": [
30
+ {
31
+ "type": "object",
32
+ "properties": {
33
+ "kind": {
34
+ "type": "string",
35
+ "const": "local"
36
+ },
37
+ "path": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "relativePath": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "sourceId": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ }
49
+ },
50
+ "required": [
51
+ "kind",
52
+ "path"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ {
57
+ "type": "object",
58
+ "properties": {
59
+ "kind": {
60
+ "type": "string",
61
+ "const": "directory"
62
+ },
63
+ "path": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "relativeRoot": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "sourceId": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ }
75
+ },
76
+ "required": [
77
+ "kind",
78
+ "path"
79
+ ],
80
+ "additionalProperties": false
81
+ },
82
+ {
83
+ "type": "object",
84
+ "properties": {
85
+ "kind": {
86
+ "type": "string",
87
+ "const": "url"
88
+ },
89
+ "url": {
90
+ "type": "string",
91
+ "format": "uri"
92
+ },
93
+ "relativePath": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "sourceId": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ }
101
+ },
102
+ "required": [
103
+ "kind",
104
+ "url"
105
+ ],
106
+ "additionalProperties": false
107
+ }
108
+ ]
109
+ }
110
+ },
111
+ "exerciseId": {
112
+ "type": "string",
113
+ "format": "uuid",
114
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
115
+ }
78
116
  },
79
- "kind": {
80
- "const": "url"
81
- },
82
- "url": {
83
- "$ref": "#/$defs/nonEmptyString"
84
- },
85
- "relativePath": {
86
- "$ref": "#/$defs/nonEmptyString"
87
- }
117
+ "required": [
118
+ "itemId",
119
+ "sources",
120
+ "exerciseId"
121
+ ],
122
+ "additionalProperties": false
88
123
  }
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
124
  }
103
- }
125
+ },
126
+ "required": [
127
+ "schemaVersion",
128
+ "operation",
129
+ "items"
130
+ ],
131
+ "additionalProperties": false
104
132
  }