@nine-lab/nine-mu 0.1.110 → 0.1.111
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 +34 -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 +2 -2
- package/src/components/NineChat.js +2 -1
- package/src/external/NoPeer.js +10 -0
- package/src/index.js +1 -0
package/dist/nine-mu.js
CHANGED
|
@@ -10,7 +10,14 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
12
|
var _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient, _NineChat_instances, initInteractions_fn, initActions_fn, _initMcp, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn;
|
|
13
|
-
import { trace, api, nine } from "@nine-lab/nine-util";
|
|
13
|
+
import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
|
|
14
|
+
class Trace extends trace$1 {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.init("nine-mu", "#0969da");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const trace = new Trace();
|
|
14
21
|
class NineMuService {
|
|
15
22
|
constructor(connectorUrl) {
|
|
16
23
|
__privateAdd(this, _getSourcePath, (menuUrl) => {
|
|
@@ -26,7 +33,7 @@ class NineMuService {
|
|
|
26
33
|
*/
|
|
27
34
|
async generate(command2, targets, currentRoutes) {
|
|
28
35
|
try {
|
|
29
|
-
trace.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
|
|
36
|
+
trace$1.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
|
|
30
37
|
const response = await fetch(`${this.connectorUrl}/api/mu/generate`, {
|
|
31
38
|
method: "POST",
|
|
32
39
|
headers: { "Content-Type": "application/json" },
|
|
@@ -43,7 +50,7 @@ class NineMuService {
|
|
|
43
50
|
}
|
|
44
51
|
return result;
|
|
45
52
|
} catch (error) {
|
|
46
|
-
trace.error("NineMu Service Error:", error);
|
|
53
|
+
trace$1.error("NineMu Service Error:", error);
|
|
47
54
|
throw error;
|
|
48
55
|
}
|
|
49
56
|
}
|
|
@@ -51,7 +58,7 @@ class NineMuService {
|
|
|
51
58
|
}
|
|
52
59
|
async generateAll_BAK(command2, targets, currentRoutes) {
|
|
53
60
|
try {
|
|
54
|
-
trace.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
|
|
61
|
+
trace$1.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
|
|
55
62
|
const srcPath = __privateGet(this, _getSourcePath).call(this, "/admin/payment/order-list");
|
|
56
63
|
const srcPath1 = {
|
|
57
64
|
mybatis: "",
|
|
@@ -60,9 +67,9 @@ class NineMuService {
|
|
|
60
67
|
javascriptFrom: "",
|
|
61
68
|
javascriptTo: ""
|
|
62
69
|
};
|
|
63
|
-
trace.log(srcPath);
|
|
70
|
+
trace$1.log(srcPath);
|
|
64
71
|
const src = await api.post("/nine-ai/source/read", srcPath);
|
|
65
|
-
trace.log(src);
|
|
72
|
+
trace$1.log(src);
|
|
66
73
|
const response = await fetch(`${this.connectorUrl}/api/mu/generateAll`, {
|
|
67
74
|
method: "POST",
|
|
68
75
|
headers: { "Content-Type": "application/json" },
|
|
@@ -73,14 +80,14 @@ class NineMuService {
|
|
|
73
80
|
//currentRoutes
|
|
74
81
|
})
|
|
75
82
|
});
|
|
76
|
-
trace.log(response);
|
|
83
|
+
trace$1.log(response);
|
|
77
84
|
const result = await response.json();
|
|
78
85
|
if (!result.success) {
|
|
79
86
|
throw new Error(result.error || "소스 생성 중 서버 오류가 발생했습니다.");
|
|
80
87
|
}
|
|
81
88
|
return result;
|
|
82
89
|
} catch (error) {
|
|
83
|
-
trace.error("NineMu Service Error:", error);
|
|
90
|
+
trace$1.error("NineMu Service Error:", error);
|
|
84
91
|
throw error;
|
|
85
92
|
}
|
|
86
93
|
}
|
|
@@ -93,7 +100,7 @@ class NineMuService {
|
|
|
93
100
|
const res = await fetch(routeUrl);
|
|
94
101
|
return await res.json();
|
|
95
102
|
} catch (err) {
|
|
96
|
-
trace.error("Route load fail", err);
|
|
103
|
+
trace$1.error("Route load fail", err);
|
|
97
104
|
return [];
|
|
98
105
|
}
|
|
99
106
|
}
|
|
@@ -13713,7 +13720,7 @@ render_fn = function() {
|
|
|
13713
13720
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
13714
13721
|
this.shadowRoot.innerHTML = `
|
|
13715
13722
|
<style>
|
|
13716
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
13723
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.110"}/dist/css/nine-mu.css";
|
|
13717
13724
|
${customImport}
|
|
13718
13725
|
</style>
|
|
13719
13726
|
<div class="wrapper">
|
|
@@ -39609,9 +39616,9 @@ class MergeButtonWidget extends WidgetType {
|
|
|
39609
39616
|
button.className = "cm-merge-button accept";
|
|
39610
39617
|
}
|
|
39611
39618
|
button.addEventListener("click", () => {
|
|
39612
|
-
trace.log(`버튼 클릭: ${this.isAsisButton ? "ASIS 쪽 (삭제)" : "TOBE 쪽 (적용)"}`, this.textToApply);
|
|
39613
|
-
trace.log("대상 에디터:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
|
|
39614
|
-
trace.log("대상 범위:", this.diffRange);
|
|
39619
|
+
trace$1.log(`버튼 클릭: ${this.isAsisButton ? "ASIS 쪽 (삭제)" : "TOBE 쪽 (적용)"}`, this.textToApply);
|
|
39620
|
+
trace$1.log("대상 에디터:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
|
|
39621
|
+
trace$1.log("대상 범위:", this.diffRange);
|
|
39615
39622
|
this.applyChanges(this.textToApply, this.targetEditorView, this.diffRange);
|
|
39616
39623
|
});
|
|
39617
39624
|
const container = document.createElement("div");
|
|
@@ -39622,7 +39629,7 @@ class MergeButtonWidget extends WidgetType {
|
|
|
39622
39629
|
// 실제 변경 적용 로직
|
|
39623
39630
|
applyChanges(text, editorView, range) {
|
|
39624
39631
|
if (!editorView || !range) {
|
|
39625
|
-
trace.error("Target editor view or range is undefined.", editorView, range);
|
|
39632
|
+
trace$1.error("Target editor view or range is undefined.", editorView, range);
|
|
39626
39633
|
return;
|
|
39627
39634
|
}
|
|
39628
39635
|
editorView.dispatch({
|
|
@@ -39663,7 +39670,7 @@ class NineDiff extends HTMLElement {
|
|
|
39663
39670
|
__privateSet(this, _asisEditorEl, this.shadowRoot.querySelector(".panel.asis"));
|
|
39664
39671
|
__privateSet(this, _tobeEditorEl, this.shadowRoot.querySelector(".panel.tobe"));
|
|
39665
39672
|
if (!__privateGet(this, _asisEditorEl) || !__privateGet(this, _tobeEditorEl)) {
|
|
39666
|
-
trace.error("CodeMirror panel containers not found!");
|
|
39673
|
+
trace$1.error("CodeMirror panel containers not found!");
|
|
39667
39674
|
return;
|
|
39668
39675
|
}
|
|
39669
39676
|
const basicExtensions = [
|
|
@@ -39704,7 +39711,7 @@ class NineDiff extends HTMLElement {
|
|
|
39704
39711
|
EditorView.updateListener.of((update) => {
|
|
39705
39712
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
39706
39713
|
update.view._initialAsisContentLoaded = true;
|
|
39707
|
-
trace.log("CodeMirror ASIS view is ready for initial content.");
|
|
39714
|
+
trace$1.log("CodeMirror ASIS view is ready for initial content.");
|
|
39708
39715
|
asisReady = true;
|
|
39709
39716
|
checkAllReady();
|
|
39710
39717
|
}
|
|
@@ -39726,7 +39733,7 @@ class NineDiff extends HTMLElement {
|
|
|
39726
39733
|
EditorView.updateListener.of((update) => {
|
|
39727
39734
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
39728
39735
|
update.view._initialTobeContentLoaded = true;
|
|
39729
|
-
trace.log("CodeMirror TOBE view is ready for initial content.");
|
|
39736
|
+
trace$1.log("CodeMirror TOBE view is ready for initial content.");
|
|
39730
39737
|
tobeReady = true;
|
|
39731
39738
|
checkAllReady();
|
|
39732
39739
|
}
|
|
@@ -39789,7 +39796,7 @@ class NineDiff extends HTMLElement {
|
|
|
39789
39796
|
const tobeRangeStart = tobeCursor;
|
|
39790
39797
|
switch (op) {
|
|
39791
39798
|
case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
|
|
39792
|
-
trace.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
|
|
39799
|
+
trace$1.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
|
|
39793
39800
|
const tobeLines = text.split("\n");
|
|
39794
39801
|
for (let i = 0; i < tobeLines.length; i++) {
|
|
39795
39802
|
if (!(i === tobeLines.length - 1 && tobeLines[i] === "" && text.endsWith("\n"))) {
|
|
@@ -39817,7 +39824,7 @@ class NineDiff extends HTMLElement {
|
|
|
39817
39824
|
);
|
|
39818
39825
|
break;
|
|
39819
39826
|
case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
|
|
39820
|
-
trace.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
|
|
39827
|
+
trace$1.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
|
|
39821
39828
|
const asisLines = text.split("\n");
|
|
39822
39829
|
for (let i = 0; i < asisLines.length; i++) {
|
|
39823
39830
|
if (!(i === asisLines.length - 1 && asisLines[i] === "" && text.endsWith("\n"))) {
|
|
@@ -39876,7 +39883,7 @@ class NineDiff extends HTMLElement {
|
|
|
39876
39883
|
});
|
|
39877
39884
|
__publicField(this, "initialize", (src1, src2, language2 = "javascript") => {
|
|
39878
39885
|
if (!__privateGet(this, _asisEditorView) || !__privateGet(this, _tobeEditorView)) {
|
|
39879
|
-
trace.warn("CodeMirror Editors not initialized yet.");
|
|
39886
|
+
trace$1.warn("CodeMirror Editors not initialized yet.");
|
|
39880
39887
|
return;
|
|
39881
39888
|
}
|
|
39882
39889
|
__privateSet(this, _isScrollSyncActive, false);
|
|
@@ -39932,7 +39939,7 @@ class NineDiff extends HTMLElement {
|
|
|
39932
39939
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
39933
39940
|
this.shadowRoot.innerHTML = `
|
|
39934
39941
|
<style>
|
|
39935
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
39942
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.110"}/dist/css/nine-mu.css";
|
|
39936
39943
|
${customImport}
|
|
39937
39944
|
</style>
|
|
39938
39945
|
|
|
@@ -39949,7 +39956,7 @@ class NineDiff extends HTMLElement {
|
|
|
39949
39956
|
bubbles: true,
|
|
39950
39957
|
composed: true
|
|
39951
39958
|
}));
|
|
39952
|
-
trace.log("dispatchEvent");
|
|
39959
|
+
trace$1.log("dispatchEvent");
|
|
39953
39960
|
});
|
|
39954
39961
|
}
|
|
39955
39962
|
disconnectedCallback() {
|
|
@@ -40008,12 +40015,12 @@ class NineDiffPopup extends HTMLElement {
|
|
|
40008
40015
|
if (typeof src === "string" && (src.startsWith("url:") || src.startsWith("file:"))) {
|
|
40009
40016
|
const targetUrl = src.replace(/^(url:|file:)/, "");
|
|
40010
40017
|
try {
|
|
40011
|
-
trace.log(`📡 리모트 로드: ${targetUrl}`);
|
|
40018
|
+
trace$1.log(`📡 리모트 로드: ${targetUrl}`);
|
|
40012
40019
|
const res = await fetch(targetUrl);
|
|
40013
40020
|
if (!res.ok) throw new Error(`Status: ${res.status}`);
|
|
40014
40021
|
return await res.text();
|
|
40015
40022
|
} catch (e) {
|
|
40016
|
-
trace.error(`로드 실패 [${targetUrl}]:`, e);
|
|
40023
|
+
trace$1.error(`로드 실패 [${targetUrl}]:`, e);
|
|
40017
40024
|
return `// 로드 실패: ${targetUrl}
|
|
40018
40025
|
${e.message}`;
|
|
40019
40026
|
}
|
|
@@ -40042,7 +40049,7 @@ render_fn2 = function() {
|
|
|
40042
40049
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
40043
40050
|
this.shadowRoot.innerHTML = `
|
|
40044
40051
|
<style>
|
|
40045
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
40052
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.110"}/dist/css/nine-mu.css";
|
|
40046
40053
|
${customImport}
|
|
40047
40054
|
</style>
|
|
40048
40055
|
|
|
@@ -40081,9 +40088,9 @@ handleCancel_fn = function() {
|
|
|
40081
40088
|
};
|
|
40082
40089
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
40083
40090
|
const NineMu = {
|
|
40084
|
-
version: "0.1.
|
|
40091
|
+
version: "0.1.110",
|
|
40085
40092
|
init: (config2) => {
|
|
40086
|
-
trace.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
40093
|
+
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
40087
40094
|
}
|
|
40088
40095
|
};
|
|
40089
40096
|
export {
|