@chalksurf/cli 0.1.0 → 0.2.1

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-import-manifest.schema.json",
4
+ "title": "ChalkSurf Exercise 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
+ }
@@ -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-solution-import-manifest.schema.json",
4
+ "title": "ChalkSurf Exercise Solution Import Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["sources"],
8
+ "properties": {
9
+ "organizationId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "exerciseId": {
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
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/knowledge-maps/chalksurf/blob/main/packages/cli/schemas/sheet-import-manifest.schema.json",
4
+ "title": "ChalkSurf Sheet Import Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["sheets"],
8
+ "properties": {
9
+ "organizationId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "wait": {
14
+ "type": "boolean"
15
+ },
16
+ "sheets": {
17
+ "type": "array",
18
+ "minItems": 1,
19
+ "items": {
20
+ "$ref": "#/$defs/sheet"
21
+ }
22
+ }
23
+ },
24
+ "$defs": {
25
+ "nonEmptyString": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "targetFolderPath": {
30
+ "oneOf": [
31
+ {
32
+ "type": "null"
33
+ },
34
+ {
35
+ "$ref": "#/$defs/nonEmptyString"
36
+ }
37
+ ]
38
+ },
39
+ "translateLanguage": {
40
+ "type": "string",
41
+ "enum": ["english", "hungarian", "german", "french", "spanish", "italian"]
42
+ },
43
+ "localSource": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["kind", "path"],
47
+ "properties": {
48
+ "sourceId": {
49
+ "$ref": "#/$defs/nonEmptyString"
50
+ },
51
+ "kind": {
52
+ "const": "local"
53
+ },
54
+ "path": {
55
+ "$ref": "#/$defs/nonEmptyString"
56
+ },
57
+ "relativePath": {
58
+ "$ref": "#/$defs/nonEmptyString"
59
+ }
60
+ }
61
+ },
62
+ "directorySource": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["kind", "path"],
66
+ "properties": {
67
+ "sourceId": {
68
+ "$ref": "#/$defs/nonEmptyString"
69
+ },
70
+ "kind": {
71
+ "const": "directory"
72
+ },
73
+ "path": {
74
+ "$ref": "#/$defs/nonEmptyString"
75
+ },
76
+ "relativeRoot": {
77
+ "$ref": "#/$defs/nonEmptyString"
78
+ }
79
+ }
80
+ },
81
+ "urlSource": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": ["kind", "url"],
85
+ "properties": {
86
+ "sourceId": {
87
+ "$ref": "#/$defs/nonEmptyString"
88
+ },
89
+ "kind": {
90
+ "const": "url"
91
+ },
92
+ "url": {
93
+ "$ref": "#/$defs/nonEmptyString"
94
+ },
95
+ "relativePath": {
96
+ "$ref": "#/$defs/nonEmptyString"
97
+ }
98
+ }
99
+ },
100
+ "source": {
101
+ "oneOf": [
102
+ {
103
+ "$ref": "#/$defs/localSource"
104
+ },
105
+ {
106
+ "$ref": "#/$defs/directorySource"
107
+ },
108
+ {
109
+ "$ref": "#/$defs/urlSource"
110
+ }
111
+ ]
112
+ },
113
+ "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"
130
+ }
131
+ },
132
+ "sources": {
133
+ "type": "array",
134
+ "minItems": 1,
135
+ "items": {
136
+ "$ref": "#/$defs/source"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }