@learnpack/learnpack 4.0.12 → 4.0.13

Sign up to get free protection for your applications and to get access to all the features.
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/4.0.12 win32-x64 node-v20.16.0
24
+ @learnpack/learnpack/4.0.13 win32-x64 node-v20.16.0
25
25
  $ learnpack --help [COMMAND]
26
26
  USAGE
27
27
  $ learnpack COMMAND
@@ -33,7 +33,6 @@ USAGE
33
33
 
34
34
  <!-- commands -->
35
35
  * [`learnpack audit`](#learnpack-audit)
36
- * [`learnpack build`](#learnpack-build)
37
36
  * [`learnpack clean`](#learnpack-clean)
38
37
  * [`learnpack download [PACKAGE]`](#learnpack-download-package)
39
38
  * [`learnpack help [COMMAND]`](#learnpack-help-command)
@@ -45,7 +44,7 @@ USAGE
45
44
  * [`learnpack plugins:link PLUGIN`](#learnpack-pluginslink-plugin)
46
45
  * [`learnpack plugins:uninstall PLUGIN...`](#learnpack-pluginsuninstall-plugin)
47
46
  * [`learnpack plugins:update`](#learnpack-pluginsupdate)
48
- * [`learnpack publish [PACKAGE]`](#learnpack-publish-package)
47
+ * [`learnpack publish`](#learnpack-publish)
49
48
  * [`learnpack start`](#learnpack-start)
50
49
  * [`learnpack test [EXERCISESLUG]`](#learnpack-test-exerciseslug)
51
50
 
@@ -75,21 +74,7 @@ DESCRIPTION
75
74
  12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
76
75
  ```
77
76
 
78
- _See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\audit.ts)_
79
-
80
- ## `learnpack build`
81
-
82
- Builds the project by copying necessary files and directories into a zip file
83
-
84
- ```
85
- USAGE
86
- $ learnpack build
87
-
88
- OPTIONS
89
- -h, --help show CLI help
90
- ```
91
-
92
- _See code: [src\commands\build.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\build.ts)_
77
+ _See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\audit.ts)_
93
78
 
94
79
  ## `learnpack clean`
95
80
 
@@ -104,7 +89,7 @@ DESCRIPTION
104
89
  Extra documentation goes here
105
90
  ```
106
91
 
107
- _See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\clean.ts)_
92
+ _See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\clean.ts)_
108
93
 
109
94
  ## `learnpack download [PACKAGE]`
110
95
 
@@ -122,7 +107,7 @@ DESCRIPTION
122
107
  Extra documentation goes here
123
108
  ```
124
109
 
125
- _See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\download.ts)_
110
+ _See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\download.ts)_
126
111
 
127
112
  ## `learnpack help [COMMAND]`
128
113
 
@@ -153,7 +138,7 @@ OPTIONS
153
138
  -h, --grading show CLI help
154
139
  ```
155
140
 
156
- _See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\init.ts)_
141
+ _See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\init.ts)_
157
142
 
158
143
  ## `learnpack login [PACKAGE]`
159
144
 
@@ -171,7 +156,7 @@ DESCRIPTION
171
156
  Extra documentation goes here
172
157
  ```
173
158
 
174
- _See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\login.ts)_
159
+ _See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\login.ts)_
175
160
 
176
161
  ## `learnpack logout [PACKAGE]`
177
162
 
@@ -189,7 +174,7 @@ DESCRIPTION
189
174
  Extra documentation goes here
190
175
  ```
191
176
 
192
- _See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\logout.ts)_
177
+ _See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\logout.ts)_
193
178
 
194
179
  ## `learnpack plugins`
195
180
 
@@ -308,23 +293,19 @@ OPTIONS
308
293
 
309
294
  _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\update.ts)_
310
295
 
311
- ## `learnpack publish [PACKAGE]`
296
+ ## `learnpack publish`
312
297
 
313
- Describe the command here
298
+ Builds the project by copying necessary files and directories into a zip file
314
299
 
315
300
  ```
316
301
  USAGE
317
- $ learnpack publish [PACKAGE]
318
-
319
- ARGUMENTS
320
- PACKAGE The unique string that identifies this package on learnpack
302
+ $ learnpack publish
321
303
 
322
- DESCRIPTION
323
- ...
324
- Extra documentation goes here
304
+ OPTIONS
305
+ -h, --help show CLI help
325
306
  ```
326
307
 
327
- _See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\publish.ts)_
308
+ _See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\publish.ts)_
328
309
 
329
310
  ## `learnpack start`
330
311
 
@@ -345,7 +326,7 @@ OPTIONS
345
326
  -w, --watch Watch for file changes
346
327
  ```
347
328
 
348
- _See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\start.ts)_
329
+ _See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\start.ts)_
349
330
 
350
331
  ## `learnpack test [EXERCISESLUG]`
351
332
 
@@ -359,7 +340,7 @@ ARGUMENTS
359
340
  EXERCISESLUG The name of the exercise to test
360
341
  ```
361
342
 
362
- _See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.12/src\commands\test.ts)_
343
+ _See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v4.0.13/src\commands\test.ts)_
363
344
  <!-- commandsstop -->
364
345
 
365
346
  > > > > > > > 0cb3e56d84c197f9d008836bb573eade212b7e57
@@ -1,14 +1,11 @@
1
1
  import SessionCommand from "../utils/SessionCommand";
2
- declare class PublishCommand extends SessionCommand {
2
+ export default class BuildCommand extends SessionCommand {
3
3
  static description: string;
4
- static flags: any;
5
- static args: {
6
- name: string;
7
- required: boolean;
8
- description: string;
9
- hidden: boolean;
10
- }[];
4
+ static flags: {
5
+ help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
6
+ };
11
7
  init(): Promise<void>;
12
8
  run(): Promise<void>;
9
+ copyDirectory(src: string, dest: string): void;
10
+ removeDirectory(dir: string): void;
13
11
  }
14
- export default PublishCommand;
@@ -1,82 +1,160 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const enquirer_1 = require("enquirer");
3
+ /* eslint-disable arrow-parens */
4
+ /* eslint-disable unicorn/no-array-for-each */
5
+ const command_1 = require("@oclif/command");
4
6
  const SessionCommand_1 = require("../utils/SessionCommand");
7
+ const session_1 = require("../managers/session");
8
+ const fs = require("fs");
9
+ const path = require("path");
10
+ const archiver = require("archiver");
11
+ const axios_1 = require("axios");
12
+ const FormData = require("form-data");
5
13
  const console_1 = require("../utils/console");
6
- const api_1 = require("../utils/api");
7
- const validators_1 = require("../utils/validators");
8
- // eslint-disable-next-line
9
- const fetch = require("node-fetch");
10
- class PublishCommand extends SessionCommand_1.default {
14
+ // const RIGOBOT_HOST = "https://rigobot-test-cca7d841c9d8.herokuapp.com"
15
+ const RIGOBOT_HOST =
16
+ // "https://8000-charlytoc-rigobot-bmwdeam7cev.ws-us116.gitpod.io"
17
+ "https://rigobot.herokuapp.com";
18
+ const uploadZipEndpont = RIGOBOT_HOST + "/v1/learnpack/upload";
19
+ class BuildCommand extends SessionCommand_1.default {
11
20
  async init() {
12
- const { flags } = this.parse(PublishCommand);
13
- await this.initSession(flags, true);
21
+ const { flags } = this.parse(BuildCommand);
22
+ await this.initSession(flags);
14
23
  }
15
24
  async run() {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
17
- const { flags, args } = this.parse(PublishCommand);
18
- // avoid annonymus sessions
19
- // eslint-disable-next-line
20
- if (!this.session)
25
+ const buildDir = path.join(process.cwd(), "build");
26
+ const sessionPayload = await session_1.default.getPayload();
27
+ if (!sessionPayload || !sessionPayload.rigobot) {
28
+ console_1.default.error("You must be logged in to upload a LearnPack packge, please run: \n$ learnpack login");
21
29
  return;
22
- console_1.default.info(`Session found for ${this.session.payload.email}, publishing the package...`);
23
- const configObject = (_a = this.configManager) === null || _a === void 0 ? void 0 : _a.get();
24
- if (((_b = configObject === null || configObject === void 0 ? void 0 : configObject.config) === null || _b === void 0 ? void 0 : _b.slug) === undefined ||
25
- !((_c = configObject.config) === null || _c === void 0 ? void 0 : _c.slug)) {
26
- throw new Error("The package is missing a slug (unique name identifier), please check your learn.json file and make sure it has a 'slug'");
27
30
  }
28
- if (!(0, validators_1.validURL)((_e = (_d = configObject === null || configObject === void 0 ? void 0 : configObject.config) === null || _d === void 0 ? void 0 : _d.repository) !== null && _e !== void 0 ? _e : "")) {
29
- throw new Error("The package has a missing or invalid 'repository' on the configuration file, it needs to be a Github URL");
31
+ const rigoToken = sessionPayload.rigobot.key;
32
+ // const rigoToken = "417d612d226a1606ad3a4e94b1881a9f0124b667"
33
+ // Read learn.json to get the slug
34
+ const learnJsonPath = path.join(process.cwd(), "learn.json");
35
+ if (!fs.existsSync(learnJsonPath)) {
36
+ this.error("learn.json not found");
37
+ }
38
+ const learnJson = JSON.parse(fs.readFileSync(learnJsonPath, "utf-8"));
39
+ const zipFilePath = path.join(process.cwd(), `${learnJson.slug}.zip`);
40
+ // Ensure build directory exists
41
+ if (!fs.existsSync(buildDir)) {
42
+ fs.mkdirSync(buildDir);
43
+ }
44
+ // Copy config.json
45
+ const configPath = path.join(process.cwd(), ".learn", "config.json");
46
+ if (fs.existsSync(configPath)) {
47
+ fs.copyFileSync(configPath, path.join(buildDir, "config.json"));
30
48
  }
31
49
  else {
32
- const validateResp = await fetch((_f = configObject.config) === null || _f === void 0 ? void 0 : _f.repository, {
33
- method: "HEAD",
34
- });
35
- if (!validateResp.ok || validateResp.status !== 200) {
36
- throw new Error(`The specified repository URL on the configuration file does not exist or its private, only public repositories are allowed at the moment: ${(_g = configObject.config) === null || _g === void 0 ? void 0 : _g.repository}`);
37
- }
50
+ this.error("config.json not found");
51
+ }
52
+ // Copy .learn/assets directory
53
+ const assetsDir = path.join(process.cwd(), ".learn", "assets");
54
+ if (fs.existsSync(assetsDir)) {
55
+ this.copyDirectory(assetsDir, path.join(buildDir, ".learn", "assets"));
56
+ }
57
+ else {
58
+ this.error(".learn/assets directory not found");
59
+ }
60
+ // Copy .learn/_app directory files to the same level as config.json
61
+ const appDir = path.join(process.cwd(), ".learn", "_app");
62
+ if (fs.existsSync(appDir)) {
63
+ this.copyDirectory(appDir, buildDir);
64
+ }
65
+ else {
66
+ this.error(".learn/_app directory not found");
67
+ }
68
+ // Copy exercises directory
69
+ const exercisesDir = path.join(process.cwd(), "exercises");
70
+ const learnExercisesDir = path.join(process.cwd(), ".learn", "exercises");
71
+ if (fs.existsSync(exercisesDir)) {
72
+ this.copyDirectory(exercisesDir, path.join(buildDir, "exercises"));
38
73
  }
39
- // start watching for file changes
40
- try {
41
- await api_1.default.publish(Object.assign(Object.assign({}, configObject), { author: this.session.payload.user_id }));
42
- console_1.default.success(`Package updated and published successfully: ${(_h = configObject.config) === null || _h === void 0 ? void 0 : _h.slug}`);
74
+ else if (fs.existsSync(learnExercisesDir)) {
75
+ this.copyDirectory(learnExercisesDir, path.join(buildDir, "exercises"));
43
76
  }
44
- catch (error) {
45
- if (error.status === 404) {
46
- const answer = await (0, enquirer_1.prompt)([
47
- {
48
- type: "confirm",
49
- name: "create",
50
- message: `Package with slug ${(_j = configObject.config) === null || _j === void 0 ? void 0 : _j.slug} does not exist, do you want to create it?`,
51
- },
52
- ]);
53
- if (answer) {
54
- await api_1.default.update(Object.assign(Object.assign({}, configObject), { author: this.session.payload.user_id }));
55
- console_1.default.success(`Package created and published successfully: ${(_k = configObject.config) === null || _k === void 0 ? void 0 : _k.slug}`);
77
+ else {
78
+ this.error("exercises directory not found in either location");
79
+ }
80
+ // Copy learn.json
81
+ fs.copyFileSync(learnJsonPath, path.join(buildDir, "learn.json"));
82
+ // Create zip file
83
+ const output = fs.createWriteStream(zipFilePath);
84
+ const archive = archiver("zip", {
85
+ zlib: { level: 9 },
86
+ });
87
+ output.on("close", async () => {
88
+ this.log(`Build completed: ${zipFilePath} (${archive.pointer()} total bytes)`);
89
+ // Remove build directory after zip is created
90
+ this.removeDirectory(buildDir);
91
+ console.log("Zip file saved in project root");
92
+ const formData = new FormData();
93
+ formData.append("file", fs.createReadStream(zipFilePath));
94
+ formData.append("config", JSON.stringify(learnJson));
95
+ try {
96
+ const res = await axios_1.default.post(uploadZipEndpont, formData, {
97
+ headers: Object.assign(Object.assign({}, formData.getHeaders()), { Authorization: `Token ${rigoToken}` }),
98
+ });
99
+ console.log(res.data);
100
+ }
101
+ catch (error) {
102
+ if (axios_1.default.isAxiosError(error)) {
103
+ if (error.response && error.response.status === 403) {
104
+ console.error("Error 403:", error.response.data.error);
105
+ }
106
+ else if (error.response && error.response.status === 400) {
107
+ console.error(error.response.data.error);
108
+ }
109
+ else {
110
+ console.error("Error uploading file:", error.message);
111
+ }
56
112
  }
57
113
  else {
58
- console_1.default.error("No answer from server");
114
+ console.error("Error uploading file:", error);
59
115
  }
60
116
  }
117
+ });
118
+ archive.on("error", (err) => {
119
+ throw err;
120
+ });
121
+ archive.pipe(output);
122
+ archive.directory(buildDir, false);
123
+ await archive.finalize();
124
+ }
125
+ copyDirectory(src, dest) {
126
+ if (!fs.existsSync(dest)) {
127
+ fs.mkdirSync(dest, { recursive: true });
128
+ }
129
+ const entries = fs.readdirSync(src, { withFileTypes: true });
130
+ for (const entry of entries) {
131
+ const srcPath = path.join(src, entry.name);
132
+ const destPath = path.join(dest, entry.name);
133
+ if (entry.isDirectory()) {
134
+ this.copyDirectory(srcPath, destPath);
135
+ }
61
136
  else {
62
- console_1.default.error(error.message);
137
+ fs.copyFileSync(srcPath, destPath);
63
138
  }
64
139
  }
65
140
  }
141
+ removeDirectory(dir) {
142
+ if (fs.existsSync(dir)) {
143
+ fs.readdirSync(dir).forEach((file) => {
144
+ const currentPath = path.join(dir, file);
145
+ if (fs.lstatSync(currentPath).isDirectory()) {
146
+ this.removeDirectory(currentPath);
147
+ }
148
+ else {
149
+ fs.unlinkSync(currentPath);
150
+ }
151
+ });
152
+ fs.rmdirSync(dir);
153
+ }
154
+ }
66
155
  }
67
- PublishCommand.description = `Describe the command here
68
- ...
69
- Extra documentation goes here
70
- `;
71
- PublishCommand.flags = {
72
- // name: flags.string({char: 'n', description: 'name to print'}),
156
+ BuildCommand.description = "Builds the project by copying necessary files and directories into a zip file";
157
+ BuildCommand.flags = {
158
+ help: command_1.flags.help({ char: "h" }),
73
159
  };
74
- PublishCommand.args = [
75
- {
76
- name: "package", // name of arg to show in help and reference with args[name]
77
- required: false, // make the arg required with `required: true`
78
- description: "The unique string that identifies this package on learnpack", // help description
79
- hidden: false, // hide this arg from help
80
- },
81
- ];
82
- exports.default = PublishCommand;
160
+ exports.default = BuildCommand;
@@ -1 +1 @@
1
- {"version":"4.0.12","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":[]},"build":{"id":"build","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":[]},"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":"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}]},"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}]}}}
1
+ {"version":"4.0.13","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}]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@learnpack/learnpack",
3
3
  "description": "Create, sell or download and take learning amazing learning packages",
4
- "version": "4.0.12",
4
+ "version": "4.0.13",
5
5
  "author": "Alejandro Sanchez @alesanchezr",
6
6
  "contributors": [
7
7
  {