opensoma 0.1.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/.claude-plugin/README.md +145 -0
- package/.claude-plugin/plugin.json +23 -0
- package/.github/workflows/release.yml +86 -0
- package/.oxfmtrc.json +9 -0
- package/.oxlintrc.json +4 -0
- package/AGENTS.md +78 -0
- package/README.md +249 -0
- package/bun.lock +297 -0
- package/bunfig.toml +2 -0
- package/dist/package.json +56 -0
- package/dist/src/cli.d.ts +5 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +39 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/client.d.ts +98 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +141 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/commands/auth.d.ts +3 -0
- package/dist/src/commands/auth.d.ts.map +1 -0
- package/dist/src/commands/auth.js +125 -0
- package/dist/src/commands/auth.js.map +1 -0
- package/dist/src/commands/dashboard.d.ts +3 -0
- package/dist/src/commands/dashboard.d.ts.map +1 -0
- package/dist/src/commands/dashboard.js +33 -0
- package/dist/src/commands/dashboard.js.map +1 -0
- package/dist/src/commands/event.d.ts +3 -0
- package/dist/src/commands/event.d.ts.map +1 -0
- package/dist/src/commands/event.js +58 -0
- package/dist/src/commands/event.js.map +1 -0
- package/dist/src/commands/helpers.d.ts +3 -0
- package/dist/src/commands/helpers.d.ts.map +1 -0
- package/dist/src/commands/helpers.js +12 -0
- package/dist/src/commands/helpers.js.map +1 -0
- package/dist/src/commands/index.d.ts +9 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +9 -0
- package/dist/src/commands/index.js.map +1 -0
- package/dist/src/commands/member.d.ts +3 -0
- package/dist/src/commands/member.d.ts.map +1 -0
- package/dist/src/commands/member.js +23 -0
- package/dist/src/commands/member.js.map +1 -0
- package/dist/src/commands/mentoring.d.ts +3 -0
- package/dist/src/commands/mentoring.d.ts.map +1 -0
- package/dist/src/commands/mentoring.js +154 -0
- package/dist/src/commands/mentoring.js.map +1 -0
- package/dist/src/commands/notice.d.ts +3 -0
- package/dist/src/commands/notice.d.ts.map +1 -0
- package/dist/src/commands/notice.js +42 -0
- package/dist/src/commands/notice.js.map +1 -0
- package/dist/src/commands/room.d.ts +3 -0
- package/dist/src/commands/room.d.ts.map +1 -0
- package/dist/src/commands/room.js +79 -0
- package/dist/src/commands/room.js.map +1 -0
- package/dist/src/commands/team.d.ts +3 -0
- package/dist/src/commands/team.d.ts.map +1 -0
- package/dist/src/commands/team.js +20 -0
- package/dist/src/commands/team.js.map +1 -0
- package/dist/src/constants.d.ts +43 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +62 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/credential-manager.d.ts +15 -0
- package/dist/src/credential-manager.d.ts.map +1 -0
- package/dist/src/credential-manager.js +40 -0
- package/dist/src/credential-manager.js.map +1 -0
- package/dist/src/formatters.d.ts +15 -0
- package/dist/src/formatters.d.ts.map +1 -0
- package/dist/src/formatters.js +382 -0
- package/dist/src/formatters.js.map +1 -0
- package/dist/src/http.d.ts +32 -0
- package/dist/src/http.d.ts.map +1 -0
- package/dist/src/http.js +143 -0
- package/dist/src/http.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/shared/utils/error-handler.d.ts +2 -0
- package/dist/src/shared/utils/error-handler.d.ts.map +1 -0
- package/dist/src/shared/utils/error-handler.js +7 -0
- package/dist/src/shared/utils/error-handler.js.map +1 -0
- package/dist/src/shared/utils/mentoring-params.d.ts +15 -0
- package/dist/src/shared/utils/mentoring-params.d.ts.map +1 -0
- package/dist/src/shared/utils/mentoring-params.js +39 -0
- package/dist/src/shared/utils/mentoring-params.js.map +1 -0
- package/dist/src/shared/utils/output.d.ts +2 -0
- package/dist/src/shared/utils/output.d.ts.map +1 -0
- package/dist/src/shared/utils/output.js +4 -0
- package/dist/src/shared/utils/output.js.map +1 -0
- package/dist/src/shared/utils/stderr.d.ts +5 -0
- package/dist/src/shared/utils/stderr.d.ts.map +1 -0
- package/dist/src/shared/utils/stderr.js +19 -0
- package/dist/src/shared/utils/stderr.js.map +1 -0
- package/dist/src/shared/utils/swmaestro.d.ts +33 -0
- package/dist/src/shared/utils/swmaestro.d.ts.map +1 -0
- package/dist/src/shared/utils/swmaestro.js +164 -0
- package/dist/src/shared/utils/swmaestro.js.map +1 -0
- package/dist/src/token-extractor.d.ts +23 -0
- package/dist/src/token-extractor.d.ts.map +1 -0
- package/dist/src/token-extractor.js +163 -0
- package/dist/src/token-extractor.js.map +1 -0
- package/dist/src/types.d.ts +176 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +110 -0
- package/dist/src/types.js.map +1 -0
- package/e2e/.gitkeep +0 -0
- package/package.json +56 -0
- package/scripts/postbuild.ts +11 -0
- package/scripts/prepublish.ts +9 -0
- package/scripts/test.ts +82 -0
- package/skills/opensoma/SKILL.md +345 -0
- package/skills/opensoma/references/common-patterns.md +182 -0
- package/skills/opensoma/references/output-format.md +130 -0
- package/src/cli.ts +57 -0
- package/src/client.test.ts +210 -0
- package/src/client.ts +264 -0
- package/src/commands/auth.ts +153 -0
- package/src/commands/dashboard.ts +39 -0
- package/src/commands/event.ts +74 -0
- package/src/commands/helpers.ts +12 -0
- package/src/commands/index.ts +8 -0
- package/src/commands/member.ts +29 -0
- package/src/commands/mentoring.ts +209 -0
- package/src/commands/notice.ts +56 -0
- package/src/commands/room.ts +102 -0
- package/src/commands/team.ts +26 -0
- package/src/constants.ts +70 -0
- package/src/credential-manager.test.ts +66 -0
- package/src/credential-manager.ts +52 -0
- package/src/formatters.test.ts +382 -0
- package/src/formatters.ts +489 -0
- package/src/http.test.ts +152 -0
- package/src/http.ts +196 -0
- package/src/index.ts +6 -0
- package/src/shared/utils/error-handler.ts +7 -0
- package/src/shared/utils/mentoring-params.test.ts +112 -0
- package/src/shared/utils/mentoring-params.ts +57 -0
- package/src/shared/utils/output.ts +3 -0
- package/src/shared/utils/stderr.ts +23 -0
- package/src/shared/utils/swmaestro.ts +218 -0
- package/src/token-extractor.test.ts +119 -0
- package/src/token-extractor.ts +205 -0
- package/src/types.test.ts +172 -0
- package/src/types.ts +134 -0
- package/tsconfig.json +38 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { MENU_NO } from '../constants.js';
|
|
3
|
+
import * as formatters from '../formatters.js';
|
|
4
|
+
import { handleError } from '../shared/utils/error-handler.js';
|
|
5
|
+
import { formatOutput } from '../shared/utils/output.js';
|
|
6
|
+
import { buildApplicationPayload, buildCancelApplicationPayload, buildDeleteMentoringPayload, buildMentoringPayload, } from '../shared/utils/swmaestro.js';
|
|
7
|
+
import { getHttpOrExit } from './helpers.js';
|
|
8
|
+
import { buildMentoringListParams, parseSearchQuery } from '../shared/utils/mentoring-params.js';
|
|
9
|
+
async function listAction(options) {
|
|
10
|
+
try {
|
|
11
|
+
const http = await getHttpOrExit();
|
|
12
|
+
const search = options.search ? parseSearchQuery(options.search) : undefined;
|
|
13
|
+
const user = search?.me ? (await http.checkLogin()) ?? undefined : undefined;
|
|
14
|
+
const html = await http.get('/mypage/mentoLec/list.do', buildMentoringListParams({
|
|
15
|
+
status: options.status,
|
|
16
|
+
type: options.type,
|
|
17
|
+
page: options.page,
|
|
18
|
+
search,
|
|
19
|
+
user,
|
|
20
|
+
}));
|
|
21
|
+
console.log(formatOutput({ items: formatters.parseMentoringList(html), pagination: formatters.parsePagination(html) }, options.pretty));
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
handleError(error);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function getAction(id, options) {
|
|
28
|
+
try {
|
|
29
|
+
const http = await getHttpOrExit();
|
|
30
|
+
const html = await http.get('/mypage/mentoLec/view.do', { menuNo: MENU_NO.MENTORING, qustnrSn: id });
|
|
31
|
+
console.log(formatOutput(formatters.parseMentoringDetail(html, Number.parseInt(id, 10)), options.pretty));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
handleError(error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function createAction(options) {
|
|
38
|
+
try {
|
|
39
|
+
const http = await getHttpOrExit();
|
|
40
|
+
await http.post('/mypage/mentoLec/insert.do', buildMentoringPayload({
|
|
41
|
+
title: options.title,
|
|
42
|
+
type: options.type,
|
|
43
|
+
date: options.date,
|
|
44
|
+
startTime: options.start,
|
|
45
|
+
endTime: options.end,
|
|
46
|
+
venue: options.venue,
|
|
47
|
+
maxAttendees: options.maxAttendees ? Number.parseInt(options.maxAttendees, 10) : undefined,
|
|
48
|
+
regStart: options.regStart,
|
|
49
|
+
regEnd: options.regEnd,
|
|
50
|
+
content: options.content,
|
|
51
|
+
}));
|
|
52
|
+
console.log(formatOutput({ ok: true }, options.pretty));
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
handleError(error);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function deleteAction(id, options) {
|
|
59
|
+
try {
|
|
60
|
+
const http = await getHttpOrExit();
|
|
61
|
+
await http.post('/mypage/mentoLec/delete.do', buildDeleteMentoringPayload(Number.parseInt(id, 10)));
|
|
62
|
+
console.log(formatOutput({ ok: true }, options.pretty));
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
handleError(error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async function applyAction(id, options) {
|
|
69
|
+
try {
|
|
70
|
+
const http = await getHttpOrExit();
|
|
71
|
+
await http.post('/application/application/application.do', buildApplicationPayload(Number.parseInt(id, 10)));
|
|
72
|
+
console.log(formatOutput({ ok: true }, options.pretty));
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
handleError(error);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async function cancelAction(options) {
|
|
79
|
+
try {
|
|
80
|
+
const http = await getHttpOrExit();
|
|
81
|
+
await http.post('/mypage/userAnswer/cancel.do', buildCancelApplicationPayload({
|
|
82
|
+
applySn: Number.parseInt(options.applySn, 10),
|
|
83
|
+
qustnrSn: Number.parseInt(options.qustnrSn, 10),
|
|
84
|
+
}));
|
|
85
|
+
console.log(formatOutput({ ok: true }, options.pretty));
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
handleError(error);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async function historyAction(options) {
|
|
92
|
+
try {
|
|
93
|
+
const http = await getHttpOrExit();
|
|
94
|
+
const html = await http.get('/mypage/userAnswer/history.do', {
|
|
95
|
+
menuNo: MENU_NO.APPLICATION_HISTORY,
|
|
96
|
+
...(options.page ? { pageIndex: options.page } : {}),
|
|
97
|
+
});
|
|
98
|
+
console.log(formatOutput({ items: formatters.parseApplicationHistory(html), pagination: formatters.parsePagination(html) }, options.pretty));
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
handleError(error);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export const mentoringCommand = new Command('mentoring')
|
|
105
|
+
.description('Manage mentoring sessions')
|
|
106
|
+
.addCommand(new Command('list')
|
|
107
|
+
.description('List mentoring sessions')
|
|
108
|
+
.option('--status <status>', 'Status filter (open|closed)')
|
|
109
|
+
.option('--type <type>', 'Type filter (public|lecture)')
|
|
110
|
+
.option('--search <query>', 'Search (e.g. "keyword", "author:@me", "content:text")')
|
|
111
|
+
.option('--page <n>', 'Page number')
|
|
112
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
113
|
+
.action(listAction))
|
|
114
|
+
.addCommand(new Command('get')
|
|
115
|
+
.description('Get mentoring detail')
|
|
116
|
+
.argument('<id>')
|
|
117
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
118
|
+
.action(getAction))
|
|
119
|
+
.addCommand(new Command('create')
|
|
120
|
+
.description('Create a mentoring session')
|
|
121
|
+
.requiredOption('--title <title>', 'Title')
|
|
122
|
+
.requiredOption('--type <type>', 'Mentoring type (public|lecture)')
|
|
123
|
+
.requiredOption('--date <date>', 'Session date')
|
|
124
|
+
.requiredOption('--start <time>', 'Start time')
|
|
125
|
+
.requiredOption('--end <time>', 'End time')
|
|
126
|
+
.requiredOption('--venue <venue>', 'Venue')
|
|
127
|
+
.option('--max-attendees <count>', 'Maximum attendees')
|
|
128
|
+
.option('--reg-start <date>', 'Registration start date')
|
|
129
|
+
.option('--reg-end <date>', 'Registration end date')
|
|
130
|
+
.option('--content <html>', 'HTML content')
|
|
131
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
132
|
+
.action(createAction))
|
|
133
|
+
.addCommand(new Command('delete')
|
|
134
|
+
.description('Delete a mentoring session')
|
|
135
|
+
.argument('<id>')
|
|
136
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
137
|
+
.action(deleteAction))
|
|
138
|
+
.addCommand(new Command('apply')
|
|
139
|
+
.description('Apply to a mentoring session')
|
|
140
|
+
.argument('<id>')
|
|
141
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
142
|
+
.action(applyAction))
|
|
143
|
+
.addCommand(new Command('cancel')
|
|
144
|
+
.description('Cancel a mentoring application')
|
|
145
|
+
.requiredOption('--apply-sn <id>', 'Application serial number')
|
|
146
|
+
.requiredOption('--qustnr-sn <id>', 'Mentoring serial number')
|
|
147
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
148
|
+
.action(cancelAction))
|
|
149
|
+
.addCommand(new Command('history')
|
|
150
|
+
.description('List mentoring application history')
|
|
151
|
+
.option('--page <n>', 'Page number')
|
|
152
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
153
|
+
.action(historyAction));
|
|
154
|
+
//# sourceMappingURL=mentoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentoring.js","sourceRoot":"","sources":["../../../src/comm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,MAAM,CAAC,YAAY,CAAC,CACxB;KACA,UAAU,CACT,IAAI,OAAO,CAAC,QAAQ,CAAC;KAClB,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,MAAM,CAAC;KAChB,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,YAAY,CAAC,CACxB;KACA,UAAU,CACT,IAAI,OAAO,CAAC,OAAO,CAAC;KACjB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,QAAQ,CAAC,MAAM,CAAC;KAChB,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,WAAW,CAAC,CACvB;KACA,UAAU,CACT,IAAI,OAAO,CAAC,QAAQ,CAAC;KAClB,WAAW,CAAC,gCAAgC,CAAC;KAC7C,cAAc,CAAC,iBAAiB,EAAE,2BAA2B,CAAC;KAC9D,cAAc,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;KAC7D,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,YAAY,CAAC,CACxB;KACA,UAAU,CACT,IAAI,OAAO,CAAC,SAAS,CAAC;KACnB,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC;KACnC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,aAAa,CAAC,CACzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice.d.ts","sourceRoot":"","sources":["../../../src/commands/notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwCnC,eAAO,MAAM,aAAa,SAevB,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { MENU_NO } from '../constants.js';
|
|
3
|
+
import * as formatters from '../formatters.js';
|
|
4
|
+
import { handleError } from '../shared/utils/error-handler.js';
|
|
5
|
+
import { formatOutput } from '../shared/utils/output.js';
|
|
6
|
+
import { getHttpOrExit } from './helpers.js';
|
|
7
|
+
async function listAction(options) {
|
|
8
|
+
try {
|
|
9
|
+
const http = await getHttpOrExit();
|
|
10
|
+
const html = await http.get('/mypage/myNotice/list.do', {
|
|
11
|
+
menuNo: MENU_NO.NOTICE,
|
|
12
|
+
...(options.page ? { pageIndex: options.page } : {}),
|
|
13
|
+
});
|
|
14
|
+
console.log(formatOutput({ items: formatters.parseNoticeList(html), pagination: formatters.parsePagination(html) }, options.pretty));
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
handleError(error);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function getAction(id, options) {
|
|
21
|
+
try {
|
|
22
|
+
const http = await getHttpOrExit();
|
|
23
|
+
const html = await http.get('/mypage/myNotice/view.do', { menuNo: MENU_NO.NOTICE, nttId: id });
|
|
24
|
+
console.log(formatOutput(formatters.parseNoticeDetail(html, Number.parseInt(id, 10)), options.pretty));
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
handleError(error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export const noticeCommand = new Command('notice')
|
|
31
|
+
.description('Browse notices')
|
|
32
|
+
.addCommand(new Command('list')
|
|
33
|
+
.description('List notices')
|
|
34
|
+
.option('--page <n>', 'Page number')
|
|
35
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
36
|
+
.action(listAction))
|
|
37
|
+
.addCommand(new Command('get')
|
|
38
|
+
.description('Get notice detail')
|
|
39
|
+
.argument('<id>')
|
|
40
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
41
|
+
.action(getAction));
|
|
42
|
+
//# sourceMappingURL=notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice.js","sourceRoot":"","sources":["../../../src/commands/notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,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AAI,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IACxG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,gBAAgB,CAAC;KAC7B,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,cAAc,CAAC;KAC3B,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC;KACnC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,UAAU,CAAC,CACtB;KACA,UAAU,CACT,IAAI,OAAO,CAAC,KAAK,CAAC;KACf,WAAW,CAAC,mBAAmB,CAAC;KAChC,QAAQ,CAAC,MAAM,CAAC;KAChB,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,SAAS,CAAC,CACrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../../src/commands/room.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwEnC,eAAO,MAAM,WAAW,SA6BrB,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import * as formatters from '../formatters.js';
|
|
3
|
+
import { handleError } from '../shared/utils/error-handler.js';
|
|
4
|
+
import { formatOutput } from '../shared/utils/output.js';
|
|
5
|
+
import { buildRoomReservationPayload, resolveRoomId } from '../shared/utils/swmaestro.js';
|
|
6
|
+
import { getHttpOrExit } from './helpers.js';
|
|
7
|
+
async function listAction(options) {
|
|
8
|
+
try {
|
|
9
|
+
const http = await getHttpOrExit();
|
|
10
|
+
const html = await http.post('/mypage/officeMng/list.do', {
|
|
11
|
+
menuNo: '200058',
|
|
12
|
+
sdate: options.date ?? new Date().toISOString().slice(0, 10),
|
|
13
|
+
searchItemId: options.room ? String(resolveRoomId(options.room)) : '',
|
|
14
|
+
});
|
|
15
|
+
console.log(formatOutput(formatters.parseRoomList(html), options.pretty));
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
handleError(error);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function availableAction(roomId, options) {
|
|
22
|
+
try {
|
|
23
|
+
const http = await getHttpOrExit();
|
|
24
|
+
const html = await http.post('/mypage/officeMng/rentTime.do', {
|
|
25
|
+
viewType: 'CONTBODY',
|
|
26
|
+
itemId: String(resolveRoomId(roomId)),
|
|
27
|
+
rentDt: options.date,
|
|
28
|
+
});
|
|
29
|
+
console.log(formatOutput(formatters.parseRoomSlots(html), options.pretty));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
handleError(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function reserveAction(options) {
|
|
36
|
+
try {
|
|
37
|
+
const http = await getHttpOrExit();
|
|
38
|
+
await http.post('/mypage/itemRent/insert.do', buildRoomReservationPayload({
|
|
39
|
+
roomId: resolveRoomId(options.room),
|
|
40
|
+
date: options.date,
|
|
41
|
+
slots: options.slots
|
|
42
|
+
.split(',')
|
|
43
|
+
.map((slot) => slot.trim())
|
|
44
|
+
.filter(Boolean),
|
|
45
|
+
title: options.title,
|
|
46
|
+
attendees: options.attendees ? Number.parseInt(options.attendees, 10) : undefined,
|
|
47
|
+
notes: options.notes,
|
|
48
|
+
}));
|
|
49
|
+
console.log(formatOutput({ ok: true }, options.pretty));
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
handleError(error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export const roomCommand = new Command('room')
|
|
56
|
+
.description('Manage room reservations')
|
|
57
|
+
.addCommand(new Command('list')
|
|
58
|
+
.description('List rooms')
|
|
59
|
+
.option('--date <date>', 'Reservation date')
|
|
60
|
+
.option('--room <room>', 'Room filter')
|
|
61
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
62
|
+
.action(listAction))
|
|
63
|
+
.addCommand(new Command('available')
|
|
64
|
+
.description('Show available time slots')
|
|
65
|
+
.argument('<roomId>')
|
|
66
|
+
.requiredOption('--date <date>', 'Reservation date')
|
|
67
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
68
|
+
.action(availableAction))
|
|
69
|
+
.addCommand(new Command('reserve')
|
|
70
|
+
.description('Reserve a room')
|
|
71
|
+
.requiredOption('--room <room>', 'Room ID or short name')
|
|
72
|
+
.requiredOption('--date <date>', 'Reservation date')
|
|
73
|
+
.requiredOption('--slots <slots>', 'Comma-separated HH:MM values')
|
|
74
|
+
.requiredOption('--title <title>', 'Reservation title')
|
|
75
|
+
.option('--attendees <count>', 'Number of attendees')
|
|
76
|
+
.option('--notes <notes>', 'Reservation notes')
|
|
77
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
78
|
+
.action(reserveAction));
|
|
79
|
+
//# sourceMappingURL=room.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room.js","sourceRoot":"","sources":["../../../src/commands/room.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAczC,KAAK,UAAU,UAAU,CAAC,OAAoB;IAC5C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,aAA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AAC,UAAU,CAAC;KACpB,cAAc,CAAC,eAAe,EAAE,kBAAkB,CAAC;KACnD,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,eAAe,CAAC,CAC3B;KACA,UAAU,CACT,IAAI,OAAO,CAAC,SAAS,CAAC;KACnB,WAAW,CAAC,gBAAgB,CAAC;KAC7B,cAAc,CAAC,eAAe,EAAE,uBAAuB,CAAC;KACxD,cAAc,CAAC,eAAe,EAAE,kBAAkB,CAAC;KACnD,cAAc,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;KACjE,cAAc,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;KACtD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;KAC9C,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,aAAa,CAAC,CACzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../../src/commands/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAqBnC,eAAO,MAAM,WAAW,SAIrB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { MENU_NO } from '../constants.js';
|
|
3
|
+
import * as formatters from '../formatters.js';
|
|
4
|
+
import { handleError } from '../shared/utils/error-handler.js';
|
|
5
|
+
import { formatOutput } from '../shared/utils/output.js';
|
|
6
|
+
import { getHttpOrExit } from './helpers.js';
|
|
7
|
+
async function showAction(options) {
|
|
8
|
+
try {
|
|
9
|
+
const http = await getHttpOrExit();
|
|
10
|
+
const html = await http.get('/mypage/myTeam/team.do', { menuNo: MENU_NO.TEAM });
|
|
11
|
+
console.log(formatOutput(formatters.parseTeamInfo(html), options.pretty));
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
handleError(error);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const teamCommand = new Command('team')
|
|
18
|
+
.description('Show team information')
|
|
19
|
+
.addCommand(new Command('show').description('Show team').option('--pretty', 'Pretty print JSON output').action(showAction));
|
|
20
|
+
//# sourceMappingURL=team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.js","sourceRoot":"","sources":["../../../src/commands/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAIzC,KAAK,UAAU,UAAU,CAAC,OAAoB;IAC5C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,aAAa,EAAE,CAAA;QAClC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;QAC/E,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,uBAAuB,CAAC;KACpC,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAC/G,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const BASE_URL = "https://www.swmaestro.ai/sw";
|
|
2
|
+
export declare const MENU_NO: {
|
|
3
|
+
readonly LOGIN: "200025";
|
|
4
|
+
readonly DASHBOARD: "200026";
|
|
5
|
+
readonly NOTICE: "200038";
|
|
6
|
+
readonly TEAM: "200093";
|
|
7
|
+
readonly MENTORING: "200046";
|
|
8
|
+
readonly EVENT: "200045";
|
|
9
|
+
readonly APPLICATION_HISTORY: "200047";
|
|
10
|
+
readonly ROOM: "200058";
|
|
11
|
+
readonly MEMBER_INFO: "200036";
|
|
12
|
+
};
|
|
13
|
+
export declare const ROOM_IDS: Record<string, number>;
|
|
14
|
+
export declare const VENUES: {
|
|
15
|
+
readonly TOZ_GWANGHWAMUN: "광화문점";
|
|
16
|
+
readonly TOZ_YANGJAE: "양재점";
|
|
17
|
+
readonly TOZ_GANGNAM_CONFERENCE_CENTER: "강남컨퍼런스센터점";
|
|
18
|
+
readonly TOZ_KONKUK: "건대점";
|
|
19
|
+
readonly TOZ_GANGNAM_TOWER: "강남역토즈타워점";
|
|
20
|
+
readonly TOZ_SEOLLEUNG: "선릉점";
|
|
21
|
+
readonly TOZ_YEOKSAM: "역삼점";
|
|
22
|
+
readonly TOZ_HONGDAE: "홍대점";
|
|
23
|
+
readonly TOZ_SINCHON_BUSINESS_CENTER: "신촌비즈니스센터점";
|
|
24
|
+
readonly ONLINE_WEBEX: "온라인(Webex)";
|
|
25
|
+
readonly SPACE_A1: "스페이스 A1";
|
|
26
|
+
readonly SPACE_A2: "스페이스 A2";
|
|
27
|
+
readonly SPACE_A3: "스페이스 A3";
|
|
28
|
+
readonly SPACE_A4: "스페이스 A4";
|
|
29
|
+
readonly SPACE_A5: "스페이스 A5";
|
|
30
|
+
readonly SPACE_A6: "스페이스 A6";
|
|
31
|
+
readonly SPACE_A7: "스페이스 A7";
|
|
32
|
+
readonly SPACE_A8: "스페이스 A8";
|
|
33
|
+
readonly SPACE_M1: "스페이스 M1";
|
|
34
|
+
readonly SPACE_M2: "스페이스 M2";
|
|
35
|
+
readonly SPACE_S: "스페이스 S";
|
|
36
|
+
};
|
|
37
|
+
export declare const REPORT_CD: {
|
|
38
|
+
readonly PUBLIC_MENTORING: "MRC010";
|
|
39
|
+
readonly MENTOR_LECTURE: "MRC020";
|
|
40
|
+
readonly REGULAR_MENTORING: "MRC990";
|
|
41
|
+
};
|
|
42
|
+
export declare const TIME_SLOTS: string[];
|
|
43
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,gCAAgC,CAAA;AAErD,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAA;AAEV,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS3C,CAAA;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CAsBT,CAAA;AAEV,eAAO,MAAM,SAAS;;;;CAIZ,CAAA;AAEV,eAAO,MAAM,UAAU,UAAoB,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const BASE_URL = 'https://www.swmaestro.ai/sw';
|
|
2
|
+
export const MENU_NO = {
|
|
3
|
+
LOGIN: '200025',
|
|
4
|
+
DASHBOARD: '200026',
|
|
5
|
+
NOTICE: '200038',
|
|
6
|
+
TEAM: '200093',
|
|
7
|
+
MENTORING: '200046',
|
|
8
|
+
EVENT: '200045',
|
|
9
|
+
APPLICATION_HISTORY: '200047',
|
|
10
|
+
ROOM: '200058',
|
|
11
|
+
MEMBER_INFO: '200036',
|
|
12
|
+
};
|
|
13
|
+
export const ROOM_IDS = {
|
|
14
|
+
A1: 17,
|
|
15
|
+
A2: 18,
|
|
16
|
+
A3: 19,
|
|
17
|
+
A4: 20,
|
|
18
|
+
A5: 21,
|
|
19
|
+
A6: 22,
|
|
20
|
+
A7: 23,
|
|
21
|
+
A8: 24,
|
|
22
|
+
};
|
|
23
|
+
export const VENUES = {
|
|
24
|
+
TOZ_GWANGHWAMUN: '광화문점',
|
|
25
|
+
TOZ_YANGJAE: '양재점',
|
|
26
|
+
TOZ_GANGNAM_CONFERENCE_CENTER: '강남컨퍼런스센터점',
|
|
27
|
+
TOZ_KONKUK: '건대점',
|
|
28
|
+
TOZ_GANGNAM_TOWER: '강남역토즈타워점',
|
|
29
|
+
TOZ_SEOLLEUNG: '선릉점',
|
|
30
|
+
TOZ_YEOKSAM: '역삼점',
|
|
31
|
+
TOZ_HONGDAE: '홍대점',
|
|
32
|
+
TOZ_SINCHON_BUSINESS_CENTER: '신촌비즈니스센터점',
|
|
33
|
+
ONLINE_WEBEX: '온라인(Webex)',
|
|
34
|
+
SPACE_A1: '스페이스 A1',
|
|
35
|
+
SPACE_A2: '스페이스 A2',
|
|
36
|
+
SPACE_A3: '스페이스 A3',
|
|
37
|
+
SPACE_A4: '스페이스 A4',
|
|
38
|
+
SPACE_A5: '스페이스 A5',
|
|
39
|
+
SPACE_A6: '스페이스 A6',
|
|
40
|
+
SPACE_A7: '스페이스 A7',
|
|
41
|
+
SPACE_A8: '스페이스 A8',
|
|
42
|
+
SPACE_M1: '스페이스 M1',
|
|
43
|
+
SPACE_M2: '스페이스 M2',
|
|
44
|
+
SPACE_S: '스페이스 S',
|
|
45
|
+
};
|
|
46
|
+
export const REPORT_CD = {
|
|
47
|
+
PUBLIC_MENTORING: 'MRC010',
|
|
48
|
+
MENTOR_LECTURE: 'MRC020',
|
|
49
|
+
REGULAR_MENTORING: 'MRC990',
|
|
50
|
+
};
|
|
51
|
+
export const TIME_SLOTS = createTimeSlots();
|
|
52
|
+
function createTimeSlots() {
|
|
53
|
+
const slots = [];
|
|
54
|
+
for (let hour = 9; hour <= 23; hour += 1) {
|
|
55
|
+
slots.push(formatTime(hour, 0), formatTime(hour, 30));
|
|
56
|
+
}
|
|
57
|
+
return slots;
|
|
58
|
+
}
|
|
59
|
+
function formatTime(hour, minute) {
|
|
60
|
+
return `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,6BAA6B,CAAA;AAErD,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,mBAAmB,EAAE,QAAQ;IAC7B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;CACb,CAAA;AAEV,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC9C,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,KAAK;IAClB,6BAA6B,EAAE,WAAW;IAC1C,UAAU,EAAE,KAAK;IACjB,iBAAiB,EAAE,UAAU;IAC7B,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,2BAA2B,EAAE,WAAW;IACxC,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,QAAQ;CACT,CAAA;AAEV,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,gBAAgB,EAAE,QAAQ;IAC1B,cAAc,EAAE,QAAQ;IACxB,iBAAiB,EAAE,QAAQ;CACnB,CAAA;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,EAAE,CAAA;AAE3C,SAAS,eAAe;IACtB,MAAM,KAAK,GAAa,EAAE,CAAA;IAE1B,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,EAAE,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;IACvD,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,MAAc;IAC9C,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AAC9E,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Credentials } from './types.js';
|
|
2
|
+
export interface CredentialConfig {
|
|
3
|
+
credentials: Credentials | null;
|
|
4
|
+
}
|
|
5
|
+
export declare class CredentialManager {
|
|
6
|
+
private configDir;
|
|
7
|
+
private credentialsPath;
|
|
8
|
+
constructor(configDir?: string);
|
|
9
|
+
load(): Promise<CredentialConfig>;
|
|
10
|
+
save(config: CredentialConfig): Promise<void>;
|
|
11
|
+
getCredentials(): Promise<Credentials | null>;
|
|
12
|
+
setCredentials(credentials: Credentials): Promise<void>;
|
|
13
|
+
remove(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=credential-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-manager.d.ts","sourceRoot":"","sources":["../../src/credential-manager.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;CAChC;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,eAAe,CAAQ;gBAEnB,SAAS,CAAC,EAAE,MAAM;IAKxB,IAAI,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAajC,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C,cAAc,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAK7C,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAG9B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { chmod, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
export class CredentialManager {
|
|
6
|
+
configDir;
|
|
7
|
+
credentialsPath;
|
|
8
|
+
constructor(configDir) {
|
|
9
|
+
this.configDir = configDir ?? join(homedir(), '.config', 'opensoma');
|
|
10
|
+
this.credentialsPath = join(this.configDir, 'credentials.json');
|
|
11
|
+
}
|
|
12
|
+
async load() {
|
|
13
|
+
if (!existsSync(this.credentialsPath)) {
|
|
14
|
+
return { credentials: null };
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const content = await readFile(this.credentialsPath, 'utf8');
|
|
18
|
+
return JSON.parse(content);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return { credentials: null };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async save(config) {
|
|
25
|
+
await mkdir(this.configDir, { recursive: true });
|
|
26
|
+
await writeFile(this.credentialsPath, JSON.stringify(config, null, 2));
|
|
27
|
+
await chmod(this.credentialsPath, 0o600);
|
|
28
|
+
}
|
|
29
|
+
async getCredentials() {
|
|
30
|
+
const config = await this.load();
|
|
31
|
+
return config.credentials;
|
|
32
|
+
}
|
|
33
|
+
async setCredentials(credentials) {
|
|
34
|
+
await this.save({ credentials });
|
|
35
|
+
}
|
|
36
|
+
async remove() {
|
|
37
|
+
await rm(this.credentialsPath, { force: true });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=credential-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-manager.js","sourceRoot":"","sources":["../../src/credential-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAQhC,MAAM,OAAO,iBAAiB;IACpB,SAAS,CAAQ;IACjB,eAAe,CAAQ;IAE/B,YAAY,SAAkB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;QACpE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kBA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etail, type MentoringListItem, type NoticeDetail, type NoticeListItem, type Pagination, type RoomCard, type TeamInfo } from './types.js';
|
|
2
|
+
export declare function parseMentoringList(html: string): MentoringListItem[];
|
|
3
|
+
export declare function parseMentoringDetail(html: string, id?: number): MentoringDetail;
|
|
4
|
+
export declare function parseRoomList(html: string): RoomCard[];
|
|
5
|
+
export declare function parseRoomSlots(html: string): RoomCard['timeSlots'];
|
|
6
|
+
export declare function parseDashboard(html: string): Dashboard;
|
|
7
|
+
export declare function parseNoticeList(html: string): NoticeListItem[];
|
|
8
|
+
export declare function parseNoticeDetail(html: string, id?: number): NoticeDetail;
|
|
9
|
+
export declare function parseTeamInfo(html: string): TeamInfo;
|
|
10
|
+
export declare function parseMemberInfo(html: string): MemberInfo;
|
|
11
|
+
export declare function parseEventList(html: string): EventListItem[];
|
|
12
|
+
export declare function parseApplicationHistory(html: string): ApplicationHistoryItem[];
|
|
13
|
+
export declare function parsePagination(html: string): Pagination;
|
|
14
|
+
export declare function parseCsrfToken(html: string): string;
|
|
15
|
+
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/formatters.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,sBAAsB,EAG3B,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAEjB,KAAK,cAAc,EAEnB,KAAK,UAAU,EAEf,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAEd,MAAM,SAAS,CAAA;AAIhB,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAmBpE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAI,GAAG,eAAe,CAyB1E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAA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