@sw-tsdk/plugin-turbine 2.1.1-next.113 → 2.1.1-next.118
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 +118 -47
- package/lib/commands/turbine/config/list.d.ts +9 -0
- package/lib/commands/turbine/config/list.js +19 -0
- package/lib/commands/turbine/config/list.js.map +1 -0
- package/lib/commands/turbine/config/remove.d.ts +14 -0
- package/lib/commands/turbine/config/remove.js +29 -0
- package/lib/commands/turbine/config/remove.js.map +1 -0
- package/lib/commands/turbine/{login.d.ts → config/set.d.ts} +8 -2
- package/lib/commands/turbine/config/set.js +48 -0
- package/lib/commands/turbine/config/set.js.map +1 -0
- package/lib/commands/turbine/config/use.d.ts +14 -0
- package/lib/commands/turbine/config/use.js +23 -0
- package/lib/commands/turbine/config/use.js.map +1 -0
- package/lib/commands/turbine/connector/keys/generate.d.ts +5 -1
- package/lib/commands/turbine/connector/keys/generate.js +45 -8
- package/lib/commands/turbine/connector/keys/generate.js.map +1 -1
- package/lib/commands/turbine/connector/keys/list/local.js +2 -1
- package/lib/commands/turbine/connector/keys/list/local.js.map +1 -1
- package/lib/commands/turbine/connector/keys/list/remote.d.ts +5 -1
- package/lib/commands/turbine/connector/keys/list/remote.js +28 -8
- package/lib/commands/turbine/connector/keys/list/remote.js.map +1 -1
- package/lib/commands/turbine/connector/keys/push.d.ts +6 -2
- package/lib/commands/turbine/connector/keys/push.js +49 -18
- package/lib/commands/turbine/connector/keys/push.js.map +1 -1
- package/lib/commands/turbine/connector/push.d.ts +5 -2
- package/lib/commands/turbine/connector/push.js +41 -10
- package/lib/commands/turbine/connector/push.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/lib/commands/turbine/login.js +0 -33
- package/lib/commands/turbine/login.js.map +0 -1
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.1.1-next.
|
|
19
|
+
@sw-tsdk/plugin-turbine/2.1.1-next.118+828d623 linux-x64 node-v16.18.1
|
|
20
20
|
$ sw-tsdk-turbine --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ sw-tsdk-turbine COMMAND
|
|
@@ -25,21 +25,63 @@ USAGE
|
|
|
25
25
|
<!-- usagestop -->
|
|
26
26
|
# Commands
|
|
27
27
|
<!-- commands -->
|
|
28
|
-
* [`sw-tsdk-turbine turbine:
|
|
28
|
+
* [`sw-tsdk-turbine turbine:config:list`](#sw-tsdk-turbine-turbineconfiglist)
|
|
29
|
+
* [`sw-tsdk-turbine turbine:config:remove URL`](#sw-tsdk-turbine-turbineconfigremove-url)
|
|
30
|
+
* [`sw-tsdk-turbine turbine:config:set URL`](#sw-tsdk-turbine-turbineconfigset-url)
|
|
31
|
+
* [`sw-tsdk-turbine turbine:config:use URL`](#sw-tsdk-turbine-turbineconfiguse-url)
|
|
32
|
+
* [`sw-tsdk-turbine turbine:connector:keys:generate [URL]`](#sw-tsdk-turbine-turbineconnectorkeysgenerate-url)
|
|
29
33
|
* [`sw-tsdk-turbine turbine:connector:keys:list:local`](#sw-tsdk-turbine-turbineconnectorkeyslistlocal)
|
|
30
|
-
* [`sw-tsdk-turbine turbine:connector:keys:list:remote`](#sw-tsdk-turbine-turbineconnectorkeyslistremote)
|
|
31
|
-
* [`sw-tsdk-turbine turbine:connector:keys:push`](#sw-tsdk-turbine-turbineconnectorkeyspush)
|
|
32
|
-
* [`sw-tsdk-turbine turbine:connector:push`](#sw-tsdk-turbine-turbineconnectorpush)
|
|
33
|
-
* [`sw-tsdk-turbine turbine:login`](#sw-tsdk-turbine-turbinelogin)
|
|
34
|
+
* [`sw-tsdk-turbine turbine:connector:keys:list:remote [URL]`](#sw-tsdk-turbine-turbineconnectorkeyslistremote-url)
|
|
35
|
+
* [`sw-tsdk-turbine turbine:connector:keys:push URL`](#sw-tsdk-turbine-turbineconnectorkeyspush-url)
|
|
36
|
+
* [`sw-tsdk-turbine turbine:connector:push [URL] FILE`](#sw-tsdk-turbine-turbineconnectorpush-url-file)
|
|
34
37
|
|
|
35
|
-
## `sw-tsdk-turbine turbine:
|
|
38
|
+
## `sw-tsdk-turbine turbine:config:list`
|
|
36
39
|
|
|
37
|
-
Use to
|
|
40
|
+
Use to login to Turbine
|
|
38
41
|
|
|
39
42
|
```
|
|
40
43
|
USAGE
|
|
41
|
-
$ sw-tsdk-turbine turbine:
|
|
42
|
-
|
|
44
|
+
$ sw-tsdk-turbine turbine:config:list [-h]
|
|
45
|
+
|
|
46
|
+
FLAGS
|
|
47
|
+
-h, --help Show CLI help.
|
|
48
|
+
|
|
49
|
+
DESCRIPTION
|
|
50
|
+
Use to login to Turbine
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
_See code: [lib/commands/turbine/config/list.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/config/list.js)_
|
|
54
|
+
|
|
55
|
+
## `sw-tsdk-turbine turbine:config:remove URL`
|
|
56
|
+
|
|
57
|
+
Use to login to Turbine
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
USAGE
|
|
61
|
+
$ sw-tsdk-turbine turbine:config:remove [URL] [-h]
|
|
62
|
+
|
|
63
|
+
ARGUMENTS
|
|
64
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
65
|
+
|
|
66
|
+
FLAGS
|
|
67
|
+
-h, --help Show CLI help.
|
|
68
|
+
|
|
69
|
+
DESCRIPTION
|
|
70
|
+
Use to login to Turbine
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
_See code: [lib/commands/turbine/config/remove.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/config/remove.js)_
|
|
74
|
+
|
|
75
|
+
## `sw-tsdk-turbine turbine:config:set URL`
|
|
76
|
+
|
|
77
|
+
Use to login to Turbine
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
USAGE
|
|
81
|
+
$ sw-tsdk-turbine turbine:config:set [URL] [-u <value>] [-p <value>] [-b] [--default] [--skip-check] [-h]
|
|
82
|
+
|
|
83
|
+
ARGUMENTS
|
|
84
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
43
85
|
|
|
44
86
|
FLAGS
|
|
45
87
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
@@ -47,40 +89,46 @@ FLAGS
|
|
|
47
89
|
-h, --help Show CLI help.
|
|
48
90
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
49
91
|
-u, --username=<value> Turbine username
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--turbine-url=<value> (required) the url of the turbine instance [https://turbine.acme.com]
|
|
92
|
+
--default sets the turbine instance as the default
|
|
93
|
+
--skip-check skips checking the credentials
|
|
53
94
|
|
|
54
95
|
DESCRIPTION
|
|
55
|
-
Use to
|
|
96
|
+
Use to login to Turbine
|
|
56
97
|
```
|
|
57
98
|
|
|
58
|
-
_See code: [lib/commands/turbine/
|
|
99
|
+
_See code: [lib/commands/turbine/config/set.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/config/set.js)_
|
|
59
100
|
|
|
60
|
-
## `sw-tsdk-turbine turbine:
|
|
101
|
+
## `sw-tsdk-turbine turbine:config:use URL`
|
|
61
102
|
|
|
62
|
-
Use to
|
|
103
|
+
Use to login to Turbine
|
|
63
104
|
|
|
64
105
|
```
|
|
65
106
|
USAGE
|
|
66
|
-
$ sw-tsdk-turbine turbine:
|
|
107
|
+
$ sw-tsdk-turbine turbine:config:use [URL] [-h]
|
|
108
|
+
|
|
109
|
+
ARGUMENTS
|
|
110
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
67
111
|
|
|
68
112
|
FLAGS
|
|
69
113
|
-h, --help Show CLI help.
|
|
70
114
|
|
|
71
115
|
DESCRIPTION
|
|
72
|
-
Use to
|
|
116
|
+
Use to login to Turbine
|
|
73
117
|
```
|
|
74
118
|
|
|
75
|
-
_See code: [lib/commands/turbine/
|
|
119
|
+
_See code: [lib/commands/turbine/config/use.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/config/use.js)_
|
|
76
120
|
|
|
77
|
-
## `sw-tsdk-turbine turbine:connector:keys:
|
|
121
|
+
## `sw-tsdk-turbine turbine:connector:keys:generate [URL]`
|
|
78
122
|
|
|
79
|
-
Use to
|
|
123
|
+
Use to generate and store signing keys in Turbine
|
|
80
124
|
|
|
81
125
|
```
|
|
82
126
|
USAGE
|
|
83
|
-
$ sw-tsdk-turbine turbine:connector:keys:
|
|
127
|
+
$ sw-tsdk-turbine turbine:connector:keys:generate [URL] [-u <value>] [-p <value>] [--signing-password <value>] [--key-name <value>]
|
|
128
|
+
[-b] [-h]
|
|
129
|
+
|
|
130
|
+
ARGUMENTS
|
|
131
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
84
132
|
|
|
85
133
|
FLAGS
|
|
86
134
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
@@ -88,22 +136,42 @@ FLAGS
|
|
|
88
136
|
-h, --help Show CLI help.
|
|
89
137
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
90
138
|
-u, --username=<value> Turbine username
|
|
91
|
-
--
|
|
139
|
+
--key-name=<value> name used for the key (default: username)
|
|
140
|
+
--signing-password=<value> password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)
|
|
92
141
|
|
|
93
142
|
DESCRIPTION
|
|
94
|
-
Use to
|
|
143
|
+
Use to generate and store signing keys in Turbine
|
|
95
144
|
```
|
|
96
145
|
|
|
97
|
-
_See code: [lib/commands/turbine/connector/keys/
|
|
146
|
+
_See code: [lib/commands/turbine/connector/keys/generate.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/connector/keys/generate.js)_
|
|
98
147
|
|
|
99
|
-
## `sw-tsdk-turbine turbine:connector:keys:
|
|
148
|
+
## `sw-tsdk-turbine turbine:connector:keys:list:local`
|
|
100
149
|
|
|
101
|
-
Use to
|
|
150
|
+
Use to list local keys
|
|
102
151
|
|
|
103
152
|
```
|
|
104
153
|
USAGE
|
|
105
|
-
$ sw-tsdk-turbine turbine:connector:keys:
|
|
106
|
-
|
|
154
|
+
$ sw-tsdk-turbine turbine:connector:keys:list:local [-h]
|
|
155
|
+
|
|
156
|
+
FLAGS
|
|
157
|
+
-h, --help Show CLI help.
|
|
158
|
+
|
|
159
|
+
DESCRIPTION
|
|
160
|
+
Use to list local keys
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
_See code: [lib/commands/turbine/connector/keys/list/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/connector/keys/list/local.js)_
|
|
164
|
+
|
|
165
|
+
## `sw-tsdk-turbine turbine:connector:keys:list:remote [URL]`
|
|
166
|
+
|
|
167
|
+
Use to list remote keys
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
USAGE
|
|
171
|
+
$ sw-tsdk-turbine turbine:connector:keys:list:remote [URL] [-u <value>] [-p <value>] [-b] [-h]
|
|
172
|
+
|
|
173
|
+
ARGUMENTS
|
|
174
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
107
175
|
|
|
108
176
|
FLAGS
|
|
109
177
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
@@ -111,45 +179,49 @@ FLAGS
|
|
|
111
179
|
-h, --help Show CLI help.
|
|
112
180
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
113
181
|
-u, --username=<value> Turbine username
|
|
114
|
-
--key-name=<value> name used for the key (default: username)
|
|
115
|
-
--turbine-url=<value> (required) the url of the turbine instance [https://turbine.acme.com]
|
|
116
182
|
|
|
117
183
|
DESCRIPTION
|
|
118
|
-
Use to
|
|
184
|
+
Use to list remote keys
|
|
119
185
|
```
|
|
120
186
|
|
|
121
|
-
_See code: [lib/commands/turbine/connector/keys/
|
|
187
|
+
_See code: [lib/commands/turbine/connector/keys/list/remote.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/connector/keys/list/remote.js)_
|
|
122
188
|
|
|
123
|
-
## `sw-tsdk-turbine turbine:connector:push`
|
|
189
|
+
## `sw-tsdk-turbine turbine:connector:keys:push URL`
|
|
124
190
|
|
|
125
|
-
Use to
|
|
191
|
+
Use to generate and store signing keys in Turbine
|
|
126
192
|
|
|
127
193
|
```
|
|
128
194
|
USAGE
|
|
129
|
-
$ sw-tsdk-turbine turbine:connector:push
|
|
195
|
+
$ sw-tsdk-turbine turbine:connector:keys:push [URL] [-u <value>] [-p <value>] [--keyName <value>] [-b] [-h]
|
|
196
|
+
|
|
197
|
+
ARGUMENTS
|
|
198
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
130
199
|
|
|
131
200
|
FLAGS
|
|
132
201
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
133
202
|
TURBINE_BYPASS_CERTIFICATE_CHECK)
|
|
134
|
-
-f, --file=<value> (required) path of the file to be uploaded to Turbine
|
|
135
203
|
-h, --help Show CLI help.
|
|
136
204
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
137
205
|
-u, --username=<value> Turbine username
|
|
138
|
-
--
|
|
206
|
+
--keyName=<value> name used for the key (default: username_YYYY)
|
|
139
207
|
|
|
140
208
|
DESCRIPTION
|
|
141
|
-
Use to
|
|
209
|
+
Use to generate and store signing keys in Turbine
|
|
142
210
|
```
|
|
143
211
|
|
|
144
|
-
_See code: [lib/commands/turbine/connector/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.
|
|
212
|
+
_See code: [lib/commands/turbine/connector/keys/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/connector/keys/push.js)_
|
|
145
213
|
|
|
146
|
-
## `sw-tsdk-turbine turbine:
|
|
214
|
+
## `sw-tsdk-turbine turbine:connector:push [URL] FILE`
|
|
147
215
|
|
|
148
|
-
Use to
|
|
216
|
+
Use to push an integration to Turbine
|
|
149
217
|
|
|
150
218
|
```
|
|
151
219
|
USAGE
|
|
152
|
-
$ sw-tsdk-turbine turbine:
|
|
220
|
+
$ sw-tsdk-turbine turbine:connector:push [URL] [FILE] [-u <value>] [-p <value>] [-b] [-h]
|
|
221
|
+
|
|
222
|
+
ARGUMENTS
|
|
223
|
+
URL the url of the turbine instance [https://turbine.acme.com]
|
|
224
|
+
FILE path of the file to be uploaded to Turbine
|
|
153
225
|
|
|
154
226
|
FLAGS
|
|
155
227
|
-b, --bypass-certificate-check disable certificate validation for Turbine instance (ENV:
|
|
@@ -157,11 +229,10 @@ FLAGS
|
|
|
157
229
|
-h, --help Show CLI help.
|
|
158
230
|
-p, --password=<value> Turbine password (ENV: TURBINE_PASSWORD)
|
|
159
231
|
-u, --username=<value> Turbine username
|
|
160
|
-
--turbine-url=<value> (required) the url of the turbine instance [https://turbine.acme.com]
|
|
161
232
|
|
|
162
233
|
DESCRIPTION
|
|
163
|
-
Use to
|
|
234
|
+
Use to push an integration to Turbine
|
|
164
235
|
```
|
|
165
236
|
|
|
166
|
-
_See code: [lib/commands/turbine/
|
|
237
|
+
_See code: [lib/commands/turbine/connector/push.js](https://github.com/swimlane/turbine-sdk/blob/v2.1.1-next.118+828d623/lib/commands/turbine/connector/push.js)_
|
|
167
238
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export declare class List extends Base {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.List = void 0;
|
|
4
|
+
const core_1 = require("@sw-tsdk/core");
|
|
5
|
+
const core_2 = require("@oclif/core");
|
|
6
|
+
// noinspection JSUnusedGlobalSymbols
|
|
7
|
+
class List extends core_1.Base {
|
|
8
|
+
async run() {
|
|
9
|
+
await this.parse(List);
|
|
10
|
+
const entry = this.config.configDir;
|
|
11
|
+
const configService = new core_1.ConfigService(entry);
|
|
12
|
+
const config = (await configService.loadConfig()) || {};
|
|
13
|
+
console.log(config);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.List = List;
|
|
17
|
+
List.description = 'Use to login to Turbine';
|
|
18
|
+
List.flags = Object.assign(Object.assign({}, core_1.Base.BaseFlags), { help: core_2.Flags.help({ char: 'h' }) });
|
|
19
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +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,mCACP,WAAI,CAAC,SAAS,KACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export declare class List extends Base {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
};
|
|
8
|
+
static args: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.List = void 0;
|
|
4
|
+
const core_1 = require("@sw-tsdk/core");
|
|
5
|
+
const core_2 = require("@oclif/core");
|
|
6
|
+
// noinspection JSUnusedGlobalSymbols
|
|
7
|
+
class List extends core_1.Base {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args } = await this.parse(List);
|
|
10
|
+
const { url, } = args;
|
|
11
|
+
const entry = this.config.configDir;
|
|
12
|
+
const configService = new core_1.ConfigService(entry);
|
|
13
|
+
const config = (await configService.loadConfig()) || {};
|
|
14
|
+
if (config.default === url) {
|
|
15
|
+
delete config.default;
|
|
16
|
+
}
|
|
17
|
+
delete config[url];
|
|
18
|
+
configService.saveConfig(config);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.List = List;
|
|
22
|
+
List.description = 'Use to login to Turbine';
|
|
23
|
+
List.flags = Object.assign(Object.assign({}, core_1.Base.BaseFlags), { help: core_2.Flags.help({ char: 'h' }) });
|
|
24
|
+
List.args = [{
|
|
25
|
+
name: 'url',
|
|
26
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
27
|
+
required: true,
|
|
28
|
+
}];
|
|
29
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/remove.ts"],"names":[],"mappings":";;;AAAA,wCAAiD;AACjD,sCAAiC;AAEjC,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAc5B,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;;AAhCH,oBAiCC;AAhCQ,gBAAW,GAAG,yBAAyB,CAAA;AAEvC,UAAK,mCACP,WAAI,CAAC,SAAS,KACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B;AAEM,SAAI,GAAG,CAAC;QACb,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,IAAI;KACf,CAAC,CAAA"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Base } from '@sw-tsdk/core';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Set extends Base {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
username: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
password: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
'turbine-url': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
7
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
default: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'skip-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
10
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
10
11
|
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
12
|
};
|
|
13
|
+
static args: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
required: boolean;
|
|
17
|
+
}[];
|
|
12
18
|
run(): Promise<void>;
|
|
13
19
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Set = void 0;
|
|
4
|
+
const inquirer_1 = require("inquirer");
|
|
5
|
+
const turbine_1 = require("@sw-tsdk/turbine");
|
|
6
|
+
const core_1 = require("@sw-tsdk/core");
|
|
7
|
+
const core_2 = require("@oclif/core");
|
|
8
|
+
// noinspection JSUnusedGlobalSymbols
|
|
9
|
+
class Set extends core_1.Base {
|
|
10
|
+
async run() {
|
|
11
|
+
const { flags, args } = await this.parse(Set);
|
|
12
|
+
const { username, password, 'bypass-certificate-check': bypassCertificateCheck, default: setDefault, } = flags;
|
|
13
|
+
const { url, } = args;
|
|
14
|
+
const answers = await (0, inquirer_1.prompt)([{
|
|
15
|
+
type: 'input',
|
|
16
|
+
name: 'username',
|
|
17
|
+
message: 'Enter a username',
|
|
18
|
+
when: () => !username || username.length === 0,
|
|
19
|
+
}, {
|
|
20
|
+
type: 'password',
|
|
21
|
+
name: 'password',
|
|
22
|
+
message: 'Enter a password',
|
|
23
|
+
when: () => !password || password.length === 0,
|
|
24
|
+
}]);
|
|
25
|
+
const newConfig = Object.assign(flags, answers);
|
|
26
|
+
const turbine = await turbine_1.Turbine.get(url, bypassCertificateCheck);
|
|
27
|
+
if (!flags['skip-check']) {
|
|
28
|
+
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(newConfig.username, newConfig.password));
|
|
29
|
+
}
|
|
30
|
+
if (setDefault) {
|
|
31
|
+
await this.saveConfig('default', url);
|
|
32
|
+
}
|
|
33
|
+
await this.saveConfig(url, {
|
|
34
|
+
bypassCertificateCheck: bypassCertificateCheck,
|
|
35
|
+
username: newConfig.username,
|
|
36
|
+
});
|
|
37
|
+
core_2.CliUx.ux.log('Login successful');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Set = Set;
|
|
41
|
+
Set.description = 'Use to login to Turbine';
|
|
42
|
+
Set.flags = Object.assign(Object.assign({}, core_1.Base.BaseFlags), { username: core_2.Flags.string({ char: 'u', description: 'Turbine username' }), password: core_2.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', env: 'TURBINE_PASSWORD' }), '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' }), default: core_2.Flags.boolean({ description: 'sets the turbine instance as the default' }), 'skip-check': core_2.Flags.boolean({ description: 'skips checking the credentials' }), help: core_2.Flags.help({ char: 'h' }) });
|
|
43
|
+
Set.args = [{
|
|
44
|
+
name: 'url',
|
|
45
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
46
|
+
required: true,
|
|
47
|
+
}];
|
|
48
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
+
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
};
|
|
8
|
+
static args: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Use = void 0;
|
|
4
|
+
const core_1 = require("@sw-tsdk/core");
|
|
5
|
+
const core_2 = require("@oclif/core");
|
|
6
|
+
// noinspection JSUnusedGlobalSymbols
|
|
7
|
+
class Use extends core_1.Base {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args } = await this.parse(Use);
|
|
10
|
+
const { url, } = args;
|
|
11
|
+
await this.saveConfig('default', url);
|
|
12
|
+
core_2.CliUx.ux.log('Login successful');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Use = Use;
|
|
16
|
+
Use.description = 'Use to login to Turbine';
|
|
17
|
+
Use.flags = Object.assign(Object.assign({}, core_1.Base.BaseFlags), { help: core_2.Flags.help({ char: 'h' }) });
|
|
18
|
+
Use.args = [{
|
|
19
|
+
name: 'url',
|
|
20
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
21
|
+
required: true,
|
|
22
|
+
}];
|
|
23
|
+
//# sourceMappingURL=use.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/commands/turbine/config/use.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAClC,sCAAwC;AAExC,qCAAqC;AACrC,MAAa,GAAI,SAAQ,WAAI;IAc3B,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,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IAClC,CAAC;;AAvBH,kBAwBC;AAvBQ,eAAW,GAAG,yBAAyB,CAAA;AAEvC,SAAK,mCACP,WAAI,CAAC,SAAS,KACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B;AAEM,QAAI,GAAG,CAAC;QACb,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,IAAI;KACf,CAAC,CAAA"}
|
|
@@ -6,10 +6,14 @@ export declare class Generate extends Base {
|
|
|
6
6
|
password: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
7
|
'signing-password': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
8
|
'key-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
-
'turbine-url': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
10
9
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
12
11
|
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
13
12
|
};
|
|
13
|
+
static args: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
required: boolean;
|
|
17
|
+
}[];
|
|
14
18
|
run(): Promise<void>;
|
|
15
19
|
}
|
|
@@ -11,29 +11,60 @@ const promises_1 = require("node:fs/promises");
|
|
|
11
11
|
const fs_extra_1 = require("fs-extra");
|
|
12
12
|
const promises_2 = require("node:fs/promises");
|
|
13
13
|
const date_fns_1 = require("date-fns");
|
|
14
|
+
const inquirer_1 = require("inquirer");
|
|
14
15
|
// noinspection JSUnusedGlobalSymbols
|
|
15
16
|
class Generate extends core_2.Base {
|
|
16
17
|
async run() {
|
|
17
18
|
var _a;
|
|
18
|
-
const { flags } = await this.parse(Generate);
|
|
19
|
+
const { flags, args } = await this.parse(Generate);
|
|
19
20
|
const { 'signing-password': signingPassword, username, password, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
21
|
+
let { url, } = args;
|
|
22
|
+
if (!url) {
|
|
23
|
+
url = await this.getConfig('default');
|
|
24
|
+
}
|
|
25
|
+
const turbineConfig = await this.getConfig(url);
|
|
26
|
+
if (turbineConfig) {
|
|
27
|
+
core_1.CliUx.ux.log(`Config: ${url} | ${turbineConfig.username}`);
|
|
28
|
+
}
|
|
20
29
|
const keyName = flags['key-name'] || `${(0, node_os_1.userInfo)().username}_${(0, date_fns_1.format)(new Date(), 'yyyy-MM-dd')}`;
|
|
30
|
+
const answers = await (0, inquirer_1.prompt)([{
|
|
31
|
+
type: 'input',
|
|
32
|
+
name: 'url',
|
|
33
|
+
message: 'Enter the url of the turbine instance [https://turbine.acme.com]',
|
|
34
|
+
when: () => !url || url.length === 0,
|
|
35
|
+
}, {
|
|
36
|
+
type: 'input',
|
|
37
|
+
name: 'username',
|
|
38
|
+
message: 'Enter a username',
|
|
39
|
+
when: () => !turbineConfig && (!username || username.length === 0),
|
|
40
|
+
}, {
|
|
41
|
+
type: 'password',
|
|
42
|
+
name: 'password',
|
|
43
|
+
message: 'Enter a password',
|
|
44
|
+
when: () => !turbineConfig && (!password || password.length === 0),
|
|
45
|
+
}, {
|
|
46
|
+
type: 'password',
|
|
47
|
+
name: 'signingPassword',
|
|
48
|
+
message: 'Enter a signing password',
|
|
49
|
+
when: () => (!signingPassword || signingPassword.length === 0),
|
|
50
|
+
}]);
|
|
51
|
+
const newConfig = Object.assign(flags, { url }, answers);
|
|
21
52
|
const storagePath = (0, node_path_1.join)(this.config.configDir, 'keys', keyName);
|
|
53
|
+
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
22
54
|
const privateKeyPath = (0, node_path_1.join)(storagePath, 'cosign.key');
|
|
23
55
|
if (await (0, core_2.fileExists)(privateKeyPath)) {
|
|
24
56
|
core_1.CliUx.ux.error(`Key already exists: ${keyName}.`);
|
|
25
57
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
await turbine.login(username, password);
|
|
58
|
+
const turbine = await turbine_1.Turbine.get(newConfig.url, bypassCertificateCheck);
|
|
59
|
+
if (newConfig.username && newConfig.password) {
|
|
60
|
+
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(newConfig.username, newConfig.password));
|
|
30
61
|
}
|
|
31
62
|
core_1.CliUx.ux.action.start('Generating the signing key...');
|
|
32
63
|
if (await (0, core_2.directoryExists)(storagePath)) {
|
|
33
64
|
await (0, promises_1.rm)(storagePath, { recursive: true, force: true });
|
|
34
65
|
}
|
|
35
66
|
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
36
|
-
await (0, cosign_1.generateKeyPair)(signingPassword, storagePath);
|
|
67
|
+
await (0, cosign_1.generateKeyPair)(signingPassword || newConfig.signingPassword, storagePath);
|
|
37
68
|
core_1.CliUx.ux.action.stop();
|
|
38
69
|
const publicKeyPath = (0, node_path_1.join)(storagePath, 'cosign.pub');
|
|
39
70
|
if (!await (0, core_2.fileExists)(publicKeyPath)) {
|
|
@@ -50,8 +81,9 @@ class Generate extends core_2.Base {
|
|
|
50
81
|
const success = await (turbine === null || turbine === void 0 ? void 0 : turbine.uploadKey(keyName, publicKeyContents.toString()));
|
|
51
82
|
if (success) {
|
|
52
83
|
const hostPath = (0, node_path_1.join)(storagePath, 'hosts.json');
|
|
84
|
+
await (0, fs_extra_1.ensureFile)(hostPath);
|
|
53
85
|
const hosts = (_a = await (0, fs_extra_1.readJson)(hostPath, { throws: false })) !== null && _a !== void 0 ? _a : {};
|
|
54
|
-
hosts[new URL(
|
|
86
|
+
hosts[new URL(newConfig.url).host] = { lastPushed: new Date() };
|
|
55
87
|
await (0, fs_extra_1.writeJson)(hostPath, hosts);
|
|
56
88
|
}
|
|
57
89
|
core_1.CliUx.ux.action.stop(`${success ? 'finished' : 'failed'}`);
|
|
@@ -59,5 +91,10 @@ class Generate extends core_2.Base {
|
|
|
59
91
|
}
|
|
60
92
|
exports.Generate = Generate;
|
|
61
93
|
Generate.description = 'Use to generate and store signing keys in Turbine';
|
|
62
|
-
Generate.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }), 'signing-password': core_1.Flags.string({ description: 'password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)', default: '', env: 'TURBINE_SIGNING_PASSWORD' }), 'key-name': core_1.Flags.string({ description: 'name used for the key (default: username)' }), '
|
|
94
|
+
Generate.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }), 'signing-password': core_1.Flags.string({ description: 'password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)', default: '', env: 'TURBINE_SIGNING_PASSWORD' }), 'key-name': core_1.Flags.string({ description: 'name used for the key (default: username)' }), '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' }), help: core_1.Flags.help({ char: 'h' }) });
|
|
95
|
+
Generate.args = [{
|
|
96
|
+
name: 'url',
|
|
97
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
98
|
+
required: false,
|
|
99
|
+
}];
|
|
63
100
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/generate.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,wCAA+D;AAC/D,8CAAwC;AACxC,6CAAgD;AAChD,qCAAgC;AAChC,yCAA8B;AAC9B,+CAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/generate.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,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;IAmBhC,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;QAET,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,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAA;SAC3D;QAED,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,IAAA,kBAAQ,GAAE,CAAC,QAAQ,IAAI,IAAA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AC,EACjF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0CAA0C,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAC,CAAC,EAClI,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,mEAAmE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAC,CAAC,EAClK,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,2CAA2C,EAAC,CAAC,EACpF,0BAA0B,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6FAA6F,EAAE,GAAG,EAAE,kCAAkC,EAAC,CAAC,EAC3M,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B;AAEM,aAAI,GAAG,CAAC;QACb,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAA"}
|
|
@@ -12,6 +12,7 @@ class Local extends core_2.Base {
|
|
|
12
12
|
async run() {
|
|
13
13
|
await this.parse(Local);
|
|
14
14
|
const storagePath = (0, node_path_1.join)(this.config.configDir, 'keys');
|
|
15
|
+
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
15
16
|
const directories = await (0, promises_1.readdir)(storagePath, { withFileTypes: true });
|
|
16
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')));
|
|
17
18
|
for (const key of allKeys) {
|
|
@@ -24,7 +25,7 @@ class Local extends core_2.Base {
|
|
|
24
25
|
const hosts = await (0, fs_extra_1.readJson)(hostsPath);
|
|
25
26
|
const allHosts = Object.entries(hosts);
|
|
26
27
|
for (const [key, value] of allHosts) {
|
|
27
|
-
console.log(`\t${key} - ${value}\n`);
|
|
28
|
+
console.log(`\t${key} - ${value.lastPushed}\n`);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../../../src/commands/turbine/connector/keys/list/local.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,wCAA8C;AAC9C,yCAA8B;AAC9B,+CAAwC;AACxC,qCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../../../src/commands/turbine/connector/keys/list/local.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,wCAA8C;AAC9C,yCAA8B;AAC9B,+CAAwC;AACxC,qCAAmC;AACnC,uCAA4C;AAE5C,qCAAqC;AACrC,MAAa,KAAM,SAAQ,WAAI;IAQ7B,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAEvB,MAAM,WAAW,GAAG,IAAA,gBAAI,EAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;QACvD,MAAM,IAAA,oBAAS,EAAC,WAAW,CAAC,CAAA;QAC5B,MAAM,WAAW,GAAG,MAAM,IAAA,kBAAO,EAAC,WAAW,EAAE,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAA;QAErE,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,IAAA,qBAAW,EAAC,IAAA,gBAAI,EAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAEhI,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;YACzB,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,CAAA;YAC5B,4CAA4C;YAC5C,MAAM,SAAS,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;YAC3D,4CAA4C;YAC5C,IAAI,MAAM,IAAA,iBAAU,EAAC,SAAS,CAAC,EAAE;gBAC/B,4CAA4C;gBAC5C,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAQ,EAAC,SAAS,CAAC,CAAA;gBACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;gBACtC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,QAAQ,EAAE;oBACnC,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,MAAO,KAAa,CAAC,UAAU,IAAI,CAAC,CAAA;iBACzD;aACF;SACF;IACH,CAAC;;AA/BH,sBAgCC;AA/BQ,iBAAW,GAAG,wBAAwB,CAAA;AAEtC,WAAK,mCACP,WAAI,CAAC,SAAS,KACjB,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B"}
|
|
@@ -4,10 +4,14 @@ export declare class Remote extends Base {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
username: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
password: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
'turbine-url': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
7
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
10
9
|
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
10
|
};
|
|
11
|
+
static args: {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
}[];
|
|
12
16
|
run(): Promise<void>;
|
|
13
17
|
}
|
|
@@ -9,27 +9,47 @@ const turbine_1 = require("@sw-tsdk/turbine");
|
|
|
9
9
|
class Remote extends core_2.Base {
|
|
10
10
|
async run() {
|
|
11
11
|
var _a;
|
|
12
|
-
const { flags } = await this.parse(Remote);
|
|
13
|
-
const { username, password, '
|
|
12
|
+
const { flags, args } = await this.parse(Remote);
|
|
13
|
+
const { username, password, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
14
|
+
let { url, } = args;
|
|
15
|
+
if (!url) {
|
|
16
|
+
url = await this.getConfig('default');
|
|
17
|
+
}
|
|
18
|
+
const turbineConfig = await this.getConfig(url);
|
|
19
|
+
if (turbineConfig) {
|
|
20
|
+
core_1.CliUx.ux.log(`Config: ${url} | ${turbineConfig.username}`);
|
|
21
|
+
}
|
|
14
22
|
const answers = await (0, inquirer_1.prompt)([{
|
|
23
|
+
type: 'input',
|
|
24
|
+
name: 'url',
|
|
25
|
+
message: 'Enter the url of the turbine instance [https://turbine.acme.com]',
|
|
26
|
+
when: () => !url || url.length === 0,
|
|
27
|
+
}, {
|
|
15
28
|
type: 'input',
|
|
16
29
|
name: 'username',
|
|
17
30
|
message: 'Enter a username',
|
|
18
|
-
when: () => !username || username.length === 0,
|
|
31
|
+
when: () => !turbineConfig && (!username || username.length === 0),
|
|
19
32
|
}, {
|
|
20
33
|
type: 'password',
|
|
21
34
|
name: 'password',
|
|
22
35
|
message: 'Enter a password',
|
|
23
|
-
when: () => !password || password.length === 0,
|
|
36
|
+
when: () => !turbineConfig && (!password || password.length === 0),
|
|
24
37
|
}]);
|
|
25
|
-
const newConfig = Object.assign(flags, answers);
|
|
26
|
-
const turbine = await turbine_1.Turbine.get(
|
|
27
|
-
|
|
38
|
+
const newConfig = Object.assign(flags, { url }, answers);
|
|
39
|
+
const turbine = await turbine_1.Turbine.get(newConfig.url, bypassCertificateCheck);
|
|
40
|
+
if (newConfig.username && newConfig.password) {
|
|
41
|
+
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(newConfig.username, newConfig.password));
|
|
42
|
+
}
|
|
28
43
|
const keys = (_a = await (turbine === null || turbine === void 0 ? void 0 : turbine.getPublicKeys())) !== null && _a !== void 0 ? _a : [];
|
|
29
44
|
console.log(keys.join('\n'));
|
|
30
45
|
}
|
|
31
46
|
}
|
|
32
47
|
exports.Remote = Remote;
|
|
33
48
|
Remote.description = 'Use to list remote keys';
|
|
34
|
-
Remote.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', env: 'TURBINE_PASSWORD' }), '
|
|
49
|
+
Remote.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', env: 'TURBINE_PASSWORD' }), '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' }), help: core_1.Flags.help({ char: 'h' }) });
|
|
50
|
+
Remote.args = [{
|
|
51
|
+
name: 'url',
|
|
52
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
53
|
+
required: false,
|
|
54
|
+
}];
|
|
35
55
|
//# sourceMappingURL=remote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../src/commands/turbine/connector/keys/list/remote.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../src/commands/turbine/connector/keys/list/remote.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,wCAAkC;AAClC,uCAA+B;AAC/B,8CAAwC;AAExC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ACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAA"}
|
|
@@ -4,11 +4,15 @@ export declare class Generate extends Base {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
username: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
6
|
password: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
|
|
8
|
-
'turbine-url': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
keyName: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
9
8
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
9
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
10
|
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
11
|
};
|
|
12
|
+
static args: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
}[];
|
|
13
17
|
run(): Promise<void>;
|
|
14
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Generate = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
6
5
|
const core_2 = require("@sw-tsdk/core");
|
|
7
6
|
const turbine_1 = require("@sw-tsdk/turbine");
|
|
@@ -9,36 +8,63 @@ const node_path_1 = require("node:path");
|
|
|
9
8
|
const promises_1 = require("node:fs/promises");
|
|
10
9
|
const fs_extra_1 = require("fs-extra");
|
|
11
10
|
const promises_2 = require("node:fs/promises");
|
|
12
|
-
const inquirer_1 =
|
|
11
|
+
const inquirer_1 = require("inquirer");
|
|
13
12
|
const node_fs_1 = require("node:fs");
|
|
14
13
|
// noinspection JSUnusedGlobalSymbols
|
|
15
14
|
class Generate extends core_2.Base {
|
|
16
15
|
async run() {
|
|
17
16
|
var _a;
|
|
18
|
-
const { flags } = await this.parse(Generate);
|
|
17
|
+
const { flags, args } = await this.parse(Generate);
|
|
19
18
|
const { username, password, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
19
|
+
let { url, } = args;
|
|
20
20
|
let { 'key-name': keyName, } = flags;
|
|
21
|
+
if (!url) {
|
|
22
|
+
url = await this.getConfig('default');
|
|
23
|
+
}
|
|
24
|
+
const turbineConfig = await this.getConfig(url);
|
|
25
|
+
if (turbineConfig) {
|
|
26
|
+
core_1.CliUx.ux.log(`Config: ${url} | ${turbineConfig.username}`);
|
|
27
|
+
}
|
|
28
|
+
const allKeys = [];
|
|
21
29
|
if (!keyName) {
|
|
22
30
|
const storagePath = (0, node_path_1.join)(this.config.configDir, 'keys');
|
|
31
|
+
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
23
32
|
const directories = await (0, promises_1.readdir)(storagePath, { withFileTypes: true });
|
|
24
|
-
|
|
25
|
-
const answers = await inquirer_1.default.prompt([{
|
|
26
|
-
type: 'list',
|
|
27
|
-
name: 'keyName',
|
|
28
|
-
message: 'Choose a key.',
|
|
29
|
-
choices: allKeys,
|
|
30
|
-
}]);
|
|
31
|
-
keyName = answers.keyName;
|
|
33
|
+
allKeys.push(...directories.filter(x => x.isDirectory() && (0, node_fs_1.readdirSync)((0, node_path_1.join)(storagePath, x.name)).some(y => y.endsWith('.key'))));
|
|
32
34
|
}
|
|
35
|
+
const answers = await (0, inquirer_1.prompt)([{
|
|
36
|
+
type: 'input',
|
|
37
|
+
name: 'url',
|
|
38
|
+
message: 'Enter the url of the turbine instance [https://turbine.acme.com]',
|
|
39
|
+
when: () => !url || url.length === 0,
|
|
40
|
+
}, {
|
|
41
|
+
type: 'input',
|
|
42
|
+
name: 'username',
|
|
43
|
+
message: 'Enter a username',
|
|
44
|
+
when: () => !turbineConfig && (!username || username.length === 0),
|
|
45
|
+
}, {
|
|
46
|
+
type: 'password',
|
|
47
|
+
name: 'password',
|
|
48
|
+
message: 'Enter a password',
|
|
49
|
+
when: () => !turbineConfig && (!password || password.length === 0),
|
|
50
|
+
}, {
|
|
51
|
+
type: 'list',
|
|
52
|
+
name: 'keyName',
|
|
53
|
+
message: 'Choose a key.',
|
|
54
|
+
choices: allKeys,
|
|
55
|
+
when: () => !keyName || keyName.length === 0,
|
|
56
|
+
}]);
|
|
57
|
+
const newConfig = Object.assign(flags, { url }, answers);
|
|
58
|
+
keyName = answers.keyName;
|
|
33
59
|
const storagePath = (0, node_path_1.join)(this.config.configDir, 'keys', keyName);
|
|
60
|
+
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
34
61
|
const privateKeyPath = (0, node_path_1.join)(storagePath, 'cosign.key');
|
|
35
62
|
if (!await (0, core_2.fileExists)(privateKeyPath)) {
|
|
36
63
|
core_1.CliUx.ux.error(`Could not find key: ${keyName}.`);
|
|
37
64
|
}
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
await turbine.login(username, password);
|
|
65
|
+
const turbine = await turbine_1.Turbine.get(newConfig.url, bypassCertificateCheck);
|
|
66
|
+
if (newConfig.username && newConfig.password) {
|
|
67
|
+
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(username, password));
|
|
42
68
|
}
|
|
43
69
|
core_1.CliUx.ux.action.start('Generating the signing key...');
|
|
44
70
|
await (0, fs_extra_1.ensureDir)(storagePath);
|
|
@@ -55,12 +81,12 @@ class Generate extends core_2.Base {
|
|
|
55
81
|
return;
|
|
56
82
|
}
|
|
57
83
|
core_1.CliUx.ux.action.start('Uploading the key...');
|
|
58
|
-
const success = await (turbine === null || turbine === void 0 ? void 0 : turbine.uploadKey(
|
|
84
|
+
const success = await (turbine === null || turbine === void 0 ? void 0 : turbine.uploadKey(newConfig['key-name'], publicKeyContents.toString()));
|
|
59
85
|
if (success) {
|
|
60
86
|
const hostPath = (0, node_path_1.join)(storagePath, 'hosts.json');
|
|
61
87
|
await (0, fs_extra_1.ensureFile)(hostPath);
|
|
62
88
|
const hosts = (_a = await (0, fs_extra_1.readJson)(hostPath, { throws: false })) !== null && _a !== void 0 ? _a : {};
|
|
63
|
-
hosts[new URL(
|
|
89
|
+
hosts[new URL(newConfig.url).host] = { lastPushed: new Date() };
|
|
64
90
|
await (0, fs_extra_1.writeJson)(hostPath, hosts);
|
|
65
91
|
}
|
|
66
92
|
core_1.CliUx.ux.action.stop(`${success ? 'done' : 'failed'}`);
|
|
@@ -68,5 +94,10 @@ class Generate extends core_2.Base {
|
|
|
68
94
|
}
|
|
69
95
|
exports.Generate = Generate;
|
|
70
96
|
Generate.description = 'Use to generate and store signing keys in Turbine';
|
|
71
|
-
Generate.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }),
|
|
97
|
+
Generate.flags = Object.assign(Object.assign({}, core_2.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }), keyName: core_1.Flags.string({ description: 'name used for the key (default: username_YYYY)', default: '', name: 'key-name' }), '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' }), help: core_1.Flags.help({ char: 'h' }) });
|
|
98
|
+
Generate.args = [{
|
|
99
|
+
name: 'url',
|
|
100
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
101
|
+
required: true,
|
|
102
|
+
}];
|
|
72
103
|
//# sourceMappingURL=push.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../../src/commands/turbine/connector/keys/push.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,wCAA8C;AAC9C,8CAAwC;AACxC,yCAA8B;AAC9B,+CAAwC;AACxC,uCAAmE;AACnE,+CAAyC;AACzC,uCAA+B;AAC/B,qCAA2C;AAE3C,qCAAqC;AACrC,MAAa,QAAS,SAAQ,WAAI;IAkBhC,KAAK,CAAC,GAAG;;QACP,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QAChD,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,0BAA0B,EAAE,sBAAsB,GACnD,GAAG,KAAK,CAAA;QAET,IAAI,EACF,GAAG,GACJ,GAAG,IAAI,CAAA;QAER,IAAI,EACF,UAAU,EAAE,OAAO,GACpB,GAAG,KAAK,CAAA;QAET,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,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAA;SAC3D;QAED,MAAM,OAAO,GAAa,EAAE,CAAA;QAE5B,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,WAAW,GAAG,IAAA,gBAAI,EAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;YACvD,MAAM,IAAA,oBAAS,EAAC,WAAW,CAAC,CAAA;YAC5B,MAAM,WAAW,GAAG,MAAM,IAAA,kBAAO,EAAC,WAAW,EAAE,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAA;YAErE,OAAO,CAAC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EAAE,EAAC,CAAC,EACjF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0CAA0C,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAC,CAAC,EAClI,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,gDAAgD,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAC,CAAC,EACrH,0BAA0B,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6FAA6F,EAAE,GAAG,EAAE,kCAAkC,EAAC,CAAC,EAC3M,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B;AAEM,aAAI,GAAG,CAAC;QACb,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,IAAI;KACf,CAAC,CAAA"}
|
|
@@ -2,13 +2,16 @@ import { Base } from '@sw-tsdk/core';
|
|
|
2
2
|
export declare class Push extends Base {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
file: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
5
|
username: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
6
|
password: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
-
'turbine-url': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
9
7
|
'bypass-certificate-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
8
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
9
|
'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
10
|
};
|
|
11
|
+
static args: {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
}[];
|
|
13
16
|
run(): Promise<void>;
|
|
14
17
|
}
|
|
@@ -5,30 +5,61 @@ const core_1 = require("@oclif/core");
|
|
|
5
5
|
const core_2 = require("@oclif/core");
|
|
6
6
|
const core_3 = require("@sw-tsdk/core");
|
|
7
7
|
const turbine_1 = require("@sw-tsdk/turbine");
|
|
8
|
+
const inquirer_1 = require("inquirer");
|
|
8
9
|
// noinspection JSUnusedGlobalSymbols
|
|
9
10
|
class Push extends core_3.Base {
|
|
10
11
|
async run() {
|
|
11
|
-
const { flags } = await this.parse(Push);
|
|
12
|
-
const {
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
await
|
|
12
|
+
const { flags, args } = await this.parse(Push);
|
|
13
|
+
const { username, password, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
14
|
+
let { url, } = args;
|
|
15
|
+
const { file, } = args;
|
|
16
|
+
if (!url) {
|
|
17
|
+
url = await this.getConfig('default');
|
|
18
|
+
}
|
|
19
|
+
const turbineConfig = await this.getConfig(url);
|
|
20
|
+
if (turbineConfig) {
|
|
21
|
+
core_2.CliUx.ux.log(`Config: ${url} | ${turbineConfig.username}`);
|
|
17
22
|
}
|
|
18
|
-
core_2.CliUx.ux.action.start('Pushing the connector...');
|
|
19
23
|
if (!await (0, core_3.fileExists)(file)) {
|
|
20
24
|
core_2.CliUx.ux.error(`Could not find file: ${file}`);
|
|
21
25
|
return;
|
|
22
26
|
}
|
|
27
|
+
const answers = await (0, inquirer_1.prompt)([{
|
|
28
|
+
type: 'input',
|
|
29
|
+
name: 'url',
|
|
30
|
+
message: 'Enter the url of the turbine instance [https://turbine.acme.com]',
|
|
31
|
+
when: () => !url || url.length === 0,
|
|
32
|
+
}, {
|
|
33
|
+
type: 'input',
|
|
34
|
+
name: 'username',
|
|
35
|
+
message: 'Enter a username',
|
|
36
|
+
when: () => !turbineConfig && (!username || username.length === 0),
|
|
37
|
+
}, {
|
|
38
|
+
type: 'password',
|
|
39
|
+
name: 'password',
|
|
40
|
+
message: 'Enter a password',
|
|
41
|
+
when: () => !turbineConfig && (!password || password.length === 0),
|
|
42
|
+
}]);
|
|
43
|
+
const newConfig = Object.assign(flags, { url }, answers);
|
|
44
|
+
const turbine = await turbine_1.Turbine.get(newConfig.url, bypassCertificateCheck);
|
|
45
|
+
if (newConfig.username && newConfig.password) {
|
|
46
|
+
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(newConfig.username, newConfig.password));
|
|
47
|
+
}
|
|
48
|
+
core_2.CliUx.ux.action.start('Pushing the connector...');
|
|
23
49
|
const success = await (turbine === null || turbine === void 0 ? void 0 : turbine.uploadConnector(file));
|
|
24
50
|
core_2.CliUx.ux.action.stop(`${success ? 'done' : 'failed'}`);
|
|
25
51
|
}
|
|
26
52
|
}
|
|
27
53
|
exports.Push = Push;
|
|
28
54
|
Push.description = 'Use to push an integration to Turbine';
|
|
29
|
-
Push.flags = Object.assign(Object.assign({}, core_3.Base.BaseFlags), {
|
|
30
|
-
|
|
55
|
+
Push.flags = Object.assign(Object.assign({}, core_3.Base.BaseFlags), { username: core_1.Flags.string({ char: 'u', description: 'Turbine username', default: '' }), password: core_1.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', default: '', env: 'TURBINE_PASSWORD' }), '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' }), help: core_1.Flags.help({ char: 'h' }) });
|
|
56
|
+
Push.args = [{
|
|
57
|
+
name: 'url',
|
|
58
|
+
description: 'the url of the turbine instance [https://turbine.acme.com]',
|
|
59
|
+
required: false,
|
|
60
|
+
}, {
|
|
61
|
+
name: 'file',
|
|
31
62
|
description: 'path of the file to be uploaded to Turbine',
|
|
32
63
|
required: true,
|
|
33
|
-
}
|
|
64
|
+
}];
|
|
34
65
|
//# sourceMappingURL=push.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/turbine/connector/push.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,sCAAiC;AACjC,wCAA8C;AAC9C,8CAAwC;
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/turbine/connector/push.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,sCAAiC;AACjC,wCAA8C;AAC9C,8CAAwC;AACxC,uCAA+B;AAE/B,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAqB5B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC5C,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,0BAA0B,EAAE,sBAAsB,GACnD,GAAG,KAAK,CAAA;QAET,IAAI,EACF,GAAG,GACJ,GAAG,IAAI,CAAA;QAER,MAAM,EACJ,IAAI,GACL,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,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAA;SAC3D;QAED,IAAI,CAAC,MAAM,IAAA,iBAAU,EAAC,IAAI,CAAC,EAAE;YAC3B,YAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAA;YAC9C,OAAM;SACP;QAED,MAAM,OAAO,GAAG,MAAM,IAAA,iBAAM,EAAC,CAAC;gBAC5B,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,KAAK;gBACX,OAAO,E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AAC,QAAQ,EAAE,CAAC,CAAA;IACxD,CAAC;;AAlFH,oBAmFC;AAlFQ,gBAAW,GAAG,uCAAuC,CAAA;AAErD,UAAK,mCACP,WAAI,CAAC,SAAS,KACjB,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC,EACjF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0CAA0C,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAC,CAAC,EAClI,0BAA0B,EAAE,YAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6FAA6F,EAAE,GAAG,EAAE,kCAAkC,EAAC,CAAC,EAC3M,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B;AAEM,SAAI,GAAG,CAAC;QACb,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,KAAK;KAChB,EAAE;QACD,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,IAAI;KACf,CAAC,CAAA"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.1.1-next.
|
|
1
|
+
{"version":"2.1.1-next.118+828d623","commands":{"turbine:config:list":{"id":"turbine:config:list","description":"Use to login to Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"turbine:config:remove":{"id":"turbine:config:remove","description":"Use to login to Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":true}]},"turbine:config:set":{"id":"turbine:config:set","description":"Use to login to Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"username":{"name":"username","type":"option","char":"u","description":"Turbine username","multiple":false},"password":{"name":"password","type":"option","char":"p","description":"Turbine password (ENV: TURBINE_PASSWORD)","multiple":false},"bypass-certificate-check":{"name":"bypass-certificate-check","type":"boolean","char":"b","description":"disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)","allowNo":false},"default":{"name":"default","type":"boolean","description":"sets the turbine instance as the default","allowNo":false},"skip-check":{"name":"skip-check","type":"boolean","description":"skips checking the credentials","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":true}]},"turbine:config:use":{"id":"turbine:config:use","description":"Use to login to Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":true}]},"turbine:connector:push":{"id":"turbine:connector:push","description":"Use to push an integration to Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"username":{"name":"username","type":"option","char":"u","description":"Turbine username","multiple":false,"default":""},"password":{"name":"password","type":"option","char":"p","description":"Turbine password (ENV: TURBINE_PASSWORD)","multiple":false,"default":""},"bypass-certificate-check":{"name":"bypass-certificate-check","type":"boolean","char":"b","description":"disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":false},{"name":"file","description":"path of the file to be uploaded to Turbine","required":true}]},"turbine:connector:keys:generate":{"id":"turbine:connector:keys:generate","description":"Use to generate and store signing keys in Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"username":{"name":"username","type":"option","char":"u","description":"Turbine username","multiple":false,"default":""},"password":{"name":"password","type":"option","char":"p","description":"Turbine password (ENV: TURBINE_PASSWORD)","multiple":false,"default":""},"signing-password":{"name":"signing-password","type":"option","description":"password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)","multiple":false,"default":""},"key-name":{"name":"key-name","type":"option","description":"name used for the key (default: username)","multiple":false},"bypass-certificate-check":{"name":"bypass-certificate-check","type":"boolean","char":"b","description":"disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":false}]},"turbine:connector:keys:push":{"id":"turbine:connector:keys:push","description":"Use to generate and store signing keys in Turbine","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"username":{"name":"username","type":"option","char":"u","description":"Turbine username","multiple":false,"default":""},"password":{"name":"password","type":"option","char":"p","description":"Turbine password (ENV: TURBINE_PASSWORD)","multiple":false,"default":""},"keyName":{"name":"keyName","type":"option","description":"name used for the key (default: username_YYYY)","multiple":false,"default":""},"bypass-certificate-check":{"name":"bypass-certificate-check","type":"boolean","char":"b","description":"disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":true}]},"turbine:connector:keys:list:local":{"id":"turbine:connector:keys:list:local","description":"Use to list local keys","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"turbine:connector:keys:list:remote":{"id":"turbine:connector:keys:list:remote","description":"Use to list remote keys","strict":true,"pluginName":"@sw-tsdk/plugin-turbine","pluginAlias":"@sw-tsdk/plugin-turbine","pluginType":"core","aliases":[],"flags":{"log-level":{"name":"log-level","type":"option","hidden":true,"multiple":false,"options":["debug"]},"username":{"name":"username","type":"option","char":"u","description":"Turbine username","multiple":false},"password":{"name":"password","type":"option","char":"p","description":"Turbine password (ENV: TURBINE_PASSWORD)","multiple":false},"bypass-certificate-check":{"name":"bypass-certificate-check","type":"boolean","char":"b","description":"disable certificate validation for Turbine instance (ENV: TURBINE_BYPASS_CERTIFICATE_CHECK)","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"url","description":"the url of the turbine instance [https://turbine.acme.com]","required":false}]}}}
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@oclif/core": "1.16.4",
|
|
8
|
-
"@sw-tsdk/common": "^2.1.1-next.
|
|
9
|
-
"@sw-tsdk/connector": "^2.1.1-next.
|
|
10
|
-
"@sw-tsdk/core": "^2.1.1-next.
|
|
11
|
-
"@sw-tsdk/docker": "^2.1.1-next.
|
|
12
|
-
"@sw-tsdk/turbine": "^2.1.1-next.
|
|
8
|
+
"@sw-tsdk/common": "^2.1.1-next.118+828d623",
|
|
9
|
+
"@sw-tsdk/connector": "^2.1.1-next.118+828d623",
|
|
10
|
+
"@sw-tsdk/core": "^2.1.1-next.118+828d623",
|
|
11
|
+
"@sw-tsdk/docker": "^2.1.1-next.118+828d623",
|
|
12
|
+
"@sw-tsdk/turbine": "^2.1.1-next.118+828d623",
|
|
13
13
|
"@swimlane/cosign": "1.3.1",
|
|
14
14
|
"date-fns": "2.29.3",
|
|
15
15
|
"fs-extra": "10.1.0",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"posttest": "yarn lint",
|
|
67
67
|
"dev:setup": "npm link"
|
|
68
68
|
},
|
|
69
|
-
"version": "2.1.1-next.
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"version": "2.1.1-next.118+828d623",
|
|
70
|
+
"gitHead": "828d6239a836f5314b7f7292eaef4b0e7814b6ab"
|
|
71
71
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Login = void 0;
|
|
4
|
-
const inquirer_1 = require("inquirer");
|
|
5
|
-
const turbine_1 = require("@sw-tsdk/turbine");
|
|
6
|
-
const core_1 = require("@sw-tsdk/core");
|
|
7
|
-
const core_2 = require("@oclif/core");
|
|
8
|
-
// noinspection JSUnusedGlobalSymbols
|
|
9
|
-
class Login extends core_1.Base {
|
|
10
|
-
async run() {
|
|
11
|
-
const { flags } = await this.parse(Login);
|
|
12
|
-
const { username, password, 'turbine-url': baseUrl, 'bypass-certificate-check': bypassCertificateCheck, } = flags;
|
|
13
|
-
const answers = await (0, inquirer_1.prompt)([{
|
|
14
|
-
type: 'input',
|
|
15
|
-
name: 'username',
|
|
16
|
-
message: 'Enter a username',
|
|
17
|
-
when: () => !username || username.length === 0,
|
|
18
|
-
}, {
|
|
19
|
-
type: 'password',
|
|
20
|
-
name: 'password',
|
|
21
|
-
message: 'Enter a password',
|
|
22
|
-
when: () => !password || password.length === 0,
|
|
23
|
-
}]);
|
|
24
|
-
const newConfig = Object.assign(flags, answers);
|
|
25
|
-
const turbine = await turbine_1.Turbine.get(baseUrl, bypassCertificateCheck);
|
|
26
|
-
await (turbine === null || turbine === void 0 ? void 0 : turbine.login(newConfig.username, newConfig.password));
|
|
27
|
-
core_2.CliUx.ux.log('Login successful');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.Login = Login;
|
|
31
|
-
Login.description = 'Use to login to Turbine';
|
|
32
|
-
Login.flags = Object.assign(Object.assign({}, core_1.Base.BaseFlags), { username: core_2.Flags.string({ char: 'u', description: 'Turbine username' }), password: core_2.Flags.string({ char: 'p', description: 'Turbine password (ENV: TURBINE_PASSWORD)', env: 'TURBINE_PASSWORD' }), 'turbine-url': core_2.Flags.string({ description: 'the url of the turbine instance [https://turbine.acme.com]', required: true }), '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' }), help: core_2.Flags.help({ char: 'h' }) });
|
|
33
|
-
//# sourceMappingURL=login.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/turbine/login.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAC/B,8CAAwC;AACxC,wCAAkC;AAClC,sCAAwC;AAExC,qCAAqC;AACr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