@hesed/conni 0.2.1 → 0.3.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.2.1 linux-x64 node-v22.22.0
29
+ @hesed/conni/0.3.1 darwin-arm64 node-v22.14.0
30
30
  $ conni --help [COMMAND]
31
31
  USAGE
32
32
  $ conni COMMAND
@@ -59,12 +59,12 @@ Add Atlassian authentication
59
59
 
60
60
  ```
61
61
  USAGE
62
- $ conni conni auth add -e <value> -t <value> -u <value> [--json]
62
+ $ conni conni auth add [--json] [-e <value>] [-t <value>] [-u <value>]
63
63
 
64
64
  FLAGS
65
- -e, --email=<value> (required) Account email:
66
- -t, --token=<value> (required) API Token:
67
- -u, --url=<value> (required) Atlassian URL (start with https://):
65
+ -e, --email=<value> Account email:
66
+ -t, --token=<value> API Token:
67
+ -u, --url=<value> Atlassian URL (start with https://):
68
68
 
69
69
  GLOBAL FLAGS
70
70
  --json Format output as json.
@@ -76,7 +76,7 @@ EXAMPLES
76
76
  $ conni conni auth add
77
77
  ```
78
78
 
79
- _See code: [src/commands/conni/auth/add.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/auth/add.ts)_
79
+ _See code: [src/commands/conni/auth/add.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/auth/add.ts)_
80
80
 
81
81
  ## `conni conni auth test`
82
82
 
@@ -96,7 +96,7 @@ EXAMPLES
96
96
  $ conni conni auth test
97
97
  ```
98
98
 
99
- _See code: [src/commands/conni/auth/test.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/auth/test.ts)_
99
+ _See code: [src/commands/conni/auth/test.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/auth/test.ts)_
100
100
 
101
101
  ## `conni conni auth update`
102
102
 
@@ -104,12 +104,12 @@ Update existing authentication
104
104
 
105
105
  ```
106
106
  USAGE
107
- $ conni conni auth update -e <value> -t <value> -u <value> [--json]
107
+ $ conni conni auth update [--json] [-e <value>] [-t <value>] [-u <value>]
108
108
 
109
109
  FLAGS
