@learnpack/learnpack 5.0.7 → 5.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/README.md +17 -17
  2. package/bin/run +17 -17
  3. package/bin/run.cmd +3 -3
  4. package/lib/commands/audit.js +34 -22
  5. package/lib/commands/clean.js +3 -3
  6. package/lib/commands/download.js +3 -3
  7. package/lib/commands/login.js +3 -3
  8. package/lib/commands/logout.js +3 -3
  9. package/lib/managers/config/index.d.ts +10 -0
  10. package/lib/managers/config/index.js +3 -1
  11. package/oclif.manifest.json +1 -1
  12. package/package.json +152 -152
  13. package/src/commands/audit.ts +449 -443
  14. package/src/commands/clean.ts +29 -29
  15. package/src/commands/download.ts +61 -61
  16. package/src/commands/login.ts +42 -42
  17. package/src/commands/logout.ts +43 -43
  18. package/src/commands/publish.ts +249 -249
  19. package/src/commands/test.ts +85 -85
  20. package/src/index.ts +1 -1
  21. package/src/managers/config/allowed_files.ts +29 -29
  22. package/src/managers/config/index.ts +6 -4
  23. package/src/managers/gitpod.ts +84 -84
  24. package/src/managers/server/index.ts +78 -78
  25. package/src/managers/telemetry.ts +353 -353
  26. package/src/managers/test.ts +83 -83
  27. package/src/models/audit.ts +16 -16
  28. package/src/models/config-manager.ts +23 -23
  29. package/src/models/counter.ts +11 -11
  30. package/src/models/errors.ts +22 -22
  31. package/src/models/exercise-obj.ts +29 -29
  32. package/src/models/file.ts +5 -5
  33. package/src/models/findings.ts +18 -18
  34. package/src/models/flags.ts +10 -10
  35. package/src/models/front-matter.ts +11 -11
  36. package/src/models/gitpod-data.ts +19 -19
  37. package/src/models/language.ts +4 -4
  38. package/src/models/package.ts +7 -7
  39. package/src/models/plugin-config.ts +17 -17
  40. package/src/models/success-types.ts +1 -1
  41. package/src/plugin/command/compile.ts +17 -17
  42. package/src/plugin/command/test.ts +30 -30
  43. package/src/plugin/index.ts +6 -6
  44. package/src/plugin/plugin.ts +94 -94
  45. package/src/plugin/utils.ts +87 -87
  46. package/src/types/node-fetch.d.ts +1 -1
  47. package/src/ui/download.ts +71 -71
  48. package/src/utils/BaseCommand.ts +48 -48
  49. package/src/utils/SessionCommand.ts +43 -43
  50. package/src/utils/audit.ts +393 -393
  51. package/src/utils/errors.ts +117 -117
  52. package/src/utils/exercisesQueue.ts +51 -51
  53. package/src/utils/fileQueue.ts +199 -199
  54. package/src/utils/misc.ts +23 -23
  55. package/src/utils/osOperations.ts +79 -79
  56. package/src/utils/templates/gitignore.txt +19 -19
  57. package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +24 -24
  58. package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +24 -24
  59. package/src/utils/templates/incremental/.vscode/schema.json +121 -121
  60. package/src/utils/templates/incremental/.vscode/settings.json +13 -13
  61. package/src/utils/templates/incremental/README.ejs +4 -4
  62. package/src/utils/templates/incremental/README.es.ejs +4 -4
  63. package/src/utils/templates/isolated/.vscode/schema.json +121 -121
  64. package/src/utils/templates/isolated/.vscode/settings.json +13 -13
  65. package/src/utils/templates/isolated/README.ejs +4 -4
  66. package/src/utils/templates/isolated/README.es.ejs +4 -4
  67. package/src/utils/templates/no-grading/README.ejs +4 -4
  68. package/src/utils/templates/no-grading/README.es.ejs +4 -4
  69. package/src/utils/validators.ts +18 -18
  70. package/src/utils/watcher.ts +27 -27
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @learnpack/learnpack
21
21
  $ learnpack COMMAND
