@gitbeaker/cli 35.7.0 → 36.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,39 +1,203 @@
1
1
  <div align="center">
2
2
  <br>
3
- <img alt="gitbeaker" src=".github/ASSETS/header.svg">
3
+ <img alt="gitbeaker" src="../../.github/ASSETS/header.svg">
4
4
  </div>
5
5
  <br>
6
6
  <p align="center">
7
- <a href="https://circleci.com/gh/jdalrymple/gitbeaker/tree/master">
8
- <img src="https://circleci.com/gh/jdalrymple/gitbeaker/tree/master.svg?style=svg" alt="CircleCI Pipeline Status">
9
- </a>
10
- <a href="https://codeclimate.com/github/jdalrymple/gitbeaker">
11
- <img src="https://codeclimate.com/github/jdalrymple/gitbeaker/badges/gpa.svg" alt="Code Climate maintainability">
12
- </a>
13
- <a href="https://codecov.io/gh/jdalrymple/gitbeaker">
14
- <img src="https://img.shields.io/codecov/c/github/jdalrymple/gitbeaker/master.svg" alt="CodeCov test coverage">
15
- </a>
16
- <a href="https://david-dm.org/jdalrymple/gitbeaker?path=packages/cli">
17
- <img src="https://status.david-dm.org/gh/jdalrymple/gitbeaker.svg?path=packages/cli" alt="Dependency Status" />
18
- </a>
19
- <a href="https://david-dm.org/jdalrymple/gitbeaker?path=packages/cli&type=dev">
20
- <img src="https://status.david-dm.org/gh/jdalrymple/gitbeaker.svg?path=packages/cli&type=dev" alt="Dev Dependency Status" />
21
- </a>
22
- <a href="https://github.com/intuit/auto">
23
- <img src="https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto" alt="Auto">
24
- </a>
25
- <a href="#contributors-">
26
- <img src="https://img.shields.io/badge/all_contributors-orange.svg?style=round" alt="All Contributors" />
27
- </a>
28
- <img src="https://img.shields.io/badge/code%20style-prettier-ff69b4.svg" alt="Prettier">
7
+ <a href="https://gitlab.com/jdalrymple/gitbeaker/-/commits/main"><img alt="pipeline status" src="https://gitlab.com/jdalrymple/gitbeaker/badges/main/pipeline.svg" /></a>
8
+ <a href="https://gitlab.com/jdalrymple/gitbeaker/-/commits/main"><img alt="coverage report" src="https://gitlab.com/jdalrymple/gitbeaker/badges/main/coverage.svg" /></a>
9
+
10
+ <a href="https://codeclimate.com/github/jdalrymple/gitbeaker">
11
+ <img src="https://codeclimate.com/github/jdalrymple/gitbeaker/badges/gpa.svg" alt="Code Climate maintainability">
12
+ </a>
13
+
14
+ <a href="https://david-dm.org/jdalrymple/gitbeaker">
15
+ <img src="https://status.david-dm.org/gh/jdalrymple/gitbeaker.svg" alt="Dependency Status" />
16
+ </a>
17
+ <a href="https://david-dm.org/jdalrymple/gitbeaker?type=dev">
18
+ <img src="https://status.david-dm.org/gh/jdalrymple/gitbeaker.svg?type=dev" alt="Dev Dependency Status" />
19
+ </a>
20
+ <a href="https://github.com/intuit/auto">
21
+ <img src="https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto" alt="Auto">
22
+ </a>
23
+ <a href="#contributors-">
24
+ <img src="https://img.shields.io/badge/all_contributors-orange.svg?style=round" alt="All Contributors" />
25
+ </a>
26
+ <img src="https://img.shields.io/badge/code%20style-prettier-ff69b4.svg" alt="Prettier">
29
27
  <a href="LICENSE.md">
30
28
  <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Licence: MIT">
31
29
  </a>
32
30
  <a href="https://packagephobia.now.sh/result?p=@gitbeaker/cli">
33
- <img src="https://packagephobia.now.sh/badge?p=@gitbeaker/cli" alt="Install Size: Core">
31
+ <img src="https://packagephobia.now.sh/badge?p=@gitbeaker/cli" alt="Install Size: CLI">
34
32
  </a>
35
33
  </p>
36
34
 
