@learnpack/learnpack 5.0.250 → 5.0.254
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.
- package/lib/commands/audit.js +1 -1
- package/lib/commands/publish.js +4 -3
- package/lib/commands/serve.d.ts +0 -3
- package/lib/commands/serve.js +50 -47
- package/lib/creatorDist/assets/{index-CZYzWk3G.js → index-CFM_Ypyi.js} +25 -22
- package/lib/creatorDist/index.html +1 -1
- package/lib/managers/config/exercise.js +1 -1
- package/lib/utils/api.js +4 -3
- package/lib/utils/configBuilder.js +1 -1
- package/lib/utils/creatorUtilities.d.ts +1 -0
- package/lib/utils/creatorUtilities.js +5 -1
- package/package.json +1 -1
- package/src/commands/audit.ts +9 -18
- package/src/commands/publish.ts +4 -3
- package/src/commands/serve.ts +75 -68
- package/src/creator/src/App.tsx +1 -1
- package/src/creator/src/utils/rigo.ts +2 -0
- package/src/creatorDist/assets/{index-CZYzWk3G.js → index-CFM_Ypyi.js} +25 -22
- package/src/creatorDist/index.html +1 -1
- package/src/managers/config/exercise.ts +8 -16
- package/src/ui/_app/app.js +379 -379
- package/src/ui/app.tar.gz +0 -0
- package/src/utils/api.ts +4 -3
- package/src/utils/configBuilder.ts +1 -1
- package/src/utils/creatorUtilities.ts +4 -0
- package/src/utils/templates/incremental/.vscode/schema.json +5 -5
- package/src/utils/templates/isolated/.vscode/schema.json +5 -5
package/src/ui/app.tar.gz
CHANGED
Binary file
|
package/src/utils/api.ts
CHANGED
@@ -536,8 +536,9 @@ const updateRigoAssetID = async (
|
|
536
536
|
) => {
|
537
537
|
const url = `${RIGOBOT_HOST}/v1/learnpack/package/${slug}/`
|
538
538
|
const headers = {
|
539
|
-
Authorization:
|
539
|
+
Authorization: "Token " + token.trim(),
|
540
540
|
}
|
541
|
+
console.log("HEADERS", headers)
|
541
542
|
try {
|
542
543
|
const response = await axios.put(url, { asset_id }, { headers })
|
543
544
|
return response.data
|
@@ -550,7 +551,7 @@ const updateRigoAssetID = async (
|
|
550
551
|
const createRigoPackage = async (token: string, slug: string, config: any) => {
|
551
552
|
const url = `${RIGOBOT_HOST}/v1/learnpack/package`
|
552
553
|
const headers = {
|
553
|
-
Authorization:
|
554
|
+
Authorization: "Token " + token.trim(),
|
554
555
|
}
|
555
556
|
try {
|
556
557
|
const response = await axios.post(url, { slug, config }, { headers })
|
@@ -570,7 +571,7 @@ let technologiesCache: TTechnology[] = []
|
|
570
571
|
|
571
572
|
export const fetchTechnologies = async () => {
|
572
573
|
const BREATHECODE_PERMANENT_TOKEN = process.env.BREATHECODE_PERMANENT_TOKEN
|
573
|
-
const LANGS = ["en", "es"
|
574
|
+
const LANGS = ["en", "es"]
|
574
575
|
|
575
576
|
if (!BREATHECODE_PERMANENT_TOKEN) {
|
576
577
|
throw new Error(
|
@@ -59,7 +59,7 @@ export async function buildConfig(
|
|
59
59
|
const fname = parts.pop()!
|
60
60
|
const m = fname.match(/^readme(?:\.([a-z]{2}))?\.md$/i)
|
61
61
|
if (m) {
|
62
|
-
const lang = m[1] || "
|
62
|
+
const lang = m[1] || "en"
|
63
63
|
map[slug].translations[lang] = fname
|
64
64
|
} else {
|
65
65
|
map[slug].files.push({
|
@@ -12,14 +12,14 @@
|
|
12
12
|
"title": {
|
13
13
|
"type": "object",
|
14
14
|
"properties": {
|
15
|
-
"
|
15
|
+
"en": {
|
16
16
|
"type": "string"
|
17
17
|
},
|
18
18
|
"es": {
|
19
19
|
"type": "string"
|
20
20
|
}
|
21
21
|
},
|
22
|
-
"required": ["
|
22
|
+
"required": ["en"]
|
23
23
|
},
|
24
24
|
"repository": {
|
25
25
|
"type": "string",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"description": {
|
33
33
|
"type": "object",
|
34
34
|
"properties": {
|
35
|
-
"
|
35
|
+
"en": {
|
36
36
|
"type": "string"
|
37
37
|
},
|
38
38
|
"es": {
|
39
39
|
"type": "string"
|
40
40
|
}
|
41
41
|
},
|
42
|
-
"required": ["
|
42
|
+
"required": ["en"]
|
43
43
|
},
|
44
44
|
"duration": {
|
45
45
|
"type": "integer"
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"intro": {
|
97
97
|
"type": "object",
|
98
98
|
"properties": {
|
99
|
-
"
|
99
|
+
"en": {
|
100
100
|
"type": "string",
|
101
101
|
"format": "uri"
|
102
102
|
},
|
@@ -12,14 +12,14 @@
|
|
12
12
|
"title": {
|
13
13
|
"type": "object",
|
14
14
|
"properties": {
|
15
|
-
"
|
15
|
+
"en": {
|
16
16
|
"type": "string"
|
17
17
|
},
|
18
18
|
"es": {
|
19
19
|
"type": "string"
|
20
20
|
}
|
21
21
|
},
|
22
|
-
"required": ["
|
22
|
+
"required": ["en"]
|
23
23
|
},
|
24
24
|
"repository": {
|
25
25
|
"type": "string",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"description": {
|
33
33
|
"type": "object",
|
34
34
|
"properties": {
|
35
|
-
"
|
35
|
+
"en": {
|
36
36
|
"type": "string"
|
37
37
|
},
|
38
38
|
"es": {
|
39
39
|
"type": "string"
|
40
40
|
}
|
41
41
|
},
|
42
|
-
"required": ["
|
42
|
+
"required": ["en"]
|
43
43
|
},
|
44
44
|
"duration": {
|
45
45
|
"type": "integer"
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"intro": {
|
97
97
|
"type": "object",
|
98
98
|
"properties": {
|
99
|
-
"
|
99
|
+
"en": {
|
100
100
|
"type": "string",
|
101
101
|
"format": "uri"
|
102
102
|
},
|