{"id":16003021,"url":"https://github.com/nodesecure/gitlab","last_synced_at":"2025-03-18T01:31:44.345Z","repository":{"id":37980875,"uuid":"237529338","full_name":"NodeSecure/gitlab","owner":"NodeSecure","description":"Download and extract gitlab repository","archived":false,"fork":false,"pushed_at":"2024-10-01T07:04:54.000Z","size":327,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-09T10:05:27.898Z","etag":null,"topics":["archive","download","extract","extractor","git","gitlab","targz","targz-extractor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NodeSecure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-31T22:47:48.000Z","updated_at":"2024-10-01T07:04:52.000Z","dependencies_parsed_at":"2023-11-07T03:25:14.107Z","dependency_job_id":"e3d1a9d6-b994-46c0-8ec1-6892416f50b3","html_url":"https://github.com/NodeSecure/gitlab","commit_stats":{"total_commits":53,"total_committers":11,"mean_commits":4.818181818181818,"dds":0.5471698113207547,"last_synced_commit":"040332aae3779f487e304acf4d2a492bbdd27b7d"},"previous_names":["slimio/gitlab"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeSecure%2Fgitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeSecure%2Fgitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeSecure%2Fgitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeSecure%2Fgitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NodeSecure","download_url":"https://codeload.github.com/NodeSecure/gitlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221704494,"owners_count":16866765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","download","extract","extractor","git","gitlab","targz","targz-extractor"],"created_at":"2024-10-08T10:05:46.694Z","updated_at":"2025-03-18T01:31:44.339Z","avatar_url":"https://github.com/NodeSecure.png","language":"TypeScript","readme":"# Gitlab\n\n![version](https://img.shields.io/badge/dynamic/json.svg?style=for-the-badge\u0026url=https://raw.githubusercontent.com/NodeSecure/gitlab/master/package.json\u0026query=$.version\u0026label=Version)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=for-the-badge)](https://github.com/NodeSecure/gitlab/graphs/commit-activity)\n[![OpenSSF\nScorecard](https://api.securityscorecards.dev/projects/github.com/NodeSecure/gitlab/badge?style=for-the-badge)](https://api.securityscorecards.dev/projects/github.com/NodeSecure/gitlab)\n![MIT](https://img.shields.io/github/license/NodeSecure/gitlab.svg?style=for-the-badge)\n![build](https://img.shields.io/github/actions/workflow/status/NodeSecure/gitlab/node.js.yml?style=for-the-badge)\n\nDownload and (optionaly) extract gitlab repository archive.\n\n## Requirements\n\n- [Node.js](https://nodejs.org/en/) v20 or higher\n\n## Getting Started\n\nThis package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).\n\n```bash\n$ npm i @nodesecure/gitlab\n# or\n$ yarn add @nodesecure/gitlab\n```\n\n## Usage example\n\n```js\nimport * as gitlab from \"@nodesecure/gitlab\";\n\n// Note: repository can be either namespace path or repository ID\nconst result = await gitlab.download(\n  \"NodeSecure.utils\"\n);\nconsole.log(result);\n```\n\n## API\n\nBoth `download` and `downloadAndExtract` functions use the same set of options.\n\n```ts\ninterface DownloadOptions {\n  /**\n   * The destination (location) to extract the tar.gz\n   *\n   * @default process.cwd()\n   */\n  dest?: string;\n  /**\n   * The default gitlab branch name (master, main ...).\n   * By default it fetch the \"default\" gitlab branch.\n   *\n   * @default null\n   */\n  branch?: string | null;\n  /**\n   * Authentication token for private repositories\n   *\n   * @default process.env.GITLAB_TOKEN\n   */\n  token?: string;\n  /**\n   * @default https://gitlab.com/api/v4/projects/\n   */\n  gitlab?: string;\n}\n```\n\n### download(repository: string, options?: DownloadOptions): Promise\u003c DownloadResult \u003e\nDownload the tar.gz archive of the GIT repository.\n\n```ts\ninterface DownloadResult {\n  /** Archive or repository location on disk */\n  location: string;\n  /** Gitlab repository name */\n  repository: string;\n  /** Gitlab organization name */\n  organization: string;\n  /** Gitlab branch name */\n  branch: string;\n}\n```\n\n### downloadAndExtract(repository: string, options?: DownloadExtractOptions): Promise\u003c DownloadResult \u003e\nUse download but extract the tar.gz archive.\n\n```ts\ninterface DownloadExtractOptions extends DownloadOptions {\n  /**\n   * Remove the tar.gz archive after a succesfull extraction\n   *\n   * @default true\n   */\n  removeArchive?: boolean;\n}\n```\n\n## Contributors ✨\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.linkedin.com/in/thomas-gentilhomme/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4438263?v=4?s=100\" width=\"100px;\" alt=\"Gentilhomme\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGentilhomme\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/NodeSecure/gitlab/commits?author=fraxken\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/NodeSecure/gitlab/commits?author=fraxken\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/NodeSecure/gitlab/pulls?q=is%3Apr+reviewed-by%3Afraxken\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"#security-fraxken\" title=\"Security\"\u003e🛡️\u003c/a\u003e \u003ca href=\"https://github.com/NodeSecure/gitlab/issues?q=author%3Afraxken\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://mickaelcroquet.fr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/23740372?v=4?s=100\" width=\"100px;\" alt=\"Haze\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHaze\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/NodeSecure/gitlab/commits?author=CroquetMickael\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/AlexandreMalaj\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/32218832?v=4?s=100\" width=\"100px;\" alt=\"Alexandre Malaj\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexandre Malaj\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/NodeSecure/gitlab/commits?author=AlexandreMalaj\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/NodeSecure/gitlab/commits?author=AlexandreMalaj\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/fabnguess\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/72697416?v=4?s=100\" width=\"100px;\" alt=\"Kouadio Fabrice Nguessan\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKouadio Fabrice Nguessan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-fabnguess\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/FredGuiou\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/99122562?v=4?s=100\" width=\"100px;\" alt=\"FredGuiou\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFredGuiou\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-FredGuiou\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesecure%2Fgitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesecure%2Fgitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesecure%2Fgitlab/lists"}