@sw-tsdk/plugin-turbine 2.11.2-next.8 → 2.11.2-next.81
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 +47 -30
- package/lib/commands/turbine/config/list.d.ts +1 -1
- package/lib/commands/turbine/config/list.js +4 -1
- package/lib/commands/turbine/config/list.js.map +1 -1
- package/lib/commands/turbine/config/remove.d.ts +3 -5
- package/lib/commands/turbine/config/remove.js +9 -4
- package/lib/commands/turbine/config/remove.js.map +1 -1
- package/lib/commands/turbine/config/set.d.ts +6 -7
- package/lib/commands/turbine/config/set.js +17 -6
- package/lib/commands/turbine/config/set.js.map +1 -1
- package/lib/commands/turbine/config/use.d.ts +3 -5
- package/lib/commands/turbine/config/use.js +10 -5
- package/lib/commands/turbine/config/use.js.map +1 -1
- package/lib/commands/turbine/connector/keys/generate.d.ts +8 -9
- package/lib/commands/turbine/connector/keys/generate.js +28 -17
- package/lib/commands/turbine/connector/keys/generate.js.map +1 -1
- package/lib/commands/turbine/connector/keys/list/local.d.ts +1 -1
- package/lib/commands/turbine/connector/keys/list/local.js +4 -2
- package/lib/commands/turbine/connector/keys/list/local.js.map +1 -1
- package/lib/commands/turbine/connector/keys/list/remote.d.ts +6 -7
- package/lib/commands/turbine/connector/keys/list/remote.js +17 -9
- package/lib/commands/turbine/connector/keys/list/remote.js.map +1 -1
- package/lib/commands/turbine/connector/keys/push.d.ts +7 -8
- package/lib/commands/turbine/connector/keys/push.js +25 -16
- package/lib/commands/turbine/connector/keys/push.js.map +1 -1
- package/lib/commands/turbine/connector/push.d.ts +9 -7
- package/lib/commands/turbine/connector/push.js +22 -12
- package/lib/commands/turbine/connector/push.js.map +1 -1
- package/oclif.manifest.json +487 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ npm install -g @sw-tsdk/plugin-turbine
|
|
|
16
16
|
$ sw-tsdk-turbine COMMAND
|
|
17
17
|
running command...
|
|
18
18
|
$ sw-tsdk-turbine (--version)
|
|
19
|
-
@sw-tsdk/plugin-turbine/2.11.2-next.
|
|
19
|
+
@sw-tsdk/plugin-turbine/2.11.2-next.81+c94bc06 linux-x64 node-v16.20.2
|
|
20
20
|
$ sw-tsdk-turbine --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ sw-tsdk-turbine COMMAND
|
|
@@ -29,11 +29,11 @@ USAGE
|
|
|
29
29
|
* [`sw-tsdk-turbine turbine:config:remove URL`](#sw-tsdk-turbine-turbineconfigremove-url)
|
|
30
30
|
* [`sw-tsdk-turbine turbine:config:set URL`](#sw-tsdk-turbine-turbineconfigset-url)
|
|
31
31
|
* [`sw-tsdk-turbine turbine:config:use URL`](#sw-tsdk-turbine-turbineconfiguse-url)
|
|
32
|
-
* [`sw-tsdk-turbine turbine:connector:keys:generate
|
|
32
|
+
* [`sw-tsdk-turbine turbine:connector:keys:generate URL`](#sw-tsdk-turbine-turbineconnectorkeysgenerate-url)
|
|
33
33
|
* [`sw-tsdk-turbine turbine:connector:keys:list:local`](#sw-tsdk-turbine-turbineconnectorkeyslistlocal)
|
|
34
|
-
* [`sw-tsdk-turbine turbine:connector:keys:list:remote
|
|
34
|
+
* [`sw-tsdk-turbine turbine:connector:keys:list:remote URL`](#sw-tsdk-turbine-turbineconnectorkeyslistremote-url)
|
|
35
35
|
* [`sw-tsdk-turbine turbine:connector:keys:push URL`](#sw-tsdk-turbine-turbineconnectorkeyspush-url)
|
|
36
|
-
* [`sw-tsdk-turbine turbine:connector:push FILE
|
|
36
|
+
* [`sw-tsdk-turbine turbine:connector:push FILE URL`](#sw-tsdk-turbine-turbineconnectorpush-file-url)
|
|
37
37
|
|
|
38
38
|
## `sw-tsdk-turbine turbine:config:list`
|
|
39
39
|
|
|
@@ -50,7 +50,7 @@ DESCRIPTION
|
|
|
50
50
|
Use to login to Turbine
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
_See code: [lib/commands/turbine/config/list.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
53
|
+
_See code: [lib/commands/turbine/config/list.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/config/list.js)_
|
|
54
54
|
|
|
55
55
|
## `sw-tsdk-turbine turbine:config:remove URL`
|
|
56
56
|
|
|
@@ -58,10 +58,12 @@ Use to login to Turbine
|
|
|
58
58
|
|
|
59
59
|
```
|
|
60
60
|
USAGE
|
|
61
|
-
$ sw-tsdk-turbine turbine:config:remove
|
|
61
|
+
$ sw-tsdk-turbine turbine:config:remove URL [-h]
|
|
62
62
|
|
|
63
63
|
ARGUMENTS
|
|
64
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
64
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
65
|
+
url with the account and the tenant
|
|
66
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}
|
|
65
67
|
|
|
66
68
|
FLAGS
|
|
67
69
|
-h, --help Show CLI help.
|
|
@@ -70,7 +72,7 @@ DESCRIPTION
|
|
|
70
72
|
Use to login to Turbine
|
|
71
73
|
```
|
|
72
74
|
|
|
73
|
-
_See code: [lib/commands/turbine/config/remove.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
75
|
+
_See code: [lib/commands/turbine/config/remove.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/config/remove.js)_
|
|
74
76
|
|
|
75
77
|
## `sw-tsdk-turbine turbine:config:set URL`
|
|
76
78
|
|
|
@@ -78,14 +80,17 @@ Use to login to Turbine
|
|
|
78
80
|
|
|
79
81
|
```
|
|
80
82
|
USAGE
|
|
81
|
-
$ sw-tsdk-turbine turbine:config:set
|
|
83
|
+
$ sw-tsdk-turbine turbine:config:set URL [-u <value>] [-p <value>] [-c <value>] [-b] [--default] [--skip-check] [-h]
|
|
82
84
|
|
|
83
85
|
ARGUMENTS
|
|
84
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
86
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
87
|
+
url with the account and the tenant
|
|
88
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}]
|
|
85
89
|
|
|
86
90
|
FLAGS
|
|
87
91
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
88
92
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
93
|
+
-c, --otp-code=<value> Turbine 2FA code
|
|
89
94
|
-h, --help Show CLI help.
|
|
90
95
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
91
96
|
-u, --username=<value> Turbine username
|
|
@@ -96,7 +101,7 @@ DESCRIPTION
|
|
|
96
101
|
Use to login to Turbine
|
|
97
102
|
```
|
|
98
103
|
|
|
99
|
-
_See code: [lib/commands/turbine/config/set.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
104
|
+
_See code: [lib/commands/turbine/config/set.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/config/set.js)_
|
|
100
105
|
|
|
101
106
|
## `sw-tsdk-turbine turbine:config:use URL`
|
|
102
107
|
|
|
@@ -104,10 +109,12 @@ Use to login to Turbine
|
|
|
104
109
|
|
|
105
110
|
```
|
|
106
111
|
USAGE
|
|
107
|
-
$ sw-tsdk-turbine turbine:config:use
|
|
112
|
+
$ sw-tsdk-turbine turbine:config:use URL [-h]
|
|
108
113
|
|
|
109
114
|
ARGUMENTS
|
|
110
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
115
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
116
|
+
url with the account and the tenant
|
|
117
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}
|
|
111
118
|
|
|
112
119
|
FLAGS
|
|
113
120
|
-h, --help Show CLI help.
|
|
@@ -116,23 +123,26 @@ DESCRIPTION
|
|
|
116
123
|
Use to login to Turbine
|
|
117
124
|
```
|
|
118
125
|
|
|
119
|
-
_See code: [lib/commands/turbine/config/use.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
126
|
+
_See code: [lib/commands/turbine/config/use.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/config/use.js)_
|
|
120
127
|
|
|
121
|
-
## `sw-tsdk-turbine turbine:connector:keys:generate
|
|
128
|
+
## `sw-tsdk-turbine turbine:connector:keys:generate URL`
|
|
122
129
|
|
|
123
130
|
Use to generate and store signing keys in Turbine
|
|
124
131
|
|
|
125
132
|
```
|
|
126
133
|
USAGE
|
|
127
|
-
$ sw-tsdk-turbine turbine:connector:keys:generate
|
|
128
|
-
[-b] [-h]
|
|
134
|
+
$ sw-tsdk-turbine turbine:connector:keys:generate URL [-u <value>] [-p <value>] [--signing-password <value>] [-c <value>]
|
|
135
|
+
[--key-name <value>] [-b] [-h]
|
|
129
136
|
|
|
130
137
|
ARGUMENTS
|
|
131
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
138
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
139
|
+
url with the account and the tenant
|
|
140
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}
|
|
132
141
|
|
|
133
142
|
FLAGS
|
|
134
143
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
135
144
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
145
|
+
-c, --otp-code=<value> Turbine 2FA code
|
|
136
146
|
-h, --help Show CLI help.
|
|
137
147
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
138
148
|
-u, --username=<value> Turbine username
|
|
@@ -143,7 +153,7 @@ DESCRIPTION
|
|
|
143
153
|
Use to generate and store signing keys in Turbine
|
|
144
154
|
```
|
|
145
155
|
|
|
146
|
-
_See code: [lib/commands/turbine/connector/keys/generate.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
156
|
+
_See code: [lib/commands/turbine/connector/keys/generate.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/connector/keys/generate.js)_
|
|
147
157
|
|
|
148
158
|
## `sw-tsdk-turbine turbine:connector:keys:list:local`
|
|
149
159
|
|
|
@@ -160,22 +170,25 @@ DESCRIPTION
|
|
|
160
170
|
Use to list local keys
|
|
161
171
|
```
|
|
162
172
|
|
|
163
|
-
_See code: [lib/commands/turbine/connector/keys/list/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
173
|
+
_See code: [lib/commands/turbine/connector/keys/list/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/connector/keys/list/local.js)_
|
|
164
174
|
|
|
165
|
-
## `sw-tsdk-turbine turbine:connector:keys:list:remote
|
|
175
|
+
## `sw-tsdk-turbine turbine:connector:keys:list:remote URL`
|
|
166
176
|
|
|
167
177
|
Use to list remote keys
|
|
168
178
|
|
|
169
179
|
```
|
|
170
180
|
USAGE
|
|
171
|
-
$ sw-tsdk-turbine turbine:connector:keys:list:remote
|
|
181
|
+
$ sw-tsdk-turbine turbine:connector:keys:list:remote URL [-u <value>] [-p <value>] [-c <value>] [-b] [-h]
|
|
172
182
|
|
|
173
183
|
ARGUMENTS
|
|
174
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
184
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
185
|
+
url with the account and the tenant
|
|
186
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}
|
|
175
187
|
|
|
176
188
|
FLAGS
|
|
177
189
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
178
190
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
191
|
+
-c, --otp-code=<value> Turbine 2FA code
|
|
179
192
|
-h, --help Show CLI help.
|
|
180
193
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
181
194
|
-u, --username=<value> Turbine username
|
|
@@ -184,7 +197,7 @@ DESCRIPTION
|
|
|
184
197
|
Use to list remote keys
|
|
185
198
|
```
|
|
186
199
|
|
|
187
|
-
_See code: [lib/commands/turbine/connector/keys/list/remote.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
200
|
+
_See code: [lib/commands/turbine/connector/keys/list/remote.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/connector/keys/list/remote.js)_
|
|
188
201
|
|
|
189
202
|
## `sw-tsdk-turbine turbine:connector:keys:push URL`
|
|
190
203
|
|
|
@@ -192,7 +205,7 @@ Use to generate and store signing keys in Turbine
|
|
|
192
205
|
|
|
193
206
|
```
|
|
194
207
|
USAGE
|
|
195
|
-
$ sw-tsdk-turbine turbine:connector:keys:push
|
|
208
|
+
$ sw-tsdk-turbine turbine:connector:keys:push URL [-u <value>] [-p <value>] [--keyName <value>] [-c <value>] [-b] [-h]
|
|
196
209
|
|
|
197
210
|
ARGUMENTS
|
|
198
211
|
URL the url of the turbine instance [https://turbine.acme.com]
|
|
@@ -200,6 +213,7 @@ ARGUMENTS
|
|
|
200
213
|
FLAGS
|
|
201
214
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
202
215
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
216
|
+
-c, --otp-code=<value> Turbine 2FA code
|
|
203
217
|
-h, --help Show CLI help.
|
|
204
218
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
205
219
|
-u, --username=<value> Turbine username
|
|
@@ -209,23 +223,26 @@ DESCRIPTION
|
|
|
209
223
|
Use to generate and store signing keys in Turbine
|
|
210
224
|
```
|
|
211
225
|
|
|
212
|
-
_See code: [lib/commands/turbine/connector/keys/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
226
|
+
_See code: [lib/commands/turbine/connector/keys/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/connector/keys/push.js)_
|
|
213
227
|
|
|
214
|
-
## `sw-tsdk-turbine turbine:connector:push FILE
|
|
228
|
+
## `sw-tsdk-turbine turbine:connector:push FILE URL`
|
|
215
229
|
|
|
216
230
|
Use to push an integration to Turbine
|
|
217
231
|
|
|
218
232
|
```
|
|
219
233
|
USAGE
|
|
220
|
-
$ sw-tsdk-turbine turbine:connector:push
|
|
234
|
+
$ sw-tsdk-turbine turbine:connector:push FILE URL [-u <value>] [-p <value>] [-c <value>] [-b] [-h]
|
|
221
235
|
|
|
222
236
|
ARGUMENTS
|
|
223
237
|
FILE path of the file to be uploaded to Turbine
|
|
224
|
-
URL the url of the turbine instance [https://turbine.acme.com]
|
|
238
|
+
URL the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the
|
|
239
|
+
url with the account and the tenant
|
|
240
|
+
[https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}
|
|
225
241
|
|
|
226
242
|
FLAGS
|
|
227
243
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
228
244
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
245
|
+
-c, --otp-code=<value> Turbine 2FA code
|
|
229
246
|
-h, --help Show CLI help.
|
|
230
247
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
231
248
|
-u, --username=<value> Turbine username
|
|
@@ -234,5 +251,5 @@ DESCRIPTION
|
|
|
234
251
|
Use to push an integration to Turbine
|
|
235
252
|
```
|
|
236
253
|
|
|
237
|
-
_See code: [lib/commands/turbine/connector/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.
|
|
254
|
+
_See code: [lib/commands/turbine/connector/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.11.2-next.81+c94bc06/lib/commands/turbine/connector/push.js)_
|
|
238
255
|
<!-- commandsstop -->
|
|
@@ -3,7 +3,7 @@ export declare class List extends Base {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -15,5 +15,8 @@ class List extends core_1.Base {
|
|
|
15
15
|
}
|
|
16
16
|
exports.List = List;
|
|
17
17
|
List.description = 'Use to login to Turbine';
|
|
18
|
-
List.flags =
|
|
18
|
+
List.flags = {
|
|
19
|
+
...core_1.Base.BaseFlags,
|
|
20
|
+
help: core_2.Flags.help({ char: 'h' }),
|
|
21
|
+
};
|
|
19
22
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/list.ts"],"names":[],"mappings":";;;AAAA,wCAAiD;AACjD,sCAAiC;AAEjC,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAQ5B,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA;QACnC,MAAM,aAAa,GAAG,IAAI,oBAAa,CAAC,KAAK,CAAC,CAAA;QAE9C,MAAM,MAAM,GAAG,CAAC,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAA;QACvD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,CAAC;;AAfH,oBAgBC;AAfQ,gBAAW,GAAG,yBAAyB,CAAA;AAEvC,UAAK,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/list.ts"],"names":[],"mappings":";;;AAAA,wCAAiD;AACjD,sCAAiC;AAEjC,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAQ5B,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA;QACnC,MAAM,aAAa,GAAG,IAAI,oBAAa,CAAC,KAAK,CAAC,CAAA;QAE9C,MAAM,MAAM,GAAG,CAAC,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAA;QACvD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,CAAC;;AAfH,oBAgBC;AAfQ,gBAAW,GAAG,yBAAyB,CAAA;AAEvC,UAAK,GAAG;IACb,GAAG,WAAI,CAAC,SAAS;IACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -3,12 +3,10 @@ export declare class List extends Base {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
static args: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
required: boolean;
|
|
12
|
-
}[];
|
|
9
|
+
url: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
10
|
+
};
|
|
13
11
|
run(): Promise<void>;
|
|
14
12
|
}
|
|
@@ -20,10 +20,15 @@ class List extends core_1.Base {
|
|
|
20
20
|
}
|
|
21
21
|
exports.List = List;
|
|
22
22
|
List.description = 'Use to login to Turbine';
|
|
23
|
-
List.flags =
|
|
24
|
-
|
|
23
|
+
List.flags = {
|
|
24
|
+
...core_1.Base.BaseFlags,
|
|
25
|
+
help: core_2.Flags.help({ char: 'h' }),
|
|
26
|
+
};
|
|
27
|
+
List.args = {
|
|
28
|
+
url: core_2.Args.string({
|
|
25
29
|
name: 'url',
|
|
26
|
-
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
30
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the url with the account and the tenant [https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}',
|
|
27
31
|
required: true,
|
|
28
|
-
}
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
29
34
|
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/remove.ts"],"names":[],"mappings":";;;AAAA,wCAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/remove.ts"],"names":[],"mappings":";;;AAAA,wCAAiD;AACjD,sCAAuC;AAEvC,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAgB5B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAErC,MAAM,EACJ,GAAG,GACJ,GAAG,IAAI,CAAA;QACR,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA;QACnC,MAAM,aAAa,GAAG,IAAI,oBAAa,CAAC,KAAK,CAAC,CAAA;QAE9C,MAAM,MAAM,GAAG,CAAC,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAA;QAEvD,IAAI,MAAM,CAAC,OAAO,KAAK,GAAG,EAAE;YAC1B,OAAO,MAAM,CAAC,OAAO,CAAA;SACtB;QAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;QAElB,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;;AAlCH,oBAmCC;AAlCQ,gBAAW,GAAG,yBAAyB,CAAA;AAEvC,UAAK,GAAG;IACb,GAAG,WAAI,CAAC,SAAS;IACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA;AAEM,SAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,sOAAsO;QACnP,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA"}
|
|
@@ -2,18 +2,17 @@ import { Base } from '@sw-tsdk/core';
|
|
|
2
2
|
export declare class Set extends Base {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
username: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
-
password: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
5
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
'otp-code': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
8
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
default: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
10
|
'skip-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
static args: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
required: boolean;
|
|
17
|
-
}[];
|
|
15
|
+
url: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
16
|
+
};
|
|
18
17
|
run(): Promise<void>;
|
|
19
18
|
}
|
|
@@ -25,7 +25,7 @@ class Set extends core_1.Base {
|
|
|
25
25
|
const newConfig = Object.assign(flags, answers);
|
|
26
26
|
const turbine = await turbine_1.Turbine.get(url, bypassCertificateCheck);
|
|
27
27
|
if (!flags['skip-check']) {
|
|
28
|
-
await
|
|
28
|
+
await turbine?.login(newConfig.username, newConfig.password, newConfig['otp-code']);
|
|
29
29
|
}
|
|
30
30
|
if (setDefault) {
|
|
31
31
|
await this.saveConfig('default', url);
|
|
@@ -34,15 +34,26 @@ class Set extends core_1.Base {
|
|
|
34
34
|
bypassCertificateCheck: bypassCertificateCheck,
|
|
35
35
|
username: newConfig.username,
|
|
36
36
|
});
|
|
37
|
-
core_2.
|
|
37
|
+
core_2.ux.log('Login successful');
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.Set = Set;
|
|
41
41
|
Set.description = 'Use to login to Turbine';
|
|
42
|
-
Set.flags =
|
|
43
|
-
|
|
42
|
+
Set.flags = {
|
|
43
|
+
...core_1.Base.BaseFlags,
|
|
44
|
+
username: core_2.Flags.string({ char: 'u', description: 'Turbine username' }),
|
|
45
|
+
password: core_2.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', env: 'TURBINE_PASSWORD' }),
|
|
46
|
+
'otp-code': core_2.Flags.string({ char: 'c', description: 'Turbine 2FA code', default: '' }),
|
|
47
|
+
'bypass-certificate-check': core_2.Flags.boolean({ char: 'b', description: 'disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)', env: 'TURBINE_BYPASS_CERTIFICATE_CHECK' }),
|
|
48
|
+
default: core_2.Flags.boolean({ description: 'sets the turbine instance as the default' }),
|
|
49
|
+
'skip-check': core_2.Flags.boolean({ description: 'skips checking the credentials' }),
|
|
50
|
+
help: core_2.Flags.help({ char: 'h' }),
|
|
51
|
+
};
|
|
52
|
+
Set.args = {
|
|
53
|
+
url: core_2.Args.string({
|
|
44
54
|
name: 'url',
|
|
45
|
-
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
55
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the url with the account and the tenant [https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}]',
|
|
46
56
|
required: true,
|
|
47
|
-
}
|
|
57
|
+
}),
|
|
58
|
+
};
|
|
48
59
|
//# sourceMappingURL=set.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/set.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAC/B,8CAAwC;AACxC,wCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/set.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAC/B,8CAAwC;AACxC,wCAAkC;AAClC,sCAA2C;AAE3C,qCAAqC;AACrC,MAAa,GAAI,SAAQ,WAAI;IAsB3B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC3C,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,0BAA0B,EAAE,sBAAsB,EAClD,OAAO,EAAE,UAAU,GACpB,GAAG,KAAK,CAAA;QAET,MAAM,EACJ,GAAG,GACJ,GAAG,I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E,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAC,CAAC;IACpE,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0CAA0C,EAAE,GAAG,EAAE,kBAAkB,EAAC,CAAC;IACrH,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC;IACnF,0BAA0B,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6FAA6F,EAAE,GAAG,EAAE,kCAAkC,EAAC,CAAC;IAC3M,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,WAAW,EAAE,0CAA0C,EAAC,CAAC;IACjF,YAAY,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,WAAW,EAAE,gCAAgC,EAAC,CAAC;IAC5E,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA;AAEM,QAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,uOAAuO;QACpP,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA"}
|
|
@@ -3,12 +3,10 @@ export declare class Use extends Base {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
static args: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
required: boolean;
|
|
12
|
-
}[];
|
|
9
|
+
url: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
10
|
+
};
|
|
13
11
|
run(): Promise<void>;
|
|
14
12
|
}
|
|
@@ -9,15 +9,20 @@ class Use extends core_1.Base {
|
|
|
9
9
|
const { args } = await this.parse(Use);
|
|
10
10
|
const { url, } = args;
|
|
11
11
|
await this.saveConfig('default', url);
|
|
12
|
-
core_2.
|
|
12
|
+
core_2.ux.log('Login successful');
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.Use = Use;
|
|
16
16
|
Use.description = 'Use to login to Turbine';
|
|
17
|
-
Use.flags =
|
|
18
|
-
|
|
17
|
+
Use.flags = {
|
|
18
|
+
...core_1.Base.BaseFlags,
|
|
19
|
+
help: core_2.Flags.help({ char: 'h' }),
|
|
20
|
+
};
|
|
21
|
+
Use.args = {
|
|
22
|
+
url: core_2.Args.string({
|
|
19
23
|
name: 'url',
|
|
20
|
-
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
24
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the url with the account and the tenant [https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}',
|
|
21
25
|
required: true,
|
|
22
|
-
}
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
23
28
|
//# sourceMappingURL=use.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/use.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/use.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAClC,sCAA2C;AAE3C,qCAAqC;AACrC,MAAa,GAAI,SAAQ,WAAI;IAgB3B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACpC,MAAM,EACJ,GAAG,GACJ,GAAG,IAAI,CAAA;QAER,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;QAErC,SAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IAC5B,CAAC;;AAzBH,kBA0BC;AAzBQ,eAAW,GAAG,yBAAyB,CAAA;AAEvC,SAAK,GAAG;IACb,GAAG,WAAI,CAAC,SAAS;IACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA;AAEM,QAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,sOAAsO;QACnP,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA"}
|
|
@@ -2,18 +2,17 @@ import { Base } from '@sw-tsdk/core';
|
|
|
2
2
|
export declare class Generate extends Base {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
username: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
-
password: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
'signing-password': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
-
'
|
|
5
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
'signing-password': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
'otp-code': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
'key-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
10
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
static args: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
required: boolean;
|
|
17
|
-
}[];
|
|
15
|
+
url: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
16
|
+
};
|
|
18
17
|
run(): Promise<void>;
|
|
19
18
|
}
|
|
@@ -15,7 +15,6 @@ const inquirer_1 = require("inquirer");
|
|
|
15
15
|
// noinspection JSUnusedGlobalSymbols
|
|
16
16
|
class Generate extends core_2.Base {
|
|
17
17
|
async run() {
|
|
18
|
-
var _a;
|
|
19
18
|
const { flags, args } = await this.parse(Generate);
|
|
20
19
|
const { 'signing-password': signingPassword, username, password, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
21
20
|
let { url, } = args;
|
|
@@ -24,7 +23,7 @@ class Generate extends core_2.Base {
|
|
|
24
23
|
}
|
|
25
24
|
const turbineConfig = await this.getConfig(url);
|
|
26
25
|
if (turbineConfig) {
|
|
27
|
-
core_1.
|
|
26
|
+
core_1.ux.log(`Config: ${url} | ${turbineConfig.username}`);
|
|
28
27
|
}
|
|
29
28
|
const keyName = flags['key-name'] || `${(0, node_os_1.userInfo)().username}_${(0, date_fns_1.format)(new Date(), 'yyyy-MM-dd')}`;
|
|
30
29
|
const answers = await (0, inquirer_1.prompt)([{
|
|
@@ -53,48 +52,60 @@ class Generate extends core_2.Base {
|
|
|
53
52
|
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
54
53
|
const privateKeyPath = (0, node_path_1.join)(storagePath, 'cosign.key');
|
|
55
54
|
if (await (0, core_2.fileExists)(privateKeyPath)) {
|
|
56
|
-
core_1.
|
|
55
|
+
core_1.ux.error(`Key already exists: ${keyName}.`);
|
|
57
56
|
}
|
|
58
57
|
const turbine = await turbine_1.Turbine.get(newConfig.url, bypassCertificateCheck);
|
|
59
58
|
if (newConfig.username && newConfig.password) {
|
|
60
|
-
await
|
|
59
|
+
await turbine
|
|
60
|
+
?.login(newConfig.username, newConfig.password, newConfig['otp-code']);
|
|
61
61
|
}
|
|
62
|
-
core_1.
|
|
62
|
+
core_1.ux.action.start('Generating the signing key...');
|
|
63
63
|
if (await (0, core_2.directoryExists)(storagePath)) {
|
|
64
64
|
await (0, promises_1.rm)(storagePath, { recursive: true, force: true });
|
|
65
65
|
}
|
|
66
66
|
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
67
67
|
await (0, cosign_1.generateKeyPair)(signingPassword || newConfig.signingPassword, storagePath);
|
|
68
|
-
core_1.
|
|
68
|
+
core_1.ux.action.stop();
|
|
69
69
|
const publicKeyPath = (0, node_path_1.join)(storagePath, 'cosign.pub');
|
|
70
70
|
if (!await (0, core_2.fileExists)(publicKeyPath)) {
|
|
71
|
-
core_1.
|
|
71
|
+
core_1.ux.error(`Could not find file public key: ${keyName}`);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const publicKey = await (0, promises_2.readFile)(publicKeyPath);
|
|
75
75
|
const publicKeyContents = publicKey.toString();
|
|
76
76
|
if (!/BEGIN PUBLIC KEY/.test(publicKeyContents)) {
|
|
77
|
-
core_1.
|
|
77
|
+
core_1.ux.error(`Invalid public key: ${keyName}`);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
core_1.
|
|
81
|
-
const success = await
|
|
80
|
+
core_1.ux.action.start('Uploading the key...');
|
|
81
|
+
const success = await turbine?.uploadKey(keyName, publicKeyContents.toString());
|
|
82
82
|
if (success) {
|
|
83
83
|
const hostPath = (0, node_path_1.join)(storagePath, 'hosts.json');
|
|
84
84
|
await (0, fs_extra_1.ensureFile)(hostPath);
|
|
85
|
-
const hosts =
|
|
85
|
+
const hosts = await (0, fs_extra_1.readJson)(hostPath, { throws: false }) ?? {};
|
|
86
86
|
hosts[new URL(newConfig.url).host] = { lastPushed: new Date() };
|
|
87
87
|
await (0, fs_extra_1.writeJson)(hostPath, hosts);
|
|
88
88
|
}
|
|
89
|
-
core_1.
|
|
89
|
+
core_1.ux.action.stop(`${success ? 'finished' : 'failed'}`);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
exports.Generate = Generate;
|
|
93
93
|
Generate.description = 'Use to generate and store signing keys in Turbine';
|
|
94
|
-
Generate.flags =
|
|
95
|
-
|
|
94
|
+
Generate.flags = {
|
|
95
|
+
...core_2.Base.BaseFlags,
|
|
96
|
+
username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }),
|
|
97
|
+
password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }),
|
|
98
|
+
'signing-password': core_1.Flags.string({ description: 'password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)', default: '', env: 'TURBINE_SIGNING_PASSWORD' }),
|
|
99
|
+
'otp-code': core_1.Flags.string({ char: 'c', description: 'Turbine 2FA code', default: '' }),
|
|
100
|
+
'key-name': core_1.Flags.string({ description: 'name used for the key (default: username_yyyy-MM-dd)' }),
|
|
101
|
+
'bypass-certificate-check': core_1.Flags.boolean({ char: 'b', description: 'disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)', env: 'TURBINE_BYPASS_CERTIFICATE_CHECK' }),
|
|
102
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
103
|
+
};
|
|
104
|
+
Generate.args = {
|
|
105
|
+
url: core_1.Args.string({
|
|
96
106
|
name: 'url',
|
|
97
|
-
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
98
|
-
required:
|
|
99
|
-
}
|
|
107
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]. For cloud and multi-tenant environments, provide the url with the account and the tenant [https://us1.swimlane.app/account/{{your-account-id}}/tenant/{{your-tenant-id}}',
|
|
108
|
+
required: true,
|
|
109
|
+
}),
|
|
110
|
+
};
|
|
100
111
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/generate.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/generate.ts"],"names":[],"mappings":";;;AAAA,sCAA2C;AAC3C,wCAA+D;AAC/D,8CAAwC;AACxC,6CAAgD;AAChD,qCAAgC;AAChC,yCAA8B;AAC9B,+CAAmC;AACnC,uCAAmE;AACnE,+CAAyC;AACzC,uCAA+B;AAC/B,uCAA+B;AAE/B,qCAAqC;AACrC,MAAa,QAAS,SAAQ,WAAI;IAsBhC,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QAChD,MAAM,EACJ,kBAAkB,EAAE,eAAe,EACnC,QAAQ,EACR,QAAQ,EACR,0BAA0B,EAAE,sBAAsB,GACnD,GAAG,KAAK,CAAA;QACT,IAAI,EACF,GAAG,GACJ,GAAG,IAAI,CAAA;QAER,IAAI,CAAC,GAAG,EAAE;YACR,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;SACtC;QAED,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,SAAS,CAA0B,GAAG,CAAC,CAAA;QAExE,IAAI,aAAa,EAAE;YACjB,SAAE,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAA;SACrD;QAED,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,I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WAAW,EAAE,0CAA0C,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAC,CAAC;IAClI,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,mEAAmE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAC,CAAC;IAClK,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC;IACnF,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,sDAAsD,EAAC,CAAC;IAC/F,0BAA0B,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6FAA6F,EAAE,GAAG,EAAE,kCAAkC,EAAC,CAAC;IAC3M,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA;AAEM,aAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,sOAAsO;QACnP,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA"}
|
|
@@ -3,7 +3,7 @@ export declare class Local extends Base {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
-
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -17,7 +17,6 @@ class Local extends core_2.Base {
|
|
|
17
17
|
const allKeys = directories.filter(x => x.isDirectory() && (0, node_fs_1.readdirSync)((0, node_path_1.join)(storagePath, x.name)).some(y => y.endsWith('.key')));
|
|
18
18
|
for (const key of allKeys) {
|
|
19
19
|
console.log(`${key.name}\n`);
|
|
20
|
-
// eslint-disable-next-line no-await-in-loop
|
|
21
20
|
const hostsPath = (0, node_path_1.join)(storagePath, key.name, 'hosts.json');
|
|
22
21
|
// eslint-disable-next-line no-await-in-loop
|
|
23
22
|
if (await (0, core_2.fileExists)(hostsPath)) {
|
|
@@ -33,5 +32,8 @@ class Local extends core_2.Base {
|
|
|
33
32
|
}
|
|
34
33
|
exports.Local = Local;
|
|
35
34
|
Local.description = 'Use to list local keys';
|
|
36
|
-
Local.flags =
|
|
35
|
+
Local.flags = {
|
|
36
|
+
...core_2.Base.BaseFlags,
|
|
37
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
38
|
+
};
|
|
37
39
|
//# sourceMappingURL=local.js.map
|