@learnpack/learnpack 2.1.39 → 2.1.40
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +370 -35
- package/bin/run +17 -17
- package/bin/run.cmd +3 -3
- package/lib/commands/audit.d.ts +6 -6
- package/lib/commands/audit.js +342 -342
- package/lib/commands/clean.d.ts +8 -8
- package/lib/commands/clean.js +25 -25
- package/lib/commands/download.d.ts +13 -13
- package/lib/commands/download.js +55 -55
- package/lib/commands/init.d.ts +9 -9
- package/lib/commands/init.js +123 -123
- package/lib/commands/login.d.ts +14 -14
- package/lib/commands/login.js +37 -37
- package/lib/commands/logout.d.ts +14 -14
- package/lib/commands/logout.js +37 -37
- package/lib/commands/publish.d.ts +14 -14
- package/lib/commands/publish.js +82 -82
- package/lib/commands/start.d.ts +7 -7
- package/lib/commands/start.js +239 -208
- package/lib/commands/test.d.ts +6 -6
- package/lib/commands/test.js +62 -62
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -4
- package/lib/managers/config/allowed_files.d.ts +5 -5
- package/lib/managers/config/allowed_files.js +30 -30
- package/lib/managers/config/defaults.d.ts +41 -41
- package/lib/managers/config/defaults.js +44 -44
- package/lib/managers/config/exercise.d.ts +36 -36
- package/lib/managers/config/exercise.js +236 -236
- package/lib/managers/config/index.d.ts +3 -3
- package/lib/managers/config/index.js +337 -337
- package/lib/managers/file.d.ts +14 -14
- package/lib/managers/file.js +153 -153
- package/lib/managers/gitpod.d.ts +3 -3
- package/lib/managers/gitpod.js +67 -67
- package/lib/managers/server/index.d.ts +6 -6
- package/lib/managers/server/index.js +58 -58
- package/lib/managers/server/routes.d.ts +4 -4
- package/lib/managers/server/routes.js +219 -219
- package/lib/managers/session.d.ts +3 -3
- package/lib/managers/session.js +125 -125
- package/lib/managers/socket.d.ts +3 -3
- package/lib/managers/socket.js +176 -176
- package/lib/managers/telemetry.d.ts +74 -74
- package/lib/managers/telemetry.js +206 -206
- package/lib/managers/test.js +84 -84
- package/lib/models/action.d.ts +2 -2
- package/lib/models/action.js +2 -2
- package/lib/models/audit.d.ts +15 -15
- package/lib/models/audit.js +2 -2
- package/lib/models/config-manager.d.ts +21 -21
- package/lib/models/config-manager.js +2 -2
- package/lib/models/config.d.ts +68 -67
- package/lib/models/config.js +2 -2
- package/lib/models/counter.d.ts +11 -11
- package/lib/models/counter.js +2 -2
- package/lib/models/errors.d.ts +15 -15
- package/lib/models/errors.js +2 -2
- package/lib/models/exercise-obj.d.ts +30 -30
- package/lib/models/exercise-obj.js +2 -2
- package/lib/models/file.d.ts +5 -5
- package/lib/models/file.js +2 -2
- package/lib/models/findings.d.ts +17 -17
- package/lib/models/findings.js +2 -2
- package/lib/models/flags.d.ts +10 -10
- package/lib/models/flags.js +2 -2
- package/lib/models/front-matter.d.ts +11 -11
- package/lib/models/front-matter.js +2 -2
- package/lib/models/gitpod-data.d.ts +16 -16
- package/lib/models/gitpod-data.js +2 -2
- package/lib/models/language.d.ts +4 -4
- package/lib/models/language.js +2 -2
- package/lib/models/package.d.ts +7 -7
- package/lib/models/package.js +2 -2
- package/lib/models/plugin-config.d.ts +16 -16
- package/lib/models/plugin-config.js +2 -2
- package/lib/models/session.d.ts +31 -31
- package/lib/models/session.js +2 -2
- package/lib/models/socket.d.ts +36 -32
- package/lib/models/socket.js +2 -2
- package/lib/models/status.d.ts +1 -1
- package/lib/models/status.js +2 -2
- package/lib/models/success-types.d.ts +1 -1
- package/lib/models/success-types.js +2 -2
- package/lib/plugin/command/compile.d.ts +6 -6
- package/lib/plugin/command/compile.js +18 -18
- package/lib/plugin/command/test.d.ts +6 -6
- package/lib/plugin/command/test.js +25 -25
- package/lib/plugin/index.d.ts +27 -27
- package/lib/plugin/index.js +7 -7
- package/lib/plugin/plugin.d.ts +8 -8
- package/lib/plugin/plugin.js +68 -68
- package/lib/plugin/utils.d.ts +16 -16
- package/lib/plugin/utils.js +58 -58
- package/lib/ui/download.d.ts +5 -5
- package/lib/ui/download.js +61 -61
- package/lib/utils/BaseCommand.d.ts +8 -8
- package/lib/utils/BaseCommand.js +41 -41
- package/lib/utils/SessionCommand.d.ts +10 -10
- package/lib/utils/SessionCommand.js +43 -43
- package/lib/utils/api.d.ts +14 -14
- package/lib/utils/api.js +255 -255
- package/lib/utils/audit.d.ts +16 -16
- package/lib/utils/audit.js +303 -303
- package/lib/utils/checkNotInstalled.d.ts +2 -0
- package/lib/utils/checkNotInstalled.js +36 -0
- package/lib/utils/console.d.ts +12 -12
- package/lib/utils/console.js +19 -19
- package/lib/utils/errors.d.ts +17 -17
- package/lib/utils/errors.js +100 -100
- package/lib/utils/exercisesQueue.d.ts +9 -9
- package/lib/utils/exercisesQueue.js +38 -38
- package/lib/utils/fileQueue.d.ts +40 -40
- package/lib/utils/fileQueue.js +168 -168
- package/lib/utils/misc.d.ts +1 -1
- package/lib/utils/misc.js +23 -23
- package/lib/utils/osOperations.d.ts +5 -5
- package/lib/utils/osOperations.js +72 -72
- package/lib/utils/validators.d.ts +5 -5
- package/lib/utils/validators.js +17 -17
- package/lib/utils/watcher.d.ts +2 -2
- package/lib/utils/watcher.js +25 -25
- package/oclif.manifest.json +1 -1
- package/package.json +139 -139
- package/src/commands/audit.ts +443 -443
- package/src/commands/clean.ts +29 -29
- package/src/commands/download.ts +61 -61
- package/src/commands/init.ts +170 -170
- package/src/commands/login.ts +42 -42
- package/src/commands/logout.ts +43 -43
- package/src/commands/publish.ts +107 -107
- package/src/commands/start.ts +53 -23
- package/src/commands/test.ts +85 -85
- package/src/index.ts +1 -1
- package/src/managers/config/allowed_files.ts +29 -29
- package/src/managers/config/defaults.ts +42 -42
- package/src/managers/config/exercise.ts +311 -311
- package/src/managers/config/index.ts +455 -455
- package/src/managers/file.ts +196 -196
- package/src/managers/gitpod.ts +84 -84
- package/src/managers/server/index.ts +78 -78
- package/src/managers/server/routes.ts +330 -330
- package/src/managers/session.ts +145 -145
- package/src/managers/socket.ts +250 -250
- package/src/managers/telemetry.ts +346 -346
- package/src/managers/test.ts +83 -83
- package/src/models/action.ts +10 -10
- package/src/models/audit.ts +16 -16
- package/src/models/config-manager.ts +23 -23
- package/src/models/config.ts +5 -3
- package/src/models/counter.ts +11 -11
- package/src/models/errors.ts +22 -22
- package/src/models/exercise-obj.ts +29 -29
- package/src/models/file.ts +5 -5
- package/src/models/findings.ts +18 -18
- package/src/models/flags.ts +10 -10
- package/src/models/front-matter.ts +11 -11
- package/src/models/gitpod-data.ts +19 -19
- package/src/models/language.ts +4 -4
- package/src/models/package.ts +7 -7
- package/src/models/plugin-config.ts +17 -17
- package/src/models/session.ts +34 -34
- package/src/models/socket.ts +5 -0
- package/src/models/status.ts +16 -16
- package/src/models/success-types.ts +1 -1
- package/src/plugin/command/compile.ts +17 -17
- package/src/plugin/command/test.ts +30 -30
- package/src/plugin/index.ts +6 -6
- package/src/plugin/plugin.ts +94 -94
- package/src/plugin/utils.ts +87 -87
- package/src/types/node-fetch.d.ts +1 -1
- package/src/ui/download.ts +71 -71
- package/src/utils/BaseCommand.ts +48 -48
- package/src/utils/SessionCommand.ts +43 -43
- package/src/utils/api.ts +303 -303
- package/src/utils/audit.ts +393 -393
- package/src/utils/checkNotInstalled.ts +46 -0
- package/src/utils/console.ts +24 -24
- package/src/utils/errors.ts +117 -117
- package/src/utils/exercisesQueue.ts +51 -51
- package/src/utils/fileQueue.ts +198 -198
- package/src/utils/misc.ts +23 -23
- package/src/utils/osOperations.ts +79 -79
- package/src/utils/templates/gitignore.txt +19 -19
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +24 -24
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +24 -24
- package/src/utils/templates/incremental/README.ejs +4 -4
- package/src/utils/templates/incremental/README.es.ejs +4 -4
- package/src/utils/templates/isolated/01-hello-world/README.es.md +26 -26
- package/src/utils/templates/isolated/01-hello-world/README.md +26 -26
- package/src/utils/templates/isolated/README.ejs +4 -4
- package/src/utils/templates/isolated/README.es.ejs +4 -4
- package/src/utils/templates/no-grading/README.ejs +4 -4
- package/src/utils/templates/no-grading/README.es.ejs +4 -4
- package/src/utils/validators.ts +18 -18
- package/src/utils/watcher.ts +27 -27
package/README.md
CHANGED
@@ -1,36 +1,55 @@
|
|
1
|
-
# learnpack
|
2
|
-
|
3
|
-
Create, sell or download and take learning amazing learning packages.
|
4
|
-
|
5
|
-
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
|
6
|
-
[![Version](https://img.shields.io/npm/v/learnpack.svg)](https://npmjs.org/package/learnpack)
|
7
|
-
[![Downloads/week](https://img.shields.io/npm/dw/learnpack.svg)](https://npmjs.org/package/learnpack)
|
8
|
-
[![License](https://img.shields.io/npm/l/learnpack.svg)](https://github.com/learnpack/learnpack-cli/blob/master/package.json)
|
9
|
-
|
1
|
+
# learnpack
|
2
|
+
|
3
|
+
Create, sell or download and take learning amazing learning packages.
|
4
|
+
|
5
|
+
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
|
6
|
+
[![Version](https://img.shields.io/npm/v/learnpack.svg)](https://npmjs.org/package/learnpack)
|
7
|
+
[![Downloads/week](https://img.shields.io/npm/dw/learnpack.svg)](https://npmjs.org/package/learnpack)
|
8
|
+
[![License](https://img.shields.io/npm/l/learnpack.svg)](https://github.com/learnpack/learnpack-cli/blob/master/package.json)
|
9
|
+
|
10
10
|
<!-- toc -->
|
11
11
|
* [learnpack](#learnpack)
|
12
12
|
* [Usage](#usage)
|
13
13
|
* [Commands](#commands)
|
14
|
-
<!-- tocstop -->
|
15
|
-
|
16
|
-
#
|
17
|
-
|
14
|
+
<!-- tocstop -->
|
15
|
+
|
16
|
+
- [learnpack](#learnpack)
|
17
|
+
- [Usage](#usage)
|
18
|
+
- [Commands](#commands)
|
19
|
+
<!-- tocstop -->
|
20
|
+
|
21
|
+
# Usage
|
22
|
+
|
18
23
|
<!-- usage -->
|
19
24
|
```sh-session
|
20
25
|
$ npm install -g @learnpack/learnpack
|
21
26
|
$ learnpack COMMAND
|
22
27
|
running command...
|
23
28
|
$ learnpack (-v|--version|version)
|
24
|
-
@learnpack/learnpack/2.1.
|
29
|
+
@learnpack/learnpack/2.1.40 win32-x64 node-v20.10.0
|
25
30
|
$ learnpack --help [COMMAND]
|
26
31
|
USAGE
|
27
32
|
$ learnpack COMMAND
|
28
33
|
...
|
29
34
|
```
|
30
|
-
<!-- usagestop -->
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
<!-- usagestop -->
|
36
|
+
|
37
|
+
```sh-session
|
38
|
+
$ npm install -g @learnpack/learnpack
|
39
|
+
$ learnpack COMMAND
|
40
|
+
running command...
|
41
|
+
$ learnpack (-v|--version|version)
|
42
|
+
@learnpack/learnpack/2.1.36 darwin-arm64 node-v16.20.1
|
43
|
+
$ learnpack --help [COMMAND]
|
44
|
+
USAGE
|
45
|
+
$ learnpack COMMAND
|
46
|
+
...
|
47
|
+
```
|
48
|
+
|
49
|
+
<!-- usagestop -->
|
50
|
+
|
51
|
+
# Commands
|
52
|
+
|
34
53
|
<!-- commands -->
|
35
54
|
* [`learnpack audit`](#learnpack-audit)
|
36
55
|
* [`learnpack clean`](#learnpack-clean)
|
@@ -74,7 +93,7 @@ DESCRIPTION
|
|
74
93
|
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
75
94
|
```
|
76
95
|
|
77
|
-
_See code: [src
|
96
|
+
_See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\audit.ts)_
|
78
97
|
|
79
98
|
## `learnpack clean`
|
80
99
|
|
@@ -89,7 +108,7 @@ DESCRIPTION
|
|
89
108
|
Extra documentation goes here
|
90
109
|
```
|
91
110
|
|
92
|
-
_See code: [src
|
111
|
+
_See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\clean.ts)_
|
93
112
|
|
94
113
|
## `learnpack download [PACKAGE]`
|
95
114
|
|
@@ -107,7 +126,7 @@ DESCRIPTION
|
|
107
126
|
Extra documentation goes here
|
108
127
|
```
|
109
128
|
|
110
|
-
_See code: [src
|
129
|
+
_See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\download.ts)_
|
111
130
|
|
112
131
|
## `learnpack help [COMMAND]`
|
113
132
|
|
@@ -124,7 +143,7 @@ OPTIONS
|
|
124
143
|
--all see all commands in CLI
|
125
144
|
```
|
126
145
|
|
127
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src
|
146
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src\commands\help.ts)_
|
128
147
|
|
129
148
|
## `learnpack init`
|
130
149
|
|
@@ -138,7 +157,7 @@ OPTIONS
|
|
138
157
|
-h, --grading show CLI help
|
139
158
|
```
|
140
159
|
|
141
|
-
_See code: [src
|
160
|
+
_See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\init.ts)_
|
142
161
|
|
143
162
|
## `learnpack login [PACKAGE]`
|
144
163
|
|
@@ -156,7 +175,7 @@ DESCRIPTION
|
|
156
175
|
Extra documentation goes here
|
157
176
|
```
|
158
177
|
|
159
|
-
_See code: [src
|
178
|
+
_See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\login.ts)_
|
160
179
|
|
161
180
|
## `learnpack logout [PACKAGE]`
|
162
181
|
|
@@ -174,7 +193,7 @@ DESCRIPTION
|
|
174
193
|
Extra documentation goes here
|
175
194
|
```
|
176
195
|
|
177
|
-
_See code: [src
|
196
|
+
_See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\logout.ts)_
|
178
197
|
|
179
198
|
## `learnpack plugins`
|
180
199
|
|
@@ -191,7 +210,7 @@ EXAMPLE
|
|
191
210
|
$ learnpack plugins
|
192
211
|
```
|
193
212
|
|
194
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src
|
213
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\index.ts)_
|
195
214
|
|
196
215
|
## `learnpack plugins:install PLUGIN...`
|
197
216
|
|
@@ -227,7 +246,7 @@ EXAMPLES
|
|
227
246
|
$ learnpack plugins:install someuser/someplugin
|
228
247
|
```
|
229
248
|
|
230
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src
|
249
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\install.ts)_
|
231
250
|
|
232
251
|
## `learnpack plugins:link PLUGIN`
|
233
252
|
|
@@ -254,7 +273,7 @@ EXAMPLE
|
|
254
273
|
$ learnpack plugins:link myplugin
|
255
274
|
```
|
256
275
|
|
257
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src
|
276
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\link.ts)_
|
258
277
|
|
259
278
|
## `learnpack plugins:uninstall PLUGIN...`
|
260
279
|
|
@@ -276,7 +295,7 @@ ALIASES
|
|
276
295
|
$ learnpack plugins:remove
|
277
296
|
```
|
278
297
|
|
279
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src
|
298
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\uninstall.ts)_
|
280
299
|
|
281
300
|
## `learnpack plugins:update`
|
282
301
|
|
@@ -291,7 +310,7 @@ OPTIONS
|
|
291
310
|
-v, --verbose
|
292
311
|
```
|
293
312
|
|
294
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src
|
313
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\update.ts)_
|
295
314
|
|
296
315
|
## `learnpack publish [PACKAGE]`
|
297
316
|
|
@@ -309,7 +328,7 @@ DESCRIPTION
|
|
309
328
|
Extra documentation goes here
|
310
329
|
```
|
311
330
|
|
312
|
-
_See code: [src
|
331
|
+
_See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\publish.ts)_
|
313
332
|
|
314
333
|
## `learnpack start`
|
315
334
|
|
@@ -330,7 +349,7 @@ OPTIONS
|
|
330
349
|
-w, --watch Watch for file changes
|
331
350
|
```
|
332
351
|
|
333
|
-
_See code: [src
|
352
|
+
_See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\start.ts)_
|
334
353
|
|
335
354
|
## `learnpack test [EXERCISESLUG]`
|
336
355
|
|
@@ -344,7 +363,323 @@ ARGUMENTS
|
|
344
363
|
EXERCISESLUG The name of the exercise to test
|
345
364
|
```
|
346
365
|
|
347
|
-
_See code: [src
|
348
|
-
<!-- commandsstop -->
|
349
|
-
|
366
|
+
_See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.40/src\commands\test.ts)_
|
367
|
+
<!-- commandsstop -->
|
368
|
+
|
369
|
+
- [`learnpack audit`](#learnpack-audit)
|
370
|
+
- [`learnpack clean`](#learnpack-clean)
|
371
|
+
- [`learnpack download [PACKAGE]`](#learnpack-download-package)
|
372
|
+
- [`learnpack help [COMMAND]`](#learnpack-help-command)
|
373
|
+
- [`learnpack init`](#learnpack-init)
|
374
|
+
- [`learnpack login [PACKAGE]`](#learnpack-login-package)
|
375
|
+
- [`learnpack logout [PACKAGE]`](#learnpack-logout-package)
|
376
|
+
- [`learnpack plugins`](#learnpack-plugins)
|
377
|
+
- [`learnpack plugins:install PLUGIN...`](#learnpack-pluginsinstall-plugin)
|
378
|
+
- [`learnpack plugins:link PLUGIN`](#learnpack-pluginslink-plugin)
|
379
|
+
- [`learnpack plugins:uninstall PLUGIN...`](#learnpack-pluginsuninstall-plugin)
|
380
|
+
- [`learnpack plugins:update`](#learnpack-pluginsupdate)
|
381
|
+
- [`learnpack publish [PACKAGE]`](#learnpack-publish-package)
|
382
|
+
- [`learnpack start`](#learnpack-start)
|
383
|
+
- [`learnpack test [EXERCISESLUG]`](#learnpack-test-exerciseslug)
|
384
|
+
|
385
|
+
## `learnpack audit`
|
386
|
+
|
387
|
+
learnpack audit is the command in charge of creating an auditory of the repository
|
388
|
+
|
389
|
+
```
|
390
|
+
USAGE
|
391
|
+
$ learnpack audit
|
392
|
+
|
393
|
+
DESCRIPTION
|
394
|
+
...
|
395
|
+
learnpack audit checks for the following information in a repository:
|
396
|
+
1. The configuration object has slug, repository and description. (Error)
|
397
|
+
2. The command learnpack clean has been run. (Error)
|
398
|
+
3. If a markdown or test file doesn't have any content. (Error)
|
399
|
+
4. The links are accessing to valid servers. (Error)
|
400
|
+
5. The relative images are working (If they have the shortest path to the image or if the images exists in the
|
401
|
+
assets). (Error)
|
402
|
+
6. The external images are working (If they are pointing to a valid server). (Error)
|
403
|
+
7. The exercises directory names are valid. (Error)
|
404
|
+
8. If an exercise doesn't have a README file. (Error)
|
405
|
+
9. The exercises array (Of the config file) has content. (Error)
|
406
|
+
10. The exercses have the same translations. (Warning)
|
407
|
+
11. The .gitignore file exists. (Warning)
|
408
|
+
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
409
|
+
```
|
410
|
+
|
411
|
+
_See code: [src/commands/audit.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/audit.ts)_
|
412
|
+
|
413
|
+
## `learnpack clean`
|
414
|
+
|
415
|
+
Clean the configuration object
|
416
|
+
|
417
|
+
```
|
418
|
+
USAGE
|
419
|
+
$ learnpack clean
|
420
|
+
|
421
|
+
DESCRIPTION
|
422
|
+
...
|
423
|
+
Extra documentation goes here
|
424
|
+
```
|
425
|
+
|
426
|
+
_See code: [src/commands/clean.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/clean.ts)_
|
427
|
+
|
428
|
+
## `learnpack download [PACKAGE]`
|
429
|
+
|
430
|
+
Describe the command here
|
431
|
+
|
432
|
+
```
|
433
|
+
USAGE
|
434
|
+
$ learnpack download [PACKAGE]
|
435
|
+
|
436
|
+
ARGUMENTS
|
437
|
+
PACKAGE The unique string that identifies this package on learnpack
|
438
|
+
|
439
|
+
DESCRIPTION
|
440
|
+
...
|
441
|
+
Extra documentation goes here
|
442
|
+
```
|
443
|
+
|
444
|
+
_See code: [src/commands/download.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/download.ts)_
|
445
|
+
|
446
|
+
## `learnpack help [COMMAND]`
|
447
|
+
|
448
|
+
display help for learnpack
|
449
|
+
|
450
|
+
```
|
451
|
+
USAGE
|
452
|
+
$ learnpack help [COMMAND]
|
453
|
+
|
454
|
+
ARGUMENTS
|
455
|
+
COMMAND command to show help for
|
456
|
+
|
457
|
+
OPTIONS
|
458
|
+
--all see all commands in CLI
|
459
|
+
```
|
460
|
+
|
461
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_
|
462
|
+
|
463
|
+
## `learnpack init`
|
464
|
+
|
465
|
+
Create a new learning package: Book, Tutorial or Exercise
|
466
|
+
|
467
|
+
```
|
468
|
+
USAGE
|
469
|
+
$ learnpack init
|
470
|
+
|
471
|
+
OPTIONS
|
472
|
+
-h, --grading show CLI help
|
473
|
+
```
|
474
|
+
|
475
|
+
_See code: [src/commands/init.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/init.ts)_
|
476
|
+
|
477
|
+
## `learnpack login [PACKAGE]`
|
478
|
+
|
479
|
+
Describe the command here
|
480
|
+
|
481
|
+
```
|
482
|
+
USAGE
|
483
|
+
$ learnpack login [PACKAGE]
|
484
|
+
|
485
|
+
ARGUMENTS
|
486
|
+
PACKAGE The unique string that identifies this package on learnpack
|
487
|
+
|
488
|
+
DESCRIPTION
|
489
|
+
...
|
490
|
+
Extra documentation goes here
|
491
|
+
```
|
492
|
+
|
493
|
+
_See code: [src/commands/login.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/login.ts)_
|
494
|
+
|
495
|
+
## `learnpack logout [PACKAGE]`
|
496
|
+
|
497
|
+
Describe the command here
|
498
|
+
|
499
|
+
```
|
500
|
+
USAGE
|
501
|
+
$ learnpack logout [PACKAGE]
|
502
|
+
|
503
|
+
ARGUMENTS
|
504
|
+
PACKAGE The unique string that identifies this package on learnpack
|
505
|
+
|
506
|
+
DESCRIPTION
|
507
|
+
...
|
508
|
+
Extra documentation goes here
|
509
|
+
```
|
510
|
+
|
511
|
+
_See code: [src/commands/logout.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/logout.ts)_
|
512
|
+
|
513
|
+
## `learnpack plugins`
|
514
|
+
|
515
|
+
list installed plugins
|
516
|
+
|
517
|
+
```
|
518
|
+
USAGE
|
519
|
+
$ learnpack plugins
|
520
|
+
|
521
|
+
OPTIONS
|
522
|
+
--core show core plugins
|
523
|
+
|
524
|
+
EXAMPLE
|
525
|
+
$ learnpack plugins
|
526
|
+
```
|
527
|
+
|
528
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/index.ts)_
|
529
|
+
|
530
|
+
## `learnpack plugins:install PLUGIN...`
|
531
|
+
|
532
|
+
installs a plugin into the CLI
|
533
|
+
|
534
|
+
```
|
535
|
+
USAGE
|
536
|
+
$ learnpack plugins:install PLUGIN...
|
537
|
+
|
538
|
+
ARGUMENTS
|
539
|
+
PLUGIN plugin to install
|
540
|
+
|
541
|
+
OPTIONS
|
542
|
+
-f, --force yarn install with force flag
|
543
|
+
-h, --help show CLI help
|
544
|
+
-v, --verbose
|
545
|
+
|
546
|
+
DESCRIPTION
|
547
|
+
Can be installed from npm or a git url.
|
548
|
+
|
549
|
+
Installation of a user-installed plugin will override a core plugin.
|
550
|
+
|
551
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
552
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
553
|
+
the CLI without the need to patch and update the whole CLI.
|
554
|
+
|
555
|
+
ALIASES
|
556
|
+
$ learnpack plugins:add
|
557
|
+
|
558
|
+
EXAMPLES
|
559
|
+
$ learnpack plugins:install myplugin
|
560
|
+
$ learnpack plugins:install https://github.com/someuser/someplugin
|
561
|
+
$ learnpack plugins:install someuser/someplugin
|
562
|
+
```
|
563
|
+
|
564
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/install.ts)_
|
565
|
+
|
566
|
+
## `learnpack plugins:link PLUGIN`
|
567
|
+
|
568
|
+
links a plugin into the CLI for development
|
569
|
+
|
570
|
+
```
|
571
|
+
USAGE
|
572
|
+
$ learnpack plugins:link PLUGIN
|
573
|
+
|
574
|
+
ARGUMENTS
|
575
|
+
PATH [default: .] path to plugin
|
576
|
+
|
577
|
+
OPTIONS
|
578
|
+
-h, --help show CLI help
|
579
|
+
-v, --verbose
|
580
|
+
|
581
|
+
DESCRIPTION
|
582
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
583
|
+
|
584
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
585
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
586
|
+
|
587
|
+
EXAMPLE
|
588
|
+
$ learnpack plugins:link myplugin
|
589
|
+
```
|
590
|
+
|
591
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/link.ts)_
|
592
|
+
|
593
|
+
## `learnpack plugins:uninstall PLUGIN...`
|
594
|
+
|
595
|
+
removes a plugin from the CLI
|
596
|
+
|
597
|
+
```
|
598
|
+
USAGE
|
599
|
+
$ learnpack plugins:uninstall PLUGIN...
|
600
|
+
|
601
|
+
ARGUMENTS
|
602
|
+
PLUGIN plugin to uninstall
|
603
|
+
|
604
|
+
OPTIONS
|
605
|
+
-h, --help show CLI help
|
606
|
+
-v, --verbose
|
607
|
+
|
608
|
+
ALIASES
|
609
|
+
$ learnpack plugins:unlink
|
610
|
+
$ learnpack plugins:remove
|
611
|
+
```
|
612
|
+
|
613
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/uninstall.ts)_
|
614
|
+
|
615
|
+
## `learnpack plugins:update`
|
616
|
+
|
617
|
+
update installed plugins
|
618
|
+
|
619
|
+
```
|
620
|
+
USAGE
|
621
|
+
$ learnpack plugins:update
|
622
|
+
|
623
|
+
OPTIONS
|
624
|
+
-h, --help show CLI help
|
625
|
+
-v, --verbose
|
626
|
+
```
|
627
|
+
|
628
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/update.ts)_
|
629
|
+
|
630
|
+
## `learnpack publish [PACKAGE]`
|
631
|
+
|
632
|
+
Describe the command here
|
633
|
+
|
634
|
+
```
|
635
|
+
USAGE
|
636
|
+
$ learnpack publish [PACKAGE]
|
637
|
+
|
638
|
+
ARGUMENTS
|
639
|
+
PACKAGE The unique string that identifies this package on learnpack
|
640
|
+
|
641
|
+
DESCRIPTION
|
642
|
+
...
|
643
|
+
Extra documentation goes here
|
644
|
+
```
|
645
|
+
|
646
|
+
_See code: [src/commands/publish.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/publish.ts)_
|
647
|
+
|
648
|
+
## `learnpack start`
|
649
|
+
|
650
|
+
Runs a small server with all the exercise instructions
|
651
|
+
|
652
|
+
```
|
653
|
+
USAGE
|
654
|
+
$ learnpack start
|
655
|
+
|
656
|
+
OPTIONS
|
657
|
+
-D, --disableGrading disble grading functionality
|
658
|
+
-d, --debug debugger mode for more verbage
|
659
|
+
-e, --editor=standalone|gitpod [standalone, gitpod]
|
660
|
+
-g, --grading=isolated|incremental [isolated, incremental]
|
661
|
+
-h, --host=host server host
|
662
|
+
-p, --port=port server port
|
663
|
+
-v, --version=version E.g: 1.0.1
|
664
|
+
-w, --watch Watch for file changes
|
665
|
+
```
|
666
|
+
|
667
|
+
_See code: [src/commands/start.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/start.ts)_
|
668
|
+
|
669
|
+
## `learnpack test [EXERCISESLUG]`
|
670
|
+
|
671
|
+
Test exercises
|
672
|
+
|
673
|
+
```
|
674
|
+
USAGE
|
675
|
+
$ learnpack test [EXERCISESLUG]
|
676
|
+
|
677
|
+
ARGUMENTS
|
678
|
+
EXERCISESLUG The name of the exercise to test
|
679
|
+
```
|
680
|
+
|
681
|
+
_See code: [src/commands/test.ts](https://github.com/learnpack/learnpack-cli/blob/v2.1.36/src/commands/test.ts)_
|
682
|
+
|
683
|
+
<!-- commandsstop -->
|
684
|
+
|
350
685
|
> > > > > > > 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" %*
|
package/lib/commands/audit.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import SessionCommand from "../utils/SessionCommand";
|
2
|
-
declare class AuditCommand extends SessionCommand {
|
3
|
-
init(): Promise<void>;
|
4
|
-
run(): Promise<void>;
|
5
|
-
}
|
6
|
-
export default AuditCommand;
|
1
|
+
import SessionCommand from "../utils/SessionCommand";
|
2
|
+
declare class AuditCommand extends SessionCommand {
|
3
|
+
init(): Promise<void>;
|
4
|
+
run(): Promise<void>;
|
5
|
+
}
|
6
|
+
export default AuditCommand;
|