# tc-submission

> Submit to Topcoder challenges directly from CLI

Latest version **1.0.10** (published 2019-07-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install tc-submission
pnpm add tc-submission
yarn add tc-submission
bun add tc-submission
```

Provides the command `tc-submission`.

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2019-07-17 |
| First published | 2019-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 228.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Armaan |
| Maintainers | dsyefria |
| Keywords | topcoder, submission, submit, challenge |

## Links

- npm: https://www.npmjs.com/package/tc-submission
- npm.io page: https://npm.io/package/tc-submission

## Dependencies (11)

- [ora](https://npm.io/package/ora.md) ^3.4.0
- [chai](https://npm.io/package/chai.md) ^4.2.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [mocha](https://npm.io/package/mocha.md) ^6.1.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.14
- [request](https://npm.io/package/request.md) ^2.88.0
- [winston](https://npm.io/package/winston.md) ^2.4.0
- [archiver](https://npm.io/package/archiver.md) ^3.0.0
- [standard](https://npm.io/package/standard.md) ^13.0.1
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.4
- [topcoder-submission-api-wrapper](https://npm.io/package/topcoder-submission-api-wrapper.md) git+https://github.com/topcoder-platform/topcoder-submission-api-wrapper.git#master

## Recent versions

- 1.0.10 (latest) — 2019-07-17

## README

# Topcoder Submission CLI Tool

CLI tool to create submissions in single/multiple topcoder challanges

## How to publish as an npm package to the global repository

1. Login to your npm account

    ```bash
    npm login
    ```

2. Publish the package to the npm registery

    ```bash
    npm publish
    ```

## How to use this tool

1. Install the tool as a global npm dependency

    ```bash
    npm i -g tc-submission
    ```

2. Open the project folder for which you want to create a submission

    - Create a file .topcoderrc
    - Place the file in the root of your project
    - Add the following details

    ```javascript
    {
        "challengeIds": [
            "12345678",
            "91011121"...
        ],
        "userId": "<Your user ID>",
        "username": "<Your user Name>",
        "password": "<Your account password>"
    }
    ```

3. Run the follwoing command from the root of your project

    ```bash
    tc-submission
    ```

    You should be able to see the following output

    ```
    ⠋ Welcome to tc-submission _______                        _           
    |__   __|                      | |          
       | | ___  _ __   ___ ___   __| | ___ _ __ 
       | |/ _ \| '_ \ / __/ _ \ / _` |/ _ \ '__|
       | | (_) | |_) | (_| (_) | (_| |  __/ |   
       |_|\___/| .__/ \___\___/ \__,_|\___|_|   
            | |                              
            |_|            
    ✔ Submission details recieved
    ✔ User logged in
    ✔ Submission packaged
    ✔ Submission uploaded successfully to challenge 12345678
    ✔ Submission uploaded successfully to challenge 91011121
    ✔ All done
    ```

    [Demo Video](https://drive.google.com/file/d/19JqbGH4SaeaNfCXlh_UZ3eQQzwJ0TNEh/view?usp=sharing)

You are done!

### Running Test Cases

Make sure you have created the .topcoderrc file in the root of your project and then run

To run the tests alone, execute the command

    ```bash
    npm run test
    ```

To run tests with coverage report, execute the command

    ```bash
    npm run cov
    ```

---
_Source: https://npm.io/package/tc-submission · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
