1.1.3 • Published 2 years ago

agcli v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Open in Visual Studio Code

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

Product Name Screen Shot

Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: dyte-submissions, dyte-vit-2022-AbhinavGor, twitter_handle, linkedin_username, gmail, abhinav20016, agCLI, A command line tool built using NodeJS to help update npm packages on github repositories.

Built With

Getting Started

To use this package, you can install it directly from npmjs.org using the package manager, npm.

Prerequisites

You can install my npm package, agcli using the following command.

  • npm
    npm install agcli@latest -g

Installation

You can also setup the project locally and run the commands.

  1. Get a Github developer Auth key at https://github.com/settings/tokens.
  2. Clone the repo
    git clone https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor.git
  3. Install NPM packages
    npm install
  4. Change the name of .example.env to .env.
  5. Enter your API in .env
    const GITHUB_TOKEN = {ENTER YOUR Auth token};
  6. Enter your github username and password in .env file.
    USER_NAME={your github username}
    USER_EMAIL={email associated with your github account}

Usage

  1. This command checks if any of the repositories listed in the csv file have an older version of the package and version specified. The "-update" flag takes control of updating the specified package.
    agcli -i <input_repositories_csv_file> <package_name@version> -update
    command-screenshot-1
  2. The command shown above can also be used without the "-update" flag as shown below.
    agcli -i <input_repositories_csv_file> <package_name@version>
    command-screenshot-2
  3. If the specified version number of the package does not exist, then an error is thrown as shown below. command-screenshot-3
  4. The get-updates <repository_url> command allows users to get the latest version of all the npm packages being used in the specified github project.
    agcli get-updates <repository_url>
    command-screenshot-4
  5. The users can then specifiy the indices of the dependencies in the table which they want to update, PRs are made to update those npm packages. command-screenshot-5
  6. Help can be accessed using the following command:
    agcli --help

Roadmap

  • Compare the version of the npm package in the project and the one specified by the user in the command and tell if the version is satisfied or not.
    • Check if the version of the package specified by user actually exists for that particular npm package or not. Implemented using pkg-versions.
  • If the version is not satisfied in the above step, make a PR to the repository mentioned to update the npm package to the required version.
  • get-updates command - Check if all the packages are up to date in a given github project and report result.
    • If the version of the packages is not the latest, ask the user which ones they want to update and make PR to update those packages.

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Abhinav Gorantla - abhinav20016@gmail.com

Project Link: https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor