diff --git a/README.md b/README.md index 55bb2b7..9aedc42 100755 --- a/README.md +++ b/README.md @@ -4,41 +4,12 @@ topcoder-cli #### Build Status: [![CircleCI](https://circleci.com/gh/topcoder-platform/topcoder-cli/tree/master.svg?style=svg)](https://circleci.com/gh/topcoder-platform/topcoder-cli/tree/master) ![npm (tag)](https://img.shields.io/npm/v/@topcoder/topcoder-cli/latest.svg?style=plastic) ![GitHub issues](https://img.shields.io/github/issues/topcoder-platform/topcoder-cli.svg?style=plastic) -# Dependencies -- nodejs https://nodejs.org/en/ (v10) -- npm https://www.npmjs.com/ (v6) - -# Configuration -Configuration for the application is at `config/default.js`. -The following parameters can be set in config files or in env variables: - -| Property | Environment varible | Default value | Description | -| --- | --- | --- | --- | -| LOG_LEVEL | LOG_LEVEL | info | control log level | -| SUBMISSION_API_URL | TEST_SUBMISSION_API_URL | https://api.topcoder.com/v5/submissions | the TC submission API URL | -| TC_AUTHN_URL | TC_AUTHN_URL | https://topcoder.auth0.com/oauth/ro | API that is used to fetch JWT token v2 | -| TC_AUTHZ_URL | TC_AUTHZ_URL | https://api.topcoder.com/v3/authorizations | API that is used to fetch JWT token v3 | -| TC_CLIENT_ID | TC_CLIENT_ID | 6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P | TC client ID | -| TC_CLIENT_V2CONNECTION | CLIENT_V2CONNECTION | TC-User-Database | TC client connection protocol | - -# Publish the package to npm -- Create a npm account on https://www.npmjs.com/signup if you don't have one. -- Use the account to sign in via cli: `npm login` -- In the root directory of the project, run `npm publish --access=public` to publish the package to npm registry. - -## Notes -- 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` - to a unique one. -- When you make changes to your code and want to update the package you'll need to update the version of the package. - After that, run `npm publish` again to republish the package. -- If you want to remove the package from npm registry anyway, run `npm unpublish --force` under the root directory of the project. - # Installation -- After you published the package to npm registry you can then install the package via npm-cli: +- Install the package via npm-cli: ``` node -npm install -g +npm i -g @topcoder/topcoder-cli ``` # Usage @@ -54,24 +25,6 @@ An example `.topcoderrc` file should conform to at least the following structure "30095545" // at least one item here ], "username": "TonyJ", - "password": "appirio123" + "password": "******" } ``` - -# test - -## Prepare -- Install dependencies `npm install` - -## Unit test -To run unit tests alone - -```bash -npm run test -``` - -To run unit tests with coverage report - -```bash -npm run test:cov -``` diff --git a/docs/Development.md b/docs/Development.md new file mode 100755 index 0000000..cc14268 --- /dev/null +++ b/docs/Development.md @@ -0,0 +1,49 @@ +topcoder-cli +=== + +# Dependencies +- nodejs https://nodejs.org/en/ (v10) +- npm https://www.npmjs.com/ (v6) + +# Configuration +Configuration for the application is at `config/default.js`. +The following parameters can be set in config files or in env variables: + +| Property | Environment varible | Default value | Description | +| --- | --- | --- | --- | +| LOG_LEVEL | LOG_LEVEL | info | control log level | +| SUBMISSION_API_URL | TEST_SUBMISSION_API_URL | https://api.topcoder.com/v5/submissions | the TC submission API URL | +| TC_AUTHN_URL | TC_AUTHN_URL | https://topcoder.auth0.com/oauth/ro | API that is used to fetch JWT token v2 | +| TC_AUTHZ_URL | TC_AUTHZ_URL | https://api.topcoder.com/v3/authorizations | API that is used to fetch JWT token v3 | +| TC_CLIENT_ID | TC_CLIENT_ID | 6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P | TC client ID | +| TC_CLIENT_V2CONNECTION | CLIENT_V2CONNECTION | TC-User-Database | TC client connection protocol | + +# Publish the package to npm +- Create a npm account on https://www.npmjs.com/signup if you don't have one. +- Use the account to sign in via cli: `npm login` +- In the root directory of the project, run `npm publish --access=public` to publish the package to npm registry. + +## Notes +- 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` + to a unique one. +- When you make changes to your code and want to update the package you'll need to update the version of the package. + After that, run `npm publish` again to republish the package. +- If you want to remove the package from npm registry anyway, run `npm unpublish --force` under the root directory of the project. + +# test + +## Prepare +- Install dependencies `npm install` + +## Unit test +To run unit tests alone + +```bash +npm run test +``` + +To run unit tests with coverage report + +```bash +npm run test:cov +``` diff --git a/package-lock.json b/package-lock.json index 1fd6274..bc03c94 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "tc-submission-cli", - "version": "1.0.0", + "name": "@topcoder/topcoder-cli", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index dedc1ea..2d12046 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@topcoder/topcoder-cli", - "version": "1.0.2", + "version": "1.0.3", "description": "A CLI tool that will be used by Topcoder members to submit their solutions on challenges.", "main": "index.js", "scripts": {