@learnpack/learnpack 5.0.340 → 5.0.341
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/serve.js +17 -4
- package/lib/creatorDist/assets/index-BhqDgBS9.js +76255 -6072
- package/lib/utils/api.js +10 -1
- package/package.json +1 -1
- package/src/commands/serve.ts +23 -4
- package/src/creatorDist/assets/index-BhqDgBS9.js +76255 -6072
- package/src/utils/api.ts +10 -1
package/src/utils/api.ts
CHANGED
|
@@ -592,8 +592,17 @@ type TTechnology = {
|
|
|
592
592
|
|
|
593
593
|
let technologiesCache: TTechnology[] = []
|
|
594
594
|
|
|
595
|
+
/** Strip .env comments (e.g. "token # comment") so the token is sent without spaces. */
|
|
596
|
+
function sanitizeToken(token: string | undefined): string {
|
|
597
|
+
if (!token) return ""
|
|
598
|
+
const trimmed = token.trim()
|
|
599
|
+
const beforeComment = trimmed.split(/\s+#/)[0].trim()
|
|
600
|
+
return beforeComment
|
|
601
|
+
}
|
|
602
|
+
|
|
595
603
|
export const fetchTechnologies = async () => {
|
|
596
|
-
const
|
|
604
|
+
const rawToken = process.env.BREATHECODE_PERMANENT_TOKEN
|
|
605
|
+
const BREATHECODE_PERMANENT_TOKEN = sanitizeToken(rawToken)
|
|
597
606
|
const LANGS = ["en", "es"]
|
|
598
607
|
|
|
599
608
|
if (!BREATHECODE_PERMANENT_TOKEN) {
|