@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/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: `Token ${token.trim()}`,
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: `Token ${token}`,
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", "us"]
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] || "us"
62
+ const lang = m[1] || "en"
63
63
  map[slug].translations[lang] = fname
64
64
  } else {
65
65
  map[slug].files.push({
@@ -498,3 +498,7 @@ export const appendAIRules = async () => {
498
498
 
499
499
  return null
500
500
  }
501
+
502
+ export const getReadmeExtension = (language: string) => {
503
+ return language === "en" || language === "us" ? ".md" : `.${language}.md`
504
+ }
@@ -12,14 +12,14 @@
12
12
  "title": {
13
13
  "type": "object",
14
14
  "properties": {
15
- "us": {
15
+ "en": {
16
16
  "type": "string"
17
17
  },
18
18
  "es": {
19
19
  "type": "string"
20
20
  }
21
21
  },
22
- "required": ["us"]
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
- "us": {
35
+ "en": {
36
36
  "type": "string"
37
37
  },
38
38
  "es": {
39
39
  "type": "string"
40
40
  }
41
41
  },
42
- "required": ["us"]
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
- "us": {
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
- "us": {
15
+ "en": {
16
16
  "type": "string"
17
17
  },
18
18
  "es": {
19
19
  "type": "string"
20
20
  }
21
21
  },
22
- "required": ["us"]
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
- "us": {
35
+ "en": {
36
36
  "type": "string"
37
37
  },
38
38
  "es": {
39
39
  "type": "string"
40
40
  }
41
41
  },
42
- "required": ["us"]
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
- "us": {
99
+ "en": {
100
100
  "type": "string",
101
101
  "format": "uri"
102
102
  },