@hesed/conni 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -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.6.0 linux-x64 node-v24.14.1
29
+ @hesed/conni/0.7.0 linux-x64 node-v24.14.1
30
30
  $ conni --help [COMMAND]
31
31
  USAGE
32
32
  $ conni COMMAND
@@ -61,10 +61,10 @@ Add Atlassian authentication
61
61
 
62
62
  ```
63
63
  USAGE
64
- $ conni conni auth add -e <value> -t <value> -u <value> [--json] [-p <value>]
64
+ $ conni conni auth add -t <value> -u <value> [--json] [-e <value>] [-p <value>]
65
65
 
66
66
  FLAGS
67
- -e, --email=<value> (required) Account email:
67
+ -e, --email=<value> Account email:
68
68
  -p, --profile=<value> Profile name:
69
69
  -t, --token=<value> (required) API Token:
70
70
  -u, --url=<value> (required) Atlassian URL (start with https://):
@@ -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.6.0/src/commands/conni/auth/add.ts)_
84
+ _See code: [src/commands/conni/auth/add.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/auth/list.ts)_
104
+ _See code: [src/commands/conni/auth/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/auth/profile.ts)_
129
+ _See code: [src/commands/conni/auth/profile.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/auth/test.ts)_
154
+ _See code: [src/commands/conni/auth/test.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/src/commands/conni/auth/test.ts)_
155
155
 
156
156
  ## `conni conni auth update`
157
157
 
@@ -159,10 +159,10 @@ Update existing authentication profile
159
159
 
160
160
  ```
161
161
  USAGE
162
- $ conni conni auth update -e <value> -t <value> -u <value> [--json] [-p <value>]
162
+ $ conni conni auth update -t <value> -u <value> [--json] [-e <value>] [-p <value>]
163
163
 
164
164
  FLAGS
165
- -e, --email=<value> (required) Account email
165
+ -e, --email=<value> Account email
166
166
  -p, --profile=<value> Profile name to update (default: "default")
167
167
  -t, --token=<value> (required) API Token
168
168
  -u, --url=<value> (required) Atlassian instance URL (start with https://)
@@ -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.6.0/src/commands/conni/auth/update.ts)_
182
+ _See code: [src/commands/conni/auth/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/attachment.ts)_
207
+ _See code: [src/commands/conni/content/attachment.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/attachment-download.ts)_
234
+ _See code: [src/commands/conni/content/attachment-download.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/comment.ts)_
268
+ _See code: [src/commands/conni/content/comment.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/comment-delete.ts)_
292
+ _See code: [src/commands/conni/content/comment-delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/comment-update.ts)_
326
+ _See code: [src/commands/conni/content/comment-update.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/create.ts)_
373
+ _See code: [src/commands/conni/content/create.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/delete.ts)_
397
+ _See code: [src/commands/conni/content/delete.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/get.ts)_
421
+ _See code: [src/commands/conni/content/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/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.6.0/src/commands/conni/content/search.ts)_
449
+ _See code: [src/commands/conni/content/search.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/src/commands/conni/content/search.ts)_
450
450
 
451
451
  ## `conni conni content update PAGEID`
452
452
 
@@ -454,14 +454,17 @@ Update an existing Confluence content
454
454
 
455
455
  ```
456
456
  USAGE
457
- $ conni conni content update PAGEID --fields <value>... [-p <value>]
457
+ $ conni conni content update PAGEID --fields <value>... [--full-width] [-p <value>] [--toon]
458
458
 
459
459
  ARGUMENTS
460
460
  PAGEID Page ID
461
461
 
462
462
  FLAGS
463
463
  -p, --profile=<value> Authentication profile name
464
- --fields=<value>... (required) Content fields to update in key=value format
464
+ --fields=<value>... (required) Content fields to update in key=value format. Use @file to read value from a file
465
+ (e.g. body=@content.xml)
466
+ --full-width Set page appearance to full-width
467
+ --toon Format output as toon
465
468
 
466
469
  DESCRIPTION
467
470
  Update an existing Confluence content
@@ -479,9 +482,11 @@ EXAMPLES
479
482
  ```'
480
483
 
481
484
  $ conni conni content update 1076199489 --fields body="$(cat content.md)"
485
+
486
+ $ conni conni content update 1076199489 --fields body=@storage.xml representation=storage --full-width
482
487
  ```
483
488
 
484
- _See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.6.0/src/commands/conni/content/update.ts)_
489
+ _See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/src/commands/conni/content/update.ts)_
485
490
 
486
491
  ## `conni conni space get SPACEKEY`
487
492
 
@@ -505,7 +510,7 @@ EXAMPLES
505
510
  $ conni conni space get DEV
506
511
  ```
