@hesed/conni 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ $ npm install -g @hesed/conni
|
|
|
26
26
|
$ conni COMMAND
|
|
27
27
|
running command...
|
|
28
28
|
$ conni (--version)
|
|
29
|
-
@hesed/conni/0.7.
|
|
29
|
+
@hesed/conni/0.7.1 linux-x64 node-v24.14.1
|
|
30
30
|
$ conni --help [COMMAND]
|
|
31
31
|
USAGE
|
|
32
32
|
$ conni COMMAND
|
|
@@ -64,10 +64,10 @@ USAGE
|
|
|
64
64
|
$ conni conni auth add -t <value> -u <value> [--json] [-e <value>] [-p <value>]
|
|
65
65
|
|
|
66
66
|
FLAGS
|
|
67
|
-
-e, --email=<value> Account email
|
|
68
|
-
-p, --profile=<value> Profile name
|
|
69
|
-
-t, --token=<value> (required) API Token
|
|
70
|
-
-u, --url=<value> (required) Atlassian URL (start with https://)
|
|
67
|
+
-e, --email=<value> Account email
|
|
68
|
+
-p, --profile=<value> Profile name
|
|
69
|
+
-t, --token=<value> (required) API Token
|
|
70
|
+
-u, --url=<value> (required) Atlassian URL (start with https://)
|
|
71
71
|
|
|
72
72
|
GLOBAL FLAGS
|
|
73
73
|
--json Format output as json.
|
|
@@ -81,7 +81,7 @@ EXAMPLES
|
|
|
81
81
|
$ conni conni auth add --profile work
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
_See code: [src/commands/conni/auth/add.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
84
|
+
_See code: [src/commands/conni/auth/add.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/auth/add.ts)_
|
|
85
85
|
|
|
86
86
|
## `conni conni auth list`
|
|
87
87
|
|
|
@@ -101,7 +101,7 @@ EXAMPLES
|
|
|
101
101
|
$ conni conni auth list
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
_See code: [src/commands/conni/auth/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
104
|
+
_See code: [src/commands/conni/auth/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/auth/list.ts)_
|
|
105
105
|
|
|
106
106
|
## `conni conni auth profile`
|
|
107
107
|
|
|
@@ -126,7 +126,7 @@ EXAMPLES
|
|
|
126
126
|
$ conni conni auth profile --default work
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
_See code: [src/commands/conni/auth/profile.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
129
|
+
_See code: [src/commands/conni/auth/profile.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/auth/profile.ts)_
|
|
130
130
|
|
|
131
131
|
## `conni conni auth test`
|
|
132
132
|
|
|
@@ -151,7 +151,7 @@ EXAMPLES
|
|
|
151
151
|
$ conni conni auth test --profile work
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
_See code: [src/commands/conni/auth/test.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
154
|
+
_See code: [src/commands/conni/auth/test.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/auth/test.ts)_
|
|
155
155
|
|
|
156
156
|
## `conni conni auth update`
|
|
157
157
|
|
|
@@ -179,7 +179,7 @@ EXAMPLES
|
|
|
179
179
|
$ conni conni auth update --profile work
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
_See code: [src/commands/conni/auth/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
182
|
+
_See code: [src/commands/conni/auth/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/auth/update.ts)_
|
|
183
183
|
|
|
184
184
|
## `conni conni content attachment PAGEID FILE`
|
|
185
185
|
|
|
@@ -204,7 +204,7 @@ EXAMPLES
|
|
|
204
204
|
$ conni conni content attachment 123456 ./document.pdf
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
_See code: [src/commands/conni/content/attachment.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
207
|
+
_See code: [src/commands/conni/content/attachment.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/attachment.ts)_
|
|
208
208
|
|
|
209
209
|
## `conni conni content attachment-download ATTACHMENTID [OUTPUTPATH]`
|
|
210
210
|
|
|
@@ -231,7 +231,7 @@ EXAMPLES
|
|
|
231
231
|
$ conni conni content attachment-download att12345 ./document.pdf
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
_See code: [src/commands/conni/content/attachment-download.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
234
|
+
_See code: [src/commands/conni/content/attachment-download.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/attachment-download.ts)_
|
|
235
235
|
|
|
236
236
|
## `conni conni content comment PAGEID BODY`
|
|
237
237
|
|
|
@@ -265,7 +265,7 @@ EXAMPLES
|
|
|
265
265
|
$ conni conni content comment 123456 "$(cat content.md)"
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
_See code: [src/commands/conni/content/comment.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
268
|
+
_See code: [src/commands/conni/content/comment.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/comment.ts)_
|
|
269
269
|
|
|
270
270
|
## `conni conni content comment-delete ID`
|
|
271
271
|
|
|
@@ -289,7 +289,7 @@ EXAMPLES
|
|
|
289
289
|
$ conni conni content comment-delete 1544224770
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
_See code: [src/commands/conni/content/comment-delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
292
|
+
_See code: [src/commands/conni/content/comment-delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/comment-delete.ts)_
|
|
293
293
|
|
|
294
294
|
## `conni conni content comment-update ID BODY`
|
|
295
295
|
|
|
@@ -323,7 +323,7 @@ EXAMPLES
|
|
|
323
323
|
$ conni conni content comment-update 1544224770 "$(cat content.md)"
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
_See code: [src/commands/conni/content/comment-update.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
326
|
+
_See code: [src/commands/conni/content/comment-update.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/comment-update.ts)_
|
|
327
327
|
|
|
328
328
|
## `conni conni content create`
|
|
329
329
|
|
|
@@ -370,7 +370,7 @@ FLAG DESCRIPTIONS
|
|
|
370
370
|
Content fields in key=value format. Use @file to read value from a file (e.g. body=@content.xml)
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
_See code: [src/commands/conni/content/create.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
373
|
+
_See code: [src/commands/conni/content/create.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/create.ts)_
|
|
374
374
|
|
|
375
375
|
## `conni conni content delete PAGEID`
|
|
376
376
|
|
|
@@ -394,7 +394,7 @@ EXAMPLES
|
|
|
394
394
|
$ conni conni content delete 1543634992
|
|
395
395
|
```
|
|
396
396
|
|
|
397
|
-
_See code: [src/commands/conni/content/delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
397
|
+
_See code: [src/commands/conni/content/delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/delete.ts)_
|
|
398
398
|
|
|
399
399
|
## `conni conni content get PAGEID`
|
|
400
400
|
|
|
@@ -418,7 +418,7 @@ EXAMPLES
|
|
|
418
418
|
$ conni conni content get 1544060948
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
-
_See code: [src/commands/conni/content/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
421
|
+
_See code: [src/commands/conni/content/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/get.ts)_
|
|
422
422
|
|
|
423
423
|
## `conni conni content search CQL`
|
|
424
424
|
|
|
@@ -446,7 +446,7 @@ EXAMPLES
|
|
|
446
446
|
$ conni conni content search 'created > startOfMonth()' --limit=5 --expand=body,version
|
|
447
447
|
```
|
|
448
448
|
|
|
449
|
-
_See code: [src/commands/conni/content/search.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
449
|
+
_See code: [src/commands/conni/content/search.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/search.ts)_
|
|
450
450
|
|
|
451
451
|
## `conni conni content update PAGEID`
|
|
452
452
|
|
|
@@ -486,7 +486,7 @@ EXAMPLES
|
|
|
486
486
|
$ conni conni content update 1076199489 --fields body=@storage.xml representation=storage --full-width
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
_See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
489
|
+
_See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/content/update.ts)_
|
|
490
490
|
|
|
491
491
|
## `conni conni space get SPACEKEY`
|
|
492
492
|
|
|
@@ -510,7 +510,7 @@ EXAMPLES
|
|
|
510
510
|
$ conni conni space get DEV
|
|
511
511
|
```
|
|
512
512
|
|
|
513
|
-
_See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
513
|
+
_See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/space/get.ts)_
|
|
514
514
|
|
|
515
515
|
## `conni conni space list`
|
|
516
516
|
|
|
@@ -531,5 +531,5 @@ EXAMPLES
|
|
|
531
531
|
$ conni conni space list
|
|
532
532
|
```
|
|
533
533
|
|
|
534
|
-
_See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.
|
|
534
|
+
_See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.1/src/commands/conni/space/list.ts)_
|
|
535
535
|
<!-- commandsstop -->
|
|
@@ -13,12 +13,12 @@ export default class AuthAdd extends Command {
|
|
|
13
13
|
'<%= config.bin %> <%= command.id %> --profile work',
|
|
14
14
|
];
|
|
15
15
|
static flags = {
|
|
16
|
-
email: Flags.string({ char: 'e', description: 'Account email
|
|
17
|
-
profile: Flags.string({ char: 'p', description: 'Profile name
|
|
18
|
-
token: Flags.string({ char: 't', description: 'API Token
|
|
16
|
+
email: Flags.string({ char: 'e', description: 'Account email', required: false }),
|
|
17
|
+
profile: Flags.string({ char: 'p', description: 'Profile name', required: false }),
|
|
18
|
+
token: Flags.string({ char: 't', description: 'API Token', required: !process.stdout.isTTY }),
|
|
19
19
|
url: Flags.string({
|
|
20
20
|
char: 'u',
|
|
21
|
-
description: 'Atlassian URL (start with https://)
|
|
21
|
+
description: 'Atlassian URL (start with https://)',
|
|
22
22
|
required: !process.stdout.isTTY,
|
|
23
23
|
}),
|
|
24
24
|
};
|
|
@@ -43,6 +43,9 @@ export default class AuthUpdate extends Command {
|
|
|
43
43
|
// Migrate legacy {auth: {...}} into profiles.default, then read current profile
|
|
44
44
|
const legacyAuth = existing.auth;
|
|
45
45
|
const profiles = (existing.profiles ?? (legacyAuth ? { default: legacyAuth } : {}));
|
|
46
|
+
if (!profiles[profileName]) {
|
|
47
|
+
this.error(`Profile '${profileName}' does not exist. Use 'conni auth add' to create it.`);
|
|
48
|
+
}
|
|
46
49
|
const current = profiles[profileName] ?? {};
|
|
47
50
|
const apiToken = flags.token ?? (await input({ default: current.apiToken, message: 'API Token:', prefill: 'tab', required: true }));
|
|
48
51
|
const email = flags.email ?? (await input({ default: current.email, message: 'Account email:', prefill: 'tab', required: false }));
|
|
@@ -57,7 +60,12 @@ export default class AuthUpdate extends Command {
|
|
|
57
60
|
if (!answer) {
|
|
58
61
|
return;
|
|
59
62
|
}
|
|
60
|
-
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
64
|
+
const { auth: _, ...rest } = existing;
|
|
65
|
+
const updatedConfig = {
|
|
66
|
+
...rest,
|
|
67
|
+
profiles: { ...profiles, [profileName]: { apiToken, ...(email && { email }), host } },
|
|
68
|
+
};
|
|
61
69
|
await fs.writeJSON(configFilePath, updatedConfig, { mode: 0o600 });
|
|
62
70
|
action.start('Authenticating');
|
|
63
71
|
const result = await testConnection({ apiToken, ...(email && { email }), host });
|
package/oclif.manifest.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"email": {
|
|
20
20
|
"char": "e",
|
|
21
|
-
"description": "Account email
|
|
21
|
+
"description": "Account email",
|
|
22
22
|
"name": "email",
|
|
23
23
|
"required": false,
|
|
24
24
|
"hasDynamicHelp": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"profile": {
|
|
29
29
|
"char": "p",
|
|
30
|
-
"description": "Profile name
|
|
30
|
+
"description": "Profile name",
|
|
31
31
|
"name": "profile",
|
|
32
32
|
"required": false,
|
|
33
33
|
"hasDynamicHelp": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"token": {
|
|
38
38
|
"char": "t",
|
|
39
|
-
"description": "API Token
|
|
39
|
+
"description": "API Token",
|
|
40
40
|
"name": "token",
|
|
41
41
|
"required": true,
|
|
42
42
|
"hasDynamicHelp": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"url": {
|
|
47
47
|
"char": "u",
|
|
48
|
-
"description": "Atlassian URL (start with https://)
|
|
48
|
+
"description": "Atlassian URL (start with https://)",
|
|
49
49
|
"name": "url",
|
|
50
50
|
"required": true,
|
|
51
51
|
"hasDynamicHelp": false,
|
|
@@ -910,5 +910,5 @@
|
|
|
910
910
|
]
|
|
911
911
|
}
|
|
912
912
|
},
|
|
913
|
-
"version": "0.7.
|
|
913
|
+
"version": "0.7.1"
|
|
914
914
|
}
|