@rhseung/ps-cli 1.3.3 → 1.5.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.
@@ -1,23 +1,35 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ getUserStats
4
+ } from "../chunk-A6STXEAE.js";
5
+ import {
6
+ calculateTierProgress,
7
+ getNextTierMinRating,
3
8
  getTierColor,
4
9
  getTierName,
5
- getUserStats,
6
10
  source_default
7
- } from "../chunk-2E4VSP6O.js";
11
+ } from "../chunk-HDNNR5OY.js";
8
12
  import {
13
+ Command,
14
+ CommandBuilder,
15
+ CommandDef,
9
16
  getSolvedAcHandle
10
- } from "../chunk-PNIGP6LX.js";
11
- import "../chunk-FYS2JH42.js";
17
+ } from "../chunk-7SVCS23X.js";
18
+ import {
19
+ __decorateClass
20
+ } from "../chunk-7MQMPJ3X.js";
12
21
 
13
22
  // src/commands/stats.tsx
14
- import { useEffect, useState } from "react";
15
- import { render, Box, Text } from "ink";
16
23
  import { Alert } from "@inkjs/ui";
17
24
  import { Spinner } from "@inkjs/ui";
18
- import gradient from "gradient-string";
19
- import { jsx, jsxs } from "react/jsx-runtime";
20
- function StatsCommand({ handle, onComplete }) {
25
+ import { Box, Text, Transform } from "ink";
26
+
27
+ // src/hooks/use-user-stats.ts
28
+ import { useEffect, useState } from "react";
29
+ function useUserStats({
30
+ handle,
31
+ onComplete
32
+ }) {
21
33
  const [status, setStatus] = useState(
22
34
  "loading"
23
35
  );
@@ -38,6 +50,30 @@ function StatsCommand({ handle, onComplete }) {
38
50
  }, 3e3);
39
51
  });
40
52
  }, [handle, onComplete]);
53
+ return {
54
+ status,
55
+ user,
56
+ error
57
+ };
58
+ }
59
+
60
+ // src/commands/stats.tsx
61
+ import { jsx, jsxs } from "react/jsx-runtime";
62
+ function ProgressBarWithColor({ value, colorFn }) {
63
+ const width = process.stdout.columns || 40;
64
+ const barWidth = Math.max(10, Math.min(30, width - 20));
65
+ const filled = Math.round(value / 100 * barWidth);
66
+ const empty = barWidth - filled;
67
+ const filledBar = "\u2588".repeat(filled);
68
+ const emptyBar = "\u2591".repeat(empty);
69
+ const barText = filledBar + emptyBar;
70
+ return /* @__PURE__ */ jsx(Transform, { transform: (output) => colorFn(output), children: /* @__PURE__ */ jsx(Text, { children: barText }) });
71
+ }
72
+ function StatsView({ handle, onComplete }) {
73
+ const { status, user, error } = useUserStats({
74
+ handle,
75
+ onComplete
76
+ });
41
77
  if (status === "loading") {
42
78
  return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: /* @__PURE__ */ jsx(Spinner, { label: "\uD1B5\uACC4\uB97C \uBD88\uB7EC\uC624\uB294 \uC911..." }) });
43
79
  }
@@ -49,16 +85,22 @@ function StatsCommand({ handle, onComplete }) {
49
85
  }
50
86
  if (user) {
51
87
  const tierName = getTierName(user.tier);
52
- const tierDisplay = user.tier === 31 ? gradient([
53
- { r: 255, g: 124, b: 168 },
54
- { r: 180, g: 145, b: 255 },
55
- { r: 124, g: 249, b: 255 }
56
- ])(tierName) : source_default.hex(getTierColor(user.tier))(tierName);
88
+ const tierColor = getTierColor(user.tier);
89
+ const tierColorFn = typeof tierColor === "string" ? source_default.hex(tierColor) : tierColor.multiline;
90
+ const nextTierMin = getNextTierMinRating(user.tier);
91
+ const progress = user.tier === 31 ? 100 : calculateTierProgress(user.rating, user.tier);
57
92
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
58
93
  /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsxs(Text, { color: "cyan", bold: true, children: [
59
94
  "\u2728 ",
60
95
  user.handle
61
96
  ] }) }),
