@nine-lab/nine-mu 0.1.237 → 0.1.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nine-mu.js +20 -27
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineChat.js +7 -18
- package/src/components/NineChatManager.js +7 -0
package/package.json
CHANGED
|
@@ -7,7 +7,6 @@ import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/webso
|
|
|
7
7
|
|
|
8
8
|
export class NineChat extends HTMLElement {
|
|
9
9
|
#service = null;
|
|
10
|
-
#routes = [];
|
|
11
10
|
#packageName;
|
|
12
11
|
#routesPath;
|
|
13
12
|
#connectorUrl;
|
|
@@ -38,7 +37,7 @@ export class NineChat extends HTMLElement {
|
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
// 경로 데이터 로드
|
|
41
|
-
this.#routes = await this.#service.fetchRoutes(this.getAttribute('route-url'));
|
|
40
|
+
//this.#routes = await this.#service.fetchRoutes(this.getAttribute('route-url'));
|
|
42
41
|
|
|
43
42
|
this.#manager = new NineChatManager(this);
|
|
44
43
|
}
|
|
@@ -126,7 +125,10 @@ export class NineChat extends HTMLElement {
|
|
|
126
125
|
if (hasUpdated || hasCreated || hasDeleted) {
|
|
127
126
|
// 진짜 메뉴명 변경이나 이동만 요청한 경우
|
|
128
127
|
nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then(res => {
|
|
129
|
-
const tobe = (parsed?.data || [])
|
|
128
|
+
const tobe = (parsed?.data || [])
|
|
129
|
+
.filter(item => item.action !== 'DELETE')
|
|
130
|
+
.map(({ isNew, action, ...rest }) => rest);
|
|
131
|
+
|
|
130
132
|
this.#showDiff(asis, tobe, "json");
|
|
131
133
|
});
|
|
132
134
|
}
|
|
@@ -227,21 +229,8 @@ export class NineChat extends HTMLElement {
|
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
#sourceGenHandler = async e => {
|
|
230
|
-
const
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
try {
|
|
234
|
-
const result = await this.#service.generateAll(command, targets, this.#routes);
|
|
235
|
-
|
|
236
|
-
// 4. 성공 처리
|
|
237
|
-
$status.textContent = "✅ 완료";
|
|
238
|
-
nine.alert("소스 생성 성공").rgb();
|
|
239
|
-
this.dispatchEvent(new CustomEvent('nine-mu-completed', { detail: result, bubbles: true }));
|
|
240
|
-
} catch (err) {
|
|
241
|
-
// 5. 실패 처리
|
|
242
|
-
$status.textContent = "❌ 실패";
|
|
243
|
-
nine.alert(err.message).rgb().shake();
|
|
244
|
-
}
|
|
232
|
+
const routes = await this.#manager.getRoutes();
|
|
233
|
+
const response = await this.#manager.analyzeUnmappedRoutes(routes);
|
|
245
234
|
}
|
|
246
235
|
|
|
247
236
|
#showDiff = (asis, tobe, lang) => {
|
|
@@ -151,4 +151,11 @@ export class NineChatManager {
|
|
|
151
151
|
current_path : currentPath,
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
/** 백엔드 통신 */
|
|
156
|
+
analyzeUnmappedRoutes = async (routes) => {
|
|
157
|
+
|
|
158
|
+
const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes : routes });
|
|
159
|
+
console.log(res);
|
|
160
|
+
};
|
|
154
161
|
}
|