22
22
  running command...
23
23
  $ learnpack (-v|--version|version)
24
- @learnpack/learnpack/5.0.7 win32-x64 node-v20.16.0
24
+ @learnpack/learnpack/5.0.9 darwin-arm64 node-v16.20.0
25
25
  $ learnpack --help [COMMAND]
26
26
  USAGE
27
27
  $ learnpack COMMAND
@@ -75,7 +75,7 @@ DESCRIPTION
75
75
  12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
76
76
  ```
77
77
 
78
- _See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\audit.ts)_
78
+ _See code: [src/commands/audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/audit.ts)_
79
79
 
80
80
  ## `learnpack clean`
81
81
 
@@ -90,7 +90,7 @@ DESCRIPTION
90
90
  Extra documentation goes here
91
91
  ```
92
92
 
93
- _See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\clean.ts)_
93
+ _See code: [src/commands/clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/clean.ts)_
94
94
 
95
95
  ## `learnpack download [PACKAGE]`
96
96
 
@@ -108,7 +108,7 @@ DESCRIPTION
108
108
  Extra documentation goes here
109
109
  ```
110
110
 
111
- _See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\download.ts)_
111
+ _See code: [src/commands/download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/download.ts)_
112
112
 
113
113
  ## `learnpack help [COMMAND]`
114
114
 
@@ -125,7 +125,7 @@ OPTIONS
125
125
  --all see all commands in CLI
126
126
  ```
127
127
 
128
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src\commands\help.ts)_
128
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_
129
129
 
130
130
  ## `learnpack init`
131
131
 
@@ -139,7 +139,7 @@ OPTIONS
139
139
  -h, --grading show CLI help
140
140
  ```
141
141
 
142
- _See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\init.ts)_
142
+ _See code: [src/commands/init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/init.ts)_
143
143
 
144
144
  ## `learnpack login [PACKAGE]`
145
145
 
@@ -157,7 +157,7 @@ DESCRIPTION
157
157
  Extra documentation goes here
158
158
  ```
159
159
 
160
- _See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\login.ts)_
160
+ _See code: [src/commands/login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/login.ts)_
161
161
 
162
162
  ## `learnpack logout [PACKAGE]`
163
163
 
@@ -175,7 +175,7 @@ DESCRIPTION
175
175
  Extra documentation goes here
176
176
  ```
177
177
 
178
- _See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\logout.ts)_
178
+ _See code: [src/commands/logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/logout.ts)_
179
179
 
180
180
  ## `learnpack plugins`
181
181
 
@@ -192,7 +192,7 @@ EXAMPLE
192
192
  $ learnpack plugins
193
193
  ```
194
194
 
195
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\index.ts)_
195
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/index.ts)_
196
196
 
197
197
  ## `learnpack plugins:install PLUGIN...`
198
198
 
@@ -228,7 +228,7 @@ EXAMPLES
228
228
  $ learnpack plugins:install someuser/someplugin
229
229
  ```
230
230
 
231
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\install.ts)_
231
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/install.ts)_
232
232
 
233
233
  ## `learnpack plugins:link PLUGIN`
234
234
 
@@ -255,7 +255,7 @@ EXAMPLE
255
255
  $ learnpack plugins:link myplugin
256
256
  ```
257
257
 
258
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\link.ts)_
258
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/link.ts)_
259
259
 
260
260
  ## `learnpack plugins:uninstall PLUGIN...`
261
261
 
@@ -277,7 +277,7 @@ ALIASES
277
277
  $ learnpack plugins:remove
278
278
  ```
279
279
 
280
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\uninstall.ts)_
280
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/uninstall.ts)_
281
281
 
282
282
  ## `learnpack plugins:update`
283
283
 
@@ -292,7 +292,7 @@ OPTIONS
292
292
  -v, --verbose
293
293
  ```
294
294
 
