@learnpack/learnpack 5.0.308 → 5.0.310
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/README.md +409 -409
- package/lib/commands/audit.js +15 -15
- package/lib/commands/breakToken.js +19 -19
- package/lib/commands/clean.js +3 -3
- package/lib/commands/logout.js +3 -3
- package/lib/commands/serve.js +16 -16
- package/lib/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
- package/lib/creatorDist/index.html +1 -1
- package/lib/managers/config/index.js +77 -77
- package/lib/utils/creatorUtilities.js +14 -14
- package/lib/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
- package/lib/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
- package/lib/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
- package/lib/utils/templates/scorm/config/index.html +209 -209
- package/lib/utils/templates/scorm/ims_xml.xsd +1 -1
- package/lib/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
- package/lib/utils/templates/scorm/imsmanifest.xml +38 -38
- package/lib/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
- package/package.json +1 -1
- package/src/commands/audit.ts +487 -487
- package/src/commands/breakToken.ts +67 -67
- package/src/commands/clean.ts +30 -30
- package/src/commands/logout.ts +38 -38
- package/src/commands/publish.ts +517 -517
- package/src/commands/serve.ts +3179 -3179
- package/src/commands/start.ts +333 -333
- package/src/commands/translate.ts +123 -123
- package/src/creator/README.md +54 -54
- package/src/creator/package-lock.json +6621 -6621
- package/src/creator/package.json +55 -55
- package/src/creator/src/App.tsx +611 -608
- package/src/creator/src/components/FileUploader.tsx +340 -302
- package/src/creator/src/components/Icon.tsx +18 -18
- package/src/creator/src/components/LessonItem.tsx +152 -152
- package/src/creator/src/components/Login.tsx +259 -259
- package/src/creator/src/components/ParamsChecker.tsx +25 -25
- package/src/creator/src/components/Uploader.tsx +3 -6
- package/src/creator/src/components/syllabus/ContentIndex.tsx +323 -323
- package/src/creator/src/components/syllabus/SyllabusEditor.tsx +341 -337
- package/src/creator/src/i18n.ts +28 -28
- package/src/creator/src/locales/en.json +139 -138
- package/src/creator/src/locales/es.json +139 -138
- package/src/creator/src/utils/configTypes.ts +122 -122
- package/src/creator/src/utils/constants.ts +13 -13
- package/src/creator/src/utils/creatorUtils.ts +46 -46
- package/src/creator/src/utils/eventBus.ts +2 -2
- package/src/creator/src/utils/lib.ts +172 -172
- package/src/creator/src/utils/rigo.ts +1 -1
- package/src/creator/src/utils/socket.ts +61 -61
- package/src/creator/src/utils/store.ts +222 -222
- package/src/creator/src/vite-env.d.ts +1 -1
- package/src/creator/vite.config.ts +13 -13
- package/src/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
- package/src/creatorDist/index.html +1 -1
- package/src/managers/config/defaults.ts +49 -49
- package/src/managers/config/exercise.ts +364 -364
- package/src/managers/config/index.ts +775 -775
- package/src/managers/file.ts +236 -236
- package/src/managers/server/routes.ts +554 -554
- package/src/managers/telemetry.ts +188 -188
- package/src/models/action.ts +13 -13
- package/src/models/config-manager.ts +28 -28
- package/src/models/config.ts +106 -106
- package/src/models/exercise-obj.ts +30 -30
- package/src/models/session.ts +39 -39
- package/src/models/socket.ts +61 -61
- package/src/models/status.ts +16 -16
- package/src/ui/_app/app.css +1 -1
- package/src/ui/_app/app.js +477 -407
- package/src/ui/app.tar.gz +0 -0
- package/src/utils/BaseCommand.ts +56 -56
- package/src/utils/api.ts +665 -665
- package/src/utils/audit.ts +392 -392
- package/src/utils/checkNotInstalled.ts +267 -267
- package/src/utils/convertCreds.js +34 -34
- package/src/utils/creatorUtilities.ts +504 -504
- package/src/utils/export/README.md +178 -178
- package/src/utils/incrementVersion.js +74 -74
- package/src/utils/misc.ts +58 -58
- package/src/utils/sidebarGenerator.ts +195 -195
- package/src/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
- package/src/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
- package/src/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
- package/src/utils/templates/scorm/config/index.html +209 -209
- package/src/utils/templates/scorm/ims_xml.xsd +1 -1
- package/src/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
- package/src/utils/templates/scorm/imsmanifest.xml +38 -38
- package/src/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
package/lib/commands/audit.js
CHANGED
|
@@ -369,21 +369,21 @@ class AuditCommand extends SessionCommand_1.default {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
AuditCommand.description = `learnpack audit is the command in charge of creating an auditory of the repository
|
|
373
|
-
...
|
|
374
|
-
learnpack audit checks for the following information in a repository:
|
|
375
|
-
1. The configuration object has slug, repository and description. (Error)
|
|
376
|
-
2. The command learnpack clean has been run. (Error)
|
|
377
|
-
3. If a markdown or test file doesn't have any content. (Error)
|
|
378
|
-
4. The links are accessing to valid servers. (Error)
|
|
379
|
-
5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)
|
|
380
|
-
6. The external images are working (If they are pointing to a valid server). (Error)
|
|
381
|
-
7. The exercises directory names are valid. (Error)
|
|
382
|
-
8. If an exercise doesn't have a README file. (Error)
|
|
383
|
-
9. The exercises array (Of the config file) has content. (Error)
|
|
384
|
-
10. The exercses have the same translations. (Warning)
|
|
385
|
-
11. The .gitignore file exists. (Warning)
|
|
386
|
-
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
|
372
|
+
AuditCommand.description = `learnpack audit is the command in charge of creating an auditory of the repository
|
|
373
|
+
...
|
|
374
|
+
learnpack audit checks for the following information in a repository:
|
|
375
|
+
1. The configuration object has slug, repository and description. (Error)
|
|
376
|
+
2. The command learnpack clean has been run. (Error)
|
|
377
|
+
3. If a markdown or test file doesn't have any content. (Error)
|
|
378
|
+
4. The links are accessing to valid servers. (Error)
|
|
379
|
+
5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)
|
|
380
|
+
6. The external images are working (If they are pointing to a valid server). (Error)
|
|
381
|
+
7. The exercises directory names are valid. (Error)
|
|
382
|
+
8. If an exercise doesn't have a README file. (Error)
|
|
383
|
+
9. The exercises array (Of the config file) has content. (Error)
|
|
384
|
+
10. The exercses have the same translations. (Warning)
|
|
385
|
+
11. The .gitignore file exists. (Warning)
|
|
386
|
+
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
|
387
387
|
`;
|
|
388
388
|
AuditCommand.flags = {
|
|
389
389
|
strict: command_1.flags.boolean({
|
|
@@ -4,25 +4,25 @@ const command_1 = require("@oclif/command");
|
|
|
4
4
|
const BaseCommand_1 = require("../utils/BaseCommand");
|
|
5
5
|
const console_1 = require("../utils/console");
|
|
6
6
|
const creatorUtilities_1 = require("../utils/creatorUtilities");
|
|
7
|
-
const exampleMd = `# How to Install Node.js
|
|
8
|
-
|
|
9
|
-
Node.js lets you run JavaScript outside a web browser.
|
|
10
|
-
|
|
11
|
-
## Step 1: Download Node.js
|
|
12
|
-
|
|
13
|
-
Get the Node.js installer from the [official site](https://nodejs.org/en/download/).
|
|
14
|
-
|
|
15
|
-
## Step 2: Install Node.js
|
|
16
|
-
|
|
17
|
-
Open the installer and follow the steps to finish.
|
|
18
|
-
|
|
19
|
-
## Step 3: Verify the Installation
|
|
20
|
-
|
|
21
|
-
Open a terminal and type:
|
|
22
|
-
|
|
23
|
-
\`\`\`bash
|
|
24
|
-
node -v
|
|
25
|
-
\`\`\`
|
|
7
|
+
const exampleMd = `# How to Install Node.js
|
|
8
|
+
|
|
9
|
+
Node.js lets you run JavaScript outside a web browser.
|
|
10
|
+
|
|
11
|
+
## Step 1: Download Node.js
|
|
12
|
+
|
|
13
|
+
Get the Node.js installer from the [official site](https://nodejs.org/en/download/).
|
|
14
|
+
|
|
15
|
+
## Step 2: Install Node.js
|
|
16
|
+
|
|
17
|
+
Open the installer and follow the steps to finish.
|
|
18
|
+
|
|
19
|
+
## Step 3: Verify the Installation
|
|
20
|
+
|
|
21
|
+
Open a terminal and type:
|
|
22
|
+
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
node -v
|
|
25
|
+
\`\`\`
|
|
26
26
|
`;
|
|
27
27
|
class BreakTokenCommand extends BaseCommand_1.default {
|
|
28
28
|
async run() {
|
package/lib/commands/clean.js
CHANGED
|
@@ -16,9 +16,9 @@ class CleanCommand extends SessionCommand_1.default {
|
|
|
16
16
|
console_1.default.success("Package cleaned successfully, ready to publish");
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
CleanCommand.description = `Clean the configuration object
|
|
20
|
-
...
|
|
21
|
-
Extra documentation goes here
|
|
19
|
+
CleanCommand.description = `Clean the configuration object
|
|
20
|
+
...
|
|
21
|
+
Extra documentation goes here
|
|
22
22
|
`;
|
|
23
23
|
CleanCommand.flags = {
|
|
24
24
|
// name: flags.string({char: 'n', description: 'name to print'}),
|
package/lib/commands/logout.js
CHANGED
|
@@ -14,9 +14,9 @@ class LogoutCommand extends SessionCommand_1.default {
|
|
|
14
14
|
session_1.default.destroy();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
LogoutCommand.description = `Describe the command here
|
|
18
|
-
...
|
|
19
|
-
Extra documentation goes here
|
|
17
|
+
LogoutCommand.description = `Describe the command here
|
|
18
|
+
...
|
|
19
|
+
Extra documentation goes here
|
|
20
20
|
`;
|
|
21
21
|
LogoutCommand.flags = {
|
|
22
22
|
// name: flags.string({char: 'n', description: 'name to print'}),
|
package/lib/commands/serve.js
CHANGED
|
@@ -75,18 +75,18 @@ async function fetchComponentsYml() {
|
|
|
75
75
|
axios_1.default.get("https://raw.githubusercontent.com/learnpack/ide/refs/heads/master/docs/assessment_components.yml"),
|
|
76
76
|
axios_1.default.get("https://raw.githubusercontent.com/learnpack/ide/refs/heads/master/docs/explanatory_components.yml"),
|
|
77
77
|
]);
|
|
78
|
-
const combinedContent = `
|
|
79
|
-
# ASSESSMENT COMPONENTS
|
|
80
|
-
These components are designed for evaluation and knowledge assessment:
|
|
81
|
-
|
|
82
|
-
${assessmentResponse.data}
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
# EXPLANATORY COMPONENTS
|
|
87
|
-
These components are designed for explanation and learning support:
|
|
88
|
-
|
|
89
|
-
${explanatoryResponse.data}
|
|
78
|
+
const combinedContent = `
|
|
79
|
+
# ASSESSMENT COMPONENTS
|
|
80
|
+
These components are designed for evaluation and knowledge assessment:
|
|
81
|
+
|
|
82
|
+
${assessmentResponse.data}
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
# EXPLANATORY COMPONENTS
|
|
87
|
+
These components are designed for explanation and learning support:
|
|
88
|
+
|
|
89
|
+
${explanatoryResponse.data}
|
|
90
90
|
`;
|
|
91
91
|
return combinedContent;
|
|
92
92
|
}
|
|
@@ -120,10 +120,10 @@ const createInitialSidebar = async (slugs, initialLanguage = "en") => {
|
|
|
120
120
|
return sidebar;
|
|
121
121
|
};
|
|
122
122
|
const uploadInitialReadme = async (bucket, exSlug, targetDir, packageContext) => {
|
|
123
|
-
const isGeneratingText = `
|
|
124
|
-
\`\`\`loader slug="${exSlug}"
|
|
125
|
-
:rigo
|
|
126
|
-
\`\`\`
|
|
123
|
+
const isGeneratingText = `
|
|
124
|
+
\`\`\`loader slug="${exSlug}"
|
|
125
|
+
:rigo
|
|
126
|
+
\`\`\`
|
|
127
127
|
`;
|
|
128
128
|
const readmeFilename = `README${(0, creatorUtilities_1.getReadmeExtension)(packageContext.language || "en")}`;
|
|
129
129
|
await uploadFileToBucket(bucket, isGeneratingText, `${targetDir}/${readmeFilename}`);
|