@slimio/gitlab
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Gitlab

version Maintenance MIT dep size known vulnerabilities Build Status

Download and (optionaly) extract gitlab repository archive.

Requirements

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @slimio/gitlab
# or
$ yarn add @slimio/gitlab

Usage example

const download = require("@slimio/gitlab");

async function main() {
    const tarGZPath = await download("SlimIO.is");
    console.log(tarGZPath);
}
main().catch(console.error);

API

download(repo: String, options?): Promise< String >

Download a given "public" repository ! Return the name of the .tar.gz file (or the name of the extracted directory).

Repository should be formatted like that:

(org|username).repository_fullname

Available options are:

name type default description
branch string master Git branch to download
dest string process.cwd() Tar/Directory destination
extract boolean false Extract .tar.gz file
unlink boolean true Remove .tar.gz file on extraction
auth string undefined Basic Authentication for private repository

Env

To be able to work on the project, please create a root .env file with these:

GIT_TOKEN=token_here

Dependencies

Name Refactoring Security Risk Usage
@slimio/is Minor Low Type Checker
follow-redirects Minor Low HTTP Request with URL redirection support
tar-fs ⚠️Major High Extract tar archive

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @slimio/gitlab

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

9.94 kB

Total Files

5

Last publish

Collaborators

  • fraxken
  • alexandre.malaj