507
512
 
508
- _See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.6.0/src/commands/conni/space/get.ts)_
513
+ _See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/src/commands/conni/space/get.ts)_
509
514
 
510
515
  ## `conni conni space list`
511
516
 
@@ -526,5 +531,5 @@ EXAMPLES
526
531
  $ conni conni space list
527
532
  ```
528
533
 
529
- _See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.6.0/src/commands/conni/space/list.ts)_
534
+ _See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.7.0/src/commands/conni/space/list.ts)_
530
535
  <!-- commandsstop -->
@@ -13,7 +13,7 @@ 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:', required: !process.stdout.isTTY }),
16
+ email: Flags.string({ char: 'e', description: 'Account email:', required: false }),
17
17
  profile: Flags.string({ char: 'p', description: 'Profile name:', required: false }),
18
18
  token: Flags.string({ char: 't', description: 'API Token:', required: !process.stdout.isTTY }),
19
19
  url: Flags.string({
@@ -26,7 +26,7 @@ export default class AuthAdd extends Command {
26
26
  const { flags } = await this.parse(AuthAdd);
27
27
  const profileName = flags.profile ?? (process.stdout.isTTY ? await input({ message: 'Profile name:', required: true }) : 'default');
28
28
  const apiToken = flags.token ?? (await input({ message: 'API Token:', required: true }));
29
- const email = flags.email ?? (await input({ message: 'Account email:', required: true }));
29
+ const email = flags.email ?? (await input({ message: 'Account email:', required: false }));
30
30
  const host = flags.url ?? (await input({ message: 'Atlassian instance URL (start with https://):', required: true }));
31
31
  const configFilePath = path.join(this.config.configDir, 'conni-config.json');
32
32
  let existing = {};
@@ -40,12 +40,12 @@ export default class AuthAdd extends Command {
40
40
  if (profileName in profiles) {
41
41
  this.error(`Profile '${profileName}' already exists. Use 'conni auth update' to modify it.`);
42
42
  }
43
- profiles[profileName] = { apiToken, email, host };
43
+ profiles[profileName] = { apiToken, ...(email && { email }), host };
44
44
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
45
45
  const { auth: _auth, ...rest } = existing;
46
46
  await fs.writeJSON(configFilePath, { ...rest, profiles }, { mode: 0o600 });
47
47
  action.start('Authenticating');
48
- const result = await testConnection({ apiToken, email, host });
48
+ const result = await testConnection({ apiToken, ...(email && { email }), host });
49
49
  clearClients();
50
50
  if (result.success) {
51
51
  action.stop('✓ successful');
@@ -13,7 +13,7 @@ export default class AuthUpdate 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', required: !process.stdout.isTTY }),
16
+ email: Flags.string({ char: 'e', description: 'Account email', required: false }),
17
17
  profile: Flags.string({ char: 'p', description: 'Profile name to update (default: "default")', required: false }),
18
18
  token: Flags.string({ char: 't', description: 'API Token', required: !process.stdout.isTTY }),
19
19
  url: Flags.string({
@@ -45,7 +45,7 @@ export default class AuthUpdate extends Command {
45
45
  const profiles = (existing.profiles ?? (legacyAuth ? { default: legacyAuth } : {}));
46
46
  const current = profiles[profileName] ?? {};
47
47
  const apiToken = flags.token ?? (await input({ default: current.apiToken, message: 'API Token:', prefill: 'tab', required: true }));
48
- const email = flags.email ?? (await input({ default: current.email, message: 'Account email:', prefill: 'tab', required: true }));
48
+ const email = flags.email ?? (await input({ default: current.email, message: 'Account email:', prefill: 'tab', required: false }));
49
49
  const host = flags.url ??
50
50
  (await input({
51
51
  default: current.host,
@@ -57,10 +57,10 @@ export default class AuthUpdate extends Command {
57
57
  if (!answer) {
58
58
  return;
59
59
  }
60
- const updatedConfig = { ...existing, profiles: { ...profiles, [profileName]: { apiToken, email, host } } };
60
+ const updatedConfig = { ...existing, profiles: { ...profiles, [profileName]: { apiToken, ...(email && { email }), host } } };
61
61
  await fs.writeJSON(configFilePath, updatedConfig, { mode: 0o600 });
62
62
  action.start('Authenticating');
63
- const result = await testConnection({ apiToken, email, host });
63
+ const result = await testConnection({ apiToken, ...(email && { email }), host });
64
64
  clearClients();
65
65
  if (result.success) {
66
66
  action.stop('✓ successful');
@@ -7,7 +7,9 @@ export default class ContentUpdate extends Command {
7
7
  static examples: string[];
8
8
  static flags: {
9
9
  fields: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
10
+ 'full-width': import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
11
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ toon: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
13
  };
12
14
  run(): Promise<void>;
13
15
  }
@@ -1,6 +1,8 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
+ import fs from 'fs-extra';
2
3
  import { readConfig } from '../../../config.js';
3
4
  import { clearClients, updateContent } from '../../../conni/conni-client.js';
5
+ import { formatAsToon } from '../../../format.js';
4
6
  export default class ContentUpdate extends Command {
5
7
  static args = {
6
8
  pageId: Args.string({ description: 'Page ID', required: true }),
@@ -10,10 +12,20 @@ export default class ContentUpdate extends Command {
10
12
  "<%= config.bin %> <%= command.id %> 1076199489 --fields title='New summary' body='New description'",
11
13
  "<%= config.bin %> <%= command.id %> 1076199489 --fields body='\n# Header\n## Sub-header\n- Item 1\n- Item 2\n```bash\nls -a\n```'",
12
14
  '<%= config.bin %> <%= command.id %> 1076199489 --fields body="$(cat content.md)"',
15
+ '<%= config.bin %> <%= command.id %> 1076199489 --fields body=@storage.xml representation=storage --full-width',
13
16
  ];
14
17
  static flags = {
15
- fields: Flags.string({ description: 'Content fields to update in key=value format', multiple: true, required: true }),
18
+ fields: Flags.string({
19
+ description: 'Content fields to update in key=value format. Use @file to read value from a file (e.g. body=@content.xml)',
20
+ multiple: true,
21
+ required: true,
22
+ }),
23
+ 'full-width': Flags.boolean({
24
+ description: 'Set page appearance to full-width',
25
+ required: false,
26
+ }),
16
27
  profile: Flags.string({ char: 'p', description: 'Authentication profile name', required: false }),
28
+ toon: Flags.boolean({ description: 'Format output as toon', required: false }),
17
29
  };
18
30
  async run() {
19
31
  const { args, flags } = await this.parse(ContentUpdate);
@@ -25,12 +37,24 @@ export default class ContentUpdate extends Command {
25
37
  if (flags.fields) {
26
38
  for (const field of flags.fields) {
27
39
  const [key, ...valueParts] = field.split('=');
28
- const value = valueParts.join('=');
40
+ let value = valueParts.join('=');
41
+ if (value.startsWith('@')) {
42
+ const filePath = value.slice(1);
43
+ value = fs.readFileSync(filePath, 'utf8');
44
+ }
29
45
  fields[key] = value;
30
46
  }
31
47
  }
48
+ if (flags['full-width']) {
49
+ fields.fullWidth = 'true';
50
+ }
32
51
  const result = await updateContent(config.auth, args.pageId, fields);
33
52
  clearClients();
34
- this.logJson(result);
53
+ if (flags.toon) {
54
+ this.log(formatAsToon(result));
55
+ }
56
+ else {
57
+ this.logJson(result);
58
+ }
35
59
  }
36
60
  }
@@ -268,12 +268,18 @@ export class ConniApi {
268
268
  return this.client;
269
269
  }
270
270
  this.client = new ConfluenceClient({
271
- authentication: {
272
- basic: {
273
- apiToken: this.config.apiToken,
274
- email: this.config.email ?? '',
271
+ authentication: this.config.email
272
+ ? {
273
+ basic: {
274
+ apiToken: this.config.apiToken,
275
+ email: this.config.email,
276
+ },
277
+ }
278
+ : {
279
+ oauth2: {
280
+ accessToken: this.config.apiToken,
281
+ },
275
282
  },
276
- },
277
283
  host: this.config.host,
278
284
  });
279
285
  return this.client;
@@ -465,6 +471,8 @@ export class ConniApi {
465
471
  const currentVersion = (page.version?.number ?? 0) + 1;
466
472
  const title = fields.title ?? page.title ?? '';
467
473
  const body = fields.body;
474
+ const representation = fields.representation ?? 'atlas_doc_format';
475
+ const isStorage = representation === 'storage';
468
476
  const response = await client.content.updateContent({
469
477
  id: pageId,
470
478
  type: 'page',
@@ -473,9 +481,11 @@ export class ConniApi {
473
481
  : {
474
482
  body: {
475
483
  storage: {
476
- representation: 'atlas_doc_format',
477
- // eslint-disable-next-line unicorn/prefer-string-replace-all
478
- value: JSON.stringify(markdownToAdf(body.replace(/\\n/g, '\n'))),
484
+ representation,
485
+ value: isStorage
486
+ ? body
487
+ : // eslint-disable-next-line unicorn/prefer-string-replace-all
488
+ JSON.stringify(markdownToAdf(body.replace(/\\n/g, '\n'))),
479
489
  },
480
490
  },
481
491
  }),
@@ -484,6 +494,9 @@ export class ConniApi {
484
494
  number: currentVersion,
485
495
  },
486
496
  });
497
+ if (fields.fullWidth) {
498
+ await this.setPageAppearance(pageId, 'full-width');
499
+ }
487
500
  return {
488
501
  data: response,
489
502
  success: true,
@@ -20,7 +20,7 @@
20
20
  "char": "e",
21
21
  "description": "Account email:",
22
22
  "name": "email",
23
- "required": true,
23
+ "required": false,
24
24
  "hasDynamicHelp": false,
25
25
  "multiple": false,
26
26
  "type": "option"
@@ -208,7 +208,7 @@
208
208
  "char": "e",
209
209
  "description": "Account email",
210
210
  "name": "email",
211
- "required": true,
211
+ "required": false,
212
212
  "hasDynamicHelp": false,
213
213
  "multiple": false,
214
214
  "type": "option"
@@ -258,96 +258,6 @@
258
258
  "update.js"
259
259
  ]
260
260
  },
261
- "conni:space:get": {
262
- "aliases": [],
263
- "args": {
264
- "spaceKey": {
265
- "description": "Space key",
266
- "name": "spaceKey",
267
- "required": true
268
- }
269
- },
270
- "description": "Get details of a Confluence space",
271
- "examples": [
272
- "<%= config.bin %> <%= command.id %> DEV"
273
- ],
274
- "flags": {
275
- "profile": {
276
- "char": "p",
277
- "description": "Authentication profile name",
278
- "name": "profile",
279
- "required": false,
280
- "hasDynamicHelp": false,
281
- "multiple": false,
282
- "type": "option"
283
- },
284
- "toon": {
285
- "description": "Format output as toon",
286
- "name": "toon",
287
- "required": false,
288
- "allowNo": false,
289
- "type": "boolean"
290
- }
291
- },
292
- "hasDynamicHelp": false,
293
- "hiddenAliases": [],
294
- "id": "conni:space:get",
295
- "pluginAlias": "@hesed/conni",
296
- "pluginName": "@hesed/conni",
297
- "pluginType": "core",
298
- "strict": true,
299
- "enableJsonFlag": false,
300
- "isESM": true,
301
- "relativePath": [
302
- "dist",
303
- "commands",
304
- "conni",
305
- "space",
306
- "get.js"
307
- ]
308
- },
309
- "conni:space:list": {
310
- "aliases": [],
311
- "args": {},
312
- "description": "List all Confluence spaces",
313
- "examples": [
314
- "<%= config.bin %> <%= command.id %>"
315
- ],
316
- "flags": {
317
- "profile": {
318
- "char": "p",
319
- "description": "Authentication profile name",
320
- "name": "profile",
321
- "required": false,
322
- "hasDynamicHelp": false,
323
- "multiple": false,
324
- "type": "option"
325
- },
326
- "toon": {
327
- "description": "Format output as toon",
328
- "name": "toon",
329
- "required": false,
330
- "allowNo": false,
331
- "type": "boolean"
332
- }
333
- },
334
- "hasDynamicHelp": false,
335
- "hiddenAliases": [],
336
- "id": "conni:space:list",
337
- "pluginAlias": "@hesed/conni",
338
- "pluginName": "@hesed/conni",
339
- "pluginType": "core",
340
- "strict": true,
341
- "enableJsonFlag": false,
342
- "isESM": true,
343
- "relativePath": [
344
- "dist",
345
- "commands",
346
- "conni",
347
- "space",
348
- "list.js"
349
- ]
350
- },
351
261
  "conni:content:attachment-download": {
352
262
  "aliases": [],
353
263
  "args": {
@@ -856,17 +766,25 @@
856
766
  "examples": [
857
767
  "<%= config.bin %> <%= command.id %> 1076199489 --fields title='New summary' body='New description'",
858
768
  "<%= config.bin %> <%= command.id %> 1076199489 --fields body='\n# Header\n## Sub-header\n- Item 1\n- Item 2\n```bash\nls -a\n```'",
859
- "<%= config.bin %> <%= command.id %> 1076199489 --fields body=\"$(cat content.md)\""
769
+ "<%= config.bin %> <%= command.id %> 1076199489 --fields body=\"$(cat content.md)\"",
770
+ "<%= config.bin %> <%= command.id %> 1076199489 --fields body=@storage.xml representation=storage --full-width"
860
771
  ],
861
772
  "flags": {
862
773
  "fields": {
863
- "description": "Content fields to update in key=value format",
774
+ "description": "Content fields to update in key=value format. Use @file to read value from a file (e.g. body=@content.xml)",
864
775
  "name": "fields",
865
776
  "required": true,
866
777
  "hasDynamicHelp": false,
867
778
  "multiple": true,
868
779
  "type": "option"
869
780
  },
781
+ "full-width": {
782
+ "description": "Set page appearance to full-width",
783
+ "name": "full-width",
784
+ "required": false,
785
+ "allowNo": false,
786
+ "type": "boolean"
787
+ },
870
788
  "profile": {
871
789
  "char": "p",
872
790
  "description": "Authentication profile name",
@@ -875,6 +793,13 @@
875
793
  "hasDynamicHelp": false,
876
794
  "multiple": false,
877
795
  "type": "option"
796
+ },
797
+ "toon": {
798
+ "description": "Format output as toon",
799
+ "name": "toon",
800
+ "required": false,
801
+ "allowNo": false,
802
+ "type": "boolean"
878
803
  }
879
804
  },
880
805
  "hasDynamicHelp": false,
@@ -893,7 +818,97 @@
893
818
  "content",
894
819
  "update.js"
895
820
  ]
821
+ },
822
+ "conni:space:get": {
823
+ "aliases": [],
824
+ "args": {
825
+ "spaceKey": {
826
+ "description": "Space key",
827
+ "name": "spaceKey",
828
+ "required": true
829
+ }
830
+ },
831
+ "description": "Get details of a Confluence space",
832
+ "examples": [
833
+ "<%= config.bin %> <%= command.id %> DEV"
834
+ ],
835
+ "flags": {
836
+ "profile": {
837
+ "char": "p",
838
+ "description": "Authentication profile name",
839
+ "name": "profile",
840
+ "required": false,
841
+ "hasDynamicHelp": false,
842
+ "multiple": false,
843
+ "type": "option"
844
+ },
845
+ "toon": {
846
+ "description": "Format output as toon",
847
+ "name": "toon",
848
+ "required": false,
849
+ "allowNo": false,
850
+ "type": "boolean"
851
+ }
852
+ },
853
+ "hasDynamicHelp": false,
854
+ "hiddenAliases": [],
855
+ "id": "conni:space:get",
856
+ "pluginAlias": "@hesed/conni",
857
+ "pluginName": "@hesed/conni",
858
+ "pluginType": "core",
859
+ "strict": true,
860
+ "enableJsonFlag": false,
861
+ "isESM": true,
862
+ "relativePath": [
863
+ "dist",
864
+ "commands",
865
+ "conni",
866
+ "space",
867
+ "get.js"
868
+ ]
869
+ },
870
+ "conni:space:list": {
871
+ "aliases": [],
872
+ "args": {},
873
+ "description": "List all Confluence spaces",
874
+ "examples": [
875
+ "<%= config.bin %> <%= command.id %>"
876
+ ],
877
+ "flags": {
878
+ "profile": {
879
+ "char": "p",
880
+ "description": "Authentication profile name",
881
+ "name": "profile",
882
+ "required": false,
883
+ "hasDynamicHelp": false,
884
+ "multiple": false,
885
+ "type": "option"
886
+ },
887
+ "toon": {
888
+ "description": "Format output as toon",
889
+ "name": "toon",
890
+ "required": false,
891
+ "allowNo": false,
892
+ "type": "boolean"
893
+ }
894
+ },
895
+ "hasDynamicHelp": false,
896
+ "hiddenAliases": [],
897
+ "id": "conni:space:list",
898
+ "pluginAlias": "@hesed/conni",
899
+ "pluginName": "@hesed/conni",
900
+ "pluginType": "core",
901
+ "strict": true,
902
+ "enableJsonFlag": false,
903
+ "isESM": true,
904
+ "relativePath": [
905
+ "dist",
906
+ "commands",
907
+ "conni",
908
+ "space",
909
+ "list.js"
910
+ ]
896
911
  }
897
912
  },
898
- "version": "0.6.0"
913
+ "version": "0.7.0"
899
914
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hesed/conni",
3
3
  "description": "CLI for Confluence API interaction",
4
- "version": "0.6.0",
4
+ "version": "0.7.0",
5
5
  "author": "Hesed",
6
6
  "bin": {
7
7
  "conni": "./bin/run.js"