@learnpack/learnpack 5.0.246 → 5.0.250

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.
@@ -191,6 +191,7 @@ class ServeCommand extends SessionCommand_1.default {
191
191
  console.log("GCP_CREDENTIALS_JSON is not set");
192
192
  process.exit(1);
193
193
  }
194
+ await api_1.default.updateTechnologiesPeriodically();
194
195
  const credentials = JSON.parse(crendsEnv);
195
196
  const bucketStorage = new storage_1.Storage({
196
197
  credentials,
@@ -35,6 +35,7 @@ type TTechnology = {
35
35
  lang: string;
36
36
  };
37
37
  export declare const fetchTechnologies: () => Promise<any[]>;
38
+ declare function updateTechnologiesPeriodically(): Promise<void>;
38
39
  export declare const getCurrentTechnologies: () => TTechnology[];
39
40
  declare const _default: {
40
41
  login: (identification: string, password: string) => Promise<any>;
@@ -60,5 +61,6 @@ declare const _default: {
60
61
  updateRigoAssetID: (token: string, slug: string, asset_id: number) => Promise<any>;
61
62
  createRigoPackage: (token: string, slug: string, config: any) => Promise<any>;
62
63
  getCurrentTechnologies: () => TTechnology[];
64
+ updateTechnologiesPeriodically: typeof updateTechnologiesPeriodically;
63
65
  };
64
66
  export default _default;
package/lib/utils/api.js CHANGED
@@ -492,7 +492,6 @@ async function updateTechnologiesPeriodically() {
492
492
  setTimeout(updateTechnologiesPeriodically, 24 * 60 * 60 * 1000);
493
493
  }
494
494
  }
495
- updateTechnologiesPeriodically();
496
495
  const getCurrentTechnologies = () => technologiesCache;
497
496
  exports.getCurrentTechnologies = getCurrentTechnologies;
498
497
  exports.default = {
@@ -513,4 +512,5 @@ exports.default = {
513
512
  updateRigoAssetID,
514
513
  createRigoPackage,
515
514
  getCurrentTechnologies: exports.getCurrentTechnologies,
515
+ updateTechnologiesPeriodically,
516
516
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@learnpack/learnpack",
3
3
  "description": "Seamlessly build, sell and/or take interactive & auto-graded tutorials, start learning now or build a new tutorial to your audience.",
4
- "version": "5.0.246",
4
+ "version": "5.0.250",
5
5
  "author": "Alejandro Sanchez @alesanchezr",
6
6
  "contributors": [
7
7
  {
@@ -334,6 +334,8 @@ export default class ServeCommand extends SessionCommand {
334
334
  process.exit(1)
335
335
  }
336
336
 
337
+ await api.updateTechnologiesPeriodically()
338
+
337
339
  const credentials = JSON.parse(crendsEnv)
338
340
  const bucketStorage = new Storage({
339
341
  credentials,
@@ -25,7 +25,7 @@ import { Sidebar } from "./Sidebar"
25
25
  import Login from "../Login"
26
26
  import { useNavigate } from "react-router"
27
27
  import { ParamsChecker } from "../ParamsChecker"
28
- import { randomUUID, slugify } from "../../utils/creatorUtils"
28
+ import { randomUUID } from "../../utils/creatorUtils"
29
29
  import { RIGO_FLOAT_GIF } from "../../utils/constants"
30
30
  import { useTranslation } from "react-i18next"
31
31
  import NotificationListener from "../NotificationListener"
package/src/utils/api.ts CHANGED
@@ -627,8 +627,6 @@ async function updateTechnologiesPeriodically() {
627
627
  }
628
628
  }
629
629
 
630
- updateTechnologiesPeriodically()
631
-
632
630
  export const getCurrentTechnologies = () => technologiesCache
633
631
 
634
632
  export default {
@@ -649,4 +647,5 @@ export default {
649
647
  updateRigoAssetID,
650
648
  createRigoPackage,
651
649
  getCurrentTechnologies,
650
+ updateTechnologiesPeriodically,
652
651
  }