@bifos/dooray-cli 0.15.0 → 0.16.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/dist/index.js CHANGED
@@ -24,8 +24,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
 
26
26
  // src/index.ts
27
- var import_commander67 = require("commander");
28
- var import_chalk8 = __toESM(require("chalk"));
27
+ var import_commander68 = require("commander");
28
+ var import_chalk9 = __toESM(require("chalk"));
29
29
 
30
30
  // src/commands/config.ts
31
31
  var import_commander = require("commander");
@@ -143,6 +143,19 @@ async function saveConfig(config) {
143
143
  await ensureDir();
144
144
  await (0, import_promises.writeFile)(CONFIG_PATH, JSON.stringify(config, null, 2) + "\n");
145
145
  }
146
+ function removeMailCredentials(config) {
147
+ const next = { ...config };
148
+ delete next.imapUsername;
149
+ delete next.imapPassword;
150
+ return next;
151
+ }
152
+ async function clearMailCredentials() {
153
+ const config = await getConfig();
154
+ if (!config) return false;
155
+ const hadCredentials = !!(config.imapUsername || config.imapPassword);
156
+ await saveConfig(removeMailCredentials(config));
157
+ return hadCredentials;
158
+ }
146
159
 
147
160
  // src/commands/config.ts
148
161
  function maskApiKey(key) {
@@ -372,7 +385,7 @@ var import_node_path3 = __toESM(require("path"));
372
385
  var import_node_os3 = require("os");
373
386
 
374
387
  // src/version.ts
375
- var CLI_VERSION = true ? "0.15.0" : "0.0.0-dev";
388
+ var CLI_VERSION = true ? "0.16.0" : "0.0.0-dev";
376
389
 
377
390
  // src/skill/context.ts
378
391
  function resolveSkillDataRoot(homeDir, xdgDataHome = process.env.XDG_DATA_HOME) {
@@ -2287,7 +2300,7 @@ async function resolveMemberGroup(client, projectId, input2) {
2287
2300
  }
2288
2301
  const adapter = valid.map((g) => ({ name: g.code, id: g.id, code: g.code }));
2289
2302
  const match = matchByName(adapter, input2, "\uADF8\uB8F9", (g) => `${g.code} (${g.id})`, {
2290
- helpHint: "\uC804\uCCB4 \uBAA9\uB85D: `dooray project groups <project>` / id \uC9C1\uC811 \uC785\uB825\uB3C4 \uAC00\uB2A5 (15+\uC790\uB9AC numeric \u2014 code \uB204\uB77D \uADF8\uB8F9\uB3C4 \uB9E4\uCE6D, ADR-028)"
2303
+ helpHint: "\uC804\uCCB4 \uBAA9\uB85D: `dooray project groups <project>` / id \uC9C1\uC811 \uC785\uB825\uB3C4 \uAC00\uB2A5 (15+\uC790\uB9AC numeric \u2014 code \uB204\uB77D \uADF8\uB8F9\uB3C4 \uB9E4\uCE6D)"
2291
2304
  });
2292
2305
  return { id: match.id, code: match.code };
2293
2306
  }
@@ -3222,6 +3235,7 @@ var postEditCommand = new import_commander15.Command("edit").description("\uC5C5
3222
3235
  const toGroups = (opts.toGroup ?? []).filter((s) => s.length > 0);
3223
3236
  const tagAdditions = (opts.tag ?? []).filter((s) => s.length > 0);
3224
3237
  const tagRemovals = (opts.tagRemove ?? []).filter((s) => s.length > 0);
3238
+ const hasParticipantChange = ccNames.length > 0 || ccGroups.length > 0 || !!opts.ccClear || toNames.length > 0 || toGroups.length > 0 || !!opts.toClear;
3225
3239
  const hasTagChange = tagAdditions.length > 0 || tagRemovals.length > 0 || !!opts.tagClear;
3226
3240
  startSpinner("\uC5C5\uBB34 \uC870\uD68C \uC911...");
3227
3241
  const { projectId, postId, postNumber, projectCode } = await resolvePostInput(client, {
@@ -3240,7 +3254,7 @@ var postEditCommand = new import_commander15.Command("edit").description("\uC5C5
3240
3254
  "\u26A0 --subject\uB294 deprecated\uC785\uB2C8\uB2E4. \uB300\uC2E0 --title\uC744 \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.\n"
3241
3255
  );
3242
3256
  }
3243
- const nonInteractive = title || opts.body || opts.bodyFile || hasTagChange;
3257
+ const nonInteractive = title || opts.body || opts.bodyFile || hasTagChange || hasParticipantChange;
3244
3258
  if (nonInteractive) {
3245
3259
  let newBody = await readBodyInputOrNull(opts);
3246
3260
  if (newBody != null && !opts.dryRun) {
@@ -3355,11 +3369,6 @@ var postEditCommand = new import_commander15.Command("edit").description("\uC5C5
3355
3369
  "\u26A0 --link-task \uB294 --title/--body \uC640 \uD568\uAED8 \uC0AC\uC6A9 \uC2DC\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4.\n"
3356
3370
  );
3357
3371
  }
3358
- if (ccNames.length > 0 || ccGroups.length > 0 || opts.ccClear || toNames.length > 0 || toGroups.length > 0 || opts.toClear) {
3359
- process.stderr.write(
3360
- "\u26A0 --cc/--cc-group/--cc-clear/--to/--to-group/--to-clear \uB294 --title/--body \uC640 \uD568\uAED8 \uC0AC\uC6A9 \uC2DC\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4.\n"
3361
- );
3362
- }
3363
3372
  if (opts.parent) {
3364
3373
  process.stderr.write(
3365
3374
  "\u26A0 --parent \uB294 --title/--body \uC640 \uD568\uAED8 \uC0AC\uC6A9 \uC2DC\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4.\n"
@@ -3438,7 +3447,7 @@ function postUserToCreate(u) {
3438
3447
  group: u.group
3439
3448
  };
3440
3449
  }
3441
- var postCreateCommand = new import_commander16.Command("create").description("\uC5C5\uBB34 \uC0DD\uC131").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").option("--title <title>", "\uC5C5\uBB34 \uC81C\uBAA9").option("--subject <subject>", "--title\uC758 deprecated alias").option("--to <members...>", "\uB2F4\uB2F9\uC790 (\uC774\uB984 \uB610\uB294 \uC774\uBA54\uC77C, \uC5EC\uB7EC \uBA85 \uAC00\uB2A5)").option("--to-group <code>", "\uB2F4\uB2F9\uC790(to) \uADF8\uB8F9 \uCD94\uAC00 (\uBC18\uBCF5 \uAC00\uB2A5, \uADF8\uB8F9 \uCF54\uB4DC \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--cc <members...>", "\uCC38\uC870\uC790 (\uC774\uB984 \uB610\uB294 \uC774\uBA54\uC77C, \uC5EC\uB7EC \uBA85 \uAC00\uB2A5)").option("--cc-group <code>", "\uCC38\uC870\uC790(cc) \uADF8\uB8F9 \uCD94\uAC00 (\uBC18\uBCF5 \uAC00\uB2A5, \uADF8\uB8F9 \uCF54\uB4DC \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--body <text>", "\uBCF8\uBB38 \uD14D\uC2A4\uD2B8 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--priority <level>", "\uC6B0\uC120\uC21C\uC704 (highest, high, normal, low, lowest)", "normal").option("--due-date <date>", "\uB9C8\uAC10\uC77C (ISO 8601 \uD615\uC2DD)").option("--tag <name>", "\uD0DC\uADF8 \uC774\uB984 (\uBC18\uBCF5 \uAC00\uB2A5)", (value, prev) => [...prev, value], []).option("--mention <name>", "\uBA64\uBC84 \uBA58\uC158 (\uBC18\uBCF5 \uAC00\uB2A5, \uC774\uB984 \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--mention-group <code>", "\uADF8\uB8F9 \uBA58\uC158 (\uBC18\uBCF5 \uAC00\uB2A5, code \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--link-task <ref>", "\uB2E4\uB978 \uC5C5\uBB34 \uB9C1\uD06C \uCD94\uAC00 (<project>/<number> \uB610\uB294 postId, \uBC18\uBCF5 \uAC00\uB2A5)", (v, prev) => [...prev, v], []).option("--parent <ref>", "\uBD80\uBAA8 \uC5C5\uBB34 (project/number \uB610\uB294 postId)").option("--template <ref>", "\uD15C\uD50C\uB9BF \uC774\uB984 \uB610\uB294 ID \u2014 body/users/tags \uC790\uB3D9 \uCC44\uC6C0 (\uC0AC\uC6A9\uC790 \uC635\uC158 \uC6B0\uC120 override, ADR-027)").option("--workflow <name>", "\uCD08\uAE30 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC774\uB984 \uB610\uB294 class").option("--milestone <name>", "\uB9C8\uC77C\uC2A4\uD1A4 \uC774\uB984").option("--dry-run", "API \uD638\uCD9C \uC5C6\uC774 \uD569\uC131\uB41C \uBCF8\uBB38\uB9CC stdout \uCD9C\uB825 (mention/link-task \uC801\uC6A9 \uACB0\uACFC \uBBF8\uB9AC\uBCF4\uAE30)").action(async (project, opts) => {
3450
+ var postCreateCommand = new import_commander16.Command("create").description("\uC5C5\uBB34 \uC0DD\uC131").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").option("--title <title>", "\uC5C5\uBB34 \uC81C\uBAA9").option("--subject <subject>", "--title\uC758 deprecated alias").option("--to <members...>", "\uB2F4\uB2F9\uC790 (\uC774\uB984 \uB610\uB294 \uC774\uBA54\uC77C, \uC5EC\uB7EC \uBA85 \uAC00\uB2A5)").option("--to-group <code>", "\uB2F4\uB2F9\uC790(to) \uADF8\uB8F9 \uCD94\uAC00 (\uBC18\uBCF5 \uAC00\uB2A5, \uADF8\uB8F9 \uCF54\uB4DC \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--cc <members...>", "\uCC38\uC870\uC790 (\uC774\uB984 \uB610\uB294 \uC774\uBA54\uC77C, \uC5EC\uB7EC \uBA85 \uAC00\uB2A5)").option("--cc-group <code>", "\uCC38\uC870\uC790(cc) \uADF8\uB8F9 \uCD94\uAC00 (\uBC18\uBCF5 \uAC00\uB2A5, \uADF8\uB8F9 \uCF54\uB4DC \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--body <text>", "\uBCF8\uBB38 \uD14D\uC2A4\uD2B8 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--priority <level>", "\uC6B0\uC120\uC21C\uC704 (highest, high, normal, low, lowest)", "normal").option("--due-date <date>", "\uB9C8\uAC10\uC77C (ISO 8601 \uD615\uC2DD)").option("--tag <name>", "\uD0DC\uADF8 \uC774\uB984 (\uBC18\uBCF5 \uAC00\uB2A5)", (value, prev) => [...prev, value], []).option("--mention <name>", "\uBA64\uBC84 \uBA58\uC158 (\uBC18\uBCF5 \uAC00\uB2A5, \uC774\uB984 \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--mention-group <code>", "\uADF8\uB8F9 \uBA58\uC158 (\uBC18\uBCF5 \uAC00\uB2A5, code \uBD80\uBD84\uC77C\uCE58)", (v, prev) => [...prev, v], []).option("--link-task <ref>", "\uB2E4\uB978 \uC5C5\uBB34 \uB9C1\uD06C \uCD94\uAC00 (<project>/<number> \uB610\uB294 postId, \uBC18\uBCF5 \uAC00\uB2A5)", (v, prev) => [...prev, v], []).option("--parent <ref>", "\uBD80\uBAA8 \uC5C5\uBB34 (project/number \uB610\uB294 postId)").option("--template <ref>", "\uD15C\uD50C\uB9BF \uC774\uB984 \uB610\uB294 ID \u2014 body/users/tags \uC790\uB3D9 \uCC44\uC6C0 (\uC0AC\uC6A9\uC790 \uC635\uC158 \uC6B0\uC120)").option("--workflow <name>", "\uCD08\uAE30 \uC6CC\uD06C\uD50C\uB85C\uC6B0 \uC774\uB984 \uB610\uB294 class").option("--milestone <name>", "\uB9C8\uC77C\uC2A4\uD1A4 \uC774\uB984").option("--dry-run", "API \uD638\uCD9C \uC5C6\uC774 \uD569\uC131\uB41C \uBCF8\uBB38\uB9CC stdout \uCD9C\uB825 (mention/link-task \uC801\uC6A9 \uACB0\uACFC \uBBF8\uB9AC\uBCF4\uAE30)").action(async (project, opts) => {
3442
3451
  const globalOpts = postCreateCommand.optsWithGlobals();
3443
3452
  const config = await getConfigOrThrow();
3444
3453
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -4021,7 +4030,36 @@ var commentEditCommand = new import_commander22.Command("edit").description("\uB
4021
4030
 
4022
4031
  // src/commands/post/comment/delete.ts
4023
4032
  var import_commander23 = require("commander");
4024
- var commentDeleteCommand = new import_commander23.Command("delete").description("\uB313\uAE00 \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC / Dooray URL / \uB313\uAE00 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 \uB313\uAE00 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg3]", "\uB313\uAE00 ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <commentId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, opts) => {
4033
+
4034
+ // src/utils/delete-confirmation.ts
4035
+ async function authorizeDeletion(skipConfirmation, isTTY, confirmDeletion) {
4036
+ if (skipConfirmation) {
4037
+ return true;
4038
+ }
4039
+ if (!isTTY) {
4040
+ throw new DoorayCliError(
4041
+ "non-TTY \uD658\uACBD\uC5D0\uC11C\uB294 \uC0AD\uC81C \uD655\uC778\uC744 \uC9C4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. --yes(-y) \uD50C\uB798\uADF8\uB85C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694.",
4042
+ EXIT_PARAM_ERROR
4043
+ );
4044
+ }
4045
+ return confirmDeletion();
4046
+ }
4047
+ async function promptDeletion(message) {
4048
+ const { confirm: confirm2 } = await import("@inquirer/prompts");
4049
+ return confirm2({ message, default: false });
4050
+ }
4051
+
4052
+ // src/commands/post/comment/delete.ts
4053
+ var commentDeleteCommand = new import_commander23.Command("delete").description("\uB313\uAE00 \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC / Dooray URL / \uB313\uAE00 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 \uB313\uAE00 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg3]", "\uB313\uAE00 ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <commentId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, arg3, opts) => {
4054
+ const confirmed = await authorizeDeletion(
4055
+ !!opts.yes,
4056
+ !!process.stdin.isTTY,
4057
+ () => promptDeletion("\uC5C5\uBB34 \uB313\uAE00\uC744 \uC601\uAD6C \uC0AD\uC81C\uD560\uAE4C\uC694?")
4058
+ );
4059
+ if (!confirmed) {
4060
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
4061
+ return;
4062
+ }
4025
4063
  const config = await getConfigOrThrow();
4026
4064
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
4027
4065
  let projectArg;
@@ -4302,9 +4340,11 @@ var import_commander26 = require("commander");
4302
4340
  var import_node_path7 = require("path");
4303
4341
 
4304
4342
  // src/utils/comment-files.ts
4343
+ var IMAGE_FILE_EXTENSION_RE = /\.(png|jpe?g|gif|webp|bmp|svg|avif|heic)$/i;
4305
4344
  function appendFileReference(body, fileName, fileId) {
4306
4345
  const safeName = fileName.replace(/[\[\]]/g, "");
4307
- const ref = `![${safeName}](/files/${fileId})`;
4346
+ const prefix = IMAGE_FILE_EXTENSION_RE.test(safeName) ? "!" : "";
4347
+ const ref = `${prefix}[${safeName}](/files/${fileId})`;
4308
4348
  if (body.length === 0) return ref;
4309
4349
  const trailing = body.endsWith("\n") ? "" : "\n";
4310
4350
  return `${body}${trailing}
@@ -4312,14 +4352,14 @@ ${ref}`;
4312
4352
  }
4313
4353
  function removeFileReference(body, fileId) {
4314
4354
  const escaped = fileId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4315
- const refSource = `!\\[[^\\]]*\\]\\(/files/${escaped}\\)`;
4355
+ const refSource = `!?\\[[^\\]]*\\]\\(/files/${escaped}\\)`;
4316
4356
  const lineRe = new RegExp(`^[ \\t]*${refSource}[ \\t]*$\\n?`, "gm");
4317
4357
  const inlineRe = new RegExp(refSource, "g");
4318
4358
  return body.replace(lineRe, "").replace(inlineRe, "");
4319
4359
  }
4320
4360
 
4321
4361
  // src/commands/post/comment/file/upload.ts
4322
- var uploadCommentFileCommand = new import_commander26.Command("upload").description("\uB313\uAE00\uC5D0 \uD30C\uC77C \uC5C5\uB85C\uB4DC (post-level \uD30C\uC77C \uC5C5\uB85C\uB4DC + \uB313\uAE00 reference \uCD94\uAC00, ADR-024)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uB313\uAE00 ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg3]", "\uB313\uAE00 ID (positional \uBAA8\uB4DC)").argument("[arg4]", "\uD30C\uC77C \uACBD\uB85C (positional \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <logId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("--file <path>", "\uC5C5\uB85C\uB4DC\uD560 \uD30C\uC77C \uACBD\uB85C (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, arg4, opts) => {
4362
+ var uploadCommentFileCommand = new import_commander26.Command("upload").description("\uB313\uAE00\uC5D0 \uD30C\uC77C \uC5C5\uB85C\uB4DC (\uBCF8\uBB38\uC5D0 reference \uC790\uB3D9 \uCD94\uAC00)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uB313\uAE00 ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg3]", "\uB313\uAE00 ID (positional \uBAA8\uB4DC)").argument("[arg4]", "\uD30C\uC77C \uACBD\uB85C (positional \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <logId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("--file <path>", "\uC5C5\uB85C\uB4DC\uD560 \uD30C\uC77C \uACBD\uB85C (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, arg4, opts) => {
4323
4363
  const globalOpts = uploadCommentFileCommand.optsWithGlobals();
4324
4364
  const config = await getConfigOrThrow();
4325
4365
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -4400,7 +4440,18 @@ var downloadCommentFileCommand = new import_commander27.Command("download").desc
4400
4440
 
4401
4441
  // src/commands/post/comment/file/delete.ts
4402
4442
  var import_commander28 = require("commander");
4403
- var deleteCommentFileCommand = new import_commander28.Command("delete").description("\uB313\uAE00 \uCCA8\uBD80 \uD30C\uC77C \uC0AD\uC81C (\uB313\uAE00 \uBCF8\uBB38 reference \uC81C\uAC70 + \uD30C\uC77C \uC0AD\uC81C, ADR-024)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uB313\uAE00 ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uB313\uAE00 ID (positional \uBAA8\uB4DC)").argument("[arg4]", "\uD30C\uC77C ID (positional \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <logId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").option("--yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C").action(async (arg1, arg2, arg3, arg4, opts) => {
4443
+ var deleteCommentFileCommand = new import_commander28.Command("delete").description("\uB313\uAE00 \uCCA8\uBD80 \uD30C\uC77C \uC0AD\uC81C (\uBCF8\uBB38 reference \uC81C\uAC70\uC640 \uD30C\uC77C \uC0AD\uC81C\uB97C \uD568\uAED8 \uC218\uD589)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uB313\uAE00 ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uB313\uAE00 ID (positional \uBAA8\uB4DC)").argument("[arg4]", "\uD30C\uC77C ID (positional \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--comment-id <logId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, arg3, arg4, opts) => {
4444
+ const confirmed = await authorizeDeletion(
4445
+ !!opts.yes,
4446
+ !!process.stdin.isTTY,
4447
+ () => promptDeletion(
4448
+ "\uB313\uAE00 \uBCF8\uBB38\uC5D0\uC11C \uD30C\uC77C reference\uB97C \uC81C\uAC70\uD558\uACE0 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uAC19\uC740 \uC5C5\uBB34\uC758 \uB2E4\uB978 \uB313\uAE00\uC774 \uAC19\uC740 \uD30C\uC77C ID\uB97C \uCC38\uC870\uD558\uBA74 \uB9C1\uD06C\uAC00 \uAE68\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"
4449
+ )
4450
+ );
4451
+ if (!confirmed) {
4452
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
4453
+ return;
4454
+ }
4404
4455
  const config = await getConfigOrThrow();
4405
4456
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
4406
4457
  const { projectId, postId, commentId, secondary: fileId } = await resolveCommentFileInput(client, {
@@ -4415,16 +4466,6 @@ var deleteCommentFileCommand = new import_commander28.Command("delete").descript
4415
4466
  requireSecondary: true,
4416
4467
  secondaryLabel: FILE_ID_SECONDARY_LABEL
4417
4468
  });
4418
- if (!opts.yes) {
4419
- const { confirm: confirm2 } = await import("@inquirer/prompts");
4420
- const ok = await confirm2({
4421
- message: `\uB313\uAE00 \uBCF8\uBB38\uC5D0\uC11C reference \uB97C \uC81C\uAC70\uD558\uACE0 \uD30C\uC77C(${fileId})\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uAC19\uC740 post \uC758 \uB2E4\uB978 \uB313\uAE00\uC5D0\uC11C \uAC19\uC740 \uD30C\uC77C ID \uB97C \uCC38\uC870\uD558\uB294 \uACBD\uC6B0 broken \uB429\uB2C8\uB2E4. \uACC4\uC18D\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`
4422
- });
4423
- if (!ok) {
4424
- process.stdout.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
4425
- return;
4426
- }
4427
- }
4428
4469
  startSpinner("\uB313\uAE00 \uBCF8\uBB38 reference \uC81C\uAC70 \uC911...");
4429
4470
  try {
4430
4471
  const commentRes = await client.getPostComment(projectId, postId, commentId);
@@ -4457,7 +4498,7 @@ var deleteCommentFileCommand = new import_commander28.Command("delete").descript
4457
4498
  });
4458
4499
 
4459
4500
  // src/commands/post/comment/file/index.ts
4460
- var commentFileCommand = new import_commander29.Command("file").description("\uB313\uAE00 \uCCA8\uBD80 \uD30C\uC77C \uAD00\uB9AC (post-level files API + \uB313\uAE00 PUT \uD569\uC131, ADR-024)").addCommand(listCommentFileCommand).addCommand(uploadCommentFileCommand).addCommand(downloadCommentFileCommand).addCommand(deleteCommentFileCommand);
4501
+ var commentFileCommand = new import_commander29.Command("file").description("\uB313\uAE00 \uCCA8\uBD80 \uD30C\uC77C \uAD00\uB9AC").addCommand(listCommentFileCommand).addCommand(uploadCommentFileCommand).addCommand(downloadCommentFileCommand).addCommand(deleteCommentFileCommand);
4461
4502
 
4462
4503
  // src/commands/post/file/list.ts
4463
4504
  var import_commander30 = require("commander");
@@ -4712,7 +4753,16 @@ var fileUploadCommand = new import_commander33.Command("upload").description("\u
4712
4753
 
4713
4754
  // src/commands/post/file/delete.ts
4714
4755
  var import_commander34 = require("commander");
4715
- var fileDeleteCommand = new import_commander34.Command("delete").description("\uCCA8\uBD80\uD30C\uC77C \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uD30C\uC77C ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, opts) => {
4756
+ var fileDeleteCommand = new import_commander34.Command("delete").description("\uCCA8\uBD80\uD30C\uC77C \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg2]", "\uC5C5\uBB34 \uBC88\uD638 \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uD30C\uC77C ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <postId>", "Dooray post ID (project/post-number \uB300\uC2E0)").option("--url <url>", "Dooray \uC5C5\uBB34 URL (project/post-number \uB300\uC2E0)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, arg3, opts) => {
4757
+ const confirmed = await authorizeDeletion(
4758
+ !!opts.yes,
4759
+ !!process.stdin.isTTY,
4760
+ () => promptDeletion("\uC5C5\uBB34\uC758 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC601\uAD6C \uC0AD\uC81C\uD560\uAE4C\uC694?")
4761
+ );
4762
+ if (!confirmed) {
4763
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
4764
+ return;
4765
+ }
4716
4766
  const globalOpts = fileDeleteCommand.optsWithGlobals();
4717
4767
  const config = await getConfigOrThrow();
4718
4768
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -5044,7 +5094,7 @@ var wikiPageEditCommand = new import_commander40.Command("edit").description("\u
5044
5094
  var import_commander41 = require("commander");
5045
5095
 
5046
5096
  // src/resolvers/wiki-page-input.ts
5047
- var INPUT_HELP2 = "\uC704\uD0A4 \uD398\uC774\uC9C0\uB97C \uC2DD\uBCC4\uD560 \uC815\uBCF4\uAC00 \uBD80\uC871\uD569\uB2C8\uB2E4. \uB2E4\uC74C \uC911 \uD558\uB098\uB97C \uC785\uB825\uD558\uC138\uC694:\n - <project> <page-id> \uC608: my-project 4071828729722696495\n - --id <page-id> --project <project> (\uB610\uB294 --url)\n - <Dooray URL> \uC608: https://x.dooray.com/wiki/<wikiId>/<pageId>";
5097
+ var INPUT_HELP2 = "\uC704\uD0A4 \uD398\uC774\uC9C0\uB97C \uC2DD\uBCC4\uD560 \uC815\uBCF4\uAC00 \uBD80\uC871\uD569\uB2C8\uB2E4. \uB2E4\uC74C \uC911 \uD558\uB098\uB97C \uC785\uB825\uD558\uC138\uC694:\n - <project> <page-id> \uC608: my-project 9876543210987654321\n - --id <page-id> --project <project> (\uB610\uB294 --url)\n - <Dooray URL> \uC608: https://x.dooray.com/wiki/<wikiId>/<pageId>";
5048
5098
  async function resolveWikiPageInput(client, args) {
5049
5099
  const { projectArg, pageIdArg, idOpt, urlOpt, project } = args;
5050
5100
  const hasPositional = !!projectArg || !!pageIdArg;
@@ -5099,6 +5149,17 @@ async function resolveWikiPageInput(client, args) {
5099
5149
 
5100
5150
  // src/commands/wiki/page-delete.ts
5101
5151
  var wikiPageDeleteCommand = new import_commander41.Command("delete").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uC0AD\uC81C (\uBE44\uACF5\uC2DD endpoint)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray Wiki URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uBBF8\uC0AC\uC6A9").argument("[arg2]", "page-id (positional 2\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, opts) => {
5152
+ const confirmed = await authorizeDeletion(
5153
+ !!opts.yes,
5154
+ !!process.stdin.isTTY,
5155
+ () => promptDeletion(
5156
+ "\uC704\uD0A4 \uD398\uC774\uC9C0\uB97C \uC0AD\uC81C\uD560\uAE4C\uC694? \uD558\uC704 \uD398\uC774\uC9C0\uAC00 \uC788\uC73C\uBA74 \uC0AD\uC81C\uD55C \uD398\uC774\uC9C0\uC758 \uBD80\uBAA8 \uC544\uB798\uB85C \uC7AC\uBD80\uCC29\uB429\uB2C8\uB2E4."
5157
+ )
5158
+ );
5159
+ if (!confirmed) {
5160
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
5161
+ return;
5162
+ }
5102
5163
  const globalOpts = wikiPageDeleteCommand.optsWithGlobals();
5103
5164
  const config = await getConfigOrThrow();
5104
5165
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -5109,25 +5170,6 @@ var wikiPageDeleteCommand = new import_commander41.Command("delete").description
5109
5170
  urlOpt: opts.url,
5110
5171
  project: opts.project
5111
5172
  });
5112
- if (!opts.yes) {
5113
- if (!process.stdin.isTTY) {
5114
- throw new DoorayCliError(
5115
- "non-TTY \uD658\uACBD\uC5D0\uC11C\uB294 \uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. --yes(-y) \uD50C\uB798\uADF8\uB85C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694.",
5116
- EXIT_PARAM_ERROR
5117
- );
5118
- }
5119
- const { confirm: confirm2 } = await import("@inquirer/prompts");
5120
- const ok = await confirm2({
5121
- message: `\uD398\uC774\uC9C0(${pageId})\uB97C \uC0AD\uC81C\uD560\uAE4C\uC694? \uD558\uC704 \uD398\uC774\uC9C0\uAC00 \uC788\uC73C\uBA74 \uC0C1\uC704 \uD398\uC774\uC9C0\uB85C \uC7AC\uBD80\uCC29\uB429\uB2C8\uB2E4.`,
5122
- default: false
5123
- });
5124
- if (!ok) {
5125
- if (!globalOpts.json && !globalOpts.quiet) {
5126
- process.stdout.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
5127
- }
5128
- return;
5129
- }
5130
- }
5131
5173
  startSpinner("\uD398\uC774\uC9C0 \uC0AD\uC81C \uC911...");
5132
5174
  try {
5133
5175
  await client.deleteWikiPage(wikiId, pageId);
@@ -5192,7 +5234,7 @@ function wikiInlineImageSnippet(wikiId, attachFileId, name) {
5192
5234
  }
5193
5235
 
5194
5236
  // src/commands/wiki/page-file/upload.ts
5195
- var wikiPageFileUploadCommand = new import_commander43.Command("upload").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uC5C5\uB85C\uB4DC (multipart type \uC21C\uC11C \uAC15\uC81C, ADR-029)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray Wiki URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg2]", "page-id \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg3]", "\uD30C\uC77C \uACBD\uB85C (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").option("--file <path>", "\uC5C5\uB85C\uB4DC\uD560 \uD30C\uC77C \uACBD\uB85C (positional \uB300\uCCB4)").option("--type <type>", "\uD30C\uC77C \uD0C0\uC785: general | inline_image (\uAE30\uBCF8 general)", "general").action(async (arg1, arg2, arg3, opts) => {
5237
+ var wikiPageFileUploadCommand = new import_commander43.Command("upload").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uC5C5\uB85C\uB4DC").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray Wiki URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg2]", "page-id \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C \uACBD\uB85C").argument("[arg3]", "\uD30C\uC77C \uACBD\uB85C (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").option("--file <path>", "\uC5C5\uB85C\uB4DC\uD560 \uD30C\uC77C \uACBD\uB85C (positional \uB300\uCCB4)").option("--type <type>", "\uD30C\uC77C \uD0C0\uC785: general | inline_image (\uAE30\uBCF8 general)", "general").action(async (arg1, arg2, arg3, opts) => {
5196
5238
  const globalOpts = wikiPageFileUploadCommand.optsWithGlobals();
5197
5239
  const config = await getConfigOrThrow();
5198
5240
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -5413,7 +5455,16 @@ var wikiPageFileDownloadAllCommand = new import_commander45.Command("download-al
5413
5455
 
5414
5456
  // src/commands/wiki/page-file/delete.ts
5415
5457
  var import_commander46 = require("commander");
5416
- var wikiPageFileDeleteCommand = new import_commander46.Command("delete").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray Wiki URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg2]", "page-id \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uD30C\uC77C ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, opts) => {
5458
+ var wikiPageFileDeleteCommand = new import_commander46.Command("delete").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC, Dooray Wiki URL, \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg2]", "page-id \uB610\uB294 (`--id`/`--url` \uBAA8\uB4DC\uC77C \uB54C) \uD30C\uC77C ID").argument("[arg3]", "\uD30C\uC77C ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").option("--file-id <fileId>", "\uD30C\uC77C ID (positional \uB300\uCCB4)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, arg3, opts) => {
5459
+ const confirmed = await authorizeDeletion(
5460
+ !!opts.yes,
5461
+ !!process.stdin.isTTY,
5462
+ () => promptDeletion("\uC704\uD0A4 \uD398\uC774\uC9C0\uC758 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC601\uAD6C \uC0AD\uC81C\uD560\uAE4C\uC694?")
5463
+ );
5464
+ if (!confirmed) {
5465
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
5466
+ return;
5467
+ }
5417
5468
  const globalOpts = wikiPageFileDeleteCommand.optsWithGlobals();
5418
5469
  const config = await getConfigOrThrow();
5419
5470
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -5472,7 +5523,7 @@ var wikiPageFileDeleteCommand = new import_commander46.Command("delete").descrip
5472
5523
  });
5473
5524
 
5474
5525
  // src/commands/wiki/page-file/index.ts
5475
- var wikiPageFileCommand = new import_commander47.Command("file").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839 (Issue #70, ADR-029)");
5526
+ var wikiPageFileCommand = new import_commander47.Command("file").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839");
5476
5527
  wikiPageFileCommand.addCommand(wikiPageFileListCommand);
5477
5528
  wikiPageFileCommand.addCommand(wikiPageFileUploadCommand);
5478
5529
  wikiPageFileCommand.addCommand(wikiPageFileDownloadCommand);
@@ -5753,7 +5804,16 @@ var wikiPageCommentEditCommand = new import_commander52.Command("edit").descript
5753
5804
 
5754
5805
  // src/commands/wiki/page-comment/delete.ts
5755
5806
  var import_commander53 = require("commander");
5756
- var wikiPageCommentDeleteCommand = new import_commander53.Command("delete").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uC0AD\uC81C (confirm \uC5C6\uC774 \uC989\uC2DC)").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC / Dooray Wiki URL (\uBAA8\uB4DC\uBCC4)").argument("[arg2]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg3]", "\uB313\uAE00 ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (positional \uB300\uC2E0)").option("--url <url>", "Dooray Wiki URL (positional \uB300\uC2E0)").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC6A9)").option("--comment-id <commentId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").action(async (arg1, arg2, arg3, opts) => {
5807
+ var wikiPageCommentDeleteCommand = new import_commander53.Command("delete").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uC0AD\uC81C").argument("[arg1]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC / Dooray Wiki URL (\uBAA8\uB4DC\uBCC4)").argument("[arg2]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (\uBAA8\uB4DC\uBCC4)").argument("[arg3]", "\uB313\uAE00 ID (positional 3\uAC1C \uBAA8\uB4DC)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (positional \uB300\uC2E0)").option("--url <url>", "Dooray Wiki URL (positional \uB300\uC2E0)").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC6A9)").option("--comment-id <commentId>", "\uB313\uAE00 ID (positional \uB300\uCCB4)").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC0AD\uC81C (\uC790\uB3D9\uD654\uC6A9)").action(async (arg1, arg2, arg3, opts) => {
5808
+ const confirmed = await authorizeDeletion(
5809
+ !!opts.yes,
5810
+ !!process.stdin.isTTY,
5811
+ () => promptDeletion("\uC704\uD0A4 \uD398\uC774\uC9C0\uC758 \uB313\uAE00\uC744 \uC601\uAD6C \uC0AD\uC81C\uD560\uAE4C\uC694?")
5812
+ );
5813
+ if (!confirmed) {
5814
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
5815
+ return;
5816
+ }
5757
5817
  const parsed = parseWikiCommentArgs(arg1, arg2, arg3, opts);
5758
5818
  const config = await getConfigOrThrow();
5759
5819
  const client = new DoorayApiClient(config.apiKey, config.baseUrl);
@@ -5905,6 +5965,51 @@ var import_commander59 = require("commander");
5905
5965
  // src/api/imapClient.ts
5906
5966
  var import_imapflow = require("imapflow");
5907
5967
  var import_mailparser = require("mailparser");
5968
+
5969
+ // src/api/mailErrors.ts
5970
+ function getErrorField(error, key) {
5971
+ if (typeof error !== "object" || error === null) return void 0;
5972
+ return error[key];
5973
+ }
5974
+ function isAuthenticationFailure(error) {
5975
+ if (getErrorField(error, "authenticationFailed") === true) return true;
5976
+ if (getErrorField(error, "code") === "EAUTH") return true;
5977
+ const details = [
5978
+ getErrorField(error, "message"),
5979
+ getErrorField(error, "responseText"),
5980
+ getErrorField(error, "responseCode")
5981
+ ].filter((value) => typeof value === "string").join(" ");
5982
+ return /auth(?:enticate|entication)?\s*(?:login\s*)?failed|invalid login|invalid credentials/i.test(
5983
+ details
5984
+ );
5985
+ }
5986
+ function isConnectionFailure(error) {
5987
+ const code = getErrorField(error, "code");
5988
+ return typeof code === "string" && [
5989
+ "ECONNECTION",
5990
+ "ECONNREFUSED",
5991
+ "ECONNRESET",
5992
+ "EHOSTUNREACH",
5993
+ "ENETUNREACH",
5994
+ "ESOCKET",
5995
+ "ETIMEDOUT"
5996
+ ].includes(code);
5997
+ }
5998
+ function toMailConnectionError(protocol, host, port, error) {
5999
+ if (isAuthenticationFailure(error)) {
6000
+ return new DoorayCliError(
6001
+ `${protocol} \uC778\uC99D\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. Dooray \uBA54\uC77C \uC124\uC815\uC5D0\uC11C \uC571 \uBE44\uBC00\uBC88\uD638\uB97C \uC0C8\uB85C \uBC1C\uAE09\uD55C \uB4A4 \uB2E4\uC2DC \uC800\uC7A5\uD558\uC138\uC694:
6002
+ dooray config set imap-password <NEW_IMAP_APP_PASSWORD>
6003
+ \uAE30\uC874 \uBA54\uC77C \uC778\uC99D\uC815\uBCF4 \uC81C\uAC70: dooray mail logout`,
6004
+ EXIT_AUTH_ERROR
6005
+ );
6006
+ }
6007
+ const reason = error instanceof Error && error.message ? `: ${error.message}` : "";
6008
+ const message = isConnectionFailure(error) ? `${protocol} \uC11C\uBC84 \uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4 (${host}:${port})${reason}` : `${protocol} \uCC98\uB9AC \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4${reason}`;
6009
+ return new DoorayCliError(message, EXIT_API_ERROR);
6010
+ }
6011
+
6012
+ // src/api/imapClient.ts
5908
6013
  function getImapConfigOrThrow(config) {
5909
6014
  if (!config.imapUsername || !config.imapPassword) {
5910
6015
  throw new DoorayCliError(
@@ -5919,7 +6024,7 @@ function getImapConfigOrThrow(config) {
5919
6024
  password: config.imapPassword
5920
6025
  };
5921
6026
  }
5922
- function createClient(config) {
6027
+ function createImapClient(config) {
5923
6028
  const imap = getImapConfigOrThrow(config);
5924
6029
  return new import_imapflow.ImapFlow({
5925
6030
  host: imap.host,
@@ -5929,11 +6034,30 @@ function createClient(config) {
5929
6034
  logger: false
5930
6035
  });
5931
6036
  }
6037
+ async function connectImapClient(client, config) {
6038
+ const imap = getImapConfigOrThrow(config);
6039
+ try {
6040
+ await client.connect();
6041
+ } catch (error) {
6042
+ throw toMailConnectionError("IMAP", imap.host, imap.port, error);
6043
+ }
6044
+ }
6045
+ async function closeImapClient(client) {
6046
+ if (!client.usable) {
6047
+ client.close();
6048
+ return;
6049
+ }
6050
+ try {
6051
+ await client.logout();
6052
+ } catch {
6053
+ client.close();
6054
+ }
6055
+ }
5932
6056
  async function listMails(config, opts) {
5933
- const client = createClient(config);
6057
+ const client = createImapClient(config);
5934
6058
  const limit = opts.limit ?? 20;
5935
6059
  try {
5936
- await client.connect();
6060
+ await connectImapClient(client, config);
5937
6061
  const lock = await client.getMailboxLock("INBOX");
5938
6062
  try {
5939
6063
  const query = {};
@@ -5969,13 +6093,13 @@ async function listMails(config, opts) {
5969
6093
  lock.release();
5970
6094
  }
5971
6095
  } finally {
5972
- await client.logout();
6096
+ await closeImapClient(client);
5973
6097
  }
5974
6098
  }
5975
6099
  async function getMail(config, uid) {
5976
- const client = createClient(config);
6100
+ const client = createImapClient(config);
5977
6101
  try {
5978
- await client.connect();
6102
+ await connectImapClient(client, config);
5979
6103
  const lock = await client.getMailboxLock("INBOX");
5980
6104
  try {
5981
6105
  const msg = await client.fetchOne(String(uid), {
@@ -6011,7 +6135,7 @@ async function getMail(config, uid) {
6011
6135
  lock.release();
6012
6136
  }
6013
6137
  } finally {
6014
- await client.logout();
6138
+ await closeImapClient(client);
6015
6139
  }
6016
6140
  }
6017
6141
 
@@ -6123,7 +6247,9 @@ async function sendMail(config, opts) {
6123
6247
  } else {
6124
6248
  mailOptions.text = opts.body;
6125
6249
  }
6126
- const info = await transporter.sendMail(mailOptions);
6250
+ const info = await transporter.sendMail(mailOptions).catch((error) => {
6251
+ throw toMailConnectionError("SMTP", smtp.host, smtp.port, error);
6252
+ });
6127
6253
  return {
6128
6254
  messageId: info.messageId,
6129
6255
  accepted: info.accepted ?? [],
@@ -6169,18 +6295,10 @@ var mailSendCommand = new import_commander61.Command("send").description("\uBA54
6169
6295
  // src/commands/mail/reply.ts
6170
6296
  var import_commander62 = require("commander");
6171
6297
  var import_promises14 = require("fs/promises");
6172
- var import_imapflow2 = require("imapflow");
6173
6298
  async function getMessageId(config, uid) {
6174
- const imap = getImapConfigOrThrow(config);
6175
- const client = new import_imapflow2.ImapFlow({
6176
- host: imap.host,
6177
- port: imap.port,
6178
- secure: true,
6179
- auth: { user: imap.username, pass: imap.password },
6180
- logger: false
6181
- });
6299
+ const client = createImapClient(config);
6182
6300
  try {
6183
- await client.connect();
6301
+ await connectImapClient(client, config);
6184
6302
  const lock = await client.getMailboxLock("INBOX");
6185
6303
  try {
6186
6304
  const msg = await client.fetchOne(String(uid), {
@@ -6193,7 +6311,7 @@ async function getMessageId(config, uid) {
6193
6311
  lock.release();
6194
6312
  }
6195
6313
  } finally {
6196
- await client.logout();
6314
+ await closeImapClient(client);
6197
6315
  }
6198
6316
  }
6199
6317
  var mailReplyCommand = new import_commander62.Command("reply").description("\uBA54\uC77C \uB2F5\uC7A5").argument("<uid>", "\uC6D0\uBCF8 \uBA54\uC77C UID").option("--body <text>", "\uB2F5\uC7A5 \uBCF8\uBB38").option("--body-file <path>", "\uB2F5\uC7A5 \uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C").option("--cc <addresses...>", "\uCC38\uC870").option("--html", "\uBCF8\uBB38\uC744 HTML\uB85C \uC804\uC1A1").action(async (uid, opts) => {
@@ -6236,12 +6354,47 @@ var mailReplyCommand = new import_commander62.Command("reply").description("\uBA
6236
6354
  }
6237
6355
  });
6238
6356
 
6357
+ // src/commands/mail/logout.ts
6358
+ var import_commander63 = require("commander");
6359
+ var import_chalk8 = __toESM(require("chalk"));
6360
+ async function authorizeMailLogout(skipConfirmation, isTTY, confirmRemoval) {
6361
+ if (skipConfirmation) return true;
6362
+ if (!isTTY) {
6363
+ throw new DoorayCliError(
6364
+ "non-TTY \uD658\uACBD\uC5D0\uC11C\uB294 \uD655\uC778 \uC5C6\uC774 \uBA54\uC77C \uC778\uC99D\uC815\uBCF4\uB97C \uC81C\uAC70\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. --yes(-y) \uD50C\uB798\uADF8\uB85C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694.",
6365
+ EXIT_PARAM_ERROR
6366
+ );
6367
+ }
6368
+ return confirmRemoval();
6369
+ }
6370
+ var mailLogoutCommand = new import_commander63.Command("logout").description("\uC800\uC7A5\uB41C \uBA54\uC77C \uC778\uC99D\uC815\uBCF4 \uC81C\uAC70").option("-y, --yes", "\uD655\uC778 \uC5C6\uC774 \uC778\uC99D\uC815\uBCF4 \uC81C\uAC70 (\uC790\uB3D9\uD654\uC6A9)").action(async (opts) => {
6371
+ const confirmed = await authorizeMailLogout(
6372
+ !!opts.yes,
6373
+ !!process.stdin.isTTY,
6374
+ async () => {
6375
+ const { confirm: confirm2 } = await import("@inquirer/prompts");
6376
+ return confirm2({
6377
+ message: "\uC800\uC7A5\uB41C IMAP \uC0AC\uC6A9\uC790\uBA85\uACFC \uC571 \uBE44\uBC00\uBC88\uD638\uB97C \uC81C\uAC70\uD560\uAE4C\uC694?",
6378
+ default: false
6379
+ });
6380
+ }
6381
+ );
6382
+ if (!confirmed) {
6383
+ process.stderr.write("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n");
6384
+ return;
6385
+ }
6386
+ const removed = await clearMailCredentials();
6387
+ process.stderr.write(
6388
+ removed ? import_chalk8.default.green("\u2713 \uBA54\uC77C \uC778\uC99D\uC815\uBCF4\uB97C \uC81C\uAC70\uD588\uC2B5\uB2C8\uB2E4.\n") : "\uC800\uC7A5\uB41C \uBA54\uC77C \uC778\uC99D\uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.\n"
6389
+ );
6390
+ });
6391
+
6239
6392
  // src/commands/messenger/index.ts
6240
- var import_commander65 = require("commander");
6393
+ var import_commander66 = require("commander");
6241
6394
 
6242
6395
  // src/commands/messenger/send.ts
6243
- var import_commander63 = require("commander");
6244
- var messengerSendCommand = new import_commander63.Command("send").description("\uBA54\uC2E0\uC800 1:1 \uB2E4\uC774\uB809\uD2B8 \uBA54\uC2DC\uC9C0 \uC804\uC1A1 (--body \uC5C6\uC73C\uBA74 $EDITOR)").option("--to <id|email>", "\uBC1B\uB294 \uC0AC\uB78C (organizationMemberId \uB610\uB294 \uC774\uBA54\uC77C \u2014 \uC774\uB984 \uBBF8\uC9C0\uC6D0)").option("--body <text>", "\uBA54\uC2DC\uC9C0 \uBCF8\uBB38 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").action(async (opts) => {
6396
+ var import_commander64 = require("commander");
6397
+ var messengerSendCommand = new import_commander64.Command("send").description("\uBA54\uC2E0\uC800 1:1 \uB2E4\uC774\uB809\uD2B8 \uBA54\uC2DC\uC9C0 \uC804\uC1A1 (--body \uC5C6\uC73C\uBA74 $EDITOR)").option("--to <id|email>", "\uBC1B\uB294 \uC0AC\uB78C (organizationMemberId \uB610\uB294 \uC774\uBA54\uC77C \u2014 \uC774\uB984 \uBBF8\uC9C0\uC6D0)").option("--body <text>", "\uBA54\uC2DC\uC9C0 \uBCF8\uBB38 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").action(async (opts) => {
6245
6398
  if (!opts.to) {
6246
6399
  throw new DoorayCliError("--to \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
6247
6400
  }
@@ -6281,7 +6434,7 @@ var messengerSendCommand = new import_commander63.Command("send").description("\
6281
6434
  });
6282
6435
 
6283
6436
  // src/commands/messenger/channel-send.ts
6284
- var import_commander64 = require("commander");
6437
+ var import_commander65 = require("commander");
6285
6438
 
6286
6439
  // src/resolvers/messenger-channel.ts
6287
6440
  var CHANNEL_ID_RE = /^\d{15,}$/;
@@ -6299,7 +6452,7 @@ async function resolveMessengerChannel(client, input2) {
6299
6452
  }
6300
6453
 
6301
6454
  // src/commands/messenger/channel-send.ts
6302
- var messengerChannelSendCommand = new import_commander64.Command("channel-send").description("\uBA54\uC2E0\uC800 \uB300\uD654\uBC29 \uBA54\uC2DC\uC9C0 \uC804\uC1A1 (--body \uC5C6\uC73C\uBA74 $EDITOR)").option("--channel <channelId|\uC774\uB984>", "\uB300\uD654\uBC29 channelId \uB610\uB294 \uC774\uB984 (\uBD80\uBD84\uC77C\uCE58)").option("--body <text>", "\uBA54\uC2DC\uC9C0 \uBCF8\uBB38 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").action(async (opts) => {
6455
+ var messengerChannelSendCommand = new import_commander65.Command("channel-send").description("\uBA54\uC2E0\uC800 \uB300\uD654\uBC29 \uBA54\uC2DC\uC9C0 \uC804\uC1A1 (--body \uC5C6\uC73C\uBA74 $EDITOR)").option("--channel <channelId|\uC774\uB984>", "\uB300\uD654\uBC29 channelId \uB610\uB294 \uC774\uB984 (\uBD80\uBD84\uC77C\uCE58)").option("--body <text>", "\uBA54\uC2DC\uC9C0 \uBCF8\uBB38 (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin\uC5D0\uC11C \uC77D\uAE30)").action(async (opts) => {
6303
6456
  if (!opts.channel) {
6304
6457
  throw new DoorayCliError("--channel \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
6305
6458
  }
@@ -6333,12 +6486,12 @@ var messengerChannelSendCommand = new import_commander64.Command("channel-send")
6333
6486
  });
6334
6487
 
6335
6488
  // src/commands/messenger/index.ts
6336
- var messengerCommand = new import_commander65.Command("messenger").description("\uBA54\uC2E0\uC800 \uAD00\uB828 \uBA85\uB839");
6489
+ var messengerCommand = new import_commander66.Command("messenger").description("\uBA54\uC2E0\uC800 \uAD00\uB828 \uBA85\uB839");
6337
6490
  messengerCommand.addCommand(messengerSendCommand);
6338
6491
  messengerCommand.addCommand(messengerChannelSendCommand);
6339
6492
 
6340
6493
  // src/commands/feedback.ts
6341
- var import_commander66 = require("commander");
6494
+ var import_commander67 = require("commander");
6342
6495
  var import_node_child_process2 = require("child_process");
6343
6496
  var import_node_util = require("util");
6344
6497
  var import_promises17 = require("fs/promises");
@@ -6449,7 +6602,7 @@ async function readBody(opts) {
6449
6602
  if (opts.bodyFile) return await (0, import_promises17.readFile)(opts.bodyFile, "utf-8");
6450
6603
  return void 0;
6451
6604
  }
6452
- var feedbackCommand = new import_commander66.Command("feedback").description("dooray-cli\uC5D0 \uB300\uD55C GitHub issue \uB4F1\uB85D (gh CLI \uC704\uC784)").option("--title <text>", "\uC774\uC288 \uC81C\uBAA9 (\uC5C6\uC73C\uBA74 \uC778\uD130\uB799\uD2F0\uBE0C)").option("--body <text>", "\uC774\uC288 \uBCF8\uBB38").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C").option(
6605
+ var feedbackCommand = new import_commander67.Command("feedback").description("dooray-cli\uC5D0 \uB300\uD55C GitHub issue \uB4F1\uB85D (gh CLI \uC704\uC784)").option("--title <text>", "\uC774\uC288 \uC81C\uBAA9 (\uC5C6\uC73C\uBA74 \uC778\uD130\uB799\uD2F0\uBE0C)").option("--body <text>", "\uC774\uC288 \uBCF8\uBB38").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C").option(
6453
6606
  "--label <name>",
6454
6607
  "\uB77C\uBCA8 (\uBC18\uBCF5 \uAC00\uB2A5)",
6455
6608
  (value, prev) => [...prev, value],
@@ -6612,25 +6765,25 @@ function sanitizeArgv(argv) {
6612
6765
  }
6613
6766
 
6614
6767
  // src/index.ts
6615
- var program = new import_commander67.Command();
6768
+ var program = new import_commander68.Command();
6616
6769
  program.name("dooray").description("Dooray REST API CLI").version(CLI_VERSION).option("--json", "JSON \uD615\uC2DD\uC73C\uB85C \uCD9C\uB825").option("--quiet", "ID\uB9CC \uCD9C\uB825").option("--no-color", "\uC0C9\uC0C1 \uBE44\uD65C\uC131\uD654");
6617
6770
  program.hook("preAction", () => {
6618
6771
  const opts = program.opts();
6619
6772
  if (opts.color === false || process.env.NO_COLOR) {
6620
- import_chalk8.default.level = 0;
6773
+ import_chalk9.default.level = 0;
6621
6774
  }
6622
6775
  if (opts.json || opts.quiet) {
6623
6776
  setQuiet(true);
6624
6777
  }
6625
6778
  });
6626
- var projectCommand = new import_commander67.Command("project").description("\uD504\uB85C\uC81D\uD2B8 \uAD00\uB828 \uBA85\uB839");
6779
+ var projectCommand = new import_commander68.Command("project").description("\uD504\uB85C\uC81D\uD2B8 \uAD00\uB828 \uBA85\uB839");
6627
6780
  projectCommand.addCommand(projectListCommand);
6628
6781
  projectCommand.addCommand(projectMembersCommand);
6629
6782
  projectCommand.addCommand(projectWorkflowsCommand);
6630
6783
  projectCommand.addCommand(projectGroupsCommand);
6631
6784
  projectCommand.addCommand(projectTagsCommand);
6632
6785
  projectCommand.addCommand(projectTemplatesCommand);
6633
- var postCommand = new import_commander67.Command("post").description("\uC5C5\uBB34 \uAD00\uB828 \uBA85\uB839");
6786
+ var postCommand = new import_commander68.Command("post").description("\uC5C5\uBB34 \uAD00\uB828 \uBA85\uB839");
6634
6787
  postCommand.addCommand(postListCommand);
6635
6788
  postCommand.addCommand(postSearchCommand);
6636
6789
  postCommand.addCommand(postGetCommand);
@@ -6638,7 +6791,7 @@ postCommand.addCommand(postEditCommand);
6638
6791
  postCommand.addCommand(postCreateCommand);
6639
6792
  postCommand.addCommand(postDoneCommand);
6640
6793
  postCommand.addCommand(postWorkflowCommand);
6641
- var commentCommand = new import_commander67.Command("comment").description("\uB313\uAE00 \uAD00\uB828 \uBA85\uB839");
6794
+ var commentCommand = new import_commander68.Command("comment").description("\uB313\uAE00 \uAD00\uB828 \uBA85\uB839");
6642
6795
  commentCommand.addCommand(commentListCommand);
6643
6796
  commentCommand.addCommand(commentLatestCommand);
6644
6797
  commentCommand.addCommand(commentGetCommand);
@@ -6647,18 +6800,18 @@ commentCommand.addCommand(commentEditCommand);
6647
6800
  commentCommand.addCommand(commentDeleteCommand);
6648
6801
  commentCommand.addCommand(commentFileCommand);
6649
6802
  postCommand.addCommand(commentCommand);
6650
- var fileCommand = new import_commander67.Command("file").description("\uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839");
6803
+ var fileCommand = new import_commander68.Command("file").description("\uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839");
6651
6804
  fileCommand.addCommand(fileListCommand);
6652
6805
  fileCommand.addCommand(fileDownloadCommand);
6653
6806
  fileCommand.addCommand(fileDownloadAllCommand);
6654
6807
  fileCommand.addCommand(fileUploadCommand);
6655
6808
  fileCommand.addCommand(fileDeleteCommand);
6656
6809
  postCommand.addCommand(fileCommand);
6657
- var wikiCommand = new import_commander67.Command("wiki").description("\uC704\uD0A4 \uAD00\uB828 \uBA85\uB839");
6810
+ var wikiCommand = new import_commander68.Command("wiki").description("\uC704\uD0A4 \uAD00\uB828 \uBA85\uB839");
6658
6811
  wikiCommand.addCommand(wikiListCommand);
6659
6812
  wikiCommand.addCommand(wikiPagesCommand);
6660
6813
  wikiCommand.addCommand(wikiTreeCommand);
6661
- var wikiPageCommand = new import_commander67.Command("page").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uAD00\uB828 \uBA85\uB839");
6814
+ var wikiPageCommand = new import_commander68.Command("page").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uAD00\uB828 \uBA85\uB839");
6662
6815
  wikiPageCommand.addCommand(wikiPageGetCommand);
6663
6816
  wikiPageCommand.addCommand(wikiPageCreateCommand);
6664
6817
  wikiPageCommand.addCommand(wikiPageEditCommand);
@@ -6666,11 +6819,12 @@ wikiPageCommand.addCommand(wikiPageDeleteCommand);
6666
6819
  wikiPageCommand.addCommand(wikiPageFileCommand);
6667
6820
  wikiPageCommand.addCommand(wikiPageCommentCommand);
6668
6821
  wikiCommand.addCommand(wikiPageCommand);
6669
- var mailCommand = new import_commander67.Command("mail").description("\uBA54\uC77C \uAD00\uB828 \uBA85\uB839");
6822
+ var mailCommand = new import_commander68.Command("mail").description("\uBA54\uC77C \uAD00\uB828 \uBA85\uB839");
6670
6823
  mailCommand.addCommand(mailListCommand);
6671
6824
  mailCommand.addCommand(mailGetCommand);
6672
6825
  mailCommand.addCommand(mailSendCommand);
6673
6826
  mailCommand.addCommand(mailReplyCommand);
6827
+ mailCommand.addCommand(mailLogoutCommand);
6674
6828
  program.addCommand(setupCommand);
6675
6829
  program.addCommand(skillCommand);
6676
6830
  program.addCommand(configCommand);
@@ -6701,6 +6855,6 @@ program.parseAsync().catch(async (err) => {
6701
6855
  }
6702
6856
  } catch {
6703
6857
  }
6704
- process.stderr.write(import_chalk8.default.red(`\uC624\uB958: ${errorMessage}`) + "\n");
6858
+ process.stderr.write(import_chalk9.default.red(`\uC624\uB958: ${errorMessage}`) + "\n");
6705
6859
  process.exit(exitCode);
6706
6860
  });