37
- 🤖 [GitLab](https://gitlab.com/gitlab-org/gitlab/) API CLI library with full support of all the [Gitlab API](https://gitlab.com/gitlab-org/gitlab/tree/master/doc/api) services.
35
+ > A CLI Wrapper for the [@gitbeaker/rest](https://www.npmjs.com/package/@gitbeaker/rest) SDK.
36
+
37
+ ## Table of Contents
38
+
39
+ - [Usage](#usage)
40
+ - [Contributors](#contributors)
41
+ - [Changelog](./CHANGELOG.md)
42
+
43
+ ## Usage
44
+
45
+ <table>
46
+ <tbody valign=top align=left>
47
+ <tr><th>
48
+ Node 18+
49
+ </th><td>
50
+
51
+ Install with <code>npm install -g @gitbeaker/cli</code>, or <code>yarn add -g @gitbeaker/cli</code>
52
+
53
+ ```bash
54
+ gitbeaker [service name] [method name] --config_args pos_arg1 pos_argN --opts_arg1 --opts_argN
55
+
56
+ # A shorthand can also be used:
57
+ gb [service name] [method name] --config_args pos_arg1 pos_argN --opts_arg1 --opts_argN
58
+ ```
59
+
60
+ Where:
61
+
62
+ - `service name` is any of the supported API names of the [@gitbeaker/rest](https://github.com/jdalrymple/gitbeaker/blob/main/packages/rest/README.md) sdk
63
+ - `method name` is any of the supported commands on that API service (See source for exceptions, but generally all, show, remove, update)
64
+ - `--config_args` is any of general configuration arguments such as your personal token. These are outlined in the this [table](https://github.com/jdalrymple/gitbeaker/blob/main/README.md?#api-client) and can also be found by looking at the cli help menu. These arguments must also include a `gb` or `gl` prefix. ie.
65
+
66
+ ```bash
67
+ # To get all the projects
68
+ gitbeaker projects all --gb-token="personaltoken"
69
+ ```
70
+
71
+ - `pos_arg1 ... pos_argN` are any of the arguments you would normally supply to the function. The names of the args should match the names in the method headers. These positional arguments can also be written as flag arguments: `--pos_arg1 ... --pos_argN`, **BUT** must be written in the correct order.
72
+ - `--opts_arg1 ...--opts_argN` are any of the optional arguments that you would normally supply to the function. Their names should match what the GitLab API docs request.
73
+
74
+ ```bash
75
+ # To get all the projects id=2 and optional parameter "search" = "cool"
76
+ gitbeaker projects all --gb-token="personaltoken" 2 --search="cool"
77
+ ```
78
+
79
+ To reduce the annoyance of having to pass those configuration properties each time, it is also possible to pass the token and host information through environment variables in the form of `GITLAB_[option name]` or `GITBEAKER_[option name]` ie:
80
+
81
+ ```bash
82
+ GITLAB_HOST=http://example.com
83
+ GITLAB_TOKEN=personaltoken
84
+ GITBEAKER_CAMELIZE=true
85
+ ```
86
+
87
+ This could be set globally or using a [.env](https://github.com/motdotla/dotenv#readme) file in the project folder.
88
+
89
+ </td></tr>
90
+ </tbody>
91
+ </table>
92
+
93
+ ## Contributors
94
+
95
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
96
+ <!-- prettier-ignore-start -->
97
+ <!-- markdownlint-disable -->
98
+ <p>
99
+ <tr>
100
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/jdalrymple"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/3743662?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Justin Dalrymple"/></td>
101
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/dylandesrosier"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13701258?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dylan DesRosier"/></td>
102
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/mikew"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4729?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mike Wyatt"/></td>
103
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/coryzibell"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7986014?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Cory Zibeill"/></td>
104
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/shadygrove"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5209850?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Bour"/></td>
105
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/akira345"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/655764?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="akira345"/></td>
106
+ <td align="center" valign="top" width="3.7%"><a href="https://birukov.me"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/1861546?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Pavel Birukov "/></td>
107
+ <td align="center" valign="top" width="3.7%"><a href="http://jetersen.dev"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/1661688?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Joseph Petersen"/></td>
108
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Musinux"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/563373?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Louis Cherel"/></td>
109
+ <td align="center" valign="top" width="3.7%"><a href="http://www.arsdehnel.net"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/1697162?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Adam Dehnel"/></td>
110
+ <td align="center" valign="top" width="3.7%"><a href="http://www.haus.gg/"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/226640?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ev Haus"/></td>
111
+ <td align="center" valign="top" width="3.7%"><a href="http://iGLOO.be"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/900947?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Loïc Mahieu"/></td>
112
+ <td align="center" valign="top" width="3.7%"><a href="http://www.giuseppeangri.com"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/9075163?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Giuseppe Angri"/></td>
113
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/jennparise"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/4134086?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="jennparise"/></td>
114
+ <td align="center" valign="top" width="3.7%"><a href="http://obartra.github.io"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/3877773?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Oscar"/></td>
115
+ <td align="center" valign="top" width="3.7%"><a href="https://daniel-ruf.de"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/827205?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Daniel Ruf"/></td>
116
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/schindld"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/1659632?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="schindld"/></td>
117
+ <td align="center" valign="top" width="3.7%"><a href="https://alvarobg.com"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/12004383?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Alvaro"/></td>
118
+ <td align="center" valign="top" width="3.7%"><a href="http://northhorizon.net"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/616152?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Daniel Moore"/></td>
119
+ <td align="center" valign="top" width="3.7%"><a href="https://dylanmtaylor.com"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/277927?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dylan M. Taylor"/></td>
120
+ <td align="center" valign="top" width="3.7%"><a href="https://pixelswap.fr/"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/4266283?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Corentin Mors"/></td>
121
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/xatavian"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/17217965?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xatavian"/></td>
122
+ <td align="center" valign="top" width="3.7%"><a href="https://stackoverflow.com/story/yepninja"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/11796206?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Yevgeny Petukhov"/></td>
123
+ <td align="center" valign="top" width="3.7%"><a href="https://about.me/mickaeltr"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/378910?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mickaël Tricot"/></td>
124
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/andreasciamanna"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/181780?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Andrea"/></td>
125
+ <td align="center" valign="top" width="3.7%"><a href="http://www.ircad.fr/"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/8638653?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Flavien Bridault"/></td>
126
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/s-kazuki"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/9253374?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="s-kazuki"/></td>
127
+ </tr><br />
128
+ <tr>
129
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/kiprasmel"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/29430509?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kipras Melnikovas"/></td>
130
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Gkxie"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/27680715?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xieyu"/></td>
131
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/st1gok"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/13641693?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="st1gok"/></td>
132
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/max-wittig"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/6639323?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Max Wittig"/></td>
133
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/nlochschmidt"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/759624?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Niklas Lochschmidt"/></td>
134
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/illyaMs"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/26578665?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ilya Dus"/></td>
135
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/wamry"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/32439651?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Omar Awamry"/></td>
136
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Sumragen"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/15640910?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Hennadii Varava"/></td>
137
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/xiezht"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/18051618?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xiezht"/></td>
138
+ <td align="center" valign="top" width="3.7%"><a href="http://www.martin-helmich.de/en"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/2538958?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Helmich"/></td>
139
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/smcgivern"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/1120328?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Sean McGivern"/></td>
140
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Vogel612"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7288995?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Clemens Lieb"/></td>
141
+ <td align="center" valign="top" width="3.7%"><a href="https://sajdl.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5222912?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Vojtěch Sajdl"/></td>
142
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/divido"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4614626?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="divido"/></td>
143
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/vboulaye"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/652767?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Vincent Boulaye"/></td>
144
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Aliyss"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/33941859?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Aliyss Snow"/></td>
145
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/saada"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1087987?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mahmoud Saada"/></td>
146
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/F3n67u"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/12343178?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Feng Yu"/></td>
147
+ <td align="center" valign="top" width="3.7%"><a href="https://datatra.sh/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/173822?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Roy Jacobs"/></td>
148
+ <td align="center" valign="top" width="3.7%"><a href="http://www.paullemke.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/976010?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Paul Lemke"/></td>
149
+ <td align="center" valign="top" width="3.7%"><a href="http://jenko.me/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/131355?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ian Jenkins"/></td>
150
+ <td align="center" valign="top" width="3.7%"><a href="https://www.nilennoct.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4055220?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="nilennoct"/></td>
151
+ <td align="center" valign="top" width="3.7%"><a href="http://michael.laffargue.fr/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/503129?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Laffargue Michael"/></td>
152
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/MartinHowarth"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7187425?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Howarth"/></td>
153
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/christophlehmann"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4953689?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Christoph Lehmann"/></td>
154
+ <td align="center" valign="top" width="3.7%"><a href="https://theopensourceu.org/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/253471?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Frank V"/></td>
155
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Salimlou"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/357286?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Salim Benabbou"/></td>
156
+ </tr><br />
157
+ <tr>
158
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/tvtamas"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1945260?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Tamás Török-Vistai"/></td>
159
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/MartinBenninger"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/20296116?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Benninger"/></td>
160
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/fewieden"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9334168?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="fewieden"/></td>
161
+ <td align="center" valign="top" width="3.7%"><a href="https://www.jeffpelton.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/36627?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Jeff Pelton"/></td>
162
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/claude-abounegm"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11809881?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Claude Abounegm"/></td>
163
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Marethyu1"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/17978203?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Stefan Hall"/></td>
164
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Mr-Wallet"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/799000?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Jordan Wallet"/></td>
165
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/zhao0"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7556666?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="zhao0"/></td>
166
+ <td align="center" valign="top" width="3.7%"><a href="https://www.linkedin.com/in/joshuagrosso"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4530584?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Joshua Grosso"/></td>
167
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/yonguelink"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9469187?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Isaac Ouellet Therrien"/></td>
168
+ <td align="center" valign="top" width="3.7%"><a href="https://wearecws.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/24895138?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Rajat Sharma"/></td>
169
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Casz"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/65105345?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Cesar B."/></td>
170
+ <td align="center" valign="top" width="3.7%"><a href="https://blog.katsuba.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/10637135?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Igor Katsuba"/></td>
171
+ <td align="center" valign="top" width="3.7%"><a href="http://www.doublespeakgames.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4884483?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Michael Townsend"/></td>
172
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/bodtx"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1039550?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="bodtx"/></td>
173
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/arthot"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1815294?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Artem"/></td>
174
+ <td align="center" valign="top" width="3.7%"><a href="https://muniftanjim.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8050659?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Munif Tanjim"/></td>
175
+ <td align="center" valign="top" width="3.7%"><a href="https://www.qkdreyer.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/717869?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Quentin Dreyer"/></td>
176
+ <td align="center" valign="top" width="3.7%"><a href="https://iwritethe.codes/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/192728?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Norm MacLennan"/></td>
177
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/jnovick"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7881319?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="jnovick"/></td>
178
+ <td align="center" valign="top" width="3.7%"><a href="https://www.fabianaussems.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/57530?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Fabian Aussems"/></td>
179
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/mima0815"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/14311597?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Michael Matzka"/></td>
180
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/CraigAllardyce"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9052289?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="CraigAllardyce"/></td>
181
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/brunobastosg"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/320122?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Bruno Guimarães"/></td>
182
+ <td align="center" valign="top" width="3.7%"><a href="http://leipert.io/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/2906107?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Lukas Eipert"/></td>
183
+ <td align="center" valign="top" width="3.7%"><a href="https://max.krauss.io/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/914671?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Maximilian Krauß"/></td>
184
+ <td align="center" valign="top" width="3.7%"><a href="https://eng.evolution.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/15799569?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Evolution Engineering"/></td>
185
+ </tr><br />
186
+ <tr>
187
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/Neonox31"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1135958?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="WEBER Logan"/></td>
188
+ <td align="center" valign="top" width="3.7%"><a href="https://t.me/mister_cheater"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5055654?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Anton Zhukov"/></td>
189
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/beaverusiv"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4149031?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Nicholas Loomans"/></td>
190
+ <td align="center" valign="top" width="3.7%"><a href="https://icedream.pw/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/807772?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Carl Kittelberger"/></td>
191
+ <td align="center" valign="top" width="3.7%"><a href="https://patrik.votocek.cz/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/112567?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Patrik Votoček"/></td>
192
+ <td align="center" valign="top" width="3.7%"><a href="https://kyr.github.io/CV/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/426462?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kyrylo Fedorov"/></td>
193
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/claudio-vellage"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/28930612?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Claudio Vellage"/></td>
194
+ <td align="center" valign="top" width="3.7%"><a href="https://github.com/seb0uil"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5122626?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Seb0uil"/></td>
195
+ </tr>
196
+ </p>
197
+
198
+ <!-- markdownlint-restore -->
199
+ <!-- prettier-ignore-end -->
200
+
201
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
38
202
 
39
- [Read More](https://github.com/jdalrymple/gitbeaker#readme)
203
+ This started as a fork from [node-gitlab-legacy](https://github.com/rest-gitlab/rest-gitlab-legacy) but I ended up rewriting much of the code. Here are the original work's [contributors](https://github.com/rest-gitlab/rest-gitlab-legacy#contributors).
package/dist/index.mjs ADDED
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env node
2
+ import Chalk from 'chalk';
3
+ import Sywac from 'sywac';
4
+ import { decamelize, depascalize, camelize } from 'xcase';
5
+ import * as Gitbeaker from '@gitbeaker/rest';
6
+ import API_MAP from '@gitbeaker/core/map.json' assert { type: 'json' };
7
+
8
+ var commandStyle = Chalk.hex("#e34329").bold;
9
+ var groupStyle = Chalk.hex("#fca325").bold;
10
+ var usageStyle = Chalk.hex("#fc6e26").bold;
11
+ var optionStyle = Chalk.white.bold;
12
+ var descriptionStyle = Chalk.hex("#848484");
13
+ var hintStyle = Chalk.hex("#6a5f88");
14
+ function normalizeEnviromentVariables(env) {
15
+ const normalized = { ...env };
16
+ const suffixes = [
17
+ "TOKEN",
18
+ "OAUTH_TOKEN",
19
+ "JOB_TOKEN",
20
+ "HOST",
21
+ "SUDO",
22
+ "CAMELIZE",
23
+ "REQUEST_TIMEOUT",
24
+ "PROFILE_TOKEN",
25
+ "PROFILE_MODE"
26
+ ];
27
+ suffixes.forEach((s) => {
28
+ if (normalized[`GITLAB_${s}`] && !normalized[`GITBEAKER_${s}`]) {
29
+ normalized[`GITBEAKER_${s}`] = normalized[`GITLAB_${s}`];
30
+ }
31
+ });
32
+ return normalized;
33
+ }
34
+ function globalConfig(env = process.env) {
35
+ const normalEnv = normalizeEnviromentVariables(env);
36
+ return {
37
+ "gb-token": {
38
+ alias: "gl-token",
39
+ desc: "Your Gitlab Personal Token",
40
+ type: "string",
41
+ defaultValue: normalEnv.GITBEAKER_TOKEN
42
+ },
43
+ "gb-oauth-token": {
44
+ alias: "gl-oauth-token",
45
+ desc: "Your Gitlab OAuth Token",
46
+ type: "string",
47
+ defaultValue: normalEnv.GITBEAKER_OAUTH_TOKEN
48
+ },
49
+ "gb-job-token": {
50
+ alias: "gl-job-token",
51
+ desc: "Your Gitlab Job Token",
52
+ type: "string",
53
+ defaultValue: normalEnv.GITBEAKER_JOB_TOKEN
54
+ },
55
+ "gb-host": {
56
+ alias: "gl-host",
57
+ desc: "Your Gitlab API host (Defaults to https://www.gitlab.com)",
58
+ type: "string",
59
+ defaultValue: normalEnv.GITBEAKER_HOST
60
+ },
61
+ "gb-sudo": {
62
+ alias: "gl-sudo",
63
+ desc: "[Sudo](https://docs.gitlab.com/ee/api/#sudo) query parameter",
64
+ type: "string",
65
+ defaultValue: normalEnv.GITBEAKER_SUDO
66
+ },
67
+ "gb-camelize": {
68
+ alias: "gl-camelize",
69
+ desc: "Camelizes all response body keys",
70
+ type: "boolean",
71
+ defaultValue: normalEnv.GITBEAKER_CAMELIZE
72
+ },
73
+ "gb-request-timeout": {
74
+ alias: "gl-request-timeout",
75
+ desc: "Timeout for API requests. Measured in ms",
76
+ type: "number",
77
+ defaultValue: normalEnv.GITBEAKER_REQUEST_TIMEOUT && parseInt(normalEnv.GITBEAKER_REQUEST_TIMEOUT, 10)
78
+ },
79
+ "gb-profile-token": {
80
+ alias: "gl-profile-token",
81
+ desc: "[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)",
82
+ type: "string",
83
+ defaultValue: normalEnv.GITBEAKER_PROFILE_TOKEN
84
+ },
85
+ "gb-profile-mode": {
86
+ alias: "gl-profile-mode",
87
+ desc: "[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)",
88
+ type: "string",
89
+ defaultValue: normalEnv.GITBEAKER_PROFILE_MODE
90
+ }
91
+ };
92
+ }
93
+ var ignoreOptions = ["_", "$0", "v", "version", "h", "help", "g", "global-args"];
94
+ function param(value) {
95
+ let cleaned = value;
96
+ const exceptions = [
97
+ "GitLabCI",
98
+ "YML",
99
+ "GPG",
100
+ "SSH",
101
+ "IId",
102
+ "NPM",
103
+ "NuGet",
104
+ "DORA4",
105
+ "LDAP",
106
+ "CICD"
107
+ ];
108
+ const ex = exceptions.find((e) => value.includes(e));
109
+ if (ex)
110
+ cleaned = cleaned.replace(ex, ex.charAt(0).toUpperCase() + ex.slice(1).toLowerCase());
111
+ const decamelized = decamelize(cleaned, "-");
112
+ return decamelized !== cleaned ? decamelized : depascalize(cleaned, "-");
113
+ }
114
+ function setupAPIMethods(setupArgs, methodArgs) {
115
+ methodArgs.forEach((name) => {
116
+ if (typeof name !== "string")
117
+ return;
118
+ setupArgs.positional(`[--${param(name)}] <${param(name)}>`, {
119
+ group: "Required Options",
120
+ type: "string"
121
+ });
122
+ });
123
+ return setupArgs;
124
+ }
125
+ function runAPIMethod(ctx, args, apiName, method) {
126
+ const coreArgs = {};
127
+ const optionalArgs = {};
128
+ const initArgs = {};
129
+ Object.entries(args).forEach(([argName, value]) => {
130
+ if (ignoreOptions.includes(argName) || value == null)
131
+ return;
132
+ const camelCased = camelize(argName.replace("gb-", "").replace("gl-", ""), "-");
133
+ if (globalConfig()[argName.replace("gl-", "gb-")]) {
134
+ initArgs[camelCased] = value;
135
+ } else if (method.args.includes(camelCased))
136
+ coreArgs[camelCased] = value;
137
+ else
138
+ optionalArgs[camelCased] = value;
139
+ });
140
+ const s = new Gitbeaker[apiName](initArgs);
141
+ return s[method.name](...Object.values(coreArgs), optionalArgs).then((r) => {
142
+ ctx.output = JSON.stringify(r, null, 3);
143
+ }).catch((e) => {
144
+ ctx.output = e;
145
+ });
146
+ }
147
+ function setupAPIs(setupArgs, apiName, methods) {
148
+ Object.entries(globalConfig()).forEach(([k, v]) => {
149
+ setupArgs.option(`${k} <value>`, {
150
+ group: "Base Options",
151
+ ...v
152
+ });
153
+ });
154
+ for (let i = 1; i < methods.length; i += 1) {
155
+ const method = methods[i];
156
+ setupArgs.command(param(method.name), {
157
+ setup: (setupMethodArgs) => setupAPIMethods(setupMethodArgs, method.args),
158
+ run: (args, ctx) => runAPIMethod(ctx, args, apiName, method)
159
+ });
160
+ }
161
+ return setupArgs;
162
+ }
163
+ var cli = Sywac.version("-v, --version").help("-h, --help").showHelpByDefault().epilogue("Copyright 2023").style({
164
+ usagePrefix: (s) => usageStyle(s),
165
+ group: (s) => groupStyle(s),
166
+ flags: (s) => optionStyle(s),
167
+ usageCommandPlaceholder: (s) => commandStyle(s),
168
+ usageOptionsPlaceholder: (s) => optionStyle(s),
169
+ desc: (s) => descriptionStyle(s),
170
+ hints: (s) => hintStyle(s)
171
+ });
172
+ cli.boolean("-g --global-args", {
173
+ desc: "Show global arguments currently set in the environment variables"
174
+ });
175
+ cli.command("*", (argv, ctx) => {
176
+ if (!argv.g)
177
+ return;
178
+ const display = {};
179
+ Object.entries(globalConfig()).forEach(([k, v]) => {
180
+ if (v.defaultValue == null)
181
+ return;
182
+ display[k] = {
183
+ alias: v.alias,
184
+ description: v.desc,
185
+ value: v.defaultValue
186
+ };
187
+ });
188
+ ctx.output = Object.keys(display).length === 0 ? "No global variables have been set!" : JSON.stringify(display, null, 3);
189
+ });
190
+ Object.entries(API_MAP).forEach(([apiName, methods]) => {
191
+ if (apiName === "Gitlab")
192
+ return;
193
+ cli.command(param(apiName), {
194
+ desc: `The ${apiName} API`,
195
+ setup: (setupArgs) => setupAPIs(setupArgs, apiName, methods)
196
+ });
197
+ });
198
+
199
+ // src/index.ts
200
+ cli.parseAndExit();
package/package.json CHANGED
@@ -1,58 +1,57 @@
1
1
  {
2
2
  "name": "@gitbeaker/cli",
3
- "description": "Full NodeJS CLI implementation of the GitLab API.",
4
- "version": "35.7.0",
5
- "author": {
6
- "name": "Justin Dalrymple"
3
+ "version": "36.0.0-rc.0",
4
+ "description": "CLI implementation of the GitLab API.",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": ">=18.0.0"
7
8
  },
8
- "bin": {
9
- "gitbeaker": "dist/index.js"
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/jdalrymple/gitbeaker"
10
12
  },
11
13
  "bugs": {
12
14
  "url": "https://github.com/jdalrymple/gitbeaker/issues"
13
15
  },
14
- "dependencies": {
15
- "@gitbeaker/core": "^35.7.0",
16
- "@gitbeaker/node": "^35.7.0",
17
- "chalk": "4.1.2",
18
- "ora": "^6.0.0",
19
- "sywac": "^1.3.0",
20
- "xcase": "^2.0.1"
21
- },
22
- "devDependencies": {
23
- "@rollup/plugin-json": "^4.1.0",
24
- "jest-extended": "^1.0.0",
25
- "rollup": "^2.47.0",
26
- "rollup-plugin-preserve-shebangs": "^0.2.0",
27
- "rollup-plugin-typescript2": "^0.31.1",
28
- "strip-ansi": "^7.0.0",
29
- "tslib": "^2.3.1",
30
- "typescript": "^4.2.4",
31
- "uuid": "^8.3.2"
32
- },
33
- "engines": {
34
- "node": ">=14.2.0"
35
- },
36
- "files": [
37
- "dist"
38
- ],
39
16
  "homepage": "https://github.com/jdalrymple/gitbeaker#readme",
17
+ "author": {
18
+ "name": "Justin Dalrymple"
19
+ },
40
20
  "keywords": [
41
- "api",
42
- "cli",
43
21
  "gitbeaker",
44
22
  "gitlab",
45
- "got"
23
+ "api",
24
+ "cli"
46
25
  ],
47
- "license": "MIT",
48
- "repository": {
49
- "type": "git",
50
- "url": "https://github.com/jdalrymple/gitbeaker"
26
+ "bin": {
27
+ "gb": "dist/index.mjs",
28
+ "gitbeaker": "dist/index.mjs"
51
29
  },
30
+ "files": [
31
+ "dist"
32
+ ],
52
33
  "scripts": {
53
- "build": "rollup -c",
54
- "test:integration": "TEST_ID=$(uuid) node --expose-gc ../../node_modules/.bin/jest --runInBand --logHeapUsage test/integration",
55
- "test:unit": "node --expose-gc ../../node_modules/.bin/jest --runInBand --logHeapUsage test/unit"
34
+ "build": "tsup src/index.ts --format esm --treeshake --target node18",
35
+ "test:integration": "jest --maxWorkers=50% test/integration",
36
+ "test:e2e": "jest --maxWorkers=50% test/e2e",
37
+ "format:docs": "prettier '**/(*.json|.yml|.js|.md)' --ignore-path ../../.prettierignore",
38
+ "format:docs:fix": "yarn format:docs --write",
39
+ "format:src": "prettier '{src,test}/**/*.ts' --ignore-path ../../.prettierignore",
40
+ "format:src:fix": "yarn format:src --write",
41
+ "format": "yarn format:src && yarn format:docs",
42
+ "format:fix": "yarn format:src:fix && yarn format:docs:fix",
43
+ "lint": "eslint '{src,test}/**/*.ts'",
44
+ "lint:fix": "yarn lint --fix"
56
45
  },
57
- "gitHead": "5037aabd6dc33187eb001efba84fee3dda4b0c4d"
46
+ "dependencies": {
47
+ "@gitbeaker/core": "36.0.0-rc.0",
48
+ "@gitbeaker/rest": "36.0.0-rc.1",
49
+ "chalk": "4.1.2",
50
+ "sywac": "^1.3.0",
51
+ "xcase": "^2.0.1"
52
+ },
53
+ "devDependencies": {
54
+ "tsup": "^6.6.3",
55
+ "typescript": "^4.9.5"
56
+ }
58
57
  }
package/LICENSE.md DELETED
@@ -1,22 +0,0 @@
1
- # The MIT License
2
-
3
- Copyright (c)
4
- **2020 Justin Dalrymple**
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.
package/dist/index.js DELETED
@@ -1,283 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- var Chalk = require('chalk');
5
- var Sywac = require('sywac');
6
- var xcase = require('xcase');
7
- var Gitbeaker = require('@gitbeaker/node');
8
- var core = require('@gitbeaker/core');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n["default"] = e;
27
- return Object.freeze(n);
28
- }
29
-
30
- var Chalk__default = /*#__PURE__*/_interopDefaultLegacy(Chalk);
31
- var Sywac__default = /*#__PURE__*/_interopDefaultLegacy(Sywac);
32
- var Gitbeaker__namespace = /*#__PURE__*/_interopNamespace(Gitbeaker);
33
-
34
- /*! *****************************************************************************
35
- Copyright (c) Microsoft Corporation.
36
-
37
- Permission to use, copy, modify, and/or distribute this software for any
38
- purpose with or without fee is hereby granted.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
- PERFORMANCE OF THIS SOFTWARE.
47
- ***************************************************************************** */
48
-
49
- var __assign = function() {
50
- __assign = Object.assign || function __assign(t) {
51
- for (var s, i = 1, n = arguments.length; i < n; i++) {
52
- s = arguments[i];
53
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
54
- }
55
- return t;
56
- };
57
- return __assign.apply(this, arguments);
58
- };
59
-
60
- function __read(o, n) {
61
- var m = typeof Symbol === "function" && o[Symbol.iterator];
62
- if (!m) return o;
63
- var i = m.call(o), r, ar = [], e;
64
- try {
65
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
66
- }
67
- catch (error) { e = { error: error }; }
68
- finally {
69
- try {
70
- if (r && !r.done && (m = i["return"])) m.call(i);
71
- }
72
- finally { if (e) throw e.error; }
73
- }
74
- return ar;
75
- }
76
-
77
- function __spreadArray(to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- }
86
-
87
- // Styling settings
88
- var commandStyle = Chalk__default["default"].hex('#e34329').bold;
89
- var groupStyle = Chalk__default["default"].hex('#fca325').bold;
90
- var usageStyle = Chalk__default["default"].hex('#fc6e26').bold;
91
- var optionStyle = Chalk__default["default"].white.bold;
92
- var descriptionStyle = Chalk__default["default"].hex('#848484');
93
- var hintStyle = Chalk__default["default"].hex('#6a5f88');
94
- // Globally configurable arguments
95
- function globalConfig(env) {
96
- if (env === void 0) { env = process.env; }
97
- return {
98
- 'gb-token': {
99
- alias: 'gl-token',
100
- desc: 'Your Gitlab Personal Token',
101
- type: 'string',
102
- defaultValue: env.GITBEAKER_TOKEN || env.GITLAB_TOKEN,
103
- },
104
- 'gb-oauth-token': {
105
- alias: 'gl-oauth-token',
106
- desc: 'Your Gitlab OAuth Token',
107
- type: 'string',
108
- defaultValue: env.GITBEAKER_OAUTH_TOKEN || env.GITLAB_OAUTH_TOKEN,
109
- },
110
- 'gb-job-token': {
111
- alias: 'gl-job-token',
112
- desc: 'Your Gitlab Job Token',
113
- type: 'string',
114
- defaultValue: env.GITBEAKER_JOB_TOKEN || env.GITLAB_JOB_TOKEN,
115
- },
116
- 'gb-host': {
117
- alias: 'gl-host',
118
- desc: 'Your Gitlab API host (Defaults to https://www.gitlab.com)',
119
- type: 'string',
120
- defaultValue: env.GITBEAKER_HOST || env.GITLAB_HOST,
121
- },
122
- 'gb-version': {
123
- alias: 'gl-version',
124
- desc: 'The targetted Gitlab API version (Defaults to 4)',
125
- type: 'number',
126
- defaultValue: (env.GITBEAKER_VERSION && parseInt(env.GITBEAKER_VERSION, 10)) ||
127
- (env.GITLAB_VERSION && parseInt(env.GITLAB_VERSION, 10)),
128
- },
129
- 'gb-sudo': {
130
- alias: 'gl-sudo',
131
- desc: '[Sudo](https://docs.gitlab.com/ee/api/#sudo) query parameter',
132
- type: 'string',
133
- defaultValue: env.GITBEAKER_SUDO || env.GITLAB_SUDO,
134
- },
135
- 'gb-camelize': {
136
- alias: 'gl-camelize',
137
- desc: 'Camelizes all response body keys',
138
- type: 'boolean',
139
- defaultValue: (env.GITBEAKER_CAMELIZE && env.GITBEAKER_CAMELIZE === 'true') ||
140
- (env.GITLAB_CAMELIZE && env.GITLAB_CAMELIZE === 'true'),
141
- },
142
- 'gb-request-timeout': {
143
- alias: 'gl-request-timeout',
144
- desc: 'Timeout for API requests. Measured in ms',
145
- type: 'number',
146
- defaultValue: (env.GITBEAKER_REQUEST_TIMEOUT && parseInt(env.GITBEAKER_REQUEST_TIMEOUT, 10)) ||
147
- (env.GITBEAKER_REQUEST_TIMEOUT && parseInt(env.GITBEAKER_REQUEST_TIMEOUT, 10)),
148
- },
149
- 'gb-profile-token': {
150
- alias: 'gl-profile-token',
151
- desc: '[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)',
152
- type: 'string',
153
- defaultValue: env.GITBEAKER_PROFILE_TOKEN || env.GITLAB_PROFILE_TOKEN,
154
- },
155
- 'gb-profile-mode': {
156
- alias: 'gl-profile-mode',
157
- desc: '[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)',
158
- type: 'string',
159
- defaultValue: env.GITBEAKER_PROFILE_MODE || env.GITLAB_PROFILE_MODE,
160
- },
161
- };
162
- }
163
- // Options to be ignored when making an API call
164
- var ignoreOptions = ['_', '$0', 'v', 'version', 'h', 'help', 'g', 'global-args'];
165
- // Helper function to param case strings
166
- function param(string) {
167
- var cleaned = string;
168
- // Handle exceptions
169
- var exceptions = ['GitLabCI', 'YML', 'GPG', 'SSH'];
170
- var ex = exceptions.find(function (e) { return string.includes(e); });
171
- if (ex)
172
- cleaned = cleaned.replace(ex, ex.charAt(0).toUpperCase() + ex.slice(1));
173
- // Decamelize
174
- var decamelized = xcase.decamelize(cleaned, '-');
175
- return decamelized !== cleaned ? decamelized : xcase.depascalize(cleaned, '-');
176
- }
177
- function setupAPIMethods(setupArgs, methodArgs) {
178
- methodArgs.forEach(function (name) {
179
- if (typeof name !== 'string')
180
- return;
181
- setupArgs.positional("[--".concat(param(name), "] <").concat(param(name), ">"), {
182
- group: 'Required Options',
183
- type: 'string',
184
- });
185
- });
186
- return setupArgs;
187
- }
188
- function runAPIMethod(ctx, args, apiName, method) {
189
- var coreArgs = {};
190
- var optionalArgs = {};
191
- var initArgs = {};
192
- Object.entries(args).forEach(function (_a) {
193
- var _b = __read(_a, 2), argName = _b[0], value = _b[1];
194
- if (ignoreOptions.includes(argName) || value == null)
195
- return;
196
- var camelCased = xcase.camelize(argName.replace('gb-', '').replace('gl-', ''), '-');
197
- if (globalConfig()[argName.replace('gl-', 'gb-')]) {
198
- initArgs[camelCased] = value;
199
- }
200
- else if (method.args.includes(camelCased))
201
- coreArgs[camelCased] = value;
202
- else
203
- optionalArgs[camelCased] = value;
204
- });
205
- // Create service
206
- var s = new Gitbeaker__namespace[apiName](initArgs);
207
- // Execute function
208
- return s[method.name].apply(s, __spreadArray(__spreadArray([], __read(Object.values(coreArgs)), false), [optionalArgs], false)).then(function (r) {
209
- ctx.output = JSON.stringify(r, null, 3);
210
- })
211
- .catch(function (e) {
212
- ctx.output = e;
213
- });
214
- }
215
- function setupAPIs(setupArgs, apiName, methods) {
216
- Object.entries(globalConfig()).forEach(function (_a) {
217
- var _b = __read(_a, 2), k = _b[0], v = _b[1];
218
- setupArgs.option("".concat(k, " <value>"), __assign({ group: 'Base Options' }, v));
219
- });
220
- var _loop_1 = function (i) {
221
- var method = methods[i];
222
- setupArgs.command(param(method.name), {
223
- setup: function (setupMethodArgs) { return setupAPIMethods(setupMethodArgs, method.args); },
224
- run: function (args, ctx) { return runAPIMethod(ctx, args, apiName, method); },
225
- });
226
- };
227
- for (var i = 1; i < methods.length; i += 1) {
228
- _loop_1(i);
229
- }
230
- return setupArgs;
231
- }
232
- // Add default settings
233
- var cli = Sywac__default["default"].version('-v, --version')
234
- .help('-h, --help')
235
- .showHelpByDefault()
236
- .epilogue('Copyright 2019')
237
- .style({
238
- usagePrefix: function (s) { return usageStyle(s); },
239
- group: function (s) { return groupStyle(s); },
240
- flags: function (s) { return optionStyle(s); },
241
- usageCommandPlaceholder: function (s) { return commandStyle(s); },
242
- usageOptionsPlaceholder: function (s) { return optionStyle(s); },
243
- desc: function (s) { return descriptionStyle(s); },
244
- hints: function (s) { return hintStyle(s); },
245
- });
246
- // Add Global commands
247
- cli.boolean('-g --global-args', {
248
- desc: 'Show global arguments currently set in the environment variables',
249
- });
250
- cli.command('*', function (argv, ctx) {
251
- if (!argv.g)
252
- return;
253
- var display = {};
254
- Object.entries(globalConfig()).forEach(function (_a) {
255
- var _b = __read(_a, 2), k = _b[0], v = _b[1];
256
- if (v.defaultValue == null)
257
- return;
258
- display[k] = {
259
- alias: v.alias,
260
- description: v.desc,
261
- value: v.defaultValue,
262
- };
263
- });
264
- ctx.output =
265
- Object.keys(display).length === 0
266
- ? 'No global variables have been set!'
267
- : JSON.stringify(display, null, 3);
268
- });
269
- // Add all supported API's
270
- Object.entries(core.getAPIMap()).forEach(function (_a) {
271
- var _b = __read(_a, 2), apiName = _b[0], methods = _b[1];
272
- // Skip Gitlab export
273
- if (apiName === 'Gitlab')
274
- return;
275
- cli.command(param(apiName), {
276
- desc: "The ".concat(apiName, " API"),
277
- setup: function (setupArgs) { return setupAPIs(setupArgs, apiName, methods); },
278
- });
279
- });
280
-
281
- // Parse input
282
- cli.parseAndExit();
283
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/cli.ts","../src/index.ts"],"sourcesContent":["import Chalk from 'chalk';\nimport Sywac from 'sywac';\nimport { camelize, decamelize, depascalize } from 'xcase';\nimport * as Gitbeaker from '@gitbeaker/node';\nimport { getAPIMap } from '@gitbeaker/core';\n\n// Styling settings\nconst commandStyle = Chalk.hex('#e34329').bold;\nconst groupStyle = Chalk.hex('#fca325').bold;\nconst usageStyle = Chalk.hex('#fc6e26').bold;\nconst optionStyle = Chalk.white.bold;\nconst descriptionStyle = Chalk.hex('#848484');\nconst hintStyle = Chalk.hex('#6a5f88');\n\n// Globally configurable arguments\nfunction globalConfig(env = process.env): { [name: string]: Sywac.Options } {\n return {\n 'gb-token': {\n alias: 'gl-token',\n desc: 'Your Gitlab Personal Token',\n type: 'string',\n defaultValue: env.GITBEAKER_TOKEN || env.GITLAB_TOKEN,\n },\n 'gb-oauth-token': {\n alias: 'gl-oauth-token',\n desc: 'Your Gitlab OAuth Token',\n type: 'string',\n defaultValue: env.GITBEAKER_OAUTH_TOKEN || env.GITLAB_OAUTH_TOKEN,\n },\n 'gb-job-token': {\n alias: 'gl-job-token',\n desc: 'Your Gitlab Job Token',\n type: 'string',\n defaultValue: env.GITBEAKER_JOB_TOKEN || env.GITLAB_JOB_TOKEN,\n },\n 'gb-host': {\n alias: 'gl-host',\n desc: 'Your Gitlab API host (Defaults to https://www.gitlab.com)',\n type: 'string',\n defaultValue: env.GITBEAKER_HOST || env.GITLAB_HOST,\n },\n 'gb-version': {\n alias: 'gl-version',\n desc: 'The targetted Gitlab API version (Defaults to 4)',\n type: 'number',\n defaultValue:\n (env.GITBEAKER_VERSION && parseInt(env.GITBEAKER_VERSION, 10)) ||\n (env.GITLAB_VERSION && parseInt(env.GITLAB_VERSION, 10)),\n },\n 'gb-sudo': {\n alias: 'gl-sudo',\n desc: '[Sudo](https://docs.gitlab.com/ee/api/#sudo) query parameter',\n type: 'string',\n defaultValue: env.GITBEAKER_SUDO || env.GITLAB_SUDO,\n },\n 'gb-camelize': {\n alias: 'gl-camelize',\n desc: 'Camelizes all response body keys',\n type: 'boolean',\n defaultValue:\n (env.GITBEAKER_CAMELIZE && env.GITBEAKER_CAMELIZE === 'true') ||\n (env.GITLAB_CAMELIZE && env.GITLAB_CAMELIZE === 'true'),\n },\n 'gb-request-timeout': {\n alias: 'gl-request-timeout',\n desc: 'Timeout for API requests. Measured in ms',\n type: 'number',\n defaultValue:\n (env.GITBEAKER_REQUEST_TIMEOUT && parseInt(env.GITBEAKER_REQUEST_TIMEOUT, 10)) ||\n (env.GITBEAKER_REQUEST_TIMEOUT && parseInt(env.GITBEAKER_REQUEST_TIMEOUT, 10)),\n },\n 'gb-profile-token': {\n alias: 'gl-profile-token',\n desc: '[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)',\n type: 'string',\n defaultValue: env.GITBEAKER_PROFILE_TOKEN || env.GITLAB_PROFILE_TOKEN,\n },\n 'gb-profile-mode': {\n alias: 'gl-profile-mode',\n desc: '[Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html)',\n type: 'string',\n defaultValue: env.GITBEAKER_PROFILE_MODE || env.GITLAB_PROFILE_MODE,\n },\n };\n}\n\n// Options to be ignored when making an API call\nconst ignoreOptions = ['_', '$0', 'v', 'version', 'h', 'help', 'g', 'global-args'];\n\n// Helper function to param case strings\nfunction param(string: string): string {\n let cleaned = string;\n\n // Handle exceptions\n const exceptions = ['GitLabCI', 'YML', 'GPG', 'SSH'];\n\n const ex = exceptions.find((e) => string.includes(e));\n\n if (ex) cleaned = cleaned.replace(ex, ex.charAt(0).toUpperCase() + ex.slice(1));\n\n // Decamelize\n const decamelized = decamelize(cleaned, '-');\n\n return decamelized !== cleaned ? decamelized : depascalize(cleaned, '-');\n}\n\nfunction setupAPIMethods(setupArgs, methodArgs: unknown[]) {\n methodArgs.forEach((name) => {\n if (typeof name !== 'string') return;\n\n setupArgs.positional(`[--${param(name)}] <${param(name)}>`, {\n group: 'Required Options',\n type: 'string',\n });\n });\n\n return setupArgs;\n}\n\nfunction runAPIMethod(ctx, args, apiName: string, method) {\n const coreArgs = {};\n const optionalArgs = {};\n const initArgs = {};\n\n Object.entries(args).forEach(([argName, value]) => {\n if (ignoreOptions.includes(argName) || value == null) return;\n\n const camelCased = camelize(argName.replace('gb-', '').replace('gl-', ''), '-');\n\n if (globalConfig()[argName.replace('gl-', 'gb-')]) {\n initArgs[camelCased] = value;\n } else if (method.args.includes(camelCased)) coreArgs[camelCased] = value;\n else optionalArgs[camelCased] = value;\n });\n\n // Create service\n const s = new Gitbeaker[apiName](initArgs);\n\n // Execute function\n return s[method.name](...Object.values(coreArgs), optionalArgs)\n .then((r) => {\n ctx.output = JSON.stringify(r, null, 3);\n })\n .catch((e) => {\n ctx.output = e;\n });\n}\n\nfunction setupAPIs(setupArgs, apiName: string, methods) {\n Object.entries(globalConfig()).forEach(([k, v]) => {\n setupArgs.option(`${k} <value>`, {\n group: 'Base Options',\n ...v,\n });\n });\n\n for (let i = 1; i < methods.length; i += 1) {\n const method = methods[i];\n\n setupArgs.command(param(method.name), {\n setup: (setupMethodArgs) => setupAPIMethods(setupMethodArgs, method.args),\n run: (args, ctx) => runAPIMethod(ctx, args, apiName, method),\n });\n }\n\n return setupArgs;\n}\n\n// Add default settings\nconst cli = Sywac.version('-v, --version')\n .help('-h, --help')\n .showHelpByDefault()\n .epilogue('Copyright 2019')\n .style({\n usagePrefix: (s) => usageStyle(s),\n group: (s) => groupStyle(s),\n flags: (s) => optionStyle(s),\n usageCommandPlaceholder: (s) => commandStyle(s),\n usageOptionsPlaceholder: (s) => optionStyle(s),\n desc: (s) => descriptionStyle(s),\n hints: (s) => hintStyle(s),\n });\n\n// Add Global commands\ncli.boolean('-g --global-args', {\n desc: 'Show global arguments currently set in the environment variables',\n});\n\ncli.command('*', (argv, ctx) => {\n if (!argv.g) return;\n\n const display = {};\n\n Object.entries(globalConfig()).forEach(([k, v]) => {\n if (v.defaultValue == null) return;\n\n display[k] = {\n alias: v.alias,\n description: v.desc,\n value: v.defaultValue,\n };\n });\n\n ctx.output =\n Object.keys(display).length === 0\n ? 'No global variables have been set!'\n : JSON.stringify(display, null, 3);\n});\n\n// Add all supported API's\nObject.entries(getAPIMap()).forEach(([apiName, methods]) => {\n // Skip Gitlab export\n if (apiName === 'Gitlab') return;\n\n cli.command(param(apiName), {\n desc: `The ${apiName} API`,\n setup: (setupArgs) => setupAPIs(setupArgs, apiName, methods),\n });\n});\n\nexport { cli };\n","#!/usr/bin/env node\nimport { cli } from './cli';\n\n// Parse input\ncli.parseAndExit();\n"],"names":["Chalk","decamelize","depascalize","camelize","Gitbeaker","Sywac","getAPIMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;AACA,IAAM,YAAY,GAAGA,yBAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,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