295
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\update.ts)_
295
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/update.ts)_
296
296
 
297
297
  ## `learnpack publish`
298
298
 
@@ -306,7 +306,7 @@ OPTIONS
306
306
  -h, --help show CLI help
307
307
  ```
308
308
 
309
- _See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\publish.ts)_
309
+ _See code: [src/commands/publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/publish.ts)_
310
310
 
311
311
  ## `learnpack start`
312
312
 
@@ -327,7 +327,7 @@ OPTIONS
327
327
  -w, --watch Watch for file changes
328
328
  ```
329
329
 
330
- _See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\start.ts)_
330
+ _See code: [src/commands/start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/start.ts)_
331
331
 
332
332
  ## `learnpack test [EXERCISESLUG]`
333
333
 
@@ -341,7 +341,7 @@ ARGUMENTS
341
341
  EXERCISESLUG The name of the exercise to test
342
342
  ```
343
343
 
344
- _See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\test.ts)_
344
+ _See code: [src/commands/test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/test.ts)_
345
345
 
346
346
  ## `learnpack translate`
347
347
 
@@ -352,7 +352,7 @@ USAGE
352
352
  $ learnpack translate
353
353
  ```
354
354
 
355
- _See code: [src\commands\translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.7/src\commands\translate.ts)_
355
+ _See code: [src/commands/translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.9/src/commands/translate.ts)_
356
356
  <!-- commandsstop -->
357
357
 
358
358
  > > > > > > > 0cb3e56d84c197f9d008836bb573eade212b7e57
package/bin/run CHANGED
@@ -1,17 +1,17 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs')
4
- const path = require('path')
5
- const project = path.join(__dirname, '../tsconfig.json')
6
- const dev = fs.existsSync(project)
7
-
8
- if (dev) {
9
- require('ts-node').register({project})
10
- }
11
-
12
- require(`../${dev ? 'src' : 'lib'}`).run()
13
- .catch(require('@oclif/errors/handle'))
14
-
15
- /*require('@oclif/command').run()
16
- .then(require('@oclif/command/flush'))
17
- .catch(require('@oclif/errors/handle'))*/
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs')
4
+ const path = require('path')
5
+ const project = path.join(__dirname, '../tsconfig.json')
6
+ const dev = fs.existsSync(project)
7
+
8
+ if (dev) {
9
+ require('ts-node').register({project})
10
+ }
11
+
12
+ require(`../${dev ? 'src' : 'lib'}`).run()
13
+ .catch(require('@oclif/errors/handle'))
14
+
15
+ /*require('@oclif/command').run()
16
+ .then(require('@oclif/command/flush'))
17
+ .catch(require('@oclif/errors/handle'))*/
package/bin/run.cmd CHANGED
@@ -1,3 +1,3 @@
1
- @echo off
2
-
3
- node "%~dp0\run" %*
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
@@ -6,6 +6,7 @@ const console_1 = require("../utils/console");
6
6
  const audit_1 = require("../utils/audit");
7
7
  const SessionCommand_1 = require("../utils/SessionCommand");
8
8
  const path = require("path");
9
+ const index_1 = require("../managers/config/index");
9
10
  // eslint-disable-next-line
10
11
  const fetch = require("node-fetch");
