confluencedc-cli 0.0.5 → 0.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,QAelC"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAezC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function deleteComment(parent: Command): void;
3
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAcnD"}
@@ -0,0 +1,19 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ import { output, handleError } from '../../utils/output.js';
3
+ export function deleteComment(parent) {
4
+ parent
5
+ .command('delete <commentId>')
6
+ .description('Delete a comment')
7
+ .addHelpText('after', '\nExamples:\n confluencedc comment delete 67890')
8
+ .action(async (commentId) => {
9
+ try {
10
+ const client = getClient();
11
+ await client.comments.delete({ commentId });
12
+ output({ deleted: true, commentId });
13
+ }
14
+ catch (err) {
15
+ handleError(err);
16
+ }
17
+ });
18
+ }
19
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/comment/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,aAAa,CAAC,MAAe;IAC3C,MAAM;SACH,OAAO,CAAC,oBAAoB,CAAC;SAC7B,WAAW,CAAC,kBAAkB,CAAC;SAC/B,WAAW,CAAC,OAAO,EAAE,kDAAkD,CAAC;SACxE,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,EAAE;QAClC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YAC5C,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAcvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmB9D"}
@@ -1,5 +1,8 @@
1
1
  import { add } from './add.js';
2
+ import { deleteComment } from './delete.js';
2
3
  import { list } from './list.js';
4
+ import { reply } from './reply.js';
5
+ import { update } from './update.js';
3
6
  export function registerCommentCommands(program) {
4
7
  const comment = program
5
8
  .command('comment')
@@ -8,8 +11,13 @@ export function registerCommentCommands(program) {
8
11
  Examples:
9
12
  $ confluencedc comment list 12345
10
13
  $ confluencedc comment add 12345 --body "Great work!"
14
+ $ confluencedc comment update 67890 --body "Updated" --version 1
15
+ $ confluencedc comment delete 67890
11
16
  `);
12
17
  list(comment);
13
18
  add(comment);
19
+ update(comment);
20
+ deleteComment(comment);
21
+ reply(comment);
14
22
  }
15
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/comment/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,oBAAoB,CAAC;SACjC,WAAW,CACV,OAAO,EACP;;;;CAIL,CACI,CAAC;IACJ,IAAI,CAAC,OAAO,CAAC,CAAC;IACd,GAAG,CAAC,OAAO,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/comment/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,oBAAoB,CAAC;SACjC,WAAW,CACV,OAAO,EACP;;;;;;CAML,CACI,CAAC;IACJ,IAAI,CAAC,OAAO,CAAC,CAAC;IACd,GAAG,CAAC,OAAO,CAAC,CAAC;IACb,MAAM,CAAC,OAAO,CAAC,CAAC;IAChB,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,KAAK,CAAC,OAAO,CAAC,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,QAoBnC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAoB1C"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function reply(parent: Command): void;
3
+ //# sourceMappingURL=reply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAoB3C"}
@@ -0,0 +1,25 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ import { output, handleError } from '../../utils/output.js';
3
+ export function reply(parent) {
4
+ parent
5
+ .command('reply <commentId>')
6
+ .description('Reply to a comment')
7
+ .requiredOption('--page <pageId>', 'Page ID the comment belongs to')
8
+ .requiredOption('--body <text>', 'Reply body in wiki markup')
9
+ .addHelpText('after', '\nExamples:\n confluencedc comment reply 67890 --page 12345 --body "Good point, agreed."')
10
+ .action(async (commentId, opts) => {
11
+ try {
12
+ const client = getClient();
13
+ const result = await client.comments.reply({
14
+ pageId: opts.page,
15
+ parentCommentId: commentId,
16
+ body: opts.body,
17
+ });
18
+ output(result);
19
+ }
20
+ catch (err) {
21
+ handleError(err);
22
+ }
23
+ });
24
+ }
25
+ //# sourceMappingURL=reply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reply.js","sourceRoot":"","sources":["../../../src/commands/comment/reply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,KAAK,CAAC,MAAe;IACnC,MAAM;SACH,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,oBAAoB,CAAC;SACjC,cAAc,CAAC,iBAAiB,EAAE,gCAAgC,CAAC;SACnE,cAAc,CAAC,eAAe,EAAE,2BAA2B,CAAC;SAC5D,WAAW,CAAC,OAAO,EAAE,2FAA2F,CAAC;SACjH,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,IAAoC,EAAE,EAAE;QACxE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;gBACzC,MAAM,EAAE,IAAI,CAAC,IAAI;gBACjB,eAAe,EAAE,SAAS;gBAC1B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function update(parent: Command): void;
3
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/comment/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAiB5C"}
@@ -0,0 +1,22 @@
1
+ import { getClient } from '../../utils/client.js';
2
+ import { output, handleError } from '../../utils/output.js';
3
+ export function update(parent) {
4
+ parent
5
+ .command('update <commentId>')
6
+ .description('Update a comment')
7
+ .requiredOption('--body <text>', 'New comment body in wiki markup')
8
+ .addHelpText('after', '\nExamples:\n confluencedc comment update 67890 --body "Updated text"')
9
+ .action(async (commentId, opts) => {
10
+ try {
11
+ const client = getClient();
12
+ const current = await client.comments.getById(commentId);
13
+ const version = current.version?.number ?? 1;
14
+ const result = await client.comments.update({ commentId, body: opts.body, version });
15
+ output(result);
16
+ }
17
+ catch (err) {
18
+ handleError(err);
19
+ }
20
+ });
21
+ }
22
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/comment/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,MAAM;SACH,OAAO,CAAC,oBAAoB,CAAC;SAC7B,WAAW,CAAC,kBAAkB,CAAC;SAC/B,cAAc,CAAC,eAAe,EAAE,iCAAiC,CAAC;SAClE,WAAW,CAAC,OAAO,EAAE,wEAAwE,CAAC;SAC9F,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,IAAsB,EAAE,EAAE;QAC1D,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACzD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC;YAC7C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;YACrF,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluencedc-cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "publish": true,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "commander": "^13.1.0",
15
15
  "dotenv": "17.2.3",
16
- "confluence-data-center-client": "0.0.6"
16
+ "confluence-data-center-client": "0.0.8"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "24.10.4",