@bifos/dooray-cli 0.13.0 → 0.14.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 +2 -0
- package/dist/index.js +160 -68
- package/package.json +1 -1
- package/skills/dooray-cli/SKILL.md +31 -672
- package/skills/dooray-cli/references/comment.md +39 -0
- package/skills/dooray-cli/references/common.md +111 -0
- package/skills/dooray-cli/references/intent-map.md +92 -0
- package/skills/dooray-cli/references/mention-link.md +104 -0
- package/skills/dooray-cli/references/post.md +218 -0
- package/skills/dooray-cli/references/wiki.md +77 -0
- package/skills/dooray-cli/references/workflow.md +106 -0
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
));
|
|
25
25
|
|
|
26
26
|
// src/index.ts
|
|
27
|
-
var
|
|
27
|
+
var import_commander66 = require("commander");
|
|
28
28
|
var import_chalk7 = __toESM(require("chalk"));
|
|
29
29
|
|
|
30
30
|
// src/commands/config.ts
|
|
@@ -675,6 +675,27 @@ var DoorayApiClient = class {
|
|
|
675
675
|
throw await toDoorayCliError(e);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
+
async getAllWikiPages(wikiId, maxDepth) {
|
|
679
|
+
const CONCURRENCY = 10;
|
|
680
|
+
const all = [];
|
|
681
|
+
let level = (await this.getWikiPages(wikiId)).result;
|
|
682
|
+
let depth = 1;
|
|
683
|
+
while (level.length > 0) {
|
|
684
|
+
all.push(...level);
|
|
685
|
+
if (maxDepth !== void 0 && depth >= maxDepth) break;
|
|
686
|
+
const next = [];
|
|
687
|
+
for (let i = 0; i < level.length; i += CONCURRENCY) {
|
|
688
|
+
const chunk = level.slice(i, i + CONCURRENCY);
|
|
689
|
+
const batches = await Promise.all(
|
|
690
|
+
chunk.map((p) => this.getWikiPages(wikiId, p.id).then((r) => r.result))
|
|
691
|
+
);
|
|
692
|
+
next.push(...batches.flat());
|
|
693
|
+
}
|
|
694
|
+
level = next;
|
|
695
|
+
depth++;
|
|
696
|
+
}
|
|
697
|
+
return all;
|
|
698
|
+
}
|
|
678
699
|
async getWikiPage(wikiId, pageId) {
|
|
679
700
|
try {
|
|
680
701
|
return await this.api.get(`wiki/v1/wikis/${wikiId}/pages/${pageId}`).json();
|
|
@@ -4146,6 +4167,55 @@ function formatWikiPages(pages, opts) {
|
|
|
4146
4167
|
ids: pages.map((p) => p.id)
|
|
4147
4168
|
});
|
|
4148
4169
|
}
|
|
4170
|
+
function buildWikiTree(pages) {
|
|
4171
|
+
const ids = new Set(pages.map((p) => p.id));
|
|
4172
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
4173
|
+
const roots = [];
|
|
4174
|
+
for (const page of pages) {
|
|
4175
|
+
const parentId = page.parentPageId;
|
|
4176
|
+
const isRoot = page.root === true || !parentId || !ids.has(parentId);
|
|
4177
|
+
if (isRoot) {
|
|
4178
|
+
roots.push(page);
|
|
4179
|
+
continue;
|
|
4180
|
+
}
|
|
4181
|
+
const siblings = childrenByParent.get(parentId) ?? [];
|
|
4182
|
+
siblings.push(page);
|
|
4183
|
+
childrenByParent.set(parentId, siblings);
|
|
4184
|
+
}
|
|
4185
|
+
const toNode = (page) => ({
|
|
4186
|
+
page,
|
|
4187
|
+
children: (childrenByParent.get(page.id) ?? []).map(toNode)
|
|
4188
|
+
});
|
|
4189
|
+
return roots.map(toNode);
|
|
4190
|
+
}
|
|
4191
|
+
function normalizeSubject(subject) {
|
|
4192
|
+
return subject.replace(/[\r\n]+/g, " ");
|
|
4193
|
+
}
|
|
4194
|
+
function renderWikiTree(nodes, prefix = "") {
|
|
4195
|
+
const lines = [];
|
|
4196
|
+
nodes.forEach((node, index) => {
|
|
4197
|
+
const isLast = index === nodes.length - 1;
|
|
4198
|
+
const connector = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
4199
|
+
const subject = normalizeSubject(node.page.subject);
|
|
4200
|
+
lines.push(`${prefix}${connector}${subject} (${node.page.id})`);
|
|
4201
|
+
if (node.children.length > 0) {
|
|
4202
|
+
const childPrefix = prefix + (isLast ? " " : "\u2502 ");
|
|
4203
|
+
lines.push(renderWikiTree(node.children, childPrefix));
|
|
4204
|
+
}
|
|
4205
|
+
});
|
|
4206
|
+
return lines.join("\n");
|
|
4207
|
+
}
|
|
4208
|
+
function formatWikiTree(pages, opts) {
|
|
4209
|
+
if (opts.json) {
|
|
4210
|
+
printJson(pages);
|
|
4211
|
+
return;
|
|
4212
|
+
}
|
|
4213
|
+
if (opts.quiet) {
|
|
4214
|
+
printQuiet(pages.map((p) => p.id));
|
|
4215
|
+
return;
|
|
4216
|
+
}
|
|
4217
|
+
process.stdout.write(renderWikiTree(buildWikiTree(pages)) + "\n");
|
|
4218
|
+
}
|
|
4149
4219
|
function formatWikiPageDetail(page, opts) {
|
|
4150
4220
|
if (opts.json) {
|
|
4151
4221
|
printJson(page);
|
|
@@ -4235,9 +4305,30 @@ var wikiPagesCommand = new import_commander35.Command("pages").description("\uC7
|
|
|
4235
4305
|
formatWikiPages(res.result, globalOpts);
|
|
4236
4306
|
});
|
|
4237
4307
|
|
|
4238
|
-
// src/commands/wiki/
|
|
4308
|
+
// src/commands/wiki/tree.ts
|
|
4239
4309
|
var import_commander36 = require("commander");
|
|
4240
|
-
var
|
|
4310
|
+
var wikiTreeCommand = new import_commander36.Command("tree").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uACC4\uCE35 \uD2B8\uB9AC \uC870\uD68C").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").option("--depth <n>", "\uC7AC\uADC0 \uCD5C\uB300 \uAE4A\uC774 (root=1, \uBBF8\uC9C0\uC815 \uC2DC \uC804\uCCB4)").action(async (project, opts) => {
|
|
4311
|
+
const globalOpts = wikiTreeCommand.optsWithGlobals();
|
|
4312
|
+
const config = await getConfigOrThrow();
|
|
4313
|
+
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
4314
|
+
let maxDepth;
|
|
4315
|
+
if (opts.depth !== void 0) {
|
|
4316
|
+
const parsed = Number(opts.depth);
|
|
4317
|
+
if (!Number.isInteger(parsed) || parsed < 1) {
|
|
4318
|
+
throw new DoorayCliError("--depth \uB294 1 \uC774\uC0C1\uC758 \uC815\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4", EXIT_PARAM_ERROR);
|
|
4319
|
+
}
|
|
4320
|
+
maxDepth = parsed;
|
|
4321
|
+
}
|
|
4322
|
+
startSpinner("\uC704\uD0A4 \uD398\uC774\uC9C0 \uD2B8\uB9AC \uC870\uD68C \uC911...");
|
|
4323
|
+
const wikiId = await resolveWiki(client, project);
|
|
4324
|
+
const pages = await client.getAllWikiPages(wikiId, maxDepth);
|
|
4325
|
+
stopSpinner(true, "\uC704\uD0A4 \uD398\uC774\uC9C0 \uD2B8\uB9AC \uC870\uD68C \uC644\uB8CC");
|
|
4326
|
+
formatWikiTree(pages, globalOpts);
|
|
4327
|
+
});
|
|
4328
|
+
|
|
4329
|
+
// src/commands/wiki/page-get.ts
|
|
4330
|
+
var import_commander37 = require("commander");
|
|
4331
|
+
var wikiPageGetCommand = new import_commander37.Command("get").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uC0C1\uC138 \uC870\uD68C").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").argument("<page-id>", "\uD398\uC774\uC9C0 ID").action(async (project, pageId) => {
|
|
4241
4332
|
const globalOpts = wikiPageGetCommand.optsWithGlobals();
|
|
4242
4333
|
const config = await getConfigOrThrow();
|
|
4243
4334
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4249,8 +4340,8 @@ var wikiPageGetCommand = new import_commander36.Command("get").description("\uC7
|
|
|
4249
4340
|
});
|
|
4250
4341
|
|
|
4251
4342
|
// src/commands/wiki/page-create.ts
|
|
4252
|
-
var
|
|
4253
|
-
var wikiPageCreateCommand = new
|
|
4343
|
+
var import_commander38 = require("commander");
|
|
4344
|
+
var wikiPageCreateCommand = new import_commander38.Command("create").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uC0DD\uC131").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").requiredOption("--title <title>", "\uD398\uC774\uC9C0 \uC81C\uBAA9").option("--parent <page-id>", "\uBD80\uBAA8 \uD398\uC774\uC9C0 ID").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)").action(async (project, opts) => {
|
|
4254
4345
|
const globalOpts = wikiPageCreateCommand.optsWithGlobals();
|
|
4255
4346
|
const config = await getConfigOrThrow();
|
|
4256
4347
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4275,8 +4366,8 @@ var wikiPageCreateCommand = new import_commander37.Command("create").description
|
|
|
4275
4366
|
});
|
|
4276
4367
|
|
|
4277
4368
|
// src/commands/wiki/page-edit.ts
|
|
4278
|
-
var
|
|
4279
|
-
var wikiPageEditCommand = new
|
|
4369
|
+
var import_commander39 = require("commander");
|
|
4370
|
+
var wikiPageEditCommand = new import_commander39.Command("edit").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uC218\uC815 (\uD50C\uB798\uADF8 \uC5C6\uC73C\uBA74 $EDITOR)").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").argument("<page-id>", "\uD398\uC774\uC9C0 ID").option("--title <title>", "\uD398\uC774\uC9C0 \uC81C\uBAA9 (\uC9C0\uC815 \uC2DC $EDITOR \uC0DD\uB7B5)").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)").action(async (project, pageId, opts) => {
|
|
4280
4371
|
const config = await getConfigOrThrow();
|
|
4281
4372
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
4282
4373
|
const hasTitle = opts.title != null;
|
|
@@ -4329,7 +4420,7 @@ var wikiPageEditCommand = new import_commander38.Command("edit").description("\u
|
|
|
4329
4420
|
});
|
|
4330
4421
|
|
|
4331
4422
|
// src/commands/wiki/page-delete.ts
|
|
4332
|
-
var
|
|
4423
|
+
var import_commander40 = require("commander");
|
|
4333
4424
|
|
|
4334
4425
|
// src/resolvers/wiki-page-input.ts
|
|
4335
4426
|
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>";
|
|
@@ -4386,7 +4477,7 @@ async function resolveWikiPageInput(client, args) {
|
|
|
4386
4477
|
}
|
|
4387
4478
|
|
|
4388
4479
|
// src/commands/wiki/page-delete.ts
|
|
4389
|
-
var wikiPageDeleteCommand = new
|
|
4480
|
+
var wikiPageDeleteCommand = new import_commander40.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) => {
|
|
4390
4481
|
const globalOpts = wikiPageDeleteCommand.optsWithGlobals();
|
|
4391
4482
|
const config = await getConfigOrThrow();
|
|
4392
4483
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4432,16 +4523,16 @@ var wikiPageDeleteCommand = new import_commander39.Command("delete").description
|
|
|
4432
4523
|
});
|
|
4433
4524
|
|
|
4434
4525
|
// src/commands/wiki/page-file/index.ts
|
|
4435
|
-
var
|
|
4526
|
+
var import_commander46 = require("commander");
|
|
4436
4527
|
|
|
4437
4528
|
// src/commands/wiki/page-file/list.ts
|
|
4438
|
-
var
|
|
4529
|
+
var import_commander41 = require("commander");
|
|
4439
4530
|
function formatSize3(bytes) {
|
|
4440
4531
|
if (bytes < 1024) return `${bytes}B`;
|
|
4441
4532
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`;
|
|
4442
4533
|
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
|
4443
4534
|
}
|
|
4444
|
-
var wikiPageFileListCommand = new
|
|
4535
|
+
var wikiPageFileListCommand = new import_commander41.Command("list").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uBAA9\uB85D \uC870\uD68C (general + inline image)").argument("[project]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (\uB610\uB294 \uCCAB \uC778\uC790\uC5D0 Dooray Wiki URL)").argument("[page-id]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (project\uC640 \uD568\uAED8 \uC0AC\uC6A9)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (--project \uB3D9\uBC18 \uD544\uC694)").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC5D0\uC11C wikiId \uD574\uC11D\uC6A9)").action(async (project, pageIdArg, opts) => {
|
|
4445
4536
|
const globalOpts = wikiPageFileListCommand.optsWithGlobals();
|
|
4446
4537
|
const config = await getConfigOrThrow();
|
|
4447
4538
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4472,7 +4563,7 @@ var wikiPageFileListCommand = new import_commander40.Command("list").description
|
|
|
4472
4563
|
});
|
|
4473
4564
|
|
|
4474
4565
|
// src/commands/wiki/page-file/upload.ts
|
|
4475
|
-
var
|
|
4566
|
+
var import_commander42 = require("commander");
|
|
4476
4567
|
|
|
4477
4568
|
// src/utils/wiki-snippet.ts
|
|
4478
4569
|
function wikiInlineImageSnippet(wikiId, attachFileId, name) {
|
|
@@ -4480,7 +4571,7 @@ function wikiInlineImageSnippet(wikiId, attachFileId, name) {
|
|
|
4480
4571
|
}
|
|
4481
4572
|
|
|
4482
4573
|
// src/commands/wiki/page-file/upload.ts
|
|
4483
|
-
var wikiPageFileUploadCommand = new
|
|
4574
|
+
var wikiPageFileUploadCommand = new import_commander42.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) => {
|
|
4484
4575
|
const globalOpts = wikiPageFileUploadCommand.optsWithGlobals();
|
|
4485
4576
|
const config = await getConfigOrThrow();
|
|
4486
4577
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4575,10 +4666,10 @@ var wikiPageFileUploadCommand = new import_commander41.Command("upload").descrip
|
|
|
4575
4666
|
});
|
|
4576
4667
|
|
|
4577
4668
|
// src/commands/wiki/page-file/download.ts
|
|
4578
|
-
var
|
|
4669
|
+
var import_commander43 = require("commander");
|
|
4579
4670
|
var import_promises11 = require("fs/promises");
|
|
4580
4671
|
var import_node_path9 = require("path");
|
|
4581
|
-
var wikiPageFileDownloadCommand = new
|
|
4672
|
+
var wikiPageFileDownloadCommand = new import_commander43.Command("download").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uB2E4\uC6B4\uB85C\uB4DC").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("-o, --output <dir>", "\uC800\uC7A5 \uB514\uB809\uD1A0\uB9AC", ".").action(async (arg1, arg2, arg3, opts) => {
|
|
4582
4673
|
const globalOpts = wikiPageFileDownloadCommand.optsWithGlobals();
|
|
4583
4674
|
const config = await getConfigOrThrow();
|
|
4584
4675
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4640,10 +4731,10 @@ var wikiPageFileDownloadCommand = new import_commander42.Command("download").des
|
|
|
4640
4731
|
});
|
|
4641
4732
|
|
|
4642
4733
|
// src/commands/wiki/page-file/download-all.ts
|
|
4643
|
-
var
|
|
4734
|
+
var import_commander44 = require("commander");
|
|
4644
4735
|
var import_promises12 = require("fs/promises");
|
|
4645
4736
|
var import_node_path10 = require("path");
|
|
4646
|
-
var wikiPageFileDownloadAllCommand = new
|
|
4737
|
+
var wikiPageFileDownloadAllCommand = new import_commander44.Command("download-all").description("\uC704\uD0A4 \uD398\uC774\uC9C0\uC758 \uBAA8\uB4E0 \uCCA8\uBD80\uD30C\uC77C \uB2E4\uC6B4\uB85C\uB4DC (general + inline image)").argument("[project]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (\uB610\uB294 \uCCAB \uC778\uC790\uC5D0 Dooray Wiki URL)").argument("[page-id]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (project\uC640 \uD568\uAED8 \uC0AC\uC6A9)").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (--project \uB3D9\uBC18 \uD544\uC694)").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("-o, --output <dir>", "\uC800\uC7A5 \uB514\uB809\uD1A0\uB9AC", ".").action(async (project, pageIdArg, opts) => {
|
|
4647
4738
|
const globalOpts = wikiPageFileDownloadAllCommand.optsWithGlobals();
|
|
4648
4739
|
const config = await getConfigOrThrow();
|
|
4649
4740
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4700,8 +4791,8 @@ var wikiPageFileDownloadAllCommand = new import_commander43.Command("download-al
|
|
|
4700
4791
|
});
|
|
4701
4792
|
|
|
4702
4793
|
// src/commands/wiki/page-file/delete.ts
|
|
4703
|
-
var
|
|
4704
|
-
var wikiPageFileDeleteCommand = new
|
|
4794
|
+
var import_commander45 = require("commander");
|
|
4795
|
+
var wikiPageFileDeleteCommand = new import_commander45.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) => {
|
|
4705
4796
|
const globalOpts = wikiPageFileDeleteCommand.optsWithGlobals();
|
|
4706
4797
|
const config = await getConfigOrThrow();
|
|
4707
4798
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4760,7 +4851,7 @@ var wikiPageFileDeleteCommand = new import_commander44.Command("delete").descrip
|
|
|
4760
4851
|
});
|
|
4761
4852
|
|
|
4762
4853
|
// src/commands/wiki/page-file/index.ts
|
|
4763
|
-
var wikiPageFileCommand = new
|
|
4854
|
+
var wikiPageFileCommand = new import_commander46.Command("file").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839 (Issue #70, ADR-029)");
|
|
4764
4855
|
wikiPageFileCommand.addCommand(wikiPageFileListCommand);
|
|
4765
4856
|
wikiPageFileCommand.addCommand(wikiPageFileUploadCommand);
|
|
4766
4857
|
wikiPageFileCommand.addCommand(wikiPageFileDownloadCommand);
|
|
@@ -4768,10 +4859,10 @@ wikiPageFileCommand.addCommand(wikiPageFileDownloadAllCommand);
|
|
|
4768
4859
|
wikiPageFileCommand.addCommand(wikiPageFileDeleteCommand);
|
|
4769
4860
|
|
|
4770
4861
|
// src/commands/wiki/page-comment/index.ts
|
|
4771
|
-
var
|
|
4862
|
+
var import_commander53 = require("commander");
|
|
4772
4863
|
|
|
4773
4864
|
// src/commands/wiki/page-comment/list.ts
|
|
4774
|
-
var
|
|
4865
|
+
var import_commander47 = require("commander");
|
|
4775
4866
|
|
|
4776
4867
|
// src/formatters/wiki-comment.ts
|
|
4777
4868
|
function formatWikiCommentList(comments, opts) {
|
|
@@ -4818,7 +4909,7 @@ function truncate(s, n) {
|
|
|
4818
4909
|
}
|
|
4819
4910
|
|
|
4820
4911
|
// src/commands/wiki/page-comment/list.ts
|
|
4821
|
-
var wikiPageCommentListCommand = new
|
|
4912
|
+
var wikiPageCommentListCommand = new import_commander47.Command("list").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uBAA9\uB85D \uC870\uD68C (\uCD5C\uC2E0\uC21C)").argument("[project]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (\uB610\uB294 \uCCAB \uC778\uC790\uC5D0 Dooray Wiki URL)").argument("[page-id]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (--project \uB3D9\uBC18)").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC6A9)").option("--size <n>", "\uD398\uC774\uC9C0 \uD06C\uAE30 (\uAE30\uBCF8 20, \uCD5C\uB300 100)", (v) => parseInt(v, 10)).option("--page <n>", "\uD398\uC774\uC9C0 \uBC88\uD638 (0\uBD80\uD130)", (v) => parseInt(v, 10)).option("--latest <n>", "\uCD5C\uC2E0 N\uAC1C\uB9CC (size \uB300\uC2E0 \uC0AC\uC6A9)", (v) => parseInt(v, 10)).action(async (project, pageIdArg, opts) => {
|
|
4822
4913
|
const globalOpts = wikiPageCommentListCommand.optsWithGlobals();
|
|
4823
4914
|
const config = await getConfigOrThrow();
|
|
4824
4915
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4843,8 +4934,8 @@ var wikiPageCommentListCommand = new import_commander46.Command("list").descript
|
|
|
4843
4934
|
});
|
|
4844
4935
|
|
|
4845
4936
|
// src/commands/wiki/page-comment/latest.ts
|
|
4846
|
-
var
|
|
4847
|
-
var wikiPageCommentLatestCommand = new
|
|
4937
|
+
var import_commander48 = require("commander");
|
|
4938
|
+
var wikiPageCommentLatestCommand = new import_commander48.Command("latest").description("\uCD5C\uC2E0 \uB313\uAE00 1\uAC74 \uC870\uD68C (= comment list --latest 1)").argument("[project]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (\uB610\uB294 \uCCAB \uC778\uC790\uC5D0 Dooray Wiki URL)").argument("[page-id]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (--project \uB3D9\uBC18)").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC6A9)").action(async (project, pageIdArg, opts) => {
|
|
4848
4939
|
const globalOpts = wikiPageCommentLatestCommand.optsWithGlobals();
|
|
4849
4940
|
const config = await getConfigOrThrow();
|
|
4850
4941
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4871,7 +4962,7 @@ var wikiPageCommentLatestCommand = new import_commander47.Command("latest").desc
|
|
|
4871
4962
|
});
|
|
4872
4963
|
|
|
4873
4964
|
// src/commands/wiki/page-comment/get.ts
|
|
4874
|
-
var
|
|
4965
|
+
var import_commander49 = require("commander");
|
|
4875
4966
|
|
|
4876
4967
|
// src/commands/wiki/page-comment/parse-args.ts
|
|
4877
4968
|
function parseWikiCommentArgs(arg1, arg2, arg3, opts) {
|
|
@@ -4924,7 +5015,7 @@ function parseWikiCommentArgs(arg1, arg2, arg3, opts) {
|
|
|
4924
5015
|
}
|
|
4925
5016
|
|
|
4926
5017
|
// src/commands/wiki/page-comment/get.ts
|
|
4927
|
-
var wikiPageCommentGetCommand = new
|
|
5018
|
+
var wikiPageCommentGetCommand = new import_commander49.Command("get").description("\uB2E8\uC77C \uB313\uAE00 \uC870\uD68C").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 <id>", "\uB313\uAE00 ID (arg3 \uB300\uC2E0)").action(async (arg1, arg2, arg3, opts) => {
|
|
4928
5019
|
const parsed = parseWikiCommentArgs(arg1, arg2, arg3, opts);
|
|
4929
5020
|
const config = await getConfigOrThrow();
|
|
4930
5021
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -4948,8 +5039,8 @@ var wikiPageCommentGetCommand = new import_commander48.Command("get").descriptio
|
|
|
4948
5039
|
});
|
|
4949
5040
|
|
|
4950
5041
|
// src/commands/wiki/page-comment/add.ts
|
|
4951
|
-
var
|
|
4952
|
-
var wikiPageCommentAddCommand = new
|
|
5042
|
+
var import_commander50 = require("commander");
|
|
5043
|
+
var wikiPageCommentAddCommand = new import_commander50.Command("add").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uCD94\uAC00 (--body \uC5C6\uC73C\uBA74 $EDITOR)").argument("[project]", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (\uB610\uB294 \uCCAB \uC778\uC790\uC5D0 Dooray Wiki URL)").argument("[page-id]", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID").option("--id <pageId>", "\uC704\uD0A4 \uD398\uC774\uC9C0 ID (--project \uB3D9\uBC18)").option("--url <url>", "Dooray Wiki URL").option("--project <code>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC (--id \uBAA8\uB4DC\uC6A9)").option("--body <text>", "\uB313\uAE00 \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 (project, pageIdArg, opts) => {
|
|
4953
5044
|
if ((opts.id || opts.url) && (project || pageIdArg)) {
|
|
4954
5045
|
throw new DoorayCliError(
|
|
4955
5046
|
"positional \uC778\uC790\uC640 --id/--url \uC635\uC158\uC740 \uB3D9\uC2DC\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
@@ -4995,8 +5086,8 @@ var wikiPageCommentAddCommand = new import_commander49.Command("add").descriptio
|
|
|
4995
5086
|
});
|
|
4996
5087
|
|
|
4997
5088
|
// src/commands/wiki/page-comment/edit.ts
|
|
4998
|
-
var
|
|
4999
|
-
var wikiPageCommentEditCommand = new
|
|
5089
|
+
var import_commander51 = require("commander");
|
|
5090
|
+
var wikiPageCommentEditCommand = new import_commander51.Command("edit").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uC218\uC815 ($EDITOR \uB610\uB294 --body \uC635\uC158)").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("--body <text>", "\uB313\uAE00 \uBCF8\uBB38 \uBCC0\uACBD (- \uC785\uB825 \uC2DC stdin, non-interactive)").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C (- \uC785\uB825 \uC2DC stdin, non-interactive)").action(async (arg1, arg2, arg3, opts) => {
|
|
5000
5091
|
const parsed = parseWikiCommentArgs(arg1, arg2, arg3, opts);
|
|
5001
5092
|
const config = await getConfigOrThrow();
|
|
5002
5093
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -5040,8 +5131,8 @@ var wikiPageCommentEditCommand = new import_commander50.Command("edit").descript
|
|
|
5040
5131
|
});
|
|
5041
5132
|
|
|
5042
5133
|
// src/commands/wiki/page-comment/delete.ts
|
|
5043
|
-
var
|
|
5044
|
-
var wikiPageCommentDeleteCommand = new
|
|
5134
|
+
var import_commander52 = require("commander");
|
|
5135
|
+
var wikiPageCommentDeleteCommand = new import_commander52.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) => {
|
|
5045
5136
|
const parsed = parseWikiCommentArgs(arg1, arg2, arg3, opts);
|
|
5046
5137
|
const config = await getConfigOrThrow();
|
|
5047
5138
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -5065,7 +5156,7 @@ var wikiPageCommentDeleteCommand = new import_commander51.Command("delete").desc
|
|
|
5065
5156
|
});
|
|
5066
5157
|
|
|
5067
5158
|
// src/commands/wiki/page-comment/index.ts
|
|
5068
|
-
var wikiPageCommentCommand = new
|
|
5159
|
+
var wikiPageCommentCommand = new import_commander53.Command("comment").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uB313\uAE00 \uAD00\uB828 \uBA85\uB839");
|
|
5069
5160
|
wikiPageCommentCommand.addCommand(wikiPageCommentListCommand);
|
|
5070
5161
|
wikiPageCommentCommand.addCommand(wikiPageCommentLatestCommand);
|
|
5071
5162
|
wikiPageCommentCommand.addCommand(wikiPageCommentGetCommand);
|
|
@@ -5074,10 +5165,10 @@ wikiPageCommentCommand.addCommand(wikiPageCommentEditCommand);
|
|
|
5074
5165
|
wikiPageCommentCommand.addCommand(wikiPageCommentDeleteCommand);
|
|
5075
5166
|
|
|
5076
5167
|
// src/commands/member/index.ts
|
|
5077
|
-
var
|
|
5168
|
+
var import_commander57 = require("commander");
|
|
5078
5169
|
|
|
5079
5170
|
// src/commands/member/get.ts
|
|
5080
|
-
var
|
|
5171
|
+
var import_commander54 = require("commander");
|
|
5081
5172
|
|
|
5082
5173
|
// src/formatters/member.ts
|
|
5083
5174
|
function formatMemberDetail(member, opts) {
|
|
@@ -5123,7 +5214,7 @@ function formatMemberSearchResults(members, opts) {
|
|
|
5123
5214
|
}
|
|
5124
5215
|
|
|
5125
5216
|
// src/commands/member/get.ts
|
|
5126
|
-
var memberGetCommand = new
|
|
5217
|
+
var memberGetCommand = new import_commander54.Command("get").description("\uBA64\uBC84 \uC0C1\uC138 \uC815\uBCF4 \uC870\uD68C (organizationMemberId)").argument("<member-id>", "\uC870\uD68C\uD560 organization member ID").action(async (memberId) => {
|
|
5127
5218
|
const globalOpts = memberGetCommand.optsWithGlobals();
|
|
5128
5219
|
const config = await getConfigOrThrow();
|
|
5129
5220
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -5132,8 +5223,8 @@ var memberGetCommand = new import_commander53.Command("get").description("\uBA64
|
|
|
5132
5223
|
});
|
|
5133
5224
|
|
|
5134
5225
|
// src/commands/member/list.ts
|
|
5135
|
-
var
|
|
5136
|
-
var memberListCommand = new
|
|
5226
|
+
var import_commander55 = require("commander");
|
|
5227
|
+
var memberListCommand = new import_commander55.Command("list").description("\uD504\uB85C\uC81D\uD2B8 \uBA64\uBC84 \uBAA9\uB85D").argument("<project>", "\uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uB610\uB294 ID").action(async (project) => {
|
|
5137
5228
|
const globalOpts = memberListCommand.optsWithGlobals();
|
|
5138
5229
|
const config = await getConfigOrThrow();
|
|
5139
5230
|
const client = new DoorayApiClient(config.apiKey, config.baseUrl);
|
|
@@ -5148,8 +5239,8 @@ var memberListCommand = new import_commander54.Command("list").description("\uD5
|
|
|
5148
5239
|
});
|
|
5149
5240
|
|
|
5150
5241
|
// src/commands/member/search.ts
|
|
5151
|
-
var
|
|
5152
|
-
var memberSearchCommand = new
|
|
5242
|
+
var import_commander56 = require("commander");
|
|
5243
|
+
var memberSearchCommand = new import_commander56.Command("search").description("organization \uC804\uCCB4\uC5D0\uC11C \uBA64\uBC84 \uAC80\uC0C9").argument("[keyword]", "\uC774\uB984 \uAC80\uC0C9\uC5B4 (--email/--user-code \uBBF8\uC9C0\uC815 \uC2DC name\uC73C\uB85C \uAC80\uC0C9)").option("--email <email>", "\uC678\uBD80 \uC774\uBA54\uC77C (\uCF64\uB9C8 \uAD6C\uBD84 \uAC00\uB2A5, exact match)").option("--user-code <code>", "\uC0AC\uBC88 like \uAC80\uC0C9").option("--user-code-exact <code>", "\uC0AC\uBC88 exact match").option("--page <n>", "\uD398\uC774\uC9C0 (\uAE30\uBCF8 0)", "0").option("--size <n>", "\uD398\uC774\uC9C0 \uD06C\uAE30 (\uAE30\uBCF8 20, max 100)", "20").action(async (keyword, opts) => {
|
|
5153
5244
|
const globalOpts = memberSearchCommand.optsWithGlobals();
|
|
5154
5245
|
const filterCount = [keyword, opts.email, opts.userCode, opts.userCodeExact].filter(Boolean).length;
|
|
5155
5246
|
if (filterCount === 0) {
|
|
@@ -5182,13 +5273,13 @@ var memberSearchCommand = new import_commander55.Command("search").description("
|
|
|
5182
5273
|
});
|
|
5183
5274
|
|
|
5184
5275
|
// src/commands/member/index.ts
|
|
5185
|
-
var memberCommand = new
|
|
5276
|
+
var memberCommand = new import_commander57.Command("member").description("Dooray \uBA64\uBC84 \uC870\uD68C");
|
|
5186
5277
|
memberCommand.addCommand(memberGetCommand);
|
|
5187
5278
|
memberCommand.addCommand(memberListCommand);
|
|
5188
5279
|
memberCommand.addCommand(memberSearchCommand);
|
|
5189
5280
|
|
|
5190
5281
|
// src/commands/mail/list.ts
|
|
5191
|
-
var
|
|
5282
|
+
var import_commander58 = require("commander");
|
|
5192
5283
|
|
|
5193
5284
|
// src/api/imapClient.ts
|
|
5194
5285
|
var import_imapflow = require("imapflow");
|
|
@@ -5305,7 +5396,7 @@ async function getMail(config, uid) {
|
|
|
5305
5396
|
|
|
5306
5397
|
// src/commands/mail/list.ts
|
|
5307
5398
|
var import_chalk5 = __toESM(require("chalk"));
|
|
5308
|
-
var mailListCommand = new
|
|
5399
|
+
var mailListCommand = new import_commander58.Command("list").description("\uBA54\uC77C \uBAA9\uB85D \uC870\uD68C").option("--unread", "\uC548\uC77D\uC740 \uBA54\uC77C\uB9CC").option("--search <keyword>", "\uC81C\uBAA9 \uAC80\uC0C9").option("--size <number>", "\uC870\uD68C \uAC1C\uC218", "20").action(async (opts) => {
|
|
5309
5400
|
const globalOpts = mailListCommand.optsWithGlobals();
|
|
5310
5401
|
const config = await getConfigOrThrow();
|
|
5311
5402
|
startSpinner("\uBA54\uC77C \uC870\uD68C \uC911...");
|
|
@@ -5337,9 +5428,9 @@ var mailListCommand = new import_commander57.Command("list").description("\uBA54
|
|
|
5337
5428
|
});
|
|
5338
5429
|
|
|
5339
5430
|
// src/commands/mail/get.ts
|
|
5340
|
-
var
|
|
5431
|
+
var import_commander59 = require("commander");
|
|
5341
5432
|
var import_chalk6 = __toESM(require("chalk"));
|
|
5342
|
-
var mailGetCommand = new
|
|
5433
|
+
var mailGetCommand = new import_commander59.Command("get").description("\uBA54\uC77C \uC0C1\uC138 \uC870\uD68C").argument("<uid>", "\uBA54\uC77C UID").action(async (uid) => {
|
|
5343
5434
|
const globalOpts = mailGetCommand.optsWithGlobals();
|
|
5344
5435
|
const config = await getConfigOrThrow();
|
|
5345
5436
|
startSpinner("\uBA54\uC77C \uC870\uD68C \uC911...");
|
|
@@ -5370,7 +5461,7 @@ ${mail.body}
|
|
|
5370
5461
|
});
|
|
5371
5462
|
|
|
5372
5463
|
// src/commands/mail/send.ts
|
|
5373
|
-
var
|
|
5464
|
+
var import_commander60 = require("commander");
|
|
5374
5465
|
var import_promises13 = require("fs/promises");
|
|
5375
5466
|
|
|
5376
5467
|
// src/api/smtpClient.ts
|
|
@@ -5420,7 +5511,7 @@ async function sendMail(config, opts) {
|
|
|
5420
5511
|
}
|
|
5421
5512
|
|
|
5422
5513
|
// src/commands/mail/send.ts
|
|
5423
|
-
var mailSendCommand = new
|
|
5514
|
+
var mailSendCommand = new import_commander60.Command("send").description("\uBA54\uC77C \uBC1C\uC1A1").requiredOption("--to <addresses...>", "\uBC1B\uB294\uC0AC\uB78C \uC774\uBA54\uC77C (\uBCF5\uC218 \uAC00\uB2A5)").requiredOption("--subject <title>", "\uC81C\uBAA9").option("--body <text>", "\uBCF8\uBB38").option("--body-file <path>", "\uBCF8\uBB38 \uD30C\uC77C \uACBD\uB85C").option("--cc <addresses...>", "\uCC38\uC870").option("--bcc <addresses...>", "\uC228\uC740\uCC38\uC870").option("--html", "\uBCF8\uBB38\uC744 HTML\uB85C \uC804\uC1A1").action(async (opts) => {
|
|
5424
5515
|
const globalOpts = mailSendCommand.optsWithGlobals();
|
|
5425
5516
|
const config = await getConfigOrThrow();
|
|
5426
5517
|
let body = opts.body ?? "";
|
|
@@ -5455,7 +5546,7 @@ var mailSendCommand = new import_commander59.Command("send").description("\uBA54
|
|
|
5455
5546
|
});
|
|
5456
5547
|
|
|
5457
5548
|
// src/commands/mail/reply.ts
|
|
5458
|
-
var
|
|
5549
|
+
var import_commander61 = require("commander");
|
|
5459
5550
|
var import_promises14 = require("fs/promises");
|
|
5460
5551
|
var import_imapflow2 = require("imapflow");
|
|
5461
5552
|
async function getMessageId(config, uid) {
|
|
@@ -5484,7 +5575,7 @@ async function getMessageId(config, uid) {
|
|
|
5484
5575
|
await client.logout();
|
|
5485
5576
|
}
|
|
5486
5577
|
}
|
|
5487
|
-
var mailReplyCommand = new
|
|
5578
|
+
var mailReplyCommand = new import_commander61.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) => {
|
|
5488
5579
|
const globalOpts = mailReplyCommand.optsWithGlobals();
|
|
5489
5580
|
const config = await getConfigOrThrow();
|
|
5490
5581
|
let body = opts.body ?? "";
|
|
@@ -5525,11 +5616,11 @@ var mailReplyCommand = new import_commander60.Command("reply").description("\uBA
|
|
|
5525
5616
|
});
|
|
5526
5617
|
|
|
5527
5618
|
// src/commands/messenger/index.ts
|
|
5528
|
-
var
|
|
5619
|
+
var import_commander64 = require("commander");
|
|
5529
5620
|
|
|
5530
5621
|
// src/commands/messenger/send.ts
|
|
5531
|
-
var
|
|
5532
|
-
var messengerSendCommand = new
|
|
5622
|
+
var import_commander62 = require("commander");
|
|
5623
|
+
var messengerSendCommand = new import_commander62.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) => {
|
|
5533
5624
|
if (!opts.to) {
|
|
5534
5625
|
throw new DoorayCliError("--to \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
5535
5626
|
}
|
|
@@ -5569,7 +5660,7 @@ var messengerSendCommand = new import_commander61.Command("send").description("\
|
|
|
5569
5660
|
});
|
|
5570
5661
|
|
|
5571
5662
|
// src/commands/messenger/channel-send.ts
|
|
5572
|
-
var
|
|
5663
|
+
var import_commander63 = require("commander");
|
|
5573
5664
|
|
|
5574
5665
|
// src/resolvers/messenger-channel.ts
|
|
5575
5666
|
var CHANNEL_ID_RE = /^\d{15,}$/;
|
|
@@ -5587,7 +5678,7 @@ async function resolveMessengerChannel(client, input2) {
|
|
|
5587
5678
|
}
|
|
5588
5679
|
|
|
5589
5680
|
// src/commands/messenger/channel-send.ts
|
|
5590
|
-
var messengerChannelSendCommand = new
|
|
5681
|
+
var messengerChannelSendCommand = new import_commander63.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) => {
|
|
5591
5682
|
if (!opts.channel) {
|
|
5592
5683
|
throw new DoorayCliError("--channel \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
5593
5684
|
}
|
|
@@ -5621,12 +5712,12 @@ var messengerChannelSendCommand = new import_commander62.Command("channel-send")
|
|
|
5621
5712
|
});
|
|
5622
5713
|
|
|
5623
5714
|
// src/commands/messenger/index.ts
|
|
5624
|
-
var messengerCommand = new
|
|
5715
|
+
var messengerCommand = new import_commander64.Command("messenger").description("\uBA54\uC2E0\uC800 \uAD00\uB828 \uBA85\uB839");
|
|
5625
5716
|
messengerCommand.addCommand(messengerSendCommand);
|
|
5626
5717
|
messengerCommand.addCommand(messengerChannelSendCommand);
|
|
5627
5718
|
|
|
5628
5719
|
// src/commands/feedback.ts
|
|
5629
|
-
var
|
|
5720
|
+
var import_commander65 = require("commander");
|
|
5630
5721
|
var import_node_child_process2 = require("child_process");
|
|
5631
5722
|
var import_node_util = require("util");
|
|
5632
5723
|
var import_promises17 = require("fs/promises");
|
|
@@ -5737,7 +5828,7 @@ async function readBody(opts) {
|
|
|
5737
5828
|
if (opts.bodyFile) return await (0, import_promises17.readFile)(opts.bodyFile, "utf-8");
|
|
5738
5829
|
return void 0;
|
|
5739
5830
|
}
|
|
5740
|
-
var feedbackCommand = new
|
|
5831
|
+
var feedbackCommand = new import_commander65.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(
|
|
5741
5832
|
"--label <name>",
|
|
5742
5833
|
"\uB77C\uBCA8 (\uBC18\uBCF5 \uAC00\uB2A5)",
|
|
5743
5834
|
(value, prev) => [...prev, value],
|
|
@@ -5900,8 +5991,8 @@ function sanitizeArgv(argv) {
|
|
|
5900
5991
|
}
|
|
5901
5992
|
|
|
5902
5993
|
// src/index.ts
|
|
5903
|
-
var program = new
|
|
5904
|
-
program.name("dooray").description("Dooray REST API CLI").version("0.
|
|
5994
|
+
var program = new import_commander66.Command();
|
|
5995
|
+
program.name("dooray").description("Dooray REST API CLI").version("0.14.0").option("--json", "JSON \uD615\uC2DD\uC73C\uB85C \uCD9C\uB825").option("--quiet", "ID\uB9CC \uCD9C\uB825").option("--no-color", "\uC0C9\uC0C1 \uBE44\uD65C\uC131\uD654");
|
|
5905
5996
|
program.hook("preAction", () => {
|
|
5906
5997
|
const opts = program.opts();
|
|
5907
5998
|
if (opts.color === false || process.env.NO_COLOR) {
|
|
@@ -5911,14 +6002,14 @@ program.hook("preAction", () => {
|
|
|
5911
6002
|
setQuiet(true);
|
|
5912
6003
|
}
|
|
5913
6004
|
});
|
|
5914
|
-
var projectCommand = new
|
|
6005
|
+
var projectCommand = new import_commander66.Command("project").description("\uD504\uB85C\uC81D\uD2B8 \uAD00\uB828 \uBA85\uB839");
|
|
5915
6006
|
projectCommand.addCommand(projectListCommand);
|
|
5916
6007
|
projectCommand.addCommand(projectMembersCommand);
|
|
5917
6008
|
projectCommand.addCommand(projectWorkflowsCommand);
|
|
5918
6009
|
projectCommand.addCommand(projectGroupsCommand);
|
|
5919
6010
|
projectCommand.addCommand(projectTagsCommand);
|
|
5920
6011
|
projectCommand.addCommand(projectTemplatesCommand);
|
|
5921
|
-
var postCommand = new
|
|
6012
|
+
var postCommand = new import_commander66.Command("post").description("\uC5C5\uBB34 \uAD00\uB828 \uBA85\uB839");
|
|
5922
6013
|
postCommand.addCommand(postListCommand);
|
|
5923
6014
|
postCommand.addCommand(postSearchCommand);
|
|
5924
6015
|
postCommand.addCommand(postGetCommand);
|
|
@@ -5926,7 +6017,7 @@ postCommand.addCommand(postEditCommand);
|
|
|
5926
6017
|
postCommand.addCommand(postCreateCommand);
|
|
5927
6018
|
postCommand.addCommand(postDoneCommand);
|
|
5928
6019
|
postCommand.addCommand(postWorkflowCommand);
|
|
5929
|
-
var commentCommand = new
|
|
6020
|
+
var commentCommand = new import_commander66.Command("comment").description("\uB313\uAE00 \uAD00\uB828 \uBA85\uB839");
|
|
5930
6021
|
commentCommand.addCommand(commentListCommand);
|
|
5931
6022
|
commentCommand.addCommand(commentLatestCommand);
|
|
5932
6023
|
commentCommand.addCommand(commentGetCommand);
|
|
@@ -5935,17 +6026,18 @@ commentCommand.addCommand(commentEditCommand);
|
|
|
5935
6026
|
commentCommand.addCommand(commentDeleteCommand);
|
|
5936
6027
|
commentCommand.addCommand(commentFileCommand);
|
|
5937
6028
|
postCommand.addCommand(commentCommand);
|
|
5938
|
-
var fileCommand = new
|
|
6029
|
+
var fileCommand = new import_commander66.Command("file").description("\uCCA8\uBD80\uD30C\uC77C \uAD00\uB828 \uBA85\uB839");
|
|
5939
6030
|
fileCommand.addCommand(fileListCommand);
|
|
5940
6031
|
fileCommand.addCommand(fileDownloadCommand);
|
|
5941
6032
|
fileCommand.addCommand(fileDownloadAllCommand);
|
|
5942
6033
|
fileCommand.addCommand(fileUploadCommand);
|
|
5943
6034
|
fileCommand.addCommand(fileDeleteCommand);
|
|
5944
6035
|
postCommand.addCommand(fileCommand);
|
|
5945
|
-
var wikiCommand = new
|
|
6036
|
+
var wikiCommand = new import_commander66.Command("wiki").description("\uC704\uD0A4 \uAD00\uB828 \uBA85\uB839");
|
|
5946
6037
|
wikiCommand.addCommand(wikiListCommand);
|
|
5947
6038
|
wikiCommand.addCommand(wikiPagesCommand);
|
|
5948
|
-
|
|
6039
|
+
wikiCommand.addCommand(wikiTreeCommand);
|
|
6040
|
+
var wikiPageCommand = new import_commander66.Command("page").description("\uC704\uD0A4 \uD398\uC774\uC9C0 \uAD00\uB828 \uBA85\uB839");
|
|
5949
6041
|
wikiPageCommand.addCommand(wikiPageGetCommand);
|
|
5950
6042
|
wikiPageCommand.addCommand(wikiPageCreateCommand);
|
|
5951
6043
|
wikiPageCommand.addCommand(wikiPageEditCommand);
|
|
@@ -5953,7 +6045,7 @@ wikiPageCommand.addCommand(wikiPageDeleteCommand);
|
|
|
5953
6045
|
wikiPageCommand.addCommand(wikiPageFileCommand);
|
|
5954
6046
|
wikiPageCommand.addCommand(wikiPageCommentCommand);
|
|
5955
6047
|
wikiCommand.addCommand(wikiPageCommand);
|
|
5956
|
-
var mailCommand = new
|
|
6048
|
+
var mailCommand = new import_commander66.Command("mail").description("\uBA54\uC77C \uAD00\uB828 \uBA85\uB839");
|
|
5957
6049
|
mailCommand.addCommand(mailListCommand);
|
|
5958
6050
|
mailCommand.addCommand(mailGetCommand);
|
|
5959
6051
|
mailCommand.addCommand(mailSendCommand);
|