11
12
  class AuditCommand extends SessionCommand_1.default {
@@ -14,8 +15,19 @@ class AuditCommand extends SessionCommand_1.default {
14
15
  await this.initSession(flags);
15
16
  }
16
17
  async run() {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18
19
  console_1.default.log("Running command audit...");
20
+ // Checking the "learn.json" file:
21
+ let learnjson;
22
+ try {
23
+ const configPath = (0, index_1.getConfigPath)().config;
24
+ const learnJsonContent = fs.readFileSync(configPath);
25
+ learnjson = JSON.parse(learnJsonContent.toString());
26
+ }
27
+ catch (_error) {
28
+ console_1.default.error("Invalid JSON syntax in learn.json file:", _error.message);
29
+ process.exit(1);
30
+ }
19
31
  // Get configuration object.
20
32
  let config = (_a = this.configManager) === null || _a === void 0 ? void 0 : _a.get();
21
33
  if (config) {
@@ -114,6 +126,11 @@ class AuditCommand extends SessionCommand_1.default {
114
126
  exercise: undefined,
115
127
  msg: "The description property is not in the configuration object",
116
128
  });
129
+ if (!((_o = config.config) === null || _o === void 0 ? void 0 : _o.projectType))
130
+ errors.push({
131
+ exercise: undefined,
132
+ msg: "The projectType property mandatory in the configuration object",
133
+ });
117
134
  if (errors.length === 0)
118
135
  console_1.default.log("The config file is ok");
119
136
  // Validates if images and links are working at every README file.
@@ -231,11 +248,6 @@ class AuditCommand extends SessionCommand_1.default {
231
248
  }
232
249
  else {
233
250
  // This is the audit code for Projects
234
- // Getting the learn.json schema
235
- const schemaResponse = await fetch("https://raw.githubusercontent.com/tommygonzaleza/project-template/main/.github/learn-schema.json");
236
- const schema = await schemaResponse.json();
237
- // Checking the "learn.json" file:
238
- const learnjson = JSON.parse(fs.readFileSync("./learn.json").toString());
239
251
  if (!learnjson) {
240
252
  console_1.default.error("There is no learn.json file located in the root of the project.");
241
253
  process.exit(1);
@@ -297,7 +309,7 @@ class AuditCommand extends SessionCommand_1.default {
297
309
  });
298
310
  }
299
311
  }
300
- catch (_o) {
312
+ catch (_p) {
301
313
  errors.push({
302
314
  exercise: undefined,
303
315
  msg: `The link of the "preview" is broken: ${learnjson.preview}`,
@@ -320,21 +332,21 @@ class AuditCommand extends SessionCommand_1.default {
320
332
  }
321
333
  }
322
334
  }
323
- AuditCommand.description = `learnpack audit is the command in charge of creating an auditory of the repository
324
- ...
325
- learnpack audit checks for the following information in a repository:
326
- 1. The configuration object has slug, repository and description. (Error)
327
- 2. The command learnpack clean has been run. (Error)
328
- 3. If a markdown or test file doesn't have any content. (Error)
329
- 4. The links are accessing to valid servers. (Error)
330
- 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)
331
- 6. The external images are working (If they are pointing to a valid server). (Error)
332
- 7. The exercises directory names are valid. (Error)
333
- 8. If an exercise doesn't have a README file. (Error)
334
- 9. The exercises array (Of the config file) has content. (Error)
335
- 10. The exercses have the same translations. (Warning)
336
- 11. The .gitignore file exists. (Warning)
337
- 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
335
+ AuditCommand.description = `learnpack audit is the command in charge of creating an auditory of the repository
336
+ ...
337
+ learnpack audit checks for the following information in a repository:
338
+ 1. The configuration object has slug, repository and description. (Error)
339
+ 2. The command learnpack clean has been run. (Error)
340
+ 3. If a markdown or test file doesn't have any content. (Error)
341
+ 4. The links are accessing to valid servers. (Error)
342
+ 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)
343
+ 6. The external images are working (If they are pointing to a valid server). (Error)
344
+ 7. The exercises directory names are valid. (Error)
345
+ 8. If an exercise doesn't have a README file. (Error)
346
+ 9. The exercises array (Of the config file) has content. (Error)
347
+ 10. The exercses have the same translations. (Warning)
348
+ 11. The .gitignore file exists. (Warning)
349
+ 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
338
350
  `;
339
351
  AuditCommand.flags = {
340
352
  // name: flags.string({char: 'n', description: 'name to print'}),
@@ -15,9 +15,9 @@ class CleanCommand extends SessionCommand_1.default {
15
15
  console_1.default.success("Package cleaned successfully, ready to publish");
16
16
  }
17
17
  }
18
- CleanCommand.description = `Clean the configuration object
19
- ...
20
- Extra documentation goes here
18
+ CleanCommand.description = `Clean the configuration object
19
+ ...
20
+ Extra documentation goes here
21
21
  `;
22
22
  CleanCommand.flags = {
23
23
  // name: flags.string({char: 'n', description: 'name to print'}),
@@ -37,9 +37,9 @@ class DownloadCommand extends command_1.Command {
37
37
  catch (_a) { }
38
38
  }
39
39
  }
40
- DownloadCommand.description = `Describe the command here
41
- ...
42
- Extra documentation goes here
40
+ DownloadCommand.description = `Describe the command here
41
+ ...
42
+ Extra documentation goes here
43
43
  `;
44
44
  DownloadCommand.flags = {
45
45
  // name: flags.string({char: 'n', description: 'name to print'}),
@@ -19,9 +19,9 @@ class LoginCommand extends SessionCommand_1.default {
19
19
  }
20
20
  }
21
21
  }
22
- LoginCommand.description = `Describe the command here
23
- ...
24
- Extra documentation goes here
22
+ LoginCommand.description = `Describe the command here
23
+ ...
24
+ Extra documentation goes here
25
25
  `;
26
26
  LoginCommand.flags = {
27
27
  // name: flags.string({char: 'n', description: 'name to print'}),
@@ -19,9 +19,9 @@ class LogoutCommand extends SessionCommand_1.default {
19
19
  session_1.default.destroy();
20
20
  }
21
21
  }
22
- LogoutCommand.description = `Describe the command here
23
- ...
24
- Extra documentation goes here
22
+ LogoutCommand.description = `Describe the command here
23
+ ...
24
+ Extra documentation goes here
25
25
  `;
26
26
  LogoutCommand.flags = {
27
27
  // name: flags.string({char: 'n', description: 'name to print'}),
@@ -1,3 +1,13 @@
1
1
  import { IConfigManagerAttributes, IConfigManager } from "../../models/config-manager";
2
+ /**
3
+ * Retrieves the configuration path for the learnpack package.
4
+ *
5
+ * @returns An object containing the configuration file path and the base directory.
6
+ * @throws NotFoundError if the learn.json file is not found in the current folder.
7
+ */
8
+ export declare const getConfigPath: () => {
9
+ config: string;
10
+ base: string;
11
+ };
2
12
  declare const _default: ({ grading, mode, disableGrading, version, }: IConfigManagerAttributes) => Promise<IConfigManager>;
3
13
  export default _default;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfigPath = void 0;
3
4
  const path = require("path");
4
5
  const fs = require("fs");
5
6
  const shell = require("shelljs");
@@ -33,6 +34,7 @@ const getConfigPath = () => {
33
34
  throw (0, errors_1.NotFoundError)("learn.json file not found on current folder, is this a learnpack package?");
34
35
  return { config, base: ".learn" };
35
36
  };
37
+ exports.getConfigPath = getConfigPath;
36
38
  const getExercisesPath = (base) => {
37
39
  const possibleFileNames = ["./exercises", base + "/exercises", "./"];
38
40
  return possibleFileNames.find(file => fs.existsSync(file)) || null;
@@ -61,7 +63,7 @@ const getCodespacesNamespace = () => {
61
63
  };
62
64
  exports.default = async ({ grading, mode, disableGrading, version, }) => {
63
65
  var _a, _b, _c, _d, _e, _f;
64
- const confPath = getConfigPath();
66
+ const confPath = (0, exports.getConfigPath)();
65
67
  console_1.default.debug("This is the config path: ", confPath);
66
68
  let configObj = {};
67
69
  if (confPath) {
@@ -1 +1 @@
1
- {"version":"5.0.7","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":{},"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":{"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":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"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":{},"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":{},"args":[]}}}
1
+ {"version":"5.0.9","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":{},"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":{"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":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"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":{},"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":{},"args":[]}}}