@heroku-cli/plugin-mtls 1.0.2 → 2.0.1
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 +66 -27
- package/dist/base.d.ts +8 -8
- package/dist/base.js +4 -7
- package/dist/commands/data/mtls/certificates/create.d.ts +3 -3
- package/dist/commands/data/mtls/certificates/create.js +16 -18
- package/dist/commands/data/mtls/certificates/delete.d.ts +4 -4
- package/dist/commands/data/mtls/certificates/delete.js +15 -18
- package/dist/commands/data/mtls/certificates/download.d.ts +6 -6
- package/dist/commands/data/mtls/certificates/download.js +58 -62
- package/dist/commands/data/mtls/certificates/get.d.ts +4 -4
- package/dist/commands/data/mtls/certificates/get.js +14 -16
- package/dist/commands/data/mtls/certificates/index.d.ts +3 -3
- package/dist/commands/data/mtls/certificates/index.js +22 -25
- package/dist/commands/data/mtls/create.d.ts +3 -3
- package/dist/commands/data/mtls/create.js +21 -23
- package/dist/commands/data/mtls/destroy.d.ts +3 -3
- package/dist/commands/data/mtls/destroy.js +14 -17
- package/dist/commands/data/mtls/index.d.ts +3 -3
- package/dist/commands/data/mtls/index.js +31 -40
- package/dist/commands/data/mtls/ip-rules/create.d.ts +5 -5
- package/dist/commands/data/mtls/ip-rules/create.js +19 -21
- package/dist/commands/data/mtls/ip-rules/delete.d.ts +5 -5
- package/dist/commands/data/mtls/ip-rules/delete.js +18 -21
- package/dist/commands/data/mtls/ip-rules/get.d.ts +4 -4
- package/dist/commands/data/mtls/ip-rules/get.js +12 -15
- package/dist/commands/data/mtls/ip-rules/index.d.ts +3 -3
- package/dist/commands/data/mtls/ip-rules/index.js +12 -15
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/dist/lib/addon-fetcher.d.ts +7 -0
- package/dist/lib/addon-fetcher.js +23 -0
- package/dist/utils/file-helper.d.ts +1 -1
- package/dist/utils/file-helper.js +4 -11
- package/dist/utils/is-error-http.js +1 -4
- package/dist/utils/is-error-message.js +1 -4
- package/dist/utils/table.d.ts +1 -1
- package/dist/utils/table.js +11 -16
- package/oclif.manifest.json +123 -38
- package/package.json +34 -39
- package/CHANGELOG.md +0 -1
- package/dist/lib/fetcher.d.ts +0 -1
- package/dist/lib/fetcher.js +0 -70
- package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ get the status of mTLS for your add-on
|
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
USAGE
|
|
37
|
-
$ heroku data:mtls ADDON -a <value>
|
|
37
|
+
$ heroku data:mtls ADDON -a <value> [--prompt]
|
|
38
38
|
|
|
39
39
|
ARGUMENTS
|
|
40
40
|
ADDON addon
|
|
@@ -42,6 +42,9 @@ ARGUMENTS
|
|
|
42
42
|
FLAGS
|
|
43
43
|
-a, --app=<value> (required) app to run command against
|
|
44
44
|
|
|
45
|
+
GLOBAL FLAGS
|
|
46
|
+
--prompt interactively prompt for command arguments and flags
|
|
47
|
+
|
|
45
48
|
DESCRIPTION
|
|
46
49
|
get the status of mTLS for your add-on
|
|
47
50
|
|
|
@@ -49,7 +52,7 @@ EXAMPLES
|
|
|
49
52
|
$ heroku data:mtls postgresql-sushi-12345 -a example-app
|
|
50
53
|
```
|
|
51
54
|
|
|
52
|
-
_See code: [src/commands/data/mtls/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
55
|
+
_See code: [src/commands/data/mtls/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/index.ts)_
|
|
53
56
|
|
|
54
57
|
## `heroku data:mtls:certificates ADDON`
|
|
55
58
|
|
|
@@ -57,7 +60,7 @@ get the certificates for your mTLS enabled add-on
|
|
|
57
60
|
|
|
58
61
|
```
|
|
59
62
|
USAGE
|
|
60
|
-
$ heroku data:mtls:certificates ADDON -a <value>
|
|
63
|
+
$ heroku data:mtls:certificates ADDON -a <value> [--prompt]
|
|
61
64
|
|
|
62
65
|
ARGUMENTS
|
|
63
66
|
ADDON addon
|
|
@@ -65,6 +68,9 @@ ARGUMENTS
|
|
|
65
68
|
FLAGS
|
|
66
69
|
-a, --app=<value> (required) app to run command against
|
|
67
70
|
|
|
71
|
+
GLOBAL FLAGS
|
|
72
|
+
--prompt interactively prompt for command arguments and flags
|
|
73
|
+
|
|
68
74
|
DESCRIPTION
|
|
69
75
|
get the certificates for your mTLS enabled add-on
|
|
70
76
|
|
|
@@ -72,7 +78,7 @@ EXAMPLES
|
|
|
72
78
|
$ heroku data:mtls:certificates postgresql-sushi-12345 -a example-app
|
|
73
79
|
```
|
|
74
80
|
|
|
75
|
-
_See code: [src/commands/data/mtls/certificates/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
81
|
+
_See code: [src/commands/data/mtls/certificates/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/certificates/index.ts)_
|
|
76
82
|
|
|
77
83
|
## `heroku data:mtls:certificates:create ADDON`
|
|
78
84
|
|
|
@@ -80,7 +86,7 @@ create a new certificate for your mTLS enabled add-on
|
|
|
80
86
|
|
|
81
87
|
```
|
|
82
88
|
USAGE
|
|
83
|
-
$ heroku data:mtls:certificates:create ADDON -a <value>
|
|
89
|
+
$ heroku data:mtls:certificates:create ADDON -a <value> [--prompt]
|
|
84
90
|
|
|
85
91
|
ARGUMENTS
|
|
86
92
|
ADDON addon
|
|
@@ -88,6 +94,9 @@ ARGUMENTS
|
|
|
88
94
|
FLAGS
|
|
89
95
|
-a, --app=<value> (required) app to run command against
|
|
90
96
|
|
|
97
|
+
GLOBAL FLAGS
|
|
98
|
+
--prompt interactively prompt for command arguments and flags
|
|
99
|
+
|
|
91
100
|
DESCRIPTION
|
|
92
101
|
create a new certificate for your mTLS enabled add-on
|
|
93
102
|
|
|
@@ -95,7 +104,7 @@ EXAMPLES
|
|
|
95
104
|
$ heroku data:mtls:certificates:create postgresql-sushi-12345 -a example-app
|
|
96
105
|
```
|
|
97
106
|
|
|
98
|
-
_See code: [src/commands/data/mtls/certificates/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
107
|
+
_See code: [src/commands/data/mtls/certificates/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/certificates/create.ts)_
|
|
99
108
|
|
|
100
109
|
## `heroku data:mtls:certificates:delete ADDON`
|
|
101
110
|
|
|
@@ -103,7 +112,7 @@ delete a specific certificate for your mTLS enabled add-on
|
|
|
103
112
|
|
|
104
113
|
```
|
|
105
114
|
USAGE
|
|
106
|
-
$ heroku data:mtls:certificates:delete ADDON -a <value> --id <value>
|
|
115
|
+
$ heroku data:mtls:certificates:delete ADDON -a <value> --id <value> [--prompt]
|
|
107
116
|
|
|
108
117
|
ARGUMENTS
|
|
109
118
|
ADDON addon
|
|
@@ -112,6 +121,9 @@ FLAGS
|
|
|
112
121
|
-a, --app=<value> (required) app to run command against
|
|
113
122
|
--id=<value> (required) id of certificate
|
|
114
123
|
|
|
124
|
+
GLOBAL FLAGS
|
|
125
|
+
--prompt interactively prompt for command arguments and flags
|
|
126
|
+
|
|
115
127
|
DESCRIPTION
|
|
116
128
|
delete a specific certificate for your mTLS enabled add-on
|
|
117
129
|
|
|
@@ -119,7 +131,7 @@ EXAMPLES
|
|
|
119
131
|
$ heroku data:mtls:certificates:delete postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app
|
|
120
132
|
```
|
|
121
133
|
|
|
122
|
-
_See code: [src/commands/data/mtls/certificates/delete.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
134
|
+
_See code: [src/commands/data/mtls/certificates/delete.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/certificates/delete.ts)_
|
|
123
135
|
|
|
124
136
|
## `heroku data:mtls:certificates:download ADDON`
|
|
125
137
|
|
|
@@ -127,7 +139,7 @@ download your certificate bundle for your mTLS add-on
|
|
|
127
139
|
|
|
128
140
|
```
|
|
129
141
|
USAGE
|
|
130
|
-
$ heroku data:mtls:certificates:download ADDON -a <value> --prefix <value> [--dir <value>] [--id <value>]
|
|
142
|
+
$ heroku data:mtls:certificates:download ADDON -a <value> --prefix <value> [--prompt] [--dir <value>] [--id <value>]
|
|
131
143
|
|
|
132
144
|
ARGUMENTS
|
|
133
145
|
ADDON addon
|
|
@@ -138,6 +150,9 @@ FLAGS
|
|
|
138
150
|
--id=<value> ID of certificate to download
|
|
139
151
|
--prefix=<value> (required) prefix to put in front of downloaded file names
|
|
140
152
|
|
|
153
|
+
GLOBAL FLAGS
|
|
154
|
+
--prompt interactively prompt for command arguments and flags
|
|
155
|
+
|
|
141
156
|
DESCRIPTION
|
|
142
157
|
download your certificate bundle for your mTLS add-on
|
|
143
158
|
|
|
@@ -149,7 +164,7 @@ EXAMPLES
|
|
|
149
164
|
$ heroku data:mtls:certificates:download postgresql-sushi-12345 --id "3559a4df-2c82-4473-86cf-181310a6ef4f --prefix "prefix_" -a example-app
|
|
150
165
|
```
|
|
151
166
|
|
|
152
|
-
_See code: [src/commands/data/mtls/certificates/download.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
167
|
+
_See code: [src/commands/data/mtls/certificates/download.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/certificates/download.ts)_
|
|
153
168
|
|
|
154
169
|
## `heroku data:mtls:certificates:get ADDON`
|
|
155
170
|
|
|
@@ -157,7 +172,7 @@ get a specific certificate for your mTLS enabled add-on
|
|
|
157
172
|
|
|
158
173
|
```
|
|
159
174
|
USAGE
|
|
160
|
-
$ heroku data:mtls:certificates:get ADDON -a <value> --id <value>
|
|
175
|
+
$ heroku data:mtls:certificates:get ADDON -a <value> --id <value> [--prompt]
|
|
161
176
|
|
|
162
177
|
ARGUMENTS
|
|
163
178
|
ADDON addon
|
|
@@ -166,6 +181,9 @@ FLAGS
|
|
|
166
181
|
-a, --app=<value> (required) app to run command against
|
|
167
182
|
--id=<value> (required) id of IP Rule
|
|
168
183
|
|
|
184
|
+
GLOBAL FLAGS
|
|
185
|
+
--prompt interactively prompt for command arguments and flags
|
|
186
|
+
|
|
169
187
|
DESCRIPTION
|
|
170
188
|
get a specific certificate for your mTLS enabled add-on
|
|
171
189
|
|
|
@@ -173,7 +191,7 @@ EXAMPLES
|
|
|
173
191
|
$ heroku data:mtls:certificates:get postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app
|
|
174
192
|
```
|
|
175
193
|
|
|
176
|
-
_See code: [src/commands/data/mtls/certificates/get.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
194
|
+
_See code: [src/commands/data/mtls/certificates/get.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/certificates/get.ts)_
|
|
177
195
|
|
|
178
196
|
## `heroku data:mtls:create ADDON`
|
|
179
197
|
|
|
@@ -181,7 +199,7 @@ enable MTLS for your addon
|
|
|
181
199
|
|
|
182
200
|
```
|
|
183
201
|
USAGE
|
|
184
|
-
$ heroku data:mtls:create ADDON -a <value>
|
|
202
|
+
$ heroku data:mtls:create ADDON -a <value> [--prompt]
|
|
185
203
|
|
|
186
204
|
ARGUMENTS
|
|
187
205
|
ADDON addon
|
|
@@ -189,6 +207,9 @@ ARGUMENTS
|
|
|
189
207
|
FLAGS
|
|
190
208
|
-a, --app=<value> (required) app to run command against
|
|
191
209
|
|
|
210
|
+
GLOBAL FLAGS
|
|
211
|
+
--prompt interactively prompt for command arguments and flags
|
|
212
|
+
|
|
192
213
|
DESCRIPTION
|
|
193
214
|
enable MTLS for your addon
|
|
194
215
|
|
|
@@ -196,7 +217,7 @@ EXAMPLES
|
|
|
196
217
|
$ heroku data:mtls:create postgresql-sushi-12345 -a example-app
|
|
197
218
|
```
|
|
198
219
|
|
|
199
|
-
_See code: [src/commands/data/mtls/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
220
|
+
_See code: [src/commands/data/mtls/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/create.ts)_
|
|
200
221
|
|
|
201
222
|
## `heroku data:mtls:delete ADDON`
|
|
202
223
|
|
|
@@ -204,7 +225,7 @@ disable mTLS for your add-on
|
|
|
204
225
|
|
|
205
226
|
```
|
|
206
227
|
USAGE
|
|
207
|
-
$ heroku data:mtls:delete ADDON -a <value>
|
|
228
|
+
$ heroku data:mtls:delete ADDON -a <value> [--prompt]
|
|
208
229
|
|
|
209
230
|
ARGUMENTS
|
|
210
231
|
ADDON addon
|
|
@@ -212,6 +233,9 @@ ARGUMENTS
|
|
|
212
233
|
FLAGS
|
|
213
234
|
-a, --app=<value> (required) app to run command against
|
|
214
235
|
|
|
236
|
+
GLOBAL FLAGS
|
|
237
|
+
--prompt interactively prompt for command arguments and flags
|
|
238
|
+
|
|
215
239
|
DESCRIPTION
|
|
216
240
|
disable mTLS for your add-on
|
|
217
241
|
|
|
@@ -228,7 +252,7 @@ disable mTLS for your add-on
|
|
|
228
252
|
|
|
229
253
|
```
|
|
230
254
|
USAGE
|
|
231
|
-
$ heroku data:mtls:destroy ADDON -a <value>
|
|
255
|
+
$ heroku data:mtls:destroy ADDON -a <value> [--prompt]
|
|
232
256
|
|
|
233
257
|
ARGUMENTS
|
|
234
258
|
ADDON addon
|
|
@@ -236,6 +260,9 @@ ARGUMENTS
|
|
|
236
260
|
FLAGS
|
|
237
261
|
-a, --app=<value> (required) app to run command against
|
|
238
262
|
|
|
263
|
+
GLOBAL FLAGS
|
|
264
|
+
--prompt interactively prompt for command arguments and flags
|
|
265
|
+
|
|
239
266
|
DESCRIPTION
|
|
240
267
|
disable mTLS for your add-on
|
|
241
268
|
|
|
@@ -246,7 +273,7 @@ EXAMPLES
|
|
|
246
273
|
$ heroku data:mtls:destroy postgresql-sushi-12345 -a example-app
|
|
247
274
|
```
|
|
248
275
|
|
|
249
|
-
_See code: [src/commands/data/mtls/destroy.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
276
|
+
_See code: [src/commands/data/mtls/destroy.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/destroy.ts)_
|
|
250
277
|
|
|
251
278
|
## `heroku data:mtls:ip-rules ADDON`
|
|
252
279
|
|
|
@@ -254,7 +281,7 @@ get the IP Rules for your mTLS enabled add-on
|
|
|
254
281
|
|
|
255
282
|
```
|
|
256
283
|
USAGE
|
|
257
|
-
$ heroku data:mtls:ip-rules ADDON -a <value>
|
|
284
|
+
$ heroku data:mtls:ip-rules ADDON -a <value> [--prompt]
|
|
258
285
|
|
|
259
286
|
ARGUMENTS
|
|
260
287
|
ADDON addon
|
|
@@ -262,6 +289,9 @@ ARGUMENTS
|
|
|
262
289
|
FLAGS
|
|
263
290
|
-a, --app=<value> (required) app to run command against
|
|
264
291
|
|
|
292
|
+
GLOBAL FLAGS
|
|
293
|
+
--prompt interactively prompt for command arguments and flags
|
|
294
|
+
|
|
265
295
|
DESCRIPTION
|
|
266
296
|
get the IP Rules for your mTLS enabled add-on
|
|
267
297
|
|
|
@@ -269,7 +299,7 @@ EXAMPLES
|
|
|
269
299
|
$ heroku data:mtls:ip-rules postgresql-sushi-12345 -a example-app
|
|
270
300
|
```
|
|
271
301
|
|
|
272
|
-
_See code: [src/commands/data/mtls/ip-rules/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
302
|
+
_See code: [src/commands/data/mtls/ip-rules/index.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/ip-rules/index.ts)_
|
|
273
303
|
|
|
274
304
|
## `heroku data:mtls:ip-rules:create ADDON`
|
|
275
305
|
|
|
@@ -277,15 +307,18 @@ create a new IP Rule for your mTLS enabled add-on
|
|
|
277
307
|
|
|
278
308
|
```
|
|
279
309
|
USAGE
|
|
280
|
-
$ heroku data:mtls:ip-rules:create ADDON -a <value> --cidr <value> [--description <value>]
|
|
310
|
+
$ heroku data:mtls:ip-rules:create ADDON -a <value> --cidr <value> [--prompt] [--description <value>]
|
|
281
311
|
|
|
282
312
|
ARGUMENTS
|
|
283
313
|
ADDON addon
|
|
284
314
|
|
|
285
315
|
FLAGS
|
|
286
316
|
-a, --app=<value> (required) app to run command against
|
|
287
|
-
--cidr=<value> (required)
|
|
288
|
-
|
|
317
|
+
--cidr=<value> (required) CIDR block to allow
|
|
318
|
+
--description=<value> description of the IP rule
|
|
319
|
+
|
|
320
|
+
GLOBAL FLAGS
|
|
321
|
+
--prompt interactively prompt for command arguments and flags
|
|
289
322
|
|
|
290
323
|
DESCRIPTION
|
|
291
324
|
create a new IP Rule for your mTLS enabled add-on
|
|
@@ -294,7 +327,7 @@ EXAMPLES
|
|
|
294
327
|
$ heroku data:mtls:ip-rules:create postgresql-sushi-12345 --cidr "1.2.3.4/32" --description "home IP address" -a example-app
|
|
295
328
|
```
|
|
296
329
|
|
|
297
|
-
_See code: [src/commands/data/mtls/ip-rules/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
330
|
+
_See code: [src/commands/data/mtls/ip-rules/create.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/ip-rules/create.ts)_
|
|
298
331
|
|
|
299
332
|
## `heroku data:mtls:ip-rules:delete ADDON`
|
|
300
333
|
|
|
@@ -302,7 +335,7 @@ delete a specific IP Rule for your mTLS enabled add-on
|
|
|
302
335
|
|
|
303
336
|
```
|
|
304
337
|
USAGE
|
|
305
|
-
$ heroku data:mtls:ip-rules:delete ADDON -a <value> [--cidr <value>] [--id <value>]
|
|
338
|
+
$ heroku data:mtls:ip-rules:delete ADDON -a <value> [--prompt] [--cidr <value>] [--id <value>]
|
|
306
339
|
|
|
307
340
|
ARGUMENTS
|
|
308
341
|
ADDON addon
|
|
@@ -312,6 +345,9 @@ FLAGS
|
|
|
312
345
|
--cidr=<value> cidr of IP Rule
|
|
313
346
|
--id=<value> id of IP Rule
|
|
314
347
|
|
|
348
|
+
GLOBAL FLAGS
|
|
349
|
+
--prompt interactively prompt for command arguments and flags
|
|
350
|
+
|
|
315
351
|
DESCRIPTION
|
|
316
352
|
delete a specific IP Rule for your mTLS enabled add-on
|
|
317
353
|
|
|
@@ -319,7 +355,7 @@ EXAMPLES
|
|
|
319
355
|
$ heroku data:mtls:ip-rules:delete postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app
|
|
320
356
|
```
|
|
321
357
|
|
|
322
|
-
_See code: [src/commands/data/mtls/ip-rules/delete.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
358
|
+
_See code: [src/commands/data/mtls/ip-rules/delete.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/ip-rules/delete.ts)_
|
|
323
359
|
|
|
324
360
|
## `heroku data:mtls:ip-rules:get ADDON`
|
|
325
361
|
|
|
@@ -327,7 +363,7 @@ get the a specific IP Rule for your mTLS enabled add-on
|
|
|
327
363
|
|
|
328
364
|
```
|
|
329
365
|
USAGE
|
|
330
|
-
$ heroku data:mtls:ip-rules:get ADDON -a <value> --id <value>
|
|
366
|
+
$ heroku data:mtls:ip-rules:get ADDON -a <value> --id <value> [--prompt]
|
|
331
367
|
|
|
332
368
|
ARGUMENTS
|
|
333
369
|
ADDON addon
|
|
@@ -336,6 +372,9 @@ FLAGS
|
|
|
336
372
|
-a, --app=<value> (required) app to run command against
|
|
337
373
|
--id=<value> (required) id of IP Rule
|
|
338
374
|
|
|
375
|
+
GLOBAL FLAGS
|
|
376
|
+
--prompt interactively prompt for command arguments and flags
|
|
377
|
+
|
|
339
378
|
DESCRIPTION
|
|
340
379
|
get the a specific IP Rule for your mTLS enabled add-on
|
|
341
380
|
|
|
@@ -343,5 +382,5 @@ EXAMPLES
|
|
|
343
382
|
$ heroku data:mtls:ip-rules:get postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app
|
|
344
383
|
```
|
|
345
384
|
|
|
346
|
-
_See code: [src/commands/data/mtls/ip-rules/get.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/
|
|
385
|
+
_See code: [src/commands/data/mtls/ip-rules/get.ts](https://github.com/heroku/heroku-cli-plugin-mtls/blob/v2.0.1/src/commands/data/mtls/ip-rules/get.ts)_
|
|
347
386
|
<!-- commandsstop -->
|
package/dist/base.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { APIClient, Command } from '@heroku-cli/command';
|
|
2
2
|
import { Config } from '@oclif/core';
|
|
3
|
-
export default abstract class extends Command {
|
|
3
|
+
export default abstract class MTLSCommand extends Command {
|
|
4
4
|
shogun: APIClient;
|
|
5
5
|
protected constructor(argv: string[], config: Config);
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type MTLSStatus = {
|
|
8
8
|
addon: string;
|
|
9
9
|
app: string;
|
|
10
10
|
certificate_authority_chain?: string;
|
|
11
11
|
status: string;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
12
|
+
};
|
|
13
|
+
export type MTLSIPRule = {
|
|
14
14
|
cidr: string;
|
|
15
15
|
created_at: Date;
|
|
16
|
-
|
|
16
|
+
description: string;
|
|
17
17
|
id: string;
|
|
18
18
|
status: string;
|
|
19
19
|
updated_at: Date;
|
|
20
|
-
}
|
|
21
|
-
export
|
|
20
|
+
};
|
|
21
|
+
export type MTLSCertificate = {
|
|
22
22
|
certificate_with_chain?: string;
|
|
23
23
|
created_at: Date;
|
|
24
24
|
expires_at: Date;
|
|
@@ -27,4 +27,4 @@ export interface MTLSCertificate {
|
|
|
27
27
|
renewal_at: Date;
|
|
28
28
|
status: string;
|
|
29
29
|
updated_at: Date;
|
|
30
|
-
}
|
|
30
|
+
};
|
package/dist/base.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const command_1 = require("@heroku-cli/command");
|
|
4
|
-
class default_1 extends command_1.Command {
|
|
1
|
+
import { APIClient, Command } from '@heroku-cli/command';
|
|
2
|
+
export default class MTLSCommand extends Command {
|
|
5
3
|
shogun;
|
|
6
4
|
constructor(argv, config) {
|
|
7
5
|
super(argv, config);
|
|
8
|
-
const client = new
|
|
6
|
+
const client = new APIClient(this.config, {});
|
|
9
7
|
client.defaults.host = process.env.HEROKU_DATA_HOST || 'api.data.heroku.com';
|
|
10
8
|
client.defaults.headers = {
|
|
11
9
|
...this.heroku.defaults.headers,
|
|
12
|
-
authorization: `Basic ${Buffer.from(':' + this.heroku.auth).toString('base64')}
|
|
10
|
+
authorization: `Basic ${Buffer.from(':' + this.heroku.auth).toString('base64')}`,
|
|
13
11
|
};
|
|
14
12
|
this.shogun = client;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
exports.default = default_1;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Command from '../../../../base';
|
|
1
|
+
import Command from '../../../../base.js';
|
|
2
2
|
export default class MTLSCertificateCreate extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
addon: import("@oclif/core/
|
|
4
|
+
addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
|
-
app: import("@oclif/core/
|
|
9
|
+
app: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class MTLSCertificateCreate extends base_1.default {
|
|
1
|
+
import { flags } from '@heroku-cli/command';
|
|
2
|
+
import * as color from '@heroku/heroku-cli-util/color';
|
|
3
|
+
import { styledObject } from '@heroku/heroku-cli-util/hux';
|
|
4
|
+
import { Args } from '@oclif/core';
|
|
5
|
+
import { ux } from '@oclif/core/ux';
|
|
6
|
+
import Command from '../../../../base.js';
|
|
7
|
+
import { fetcher } from '../../../../lib/addon-fetcher.js';
|
|
8
|
+
export default class MTLSCertificateCreate extends Command {
|
|
10
9
|
static args = {
|
|
11
|
-
addon:
|
|
10
|
+
addon: Args.string({ required: true, description: 'addon' }),
|
|
12
11
|
};
|
|
13
12
|
static description = 'create a new certificate for your mTLS enabled add-on';
|
|
14
13
|
static examples = [
|
|
15
|
-
'$ heroku data:mtls:certificates:create postgresql-sushi-12345 -a example-app'
|
|
14
|
+
'$ heroku data:mtls:certificates:create postgresql-sushi-12345 -a example-app',
|
|
16
15
|
];
|
|
17
16
|
static flags = {
|
|
18
|
-
app:
|
|
17
|
+
app: flags.app({ required: true }),
|
|
19
18
|
};
|
|
20
19
|
async run() {
|
|
21
20
|
const { args, flags } = await this.parse(MTLSCertificateCreate);
|
|
22
|
-
const addon = await (
|
|
21
|
+
const addon = await fetcher(this.heroku, args.addon, flags.app);
|
|
23
22
|
if (addon.kind === 'kafka') {
|
|
24
|
-
|
|
23
|
+
ux.error('Kafka certificates are available in your app\'s config vars');
|
|
25
24
|
}
|
|
26
|
-
|
|
25
|
+
ux.action.start(`Creating new certificate for ${color.addon(addon.name)}`);
|
|
27
26
|
const { body: res } = await this.shogun.post(`${addon.endpoint}/certificates`, this.shogun.defaults);
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
ux.action.stop();
|
|
28
|
+
styledObject(res);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
exports.default = MTLSCertificateCreate;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Command from '../../../../base';
|
|
1
|
+
import Command from '../../../../base.js';
|
|
2
2
|
export default class MTLSCertificateDelete extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
addon: import("@oclif/core/
|
|
4
|
+
addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
|
-
app: import("@oclif/core/
|
|
10
|
-
id: import("@oclif/core/
|
|
9
|
+
app: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
id: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
};
|
|
12
12
|
run(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const fetcher_1 = tslib_1.__importDefault(require("../../../../lib/fetcher"));
|
|
9
|
-
class MTLSCertificateDelete extends base_1.default {
|
|
1
|
+
import { flags } from '@heroku-cli/command';
|
|
2
|
+
import * as color from '@heroku/heroku-cli-util/color';
|
|
3
|
+
import { Args } from '@oclif/core';
|
|
4
|
+
import { ux } from '@oclif/core/ux';
|
|
5
|
+
import Command from '../../../../base.js';
|
|
6
|
+
import { fetcher } from '../../../../lib/addon-fetcher.js';
|
|
7
|
+
export default class MTLSCertificateDelete extends Command {
|
|
10
8
|
static args = {
|
|
11
|
-
addon:
|
|
9
|
+
addon: Args.string({ required: true, description: 'addon' }),
|
|
12
10
|
};
|
|
13
11
|
static description = 'delete a specific certificate for your mTLS enabled add-on';
|
|
14
12
|
static examples = [
|
|
15
|
-
'$ heroku data:mtls:certificates:delete postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app'
|
|
13
|
+
'$ heroku data:mtls:certificates:delete postgresql-sushi-12345 --id "1862ec85-fdc1-47b3-924e-a91d26ca3a7c" -a example-app',
|
|
16
14
|
];
|
|
17
15
|
static flags = {
|
|
18
|
-
app:
|
|
19
|
-
id:
|
|
16
|
+
app: flags.app({ required: true }),
|
|
17
|
+
id: flags.string({ required: true, description: 'id of certificate' }),
|
|
20
18
|
};
|
|
21
19
|
async run() {
|
|
22
20
|
const { args, flags } = await this.parse(MTLSCertificateDelete);
|
|
23
|
-
const addon = await (
|
|
21
|
+
const addon = await fetcher(this.heroku, args.addon, flags.app);
|
|
24
22
|
if (addon.kind === 'kafka') {
|
|
25
|
-
|
|
23
|
+
ux.error('Kafka certificates are available in your app\'s config vars');
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
ux.action.start(`Deleting certificate for ${color.addon(addon.name)}`);
|
|
28
26
|
await this.shogun.delete(`${addon.endpoint}/certificates/${flags.id}`, this.shogun.defaults);
|
|
29
|
-
|
|
27
|
+
ux.action.stop();
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
|
-
exports.default = MTLSCertificateDelete;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Command from '../../../../base';
|
|
1
|
+
import Command from '../../../../base.js';
|
|
2
2
|
export default class MTLSCertificateDownload extends Command {
|
|
3
3
|
static args: {
|
|
4
|
-
addon: import("@oclif/core/
|
|
4
|
+
addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
|
-
app: import("@oclif/core/
|
|
10
|
-
dir: import("@oclif/core/
|
|
11
|
-
id: import("@oclif/core/
|
|
12
|
-
prefix: import("@oclif/core/
|
|
9
|
+
app: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
dir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
prefix: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
};
|
|
14
14
|
run(): Promise<void>;
|
|
15
15
|
}
|