1
1
topcoder-cli
2
2
===
3
3
4
- # Dependencies
5
- - nodejs https://nodejs.org/en/ (v10)
6
- - npm https://www.npmjs.com/ (v6)
7
-
8
- # Configuration
9
- Configuration for the application is at ` config/default.js ` .
10
- The following parameters can be set in config files or in env variables:
11
-
12
- | Property | Environment varible | Default value | Description |
13
- | --- | --- | --- | --- |
14
- | LOG_LEVEL | LOG_LEVEL | info | control log level |
15
- | SUBMISSION_API_URL | TEST_SUBMISSION_API_URL | https://api.topcoder.com/v5/submissions | the TC submission API URL |
16
- | TC_AUTHN_URL | TC_AUTHN_URL | https://topcoder.auth0.com/oauth/ro | API that is used to fetch JWT token v2 |
17
- | TC_AUTHZ_URL | TC_AUTHZ_URL | https://api.topcoder.com/v3/authorizations | API that is used to fetch JWT token v3 |
18
- | TC_CLIENT_ID | TC_CLIENT_ID | 6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P | TC client ID |
19
- | TC_CLIENT_V2CONNECTION | CLIENT_V2CONNECTION | TC-User-Database | TC client connection protocol |
20
-
21
- # Publish the package to npm
22
- - Create a npm account on https://www.npmjs.com/signup if you don't have one.
23
- - Use the account to sign in via cli: ` npm login `
24
- - In the root directory of the project, run ` npm publish --access=public ` to publish the package to npm registry.
25
-
26
- ## Notes
27
- - In rare cases the module name would have been used by others. You may need to change the value of the ` name ` field in ` package.json `
28
- to a unique one.
29
- - When you make changes to your code and want to update the package you'll need to update the version of the package.
30
- After that, run ` npm publish ` again to republish the package.
31
- - If you want to remove the package from npm registry anyway, run ` npm unpublish --force ` under the root directory of the project.
32
-
33
4
# Installation
34
5
35
- - After you published the package to npm registry you can then install the package via npm-cli:
6
+ - Install the package via npm-cli:
36
7
37
8
``` node
38
- npm install - g < your package name here >
9
+ npm i - g @topcoder / topcoder - cli
39
10
```
40
11
41
12
# Usage
@@ -51,24 +22,6 @@ An example `.topcoderrc` file should conform to at least the following structure
51
22
"30095545" // at least one item here
52
23
],
53
24
"username": "TonyJ",
54
- "password": "appirio123 "
25
+ "password": "****** "
55
26
}
56
27
```
57
-
58
- # test
59
-
60
- ## Prepare
61
- - Install dependencies ` npm install `
62
-
63
- ## Unit test
64
- To run unit tests alone
65
-
66
- ``` bash
67
- npm run test
68
- ```
69
-
70
- To run unit tests with coverage report
71
-
72
- ``` bash
73
- npm run test:cov
74
- ```
0 commit comments