seogitan 1.3.0 → 1.4.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,4 +1,4 @@
1
- import { listMeetings, getMeeting, getMeetingSummary, getMeetingTranscripts, searchMeetings, } from "seogitan-core";
1
+ import { listMeetings, getMeeting, getMeetingSummary, getMeetingTranscripts, searchMeetings, deleteMeeting, updateMeetingTags, } from "seogitan-core";
2
2
  import { getSupabaseClient } from "../lib/supabase.js";
3
3
  import { formatMeetingsList, formatMeetingDetail, formatSearchResults, } from "../lib/output.js";
4
4
  import { EXIT_CODES } from "../exit-codes.js";
@@ -14,15 +14,23 @@ export function registerMeetingsCommand(program) {
14
14
  .option("--from <date>", "조회 시작 날짜 (ISO 8601)")
15
15
  .option("--to <date>", "조회 종료 날짜 (ISO 8601)")
16
16
  .option("--limit <n>", "조회할 최대 개수", "10")
17
+ .option("--sort <order>", "정렬 (newest|name)", "newest")
18
+ .option("--filter <type>", "필터 (mine|shared)")
19
+ .option("--tag <tag>", "태그로 필터링")
17
20
  .option("--json", "JSON 형식으로 출력", false)
18
21
  .action(async (opts) => {
19
22
  try {
20
23
  const supabase = await getSupabaseClient();
24
+ const { data: { user } } = await supabase.auth.getUser();
21
25
  const data = await listMeetings(supabase, {
22
26
  limit: parseInt(opts.limit, 10),
23
27
  status: opts.status,
24
28
  date_from: opts.from,
25
29
  date_to: opts.to,
30
+ sort: opts.sort,
31
+ ownership: opts.filter,
32
+ userId: user?.id,
33
+ tag: opts.tag,
26
34
  });
27
35
  console.log(formatMeetingsList(data, opts.json));
28
36
  }
@@ -157,4 +165,55 @@ export function registerMeetingsCommand(program) {
157
165
  process.exit(EXIT_CODES.ERROR);
158
166
  }
159
167
  });
168
+ // delete
169
+ meetings
170
+ .command("delete <id>")
171
+ .description("회의를 삭제합니다 (생성자만 가능)")
172
+ .option("--force", "확인 없이 삭제", false)
173
+ .action(async (id, opts) => {
174
+ try {
175
+ const supabase = await getSupabaseClient();
176
+ const meeting = await getMeeting(supabase, id);
177
+ if (!meeting) {
178
+ console.error(`회의를 찾을 수 없습니다: ${id}`);
179
+ process.exit(EXIT_CODES.NOT_FOUND);
180
+ }
181
+ if (!opts.force) {
182
+ const { createInterface } = await import("node:readline");
183
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
184
+ const answer = await new Promise((resolve) => rl.question(`"${meeting.title}" 회의를 삭제할까요? (y/N) `, resolve));
185
+ rl.close();
186
+ if (answer.toLowerCase() !== "y") {
187
+ console.log("삭제가 취소되었습니다.");
188
+ return;
189
+ }
190
+ }
191
+ await deleteMeeting(supabase, id);
192
+ console.log(`회의가 삭제되었습니다: ${meeting.title}`);
193
+ }
194
+ catch (err) {
195
+ console.error(`오류: ${err instanceof Error ? err.message : String(err)}`);
196
+ process.exit(EXIT_CODES.ERROR);
197
+ }
198
+ });
199
+ // tag
200
+ meetings
201
+ .command("tag <id> [tags...]")
202
+ .description("회의에 태그를 설정합니다")
203
+ .action(async (id, tags) => {
204
+ try {
205
+ const supabase = await getSupabaseClient();
206
+ const meeting = await getMeeting(supabase, id);
207
+ if (!meeting) {
208
+ console.error(`회의를 찾을 수 없습니다: ${id}`);
209
+ process.exit(EXIT_CODES.NOT_FOUND);
210
+ }
211
+ await updateMeetingTags(supabase, id, tags);
212
+ console.log(`태그 설정됨: ${tags.length > 0 ? tags.join(", ") : "(태그 삭제)"}`);
213
+ }
214
+ catch (err) {
215
+ console.error(`오류: ${err instanceof Error ? err.message : String(err)}`);
216
+ process.exit(EXIT_CODES.ERROR);
217
+ }
218
+ });
160
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seogitan",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "seogitan": "dist/index.js"
@@ -19,7 +19,7 @@
19
19
  "commander": "^13.0.0",
20
20
  "ffmpeg-static": "^5.3.0",
21
21
  "open": "^10.0.0",
22
- "seogitan-core": "^1.0.0",
22
+ "seogitan-core": "^1.1.0",
23
23
  "zod": "^3.24.3"
24
24
  },
25
25
  "devDependencies": {