97
+ /* @__PURE__ */ jsx(Box, { marginBottom: 1, flexDirection: "row", gap: 1, children: /* @__PURE__ */ jsxs(Text, { children: [
98
+ tierColorFn(tierName),
99
+ " ",
100
+ /* @__PURE__ */ jsx(Text, { bold: true, children: tierColorFn(user.rating.toLocaleString()) }),
101
+ nextTierMin !== null && /* @__PURE__ */ jsx(Text, { bold: true, children: " / " + nextTierMin.toLocaleString() })
102
+ ] }) }),
103
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsx(ProgressBarWithColor, { value: progress, colorFn: tierColorFn }) }),
62
104
  /* @__PURE__ */ jsx(
63
105
  Box,
64
106
  {
@@ -67,11 +109,6 @@ function StatsCommand({ handle, onComplete }) {
67
109
  borderColor: "gray",
68
110
  alignSelf: "flex-start",
69
111
  children: /* @__PURE__ */ jsxs(Box, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
70
- /* @__PURE__ */ jsxs(Text, { children: [
71
- tierDisplay,
72
- " ",
73
- /* @__PURE__ */ jsx(Text, { bold: true, children: user.rating.toLocaleString() })
74
- ] }),
75
112
  /* @__PURE__ */ jsxs(Text, { children: [
76
113
  "\uD574\uACB0\uD55C \uBB38\uC81C:",
77
114
  " ",
@@ -100,65 +137,48 @@ function StatsCommand({ handle, onComplete }) {
100
137
  }
101
138
  return null;
102
139
  }
103
- async function statsCommand(handle) {
104
- return new Promise((resolve) => {
105
- const { unmount } = render(
106
- /* @__PURE__ */ jsx(
107
- StatsCommand,
108
- {
109
- handle,
110
- onComplete: () => {
111
- unmount();
112
- resolve();
113
- }
114
- }
115
- )
116
- );
117
- });
118
- }
119
- var statsHelp = `
120
- \uC0AC\uC6A9\uBC95:
121
- $ ps stats [\uD578\uB4E4] [\uC635\uC158]
122
-
123
- \uC124\uBA85:
124
- Solved.ac\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uD1B5\uACC4\uB97C \uC870\uD68C\uD569\uB2C8\uB2E4.
125
- - \uD2F0\uC5B4, \uB808\uC774\uD305, \uD574\uACB0\uD55C \uBB38\uC81C \uC218 \uB4F1 \uD45C\uC2DC
126
- - \uADF8\uB77C\uB370\uC774\uC158\uC73C\uB85C \uC2DC\uAC01\uC801\uC73C\uB85C \uD45C\uC2DC
127
-
128
- \uC635\uC158:
129
- --handle, -h Solved.ac \uD578\uB4E4 (\uC124\uC815\uC5D0 \uC800\uC7A5\uB41C \uAC12 \uC0AC\uC6A9 \uAC00\uB2A5)
130
-
131
- \uC608\uC81C:
132
- $ ps stats myhandle
133
- $ ps stats --handle myhandle
134
- `;
135
- async function statsExecute(args, flags) {
136
- if (flags.help) {
137
- console.log(statsHelp.trim());
138
- process.exit(0);
139
- return;
140
- }
141
- let handle = args[0] || flags.handle;
142
- if (!handle) {
143
- handle = getSolvedAcHandle();
144
- }
145
- if (!handle) {
146
- console.error("\uC624\uB958: Solved.ac \uD578\uB4E4\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694.");
147
- console.error(`\uC0AC\uC6A9\uBC95: ps stats <\uD578\uB4E4>`);
148
- console.error(`\uB3C4\uC6C0\uB9D0: ps stats --help`);
149
- console.error(`\uD78C\uD2B8: \uC124\uC815\uC5D0 \uD578\uB4E4\uC744 \uC800\uC7A5\uD558\uBA74 \uB9E4\uBC88 \uC785\uB825\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.`);
150
- process.exit(1);
140
+ var StatsCommand = class extends Command {
141
+ async execute(args, flags) {
142
+ let handle = args[0] || flags.handle;
143
+ if (!handle) {
144
+ handle = getSolvedAcHandle();
145
+ }
146
+ if (!handle) {
147
+ console.error("\uC624\uB958: Solved.ac \uD578\uB4E4\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694.");
148
+ console.error(`\uC0AC\uC6A9\uBC95: ps stats <\uD578\uB4E4>`);
149
+ console.error(`\uB3C4\uC6C0\uB9D0: ps stats --help`);
150
+ console.error(
151
+ `\uD78C\uD2B8: \uC124\uC815\uC5D0 \uD578\uB4E4\uC744 \uC800\uC7A5\uD558\uBA74 \uB9E4\uBC88 \uC785\uB825\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.`
152
+ );
153
+ process.exit(1);
154
+ return;
155
+ }
156
+ await this.renderView(StatsView, {
157
+ handle
158
+ });
151
159
  }
152
- await statsCommand(handle);
153
- }
154
- var statsCommandDef = {
155
- name: "stats",
156
- help: statsHelp,
157
- execute: statsExecute
158
160
  };
159
- var stats_default = statsCommandDef;
161
+ StatsCommand = __decorateClass([
162
+ CommandDef({
163
+ name: "stats",
164
+ description: `Solved.ac\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uD1B5\uACC4\uB97C \uC870\uD68C\uD569\uB2C8\uB2E4.
165
+ - \uD2F0\uC5B4, \uB808\uC774\uD305, \uD574\uACB0\uD55C \uBB38\uC81C \uC218 \uB4F1 \uD45C\uC2DC
166
+ - \uADF8\uB77C\uB370\uC774\uC158\uC73C\uB85C \uC2DC\uAC01\uC801\uC73C\uB85C \uD45C\uC2DC`,
167
+ flags: [
168
+ {
169
+ name: "handle",
170
+ options: {
171
+ shortFlag: "h",
172
+ description: "Solved.ac \uD578\uB4E4 (\uC124\uC815\uC5D0 \uC800\uC7A5\uB41C \uAC12 \uC0AC\uC6A9 \uAC00\uB2A5)"
173
+ }
174
+ }
175
+ ],
176
+ autoDetectProblemId: false,
177
+ examples: ["stats myhandle", "stats --handle myhandle"]
178
+ })
179
+ ], StatsCommand);
180
+ var stats_default = CommandBuilder.fromClass(StatsCommand);
160
181
  export {
161
- stats_default as default,
162
- statsExecute,
163
- statsHelp
182
+ StatsCommand,
183
+ stats_default as default
164
184
  };
@@ -1,26 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- detectLanguageFromFile,
4
- getSupportedLanguages,
5
- getSupportedLanguagesString
6
- } from "../chunk-TQXMB7XV.js";
3
+ openBrowser
4
+ } from "../chunk-QGMWUOJ3.js";
7
5
  import {
6
+ Command,
7
+ CommandBuilder,
8
+ CommandDef,
8
9
  detectProblemIdFromPath,
9
- getProblemDirPath,
10
- getProblemId
11
- } from "../chunk-6ENX5K3C.js";
12
- import "../chunk-PNIGP6LX.js";
13
- import "../chunk-FYS2JH42.js";
10
+ findSolutionFile,
11
+ getProblemId,
12
+ resolveLanguage,
13
+ resolveProblemContext
14
+ } from "../chunk-7SVCS23X.js";
15
+ import {
16
+ __decorateClass,
17
+ getSupportedLanguagesString
18
+ } from "../chunk-7MQMPJ3X.js";
14
19
 
15
20
  // src/commands/submit.tsx
16
- import { useState, useEffect } from "react";
17
- import { render, Text, Box } from "ink";
18
21
  import { Badge, StatusMessage, Alert } from "@inkjs/ui";
19
- import { readdir } from "fs/promises";
20
- import { join } from "path";
21
- import { readFile } from "fs/promises";
22
22
  import { Spinner } from "@inkjs/ui";
23
- import { execaCommand as execaCommand2 } from "execa";
23
+ import { Text, Box } from "ink";
24
+
25
+ // src/hooks/use-submit.ts
26
+ import { readFile } from "fs/promises";
27
+ import { useEffect, useState } from "react";
24
28
 
25
29
  // src/utils/clipboard.ts
26
30
  import { execa, execaCommand } from "execa";
@@ -52,17 +56,16 @@ async function copyToClipboard(text) {
52
56
  }
53
57
  }
54
58
  return true;
55
- } catch (error) {
59
+ } catch {
56
60
  return false;
57
61
  }
58
62
  }
59
63
 
60
- // src/commands/submit.tsx
61
- import { jsx, jsxs } from "react/jsx-runtime";
64
+ // src/hooks/use-submit.ts
62
65
  var BOJ_BASE_URL = "https://www.acmicpc.net";
63
- function SubmitCommand({
66
+ function useSubmit({
64
67
  problemId,
65
- language,
68
+ language: _language,
66
69
  sourcePath,
67
70
  onComplete
68
71
  }) {
@@ -88,19 +91,7 @@ function SubmitCommand({
88
91
  const url = `${BOJ_BASE_URL}/submit/${problemId}`;
89
92
  setSubmitUrl(url);
90
93
  setMessage("\uBE0C\uB77C\uC6B0\uC800\uB97C \uC5EC\uB294 \uC911...");
91
- let command;
92
- if (process.platform === "win32") {
93
- command = `start "" "${url}"`;
94
- } else if (process.platform === "darwin") {
95
- command = `open "${url}"`;
96
- } else {
97
- command = `xdg-open "${url}"`;
98
- }
99
- await execaCommand2(command, {
100
- shell: true,
101
- detached: true,
102
- stdio: "ignore"
103
- });
94
+ await openBrowser(url);
104
95
  setStatus("success");
105
96
  setTimeout(() => {
106
97
  onComplete();
@@ -113,8 +104,39 @@ function SubmitCommand({
113
104
  }, 2e3);
114
105
  }
115
106
  }
116
- submit();
117
- }, [problemId, language, sourcePath, onComplete]);
107
+ void submit();
108
+ }, [problemId, sourcePath, onComplete]);
109
+ return {
110
+ status,
111
+ message,
112
+ error,
113
+ submitUrl,
114
+ clipboardSuccess,
115
+ clipboardError
116
+ };
117
+ }
118
+
119
+ // src/commands/submit.tsx
120
+ import { jsx, jsxs } from "react/jsx-runtime";
121
+ function SubmitView({
122
+ problemId,
123
+ language,
124
+ sourcePath,
125
+ onComplete
126
+ }) {
127
+ const {
128
+ status,
129
+ message,
130
+ error,
131
+ submitUrl,
132
+ clipboardSuccess,
133
+ clipboardError
134
+ } = useSubmit({
135
+ problemId,
136
+ language,
137
+ sourcePath,
138
+ onComplete
139
+ });
118
140
  if (status === "loading") {
119
141
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
120
142
  /* @__PURE__ */ jsx(Spinner, { label: message }),
@@ -171,100 +193,64 @@ function SubmitCommand({
171
193
  )
172
194
  ] });
173
195
  }
174
- async function detectSolutionFile(problemDir) {
175
- const files = await readdir(problemDir);
176
- const solutionFile = files.find((f) => f.startsWith("solution."));
177
- if (!solutionFile) {
178
- throw new Error("solution.* \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
179
- }
180
- return join(problemDir, solutionFile);
181
- }
182
- async function submitCommand(problemId, language) {
183
- const currentPathProblemId = detectProblemIdFromPath(process.cwd());
184
- const problemDir = problemId && currentPathProblemId !== problemId ? getProblemDirPath(problemId) : process.cwd();
185
- const sourcePath = await detectSolutionFile(problemDir);
186
- const detectedLanguage = language ?? detectLanguageFromFile(sourcePath);
187
- if (!detectedLanguage) {
188
- throw new Error(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC5B8\uC5B4\uC785\uB2C8\uB2E4: ${sourcePath}`);
189
- }
190
- let finalProblemId = problemId ?? detectProblemIdFromPath(problemDir);
191
- if (finalProblemId === null) {
192
- const segments = problemDir.split(/[/\\]/).filter(Boolean);
193
- const lastSegment = segments[segments.length - 1];
194
- if (lastSegment) {
195
- const parsedId = parseInt(lastSegment, 10);
196
- if (!isNaN(parsedId) && parsedId > 0 && lastSegment === parsedId.toString()) {
197
- finalProblemId = parsedId;
198
- }
199
- }
200
- }
201
- if (finalProblemId === null) {
202
- throw new Error(
203
- "\uBB38\uC81C \uBC88\uD638\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uBB38\uC81C \uBC88\uD638\uB97C \uC778\uC790\uB85C \uC804\uB2EC\uD558\uAC70\uB098 \uBB38\uC81C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC2E4\uD589\uD574\uC8FC\uC138\uC694."
196
+ var SubmitCommand = class extends Command {
197
+ async execute(args, flags) {
198
+ const problemId = getProblemId(args);
199
+ const context = await resolveProblemContext(
200
+ problemId !== null ? [problemId.toString()] : [],
201
+ { requireId: true }
204
202
  );
205
- }
206
- return new Promise((resolve) => {
207
- const { unmount } = render(
208
- /* @__PURE__ */ jsx(
209
- SubmitCommand,
210
- {
211
- problemId: finalProblemId,
212
- language: detectedLanguage,
213
- sourcePath,
214
- onComplete: () => {
215
- unmount();
216
- resolve();
217
- }
218
- }
219
- )
203
+ const sourcePath = await findSolutionFile(context.problemDir);
204
+ const detectedLanguage = await resolveLanguage(
205
+ context.problemDir,
206
+ flags.language
220
207
  );
221
- });
222
- }
223
- var submitHelp = `
224
- \uC0AC\uC6A9\uBC95:
225
- $ ps submit [\uBB38\uC81C\uBC88\uD638] [\uC635\uC158]
226
-
227
- \uC124\uBA85:
228
- \uBC31\uC900 \uC81C\uCD9C \uD398\uC774\uC9C0\uB97C \uBE0C\uB77C\uC6B0\uC800\uB85C \uC5F4\uACE0 \uC18C\uC2A4 \uCF54\uB4DC\uB97C \uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC\uD569\uB2C8\uB2E4.
229
- - \uBB38\uC81C \uBC88\uD638\uB97C \uC778\uC790\uB85C \uC804\uB2EC\uD558\uAC70\uB098 \uBB38\uC81C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC2E4\uD589\uD558\uBA74 \uC790\uB3D9\uC73C\uB85C \uBB38\uC81C \uBC88\uD638\uB97C \uCD94\uB860
230
- - solution.* \uD30C\uC77C\uC744 \uC790\uB3D9\uC73C\uB85C \uCC3E\uC544 \uC5B8\uC5B4 \uAC10\uC9C0
231
- - \uC18C\uC2A4 \uCF54\uB4DC\uB97C \uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uC790\uB3D9 \uBCF5\uC0AC
232
- - \uC81C\uCD9C \uD398\uC774\uC9C0\uB97C \uBE0C\uB77C\uC6B0\uC800\uB85C \uC790\uB3D9 \uC5F4\uAE30
233
-
234
- \uC635\uC158:
235
- --language, -l \uC5B8\uC5B4 \uC120\uD0DD (\uC9C0\uC815 \uC2DC \uC790\uB3D9 \uAC10\uC9C0 \uBB34\uC2DC)
236
- \uC9C0\uC6D0 \uC5B8\uC5B4: ${getSupportedLanguagesString()}
237
-
238
- \uC608\uC81C:
239
- $ ps submit # \uD604\uC7AC \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC81C\uCD9C
240
- $ ps submit 1000 # 1000\uBC88 \uBB38\uC81C \uC81C\uCD9C
241
- $ ps submit --language python # Python\uC73C\uB85C \uC81C\uCD9C
242
- `;
243
- async function submitExecute(args, flags) {
244
- if (flags.help) {
245
- console.log(submitHelp.trim());
246
- process.exit(0);
247
- return;
248
- }
249
- const problemId = getProblemId(args);
250
- const validLanguages = getSupportedLanguages();
251
- const language = flags.language;
252
- if (flags.language && language && !validLanguages.includes(language)) {
253
- console.error(
254
- `\uC624\uB958: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC5B8\uC5B4\uC785\uB2C8\uB2E4. (${getSupportedLanguagesString()})`
255
- );
256
- process.exit(1);
208
+ let finalProblemId = context.problemId;
209
+ if (finalProblemId === null) {
210
+ finalProblemId = detectProblemIdFromPath(context.problemDir);
211
+ }
212
+ if (finalProblemId === null) {
213
+ throw new Error(
214
+ "\uBB38\uC81C \uBC88\uD638\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uBB38\uC81C \uBC88\uD638\uB97C \uC778\uC790\uB85C \uC804\uB2EC\uD558\uAC70\uB098 \uBB38\uC81C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC2E4\uD589\uD574\uC8FC\uC138\uC694."
215
+ );
216
+ }
217
+ await this.renderView(SubmitView, {
218
+ problemId: finalProblemId,
219
+ language: detectedLanguage,
220
+ sourcePath
221
+ });
257
222
  }
258
- await submitCommand(problemId, language);
259
- }
260
- var submitCommandDef = {
261
- name: "submit",
262
- help: submitHelp,
263
- execute: submitExecute
264
223
  };
265
- var submit_default = submitCommandDef;
224
+ SubmitCommand = __decorateClass([
225
+ CommandDef({
226
+ name: "submit",
227
+ description: `\uBC31\uC900 \uC81C\uCD9C \uD398\uC774\uC9C0\uB97C \uBE0C\uB77C\uC6B0\uC800\uB85C \uC5F4\uACE0 \uC18C\uC2A4 \uCF54\uB4DC\uB97C \uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC\uD569\uB2C8\uB2E4.
228
+ - \uBB38\uC81C \uBC88\uD638\uB97C \uC778\uC790\uB85C \uC804\uB2EC\uD558\uAC70\uB098 \uBB38\uC81C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC2E4\uD589\uD558\uBA74 \uC790\uB3D9\uC73C\uB85C \uBB38\uC81C \uBC88\uD638\uB97C \uCD94\uB860
229
+ - solution.* \uD30C\uC77C\uC744 \uC790\uB3D9\uC73C\uB85C \uCC3E\uC544 \uC5B8\uC5B4 \uAC10\uC9C0
230
+ - \uC18C\uC2A4 \uCF54\uB4DC\uB97C \uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uC790\uB3D9 \uBCF5\uC0AC
231
+ - \uC81C\uCD9C \uD398\uC774\uC9C0\uB97C \uBE0C\uB77C\uC6B0\uC800\uB85C \uC790\uB3D9 \uC5F4\uAE30`,
232
+ flags: [
233
+ {
234
+ name: "language",
235
+ options: {
236
+ shortFlag: "l",
237
+ description: `\uC5B8\uC5B4 \uC120\uD0DD (\uC9C0\uC815 \uC2DC \uC790\uB3D9 \uAC10\uC9C0 \uBB34\uC2DC)
238
+ \uC9C0\uC6D0 \uC5B8\uC5B4: ${getSupportedLanguagesString()}`
239
+ }
240
+ }
241
+ ],
242
+ autoDetectProblemId: true,
243
+ autoDetectLanguage: true,
244
+ requireProblemId: true,
245
+ examples: [
246
+ "submit # \uD604\uC7AC \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uC81C\uCD9C",
247
+ "submit 1000 # 1000\uBC88 \uBB38\uC81C \uC81C\uCD9C",
248
+ "submit --language python # Python\uC73C\uB85C \uC81C\uCD9C"
249
+ ]
250
+ })
251
+ ], SubmitCommand);
252
+ var submit_default = CommandBuilder.fromClass(SubmitCommand);
266
253
  export {
267
- submit_default as default,
268
- submitExecute,
269
- submitHelp
254
+ SubmitCommand,
255
+ submit_default as default
270
256
  };