track-cli 3.0.0-rc2 → 3.0.0
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 +18 -0
- package/esm/_dnt.shims.js +0 -1
- package/esm/src/action/lang.js +1 -1
- package/esm/src/main.js +7 -7
- package/esm/src/meta.d.ts +1 -1
- package/esm/src/meta.js +1 -1
- package/esm/src/shared/mod.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
# Track CLI
|
|
2
2
|
|
|
3
3
|
A CLI for interacting with tracks.run and running code tests on Track Test's servers
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Requirements
|
|
8
|
+
|
|
9
|
+
* Node.js (v16 or higher)
|
|
10
|
+
|
|
11
|
+
### Install from NPM
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install --global track-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
See the documentation
|
|
20
|
+
* [CLI 受験の流れ (日本語)](https://help.tracks.run/ja/articles/2333039-cli-%E5%8F%97%E9%A8%93%E3%81%AE%E6%B5%81%E3%82%8C)
|
|
21
|
+
* [How to take exam using local IDE on Track (English)](https://help.tracks.run/ja/articles/2332950-how-to-take-exam-using-local-ide-on-track)
|
package/esm/_dnt.shims.js
CHANGED
package/esm/src/action/lang.js
CHANGED
|
@@ -16,7 +16,7 @@ export async function lang() {
|
|
|
16
16
|
const availableLanguages = (await api.getProgrammingLanguages())
|
|
17
17
|
.filter((pl) => codingContext.programmingLanguages.find((n) => n === pl.value));
|
|
18
18
|
console.log("Your existing code will be archived in this directory and the original challenge code for the new language will be downloaded");
|
|
19
|
-
const shouldContinue = dntShim.confirm("Are you sure you want to continue?
|
|
19
|
+
const shouldContinue = dntShim.confirm("Are you sure you want to continue?");
|
|
20
20
|
if (!shouldContinue) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
package/esm/src/main.js
CHANGED
|
@@ -27,8 +27,8 @@ import { Command } from "../deps/deno.land/x/cliffy@v0.25.7/command/mod.js";
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
const runCommand = new Command()
|
|
30
|
-
.description("Save and run the challenge on the remote code execution server")
|
|
31
|
-
.option("--no-save", "If this flag is specified, your files will not be uploaded to track after running the challenge tests")
|
|
30
|
+
.description("Save and run the challenge on the remote code execution server.")
|
|
31
|
+
.option("--no-save", "If this flag is specified, your files will not be uploaded to track after running the challenge tests.")
|
|
32
32
|
.action(async ({ save }) => {
|
|
33
33
|
await runAction({ noSave: !save });
|
|
34
34
|
});
|
|
@@ -38,30 +38,30 @@ import { Command } from "../deps/deno.land/x/cliffy@v0.25.7/command/mod.js";
|
|
|
38
38
|
await langAction();
|
|
39
39
|
});
|
|
40
40
|
const resetCommand = new Command()
|
|
41
|
-
.description("Reset the challenge files back to their starting point and archive your current challenge files")
|
|
41
|
+
.description("Reset the challenge files back to their starting point and archive your current challenge files.")
|
|
42
42
|
.action(async () => {
|
|
43
43
|
await resetAction();
|
|
44
44
|
});
|
|
45
45
|
const pullCommand = new Command()
|
|
46
|
-
.description("Pull your most recent changes into this directory (caution: overwrites existing files)")
|
|
46
|
+
.description("Pull your most recent changes into this directory (caution: overwrites existing files).")
|
|
47
47
|
.action(async () => {
|
|
48
48
|
await pullAction();
|
|
49
49
|
});
|
|
50
50
|
const addCommand = new Command()
|
|
51
|
-
.description("Add a file to be included in your challenge submission")
|
|
51
|
+
.description("Add a file to be included in your challenge submission.")
|
|
52
52
|
.arguments("<file_paths...:string>")
|
|
53
53
|
.action(async (_, ...filePaths) => {
|
|
54
54
|
await addAction(filePaths);
|
|
55
55
|
});
|
|
56
56
|
const removeCommand = new Command()
|
|
57
|
-
.description("Remove files from your challenge submission")
|
|
57
|
+
.description("Remove files from your challenge submission.")
|
|
58
58
|
.arguments("<file_paths...:string>")
|
|
59
59
|
.option("-r --recursive", "Allow recursive removal when a directory is given")
|
|
60
60
|
.action(async ({ recursive }, ...filePaths) => {
|
|
61
61
|
await removeAction(filePaths, { recursive });
|
|
62
62
|
});
|
|
63
63
|
const statusCommand = new Command()
|
|
64
|
-
.description("Display the current status for this challenge")
|
|
64
|
+
.description("Display the current status for this challenge.")
|
|
65
65
|
.action(async () => {
|
|
66
66
|
await statusAction();
|
|
67
67
|
});
|
package/esm/src/meta.d.ts
CHANGED
package/esm/src/meta.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as colors from "../deps/deno.land/std@0.195.0/fmt/colors.js";
|
|
2
2
|
// @ts-ignore: has no exported member
|
|
3
3
|
import { CookieJar, fetch } from "node-fetch-cookies";
|
|
4
|
-
export const VERSION = "3.0.0
|
|
4
|
+
export const VERSION = "3.0.0";
|
|
5
5
|
export const DESCRIPTION = "A CLI for interacting with tracks.run and running code tests on track's servers";
|
|
6
6
|
const VERSION_RE = /^(\d+)\.(\d+)\.(\d+)(?:-?(.*))$/;
|
|
7
7
|
function parseSemver(s) {
|
package/esm/src/shared/mod.js
CHANGED
|
@@ -104,7 +104,7 @@ export async function tryStartingChallenge(challenge, api, applicantExam, result
|
|
|
104
104
|
? `The challenge will start after this point.\n${timeMsg}`
|
|
105
105
|
: `The challenge will start after you select a programming language in the next step.\n${timeMsg}`;
|
|
106
106
|
console.log(wariningMsg);
|
|
107
|
-
const shouldContinue = dntShim.confirm("Do you want to continue?
|
|
107
|
+
const shouldContinue = dntShim.confirm("Do you want to continue?");
|
|
108
108
|
if (!shouldContinue) {
|
|
109
109
|
throw new OtherError("Aborted. Challenge was not started.");
|
|
110
110
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"track": "./esm/src/main.js"
|
|
4
4
|
},
|
|
5
5
|
"name": "track-cli",
|
|
6
|
-
"version": "3.0.0
|
|
6
|
+
"version": "3.0.0",
|
|
7
7
|
"description": "A CLI for interacting with tracks.run and running code tests on track's servers",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "node test_runner.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@hazae41/foras": "
|
|
20
|
+
"@hazae41/foras": "2.0.8",
|
|
21
21
|
"eventemitter3": "5.0.1",
|
|
22
22
|
"node-fetch-cookies": "2.0.4",
|
|
23
23
|
"proxy-agent": "6.3.0",
|