@learnpack/learnpack 5.0.69 → 5.0.71

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.
Files changed (30) hide show
  1. package/README.md +13 -13
  2. package/lib/commands/init.js +1 -1
  3. package/lib/commands/serve.js +12 -3
  4. package/lib/creatorDist/assets/{index-C7bLE5wU.js → index-Dm2fdeOs.js} +9076 -8991
  5. package/lib/creatorDist/assets/{index-C_Rp91QE.css → index-k_eF99Sf.css} +103 -45
  6. package/lib/creatorDist/index.html +2 -2
  7. package/lib/creatorDist/rigo-float.gif +0 -0
  8. package/oclif.manifest.json +1 -1
  9. package/package.json +1 -1
  10. package/src/commands/init.ts +1 -1
  11. package/src/commands/serve.ts +13 -5
  12. package/src/creator/public/rigo-float.gif +0 -0
  13. package/src/creator/src/App.tsx +203 -163
  14. package/src/creator/src/assets/svgs.tsx +2 -2
  15. package/src/creator/src/components/LessonItem.tsx +10 -3
  16. package/src/creator/src/components/Login.tsx +14 -18
  17. package/src/creator/src/components/Message.tsx +12 -2
  18. package/src/creator/src/components/Redirector.tsx +12 -0
  19. package/src/creator/src/components/StepWizard.tsx +32 -18
  20. package/src/creator/src/components/syllabus/ContentIndex.tsx +47 -20
  21. package/src/creator/src/components/syllabus/Sidebar.tsx +114 -0
  22. package/src/creator/src/components/syllabus/SyllabusEditor.tsx +20 -125
  23. package/src/creator/src/index.css +2 -6
  24. package/src/creator/src/main.tsx +0 -1
  25. package/src/creator/src/utils/store.ts +14 -3
  26. package/src/creatorDist/assets/{index-C7bLE5wU.js → index-Dm2fdeOs.js} +9076 -8991
  27. package/src/creatorDist/assets/{index-C_Rp91QE.css → index-k_eF99Sf.css} +103 -45
  28. package/src/creatorDist/index.html +2 -2
  29. package/src/creatorDist/rigo-float.gif +0 -0
  30. package/src/utils/creds.json +13 -0
@@ -42,6 +42,8 @@
42
42
  --tw-ring-offset-width: 0px;
43
43
  --tw-ring-offset-color: #fff;
44
44
  --tw-ring-offset-shadow: 0 0 #0000;
45
+ --tw-duration: initial;
46
+ --tw-ease: initial;
45
47
  }
46
48
  }
47
49
  }
@@ -84,8 +86,6 @@
84
86
  --text-sm--line-height: calc(1.25 / 0.875);
85
87
  --text-lg: 1.125rem;
86
88
  --text-lg--line-height: calc(1.75 / 1.125);
87
- --text-xl: 1.25rem;
88
- --text-xl--line-height: calc(1.75 / 1.25);
89
89
  --text-4xl: 2.25rem;
90
90
  --text-4xl--line-height: calc(2.5 / 2.25);
91
91
  --font-weight-medium: 500;
@@ -95,6 +95,7 @@
95
95
  --radius-md: 0.375rem;
96
96
  --radius-lg: 0.5rem;
97
97
  --radius-xl: 0.75rem;
98
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
98
99
  --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
99
100
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
100
101
  --default-transition-duration: 0.15s;
@@ -364,6 +365,9 @@
364
365
  .absolute {
365
366
  position: absolute;
366
367
  }
368
+ .fixed {
369
+ position: fixed;
370
+ }
367
371
  .relative {
368
372
  position: relative;
369
373
  }
@@ -373,6 +377,12 @@
373
377
  .-top-3 {
374
378
  top: calc(var(--spacing) * -3);
375
379
  }