110
- -e, --email=<value> (required) Account email
111
- -t, --token=<value> (required) API Token
112
- -u, --url=<value> (required) Atlassian instance URL (start with https://)
110
+ -e, --email=<value> Account email
111
+ -t, --token=<value> API Token
112
+ -u, --url=<value> Atlassian instance URL (start with https://)
113
113
 
114
114
  GLOBAL FLAGS
115
115
  --json Format output as json.
@@ -121,7 +121,7 @@ EXAMPLES
121
121
  $ conni conni auth update
122
122
  ```
123
123
 
124
- _See code: [src/commands/conni/auth/update.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/auth/update.ts)_
124
+ _See code: [src/commands/conni/auth/update.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/auth/update.ts)_
125
125
 
126
126
  ## `conni conni content attachment PAGEID FILE`
127
127
 
@@ -145,7 +145,7 @@ EXAMPLES
145
145
  $ conni conni content attachment 123456 ./document.pdf
146
146
  ```
147
147
 
148
- _See code: [src/commands/conni/content/attachment.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/attachment.ts)_
148
+ _See code: [src/commands/conni/content/attachment.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/attachment.ts)_
149
149
 
150
150
  ## `conni conni content attachment-download ATTACHMENTID [OUTPUTPATH]`
151
151
 
@@ -171,7 +171,7 @@ EXAMPLES
171
171
  $ conni conni content attachment-download att12345 ./document.pdf
172
172
  ```
173
173
 
174
- _See code: [src/commands/conni/content/attachment-download.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/attachment-download.ts)_
174
+ _See code: [src/commands/conni/content/attachment-download.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/attachment-download.ts)_
175
175
 
176
176
  ## `conni conni content comment PAGEID BODY`
177
177
 
@@ -204,7 +204,7 @@ EXAMPLES
204
204
  $ conni conni content comment 123456 "$(cat content.md)"
205
205
  ```
206
206
 
207
- _See code: [src/commands/conni/content/comment.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/comment.ts)_
207
+ _See code: [src/commands/conni/content/comment.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/comment.ts)_
208
208
 
209
209
  ## `conni conni content comment-delete ID`
210
210
 
@@ -227,7 +227,7 @@ EXAMPLES
227
227
  $ conni conni content comment-delete 1544224770
228
228
  ```
229
229
 
230
- _See code: [src/commands/conni/content/comment-delete.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/comment-delete.ts)_
230
+ _See code: [src/commands/conni/content/comment-delete.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/comment-delete.ts)_
231
231
 
232
232
  ## `conni conni content comment-update ID BODY`
233
233
 
@@ -260,7 +260,7 @@ EXAMPLES
260
260
  $ conni conni content comment-update 1544224770 "$(cat content.md)"
261
261
  ```
262
262
 
263
- _See code: [src/commands/conni/content/comment-update.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/comment-update.ts)_
263
+ _See code: [src/commands/conni/content/comment-update.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/comment-update.ts)_
264
264
 
265
265
  ## `conni conni content create`
266
266
 
@@ -289,13 +289,15 @@ EXAMPLES
289
289
  ls -a
290
290
  ```'
291
291
 
292
+ $ conni conni content create --fields spaceKey="DEV" title="Child page" body="Content" parentId="123456"
293
+
292
294
  FLAG DESCRIPTIONS
293
295
  --fields=<value>... Content fields in key=value format
294
296
 
295
297
  Minimum fields required: spaceKey, title & body
296
298
  ```
297
299
 
298
- _See code: [src/commands/conni/content/create.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/create.ts)_
300
+ _See code: [src/commands/conni/content/create.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/create.ts)_
299
301
 
300
302
  ## `conni conni content delete PAGEID`
301
303
 
@@ -318,7 +320,7 @@ EXAMPLES
318
320
  $ conni conni content delete 1543634992
319
321
  ```
320
322
 
321
- _See code: [src/commands/conni/content/delete.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/delete.ts)_
323
+ _See code: [src/commands/conni/content/delete.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/delete.ts)_
322
324
 
323
325
  ## `conni conni content get PAGEID`
324
326
 
@@ -341,7 +343,7 @@ EXAMPLES
341
343
  $ conni conni content get 1544060948
342
344
  ```
343
345
 
344
- _See code: [src/commands/conni/content/get.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/get.ts)_
346
+ _See code: [src/commands/conni/content/get.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/get.ts)_
345
347
 
346
348
  ## `conni conni content search CQL`
347
349
 
@@ -368,7 +370,7 @@ EXAMPLES
368
370
  $ conni conni content search 'created > startOfMonth()' --limit=5 --expand=body,version
369
371
  ```
370
372
 
371
- _See code: [src/commands/conni/content/search.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/search.ts)_
373
+ _See code: [src/commands/conni/content/search.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/search.ts)_
372
374
 
373
375
  ## `conni conni content update PAGEID`
374
376
 
@@ -402,7 +404,7 @@ EXAMPLES
402
404
  $ conni conni content update 1076199489 --fields body="$(cat content.md)"
403
405
  ```
404
406
 
405
- _See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/content/update.ts)_
407
+ _See code: [src/commands/conni/content/update.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/content/update.ts)_
406
408
 
407
409
  ## `conni conni space get SPACEKEY`
408
410
 
@@ -425,7 +427,7 @@ EXAMPLES
425
427
  $ conni conni space get DEV
426
428
  ```
427
429
 
428
- _See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/space/get.ts)_
430
+ _See code: [src/commands/conni/space/get.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/space/get.ts)_
429
431
 
430
432
  ## `conni conni space list`
431
433
 
@@ -445,5 +447,5 @@ EXAMPLES
445
447
  $ conni conni space list
446
448
  ```
447
449
 
448
- _See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.2.1/src/commands/conni/space/list.ts)_
450
+ _See code: [src/commands/conni/space/list.ts](https://github.com/hesedcasa/conni/blob/v0.3.1/src/commands/conni/space/list.ts)_
449
451
  <!-- commandsstop -->
@@ -8,6 +8,7 @@ export default class ContentCreate extends Command {
8
8
  static examples = [
9
9
  '<%= config.bin %> <%= command.id %> --fields spaceKey="DEV" title="New title" body="New description" status="draft"',
10
10
  '<%= config.bin %> <%= command.id %> --fields spaceKey="DEV" title="New title" body=\'\n# Header\n## Sub-header\n- Item 1\n- Item 2\n```bash\nls -a\n```\'',
11
+ '<%= config.bin %> <%= command.id %> --fields spaceKey="DEV" title="Child page" body="Content" parentId="123456"',
11
12
  ];
12
13
  static flags = {
13
14
  fields: Flags.string({
@@ -114,13 +114,13 @@ export class ConniApi {
114
114
  const parentId = fields.parentId;
115
115
  const status = fields.status;
116
116
  const contentBody = {
117
+ ancestors: parentId ? [{ id: parentId }] : undefined,
117
118
  body: {
118
119
  storage: {
119
120
  representation: 'atlas_doc_format',
120
121
  value: JSON.stringify(bodyContent),
121
122
  },
122
123
  },
123
- parentId,
124
124
  space: { key: spaceKey },
125
125
  status,
126
126
  title,
@@ -19,7 +19,7 @@
19
19
  "char": "e",
20
20
  "description": "Account email:",
21
21
  "name": "email",
22
- "required": true,
22
+ "required": false,
23
23
  "hasDynamicHelp": false,
24
24
  "multiple": false,
25
25
  "type": "option"
@@ -28,7 +28,7 @@
28
28
  "char": "t",
29
29
  "description": "API Token:",
30
30
  "name": "token",
31
- "required": true,
31
+ "required": false,
32
32
  "hasDynamicHelp": false,
33
33
  "multiple": false,
34
34
  "type": "option"
@@ -37,7 +37,7 @@
37
37
  "char": "u",
38
38
  "description": "Atlassian URL (start with https://):",
39
39
  "name": "url",
40
- "required": true,
40
+ "required": false,
41
41
  "hasDynamicHelp": false,
42
42
  "multiple": false,
43
43
  "type": "option"
@@ -112,7 +112,7 @@
112
112
  "char": "e",
113
113
  "description": "Account email",
114
114
  "name": "email",
115
- "required": true,
115
+ "required": false,
116
116
  "hasDynamicHelp": false,
117
117
  "multiple": false,
118
118
  "type": "option"
@@ -121,7 +121,7 @@
121
121
  "char": "t",
122
122
  "description": "API Token",
123
123
  "name": "token",
124
- "required": true,
124
+ "required": false,
125
125
  "hasDynamicHelp": false,
126
126
  "multiple": false,
127
127
  "type": "option"
@@ -130,7 +130,7 @@
130
130
  "char": "u",
131
131
  "description": "Atlassian instance URL (start with https://)",
132
132
  "name": "url",
133
- "required": true,
133
+ "required": false,
134
134
  "hasDynamicHelp": false,
135
135
  "multiple": false,
136
136
  "type": "option"
@@ -153,78 +153,6 @@
153
153
  "update.js"
154
154
  ]
155
155
  },
156
- "conni:space:get": {
157
- "aliases": [],
158
- "args": {
159
- "spaceKey": {
160
- "description": "Space key",
161
- "name": "spaceKey",
162
- "required": true
163
- }
164
- },
165
- "description": "Get details of a Confluence space",
166
- "examples": [
167
- "<%= config.bin %> <%= command.id %> DEV"
168
- ],
169
- "flags": {
170
- "toon": {
171
- "description": "Format output as toon",
172
- "name": "toon",
173
- "required": false,
174
- "allowNo": false,
175
- "type": "boolean"
176
- }
177
- },
178
- "hasDynamicHelp": false,
179
- "hiddenAliases": [],
180
- "id": "conni:space:get",
181
- "pluginAlias": "@hesed/conni",
182
- "pluginName": "@hesed/conni",
183
- "pluginType": "core",
184
- "strict": true,
185
- "enableJsonFlag": false,
186
- "isESM": true,
187
- "relativePath": [
188
- "dist",
189
- "commands",
190
- "conni",
191
- "space",
192
- "get.js"
193
- ]
194
- },
195
- "conni:space:list": {
196
- "aliases": [],
197
- "args": {},
198
- "description": "List all Confluence spaces",
199
- "examples": [
200
- "<%= config.bin %> <%= command.id %>"
201
- ],
202
- "flags": {
203
- "toon": {
204
- "description": "Format output as toon",
205
- "name": "toon",
206
- "required": false,
207
- "allowNo": false,
208
- "type": "boolean"
209
- }
210
- },
211
- "hasDynamicHelp": false,
212
- "hiddenAliases": [],
213
- "id": "conni:space:list",
214
- "pluginAlias": "@hesed/conni",
215
- "pluginName": "@hesed/conni",
216
- "pluginType": "core",
217
- "strict": true,
218
- "enableJsonFlag": false,
219
- "isESM": true,
220
- "relativePath": [
221
- "dist",
222
- "commands",
223
- "conni",
224
- "space",
225
- "list.js"
226
- ]
227
- },
228
156
  "conni:content:attachment-download": {
229
157
  "aliases": [],
230
158
  "args": {
@@ -449,7 +377,8 @@
449
377
  "description": "Create a new Confluence page",
450
378
  "examples": [
451
379
  "<%= config.bin %> <%= command.id %> --fields spaceKey=\"DEV\" title=\"New title\" body=\"New description\" status=\"draft\"",
452
- "<%= config.bin %> <%= command.id %> --fields spaceKey=\"DEV\" title=\"New title\" body='\n# Header\n## Sub-header\n- Item 1\n- Item 2\n```bash\nls -a\n```'"
380
+ "<%= config.bin %> <%= command.id %> --fields spaceKey=\"DEV\" title=\"New title\" body='\n# Header\n## Sub-header\n- Item 1\n- Item 2\n```bash\nls -a\n```'",
381
+ "<%= config.bin %> <%= command.id %> --fields spaceKey=\"DEV\" title=\"Child page\" body=\"Content\" parentId=\"123456\""
453
382
  ],
454
383
  "flags": {
455
384
  "fields": {
@@ -661,7 +590,79 @@
661
590
  "content",
662
591
  "update.js"
663
592
  ]
593
+ },
594
+ "conni:space:get": {
595
+ "aliases": [],
596
+ "args": {
597
+ "spaceKey": {
598
+ "description": "Space key",
599
+ "name": "spaceKey",
600
+ "required": true
601
+ }
602
+ },
603
+ "description": "Get details of a Confluence space",
604
+ "examples": [
605
+ "<%= config.bin %> <%= command.id %> DEV"
606
+ ],
607
+ "flags": {
608
+ "toon": {
609
+ "description": "Format output as toon",
610
+ "name": "toon",
611
+ "required": false,
612
+ "allowNo": false,
613
+ "type": "boolean"
614
+ }
615
+ },
616
+ "hasDynamicHelp": false,
617
+ "hiddenAliases": [],
618
+ "id": "conni:space:get",
619
+ "pluginAlias": "@hesed/conni",
620
+ "pluginName": "@hesed/conni",
621
+ "pluginType": "core",
622
+ "strict": true,
623
+ "enableJsonFlag": false,
624
+ "isESM": true,
625
+ "relativePath": [
626
+ "dist",
627
+ "commands",
628
+ "conni",
629
+ "space",
630
+ "get.js"
631
+ ]
632
+ },
633
+ "conni:space:list": {
634
+ "aliases": [],
635
+ "args": {},
636
+ "description": "List all Confluence spaces",
637
+ "examples": [
638
+ "<%= config.bin %> <%= command.id %>"
639
+ ],
640
+ "flags": {
641
+ "toon": {
642
+ "description": "Format output as toon",
643
+ "name": "toon",
644
+ "required": false,
645
+ "allowNo": false,
646
+ "type": "boolean"
647
+ }
648
+ },
649
+ "hasDynamicHelp": false,
650
+ "hiddenAliases": [],
651
+ "id": "conni:space:list",
652
+ "pluginAlias": "@hesed/conni",
653
+ "pluginName": "@hesed/conni",
654
+ "pluginType": "core",
655
+ "strict": true,
656
+ "enableJsonFlag": false,
657
+ "isESM": true,
658
+ "relativePath": [
659
+ "dist",
660
+ "commands",
661
+ "conni",
662
+ "space",
663
+ "list.js"
664
+ ]
664
665
  }
665
666
  },
666
- "version": "0.2.1"
667
+ "version": "0.3.1"
667
668
  }
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.2.1",
4
+ "version": "0.3.1",
5
5
  "author": "Hesed",
6
6
  "bin": {
7
7
  "conni": "./bin/run.js"
@@ -16,7 +16,7 @@
16
16
  "marklassian": "^1.1.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@eslint/compat": "^1",
19
+ "@eslint/compat": "^2",
20
20
  "@oclif/prettier-config": "^0.2.1",
21
21
  "@oclif/test": "^4",
22
22
  "@types/chai": "^5",