380
+ .top-0 {
381
+ top: calc(var(--spacing) * 0);
382
+ }
383
+ .top-2 {
384
+ top: calc(var(--spacing) * 2);
385
+ }
376
386
  .right-0 {
377
387
  right: calc(var(--spacing) * 0);
378
388
  }
@@ -388,21 +398,27 @@
388
398
  .bottom-3 {
389
399
  bottom: calc(var(--spacing) * 3);
390
400
  }
391
- .bottom-4 {
392
- bottom: calc(var(--spacing) * 4);
393
- }
394
401
  .left-0 {
395
402
  left: calc(var(--spacing) * 0);
396
403
  }
397
404
  .left-1\/2 {
398
405
  left: 50%;
399
406
  }
407
+ .left-2 {
408
+ left: calc(var(--spacing) * 2);
409
+ }
400
410
  .z-10 {
401
411
  z-index: 10;
402
412
  }
403
413
  .z-20 {
404
414
  z-index: 20;
405
415
  }
416
+ .z-40 {
417
+ z-index: 40;
418
+ }
419
+ .z-50 {
420
+ z-index: 50;
421
+ }
406
422
  .container {
407
423
  width: 100%;
408
424
  }
@@ -500,14 +516,23 @@
500
516
  .h-24 {
501
517
  height: calc(var(--spacing) * 24);
502
518
  }
519
+ .h-40 {
520
+ height: calc(var(--spacing) * 40);
521
+ }
522
+ .h-50 {
523
+ height: calc(var(--spacing) * 50);
524
+ }
525
+ .h-\[85\%\] {
526
+ height: 85%;
527
+ }
503
528
  .h-full {
504
529
  height: 100%;
505
530
  }
506
531
  .h-screen {
507
532
  height: 100vh;
508
533
  }
509
- .max-h-\[70vh\] {
510
- max-height: 70vh;
534
+ .max-h-\[80vh\] {
535
+ max-height: 80vh;
511
536
  }
512
537
  .max-h-\[300px\] {
513
538
  max-height: 300px;
@@ -515,23 +540,20 @@
515
540
  .min-h-screen {
516
541
  min-height: 100vh;
517
542
  }
518
- .w-1\/3 {
519
- width: 33.3333%;
520
- }
521
543
  .w-2 {
522
544
  width: calc(var(--spacing) * 2);
523
545
  }
524
- .w-2\/3 {
525
- width: 66.6667%;
526
- }
527
546
  .w-3 {
528
547
  width: calc(var(--spacing) * 3);
529
548
  }
549
+ .w-4\/5 {
550
+ width: 80%;
551
+ }
530
552
  .w-6 {
531
553
  width: calc(var(--spacing) * 6);
532
554
  }
533
- .w-\[90\%\] {
534
- width: 90%;
555
+ .w-20 {
556
+ width: calc(var(--spacing) * 20);
535
557
  }
536
558
  .w-full {
537
559
  width: 100%;
@@ -555,6 +577,14 @@
555
577
  --tw-translate-x: -50%;
556
578
  translate: var(--tw-translate-x) var(--tw-translate-y);
557
579
  }
580
+ .-translate-x-full {
581
+ --tw-translate-x: -100%;
582
+ translate: var(--tw-translate-x) var(--tw-translate-y);
583
+ }
584
+ .translate-x-0 {
585
+ --tw-translate-x: calc(var(--spacing) * 0);
586
+ translate: var(--tw-translate-x) var(--tw-translate-y);
587
+ }
558
588
  .transform {
559
589
  transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z)
560
590
  var(--tw-skew-x) var(--tw-skew-y);
@@ -571,9 +601,6 @@
571
601
  .resize {
572
602
  resize: both;
573
603
  }
574
- .resize-none {
575
- resize: none;
576
- }
577
604
  .flex-col {
578
605
  flex-direction: column;
579
606
  }
@@ -743,6 +770,9 @@
743
770
  var(--tw-gradient-to) var(--tw-gradient-to-position)
744
771
  );
745
772
  }
773
+ .p-1 {
774
+ padding: calc(var(--spacing) * 1);
775
+ }
746
776
  .p-2 {
747
777
  padding: calc(var(--spacing) * 2);
748
778
  }
@@ -773,8 +803,11 @@
773
803
  .pr-2 {
774
804
  padding-right: calc(var(--spacing) * 2);
775
805
  }
776
- .pb-16 {
777
- padding-bottom: calc(var(--spacing) * 16);
806
+ .pb-5 {
807
+ padding-bottom: calc(var(--spacing) * 5);
808
+ }
809
+ .pb-32 {
810
+ padding-bottom: calc(var(--spacing) * 32);
778
811
  }
779
812
  .text-center {
780
813
  text-align: center;
@@ -797,10 +830,6 @@
797
830
  font-size: var(--text-sm);
798
831
  line-height: var(--tw-leading, var(--text-sm--line-height));
799
832
  }
800
- .text-xl {
801
- font-size: var(--text-xl);
802
- line-height: var(--tw-leading, var(--text-xl--line-height));
803
- }
804
833
  .text-\[10px\] {
805
834
  font-size: 10px;
806
835
  }
@@ -865,12 +894,6 @@
865
894
  .opacity-30 {
866
895
  opacity: 0.3;
867
896
  }
868
- .shadow {
869
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a),
870
- 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
871
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow),
872
- var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
873
- }
874
897
  .shadow-md {
875
898
  --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a),
876
899
  0 2px 4px -2px var(--tw-shadow-color, #0000001a);
@@ -891,6 +914,22 @@
891
914
  );
892
915
  transition-duration: var(--tw-duration, var(--default-transition-duration));
893
916
  }
917
+ .transition-transform {
918
+ transition-property: transform, translate, scale, rotate;
919
+ transition-timing-function: var(
920
+ --tw-ease,
921
+ var(--default-transition-timing-function)
922
+ );
923
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
924
+ }
925
+ .duration-300 {
926
+ --tw-duration: 0.3s;
927
+ transition-duration: 0.3s;
928
+ }
929
+ .ease-in-out {
930
+ --tw-ease: var(--ease-in-out);
931
+ transition-timing-function: var(--ease-in-out);
932
+ }
894
933
  @media (hover: hover) {
895
934
  .hover\:bg-blue-50:hover {
896
935
  background-color: var(--color-blue-50);
@@ -926,6 +965,29 @@
926
965
  .disabled\:opacity-40:disabled {
927
966
  opacity: 0.4;
928
967
  }
968
+ @media (min-width: 48rem) {
969
+ .md\:flex-row {
970
+ flex-direction: row;
971
+ }
972
+ }
973
+ @media (min-width: 64rem) {
974
+ .lg\:relative {
975
+ position: relative;
976
+ }
977
+ .lg\:hidden {
978
+ display: none;
979
+ }
980
+ .lg\:w-1\/3 {
981
+ width: 33.3333%;
982
+ }
983
+ .lg\:translate-x-0 {
984
+ --tw-translate-x: calc(var(--spacing) * 0);
985
+ translate: var(--tw-translate-x) var(--tw-translate-y);
986
+ }
987
+ .lg\:transform-none {
988
+ transform: none;
989
+ }
990
+ }
929
991
  }
930
992
  :root {
931
993
  color-scheme: light dark;
@@ -993,13 +1055,14 @@ h1 {
993
1055
  display: flex;
994
1056
  }
995
1057
  @keyframes spin {
1058
+ 0% {
1059
+ transform: rotate(0);
1060
+ }
996
1061
  to {
997
1062
  transform: rotate(360deg);
998
1063
  }
999
1064
  }
1000
1065
  .loader-icon {
1001
- border: 2px solid var(--loader-color);
1002
- border-top-color: #0000;
1003
1066
  justify-content: center;
1004
1067
  align-items: center;
1005
1068
  width: 40px;
@@ -1007,19 +1070,6 @@ h1 {
1007
1070
  display: flex;
1008
1071
  position: relative;
1009
1072
  }
1010
- .loader-icon:after {
1011
- content: "";
1012
- border: 2px solid var(--gray-text);
1013
- border-top: 2px solid var(--learnpack-blue);
1014
- border-radius: 50%;
1015
- width: 100%;
1016
- height: 100%;
1017
- animation: 2s linear infinite spin;
1018
- display: block;
1019
- position: absolute;
1020
- top: 0;
1021
- left: 0;
1022
- }
1023
1073
  @keyframes glowing {
1024
1074
  0% {
1025
1075
  opacity: 0.6;
@@ -1202,6 +1252,14 @@ h1 {
1202
1252
  inherits: false;
1203
1253
  initial-value: 0 0 #0000;
1204
1254
  }
1255
+ @property --tw-duration {
1256
+ syntax: "*";
1257
+ inherits: false;
1258
+ }
1259
+ @property --tw-ease {
1260
+ syntax: "*";
1261
+ inherits: false;
1262
+ }
1205
1263
  @keyframes ping {
1206
1264
  75%,
1207
1265
  to {
@@ -10,8 +10,8 @@
10
10
  />
11
11
 
12
12
  <title>Learnpack Creator: Craft tutorials in seconds!</title>
13
- <script type="module" crossorigin src="/creator/assets/index-C7bLE5wU.js"></script>
14
- <link rel="stylesheet" crossorigin href="/creator/assets/index-C_Rp91QE.css">
13
+ <script type="module" crossorigin src="/creator/assets/index-Dm2fdeOs.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/creator/assets/index-k_eF99Sf.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
Binary file
@@ -1 +1 @@
1
- {"version":"5.0.69","commands":{"audit":{"id":"audit","description":"learnpack audit is the command in charge of creating an auditory of the repository\n...\nlearnpack audit checks for the following information in a repository:\n 1. The configuration object has slug, repository and description. (Error)\n 2. The command learnpack clean has been run. (Error)\n 3. If a markdown or test file doesn't have any content. (Error)\n 4. The links are accessing to valid servers. (Error)\n 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)\n 6. The external images are working (If they are pointing to a valid server). (Error)\n 7. The exercises directory names are valid. (Error)\n 8. If an exercise doesn't have a README file. (Error)\n 9. The exercises array (Of the config file) has content. (Error)\n 10. The exercses have the same translations. (Warning)\n 11. The .gitignore file exists. (Warning)\n 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false}},"args":[]},"breakToken":{"id":"breakToken","description":"Break the token","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"clean":{"id":"clean","description":"Clean the configuration object\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"download":{"id":"download","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"init":{"id":"init","description":"Create a new learning package: Book, Tutorial or Exercise","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"logout":{"id":"logout","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"publish":{"id":"publish","description":"Builds the project by copying necessary files and directories into a zip file","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"serve":{"id":"serve","description":"Runs a small server to build tutorials","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"disableGrading":{"name":"disableGrading","type":"boolean","char":"D","description":"disble grading functionality","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watch for file changes","allowNo":false},"editor":{"name":"editor","type":"option","char":"e","description":"[preview, extension]","options":["extension","preview"]},"version":{"name":"version","type":"option","char":"v","description":"E.g: 1.0.1"},"grading":{"name":"grading","type":"option","char":"g","description":"[isolated, incremental]","options":["isolated","incremental"]},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"test":{"id":"test","description":"Test exercises","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[{"name":"exerciseSlug","description":"The name of the exercise to test","required":false,"hidden":false}]},"translate":{"id":"translate","description":"List all the lessons, the user is able of select many of them to translate to the given languages","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[]}}}
1
+ {"version":"5.0.71","commands":{"audit":{"id":"audit","description":"learnpack audit is the command in charge of creating an auditory of the repository\n...\nlearnpack audit checks for the following information in a repository:\n 1. The configuration object has slug, repository and description. (Error)\n 2. The command learnpack clean has been run. (Error)\n 3. If a markdown or test file doesn't have any content. (Error)\n 4. The links are accessing to valid servers. (Error)\n 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)\n 6. The external images are working (If they are pointing to a valid server). (Error)\n 7. The exercises directory names are valid. (Error)\n 8. If an exercise doesn't have a README file. (Error)\n 9. The exercises array (Of the config file) has content. (Error)\n 10. The exercses have the same translations. (Warning)\n 11. The .gitignore file exists. (Warning)\n 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false}},"args":[]},"breakToken":{"id":"breakToken","description":"Break the token","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"clean":{"id":"clean","description":"Clean the configuration object\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"download":{"id":"download","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"init":{"id":"init","description":"Create a new learning package: Book, Tutorial or Exercise","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"logout":{"id":"logout","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"publish":{"id":"publish","description":"Builds the project by copying necessary files and directories into a zip file","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"serve":{"id":"serve","description":"Runs a small server to build tutorials","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"disableGrading":{"name":"disableGrading","type":"boolean","char":"D","description":"disble grading functionality","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watch for file changes","allowNo":false},"editor":{"name":"editor","type":"option","char":"e","description":"[preview, extension]","options":["extension","preview"]},"version":{"name":"version","type":"option","char":"v","description":"E.g: 1.0.1"},"grading":{"name":"grading","type":"option","char":"g","description":"[isolated, incremental]","options":["isolated","incremental"]},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"test":{"id":"test","description":"Test exercises","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[{"name":"exerciseSlug","description":"The name of the exercise to test","required":false,"hidden":false}]},"translate":{"id":"translate","description":"List all the lessons, the user is able of select many of them to translate to the given languages","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[]}}}
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.69",
4
+ "version": "5.0.71",
5
5
  "author": "Alejandro Sanchez @alesanchezr",
6
6
  "contributors": [
7
7
  {
@@ -269,7 +269,7 @@ const handleAILogic = async (tutorialDir: string, packageInfo: PackageInfo) => {
269
269
 
270
270
  if (!sessionExists || !isValidBreathecodeToken || !isValidToken) {
271
271
  Console.info(
272
- "Almost there! First you need to login with 4Geeks.com to use AI Generation tool for creators. You can create a new account here: https://4geeks.com/creators"
272
+ "Almost there! First you need to login with 4Geeks.com to use AI Generation tool for creators. You can create a new account here: https://4geeks.com/checkout?plan=4geeks-creator"
273
273
  )
274
274
  try {
275
275
  sessionPayload = await SessionManager.login()
@@ -49,7 +49,6 @@ export default class ServeCommand extends SessionCommand {
49
49
  }
50
50
 
51
51
  const credentials = JSON.parse(crendsEnv)
52
-
53
52
  const bucketStorage = new Storage({
54
53
  credentials,
55
54
  })
@@ -126,14 +125,23 @@ export default class ServeCommand extends SessionCommand {
126
125
  stream.end(buffer)
127
126
  })
128
127
 
128
+ app.get("/create", (req, res) => {
129
+ console.log("GET /create")
130
+ res.redirect("/creator/")
131
+ })
132
+
129
133
  app.get("/", async (req, res) => {
130
- // The the ui/_app/index.html
131
134
  console.log("GET /")
132
135
 
133
- const file = path.resolve(__dirname, "../ui/_app/index.html")
134
- res.sendFile(file)
135
- })
136
+ const slug = req.query.slug
136
137
 
138
+ if (slug) {
139
+ const file = path.resolve(__dirname, "../ui/_app/index.html")
140
+ res.sendFile(file)
141
+ } else {
142
+ res.redirect("https://learnpack.co")
143
+ }
144
+ })
137
145
  app.get("/config", async (req, res) => {
138
146
  const courseSlug = req.query.slug
139
147
  const files = await listFilesWithPrefix(`courses/${courseSlug}`)