@nine-lab/nine-mu 0.1.120 โ†’ 0.1.122

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 CHANGED
@@ -9,23 +9,15 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
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
- var _logger, _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";
14
- class NineMuTrace extends trace.constructor {
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 as trace$1, api, nine } from "@nine-lab/nine-util";
14
+ class Trace extends trace$1.constructor {
15
15
  constructor() {
16
16
  super();
17
- __privateAdd(this, _logger);
18
- __privateSet(this, _logger, this.init("nine-mu", "#0969da"));
17
+ this.init("nine-mu", "#0969da");
19
18
  }
20
- /**
21
- // ๐Ÿ”ด ๋ถ€๋ชจ์˜ log๋ฅผ ๋‚ด ๋ฆฌ๋ชจ์ปจ์˜ log๋กœ ๋ฎ์–ด์”Œ์›๋‹ˆ๋‹ค (Override)
22
- get log() {
23
- return this.#logger.log;
24
- } */
25
- // ํ•„์š”ํ•˜๋‹ค๋ฉด warn, error๋„ ๋˜‘๊ฐ™์ด...
26
19
  }
27
- _logger = new WeakMap();
28
- const trace1 = new NineMuTrace();
20
+ const trace = new Trace();
29
21
  class NineMuService {
30
22
  constructor(connectorUrl) {
31
23
  __privateAdd(this, _getSourcePath, (menuUrl) => {
@@ -41,7 +33,7 @@ class NineMuService {
41
33
  */
42
34
  async generate(command2, targets, currentRoutes) {
43
35
  try {
44
- trace.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
36
+ trace$1.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
45
37
  const response = await fetch(`${this.connectorUrl}/api/mu/generate`, {
46
38
  method: "POST",
47
39
  headers: { "Content-Type": "application/json" },
@@ -58,7 +50,7 @@ class NineMuService {
58
50
  }
59
51
  return result;
60
52
  } catch (error) {
61
- trace.error("NineMu Service Error:", error);
53
+ trace$1.error("NineMu Service Error:", error);
62
54
  throw error;
63
55
  }
64
56
  }
@@ -66,7 +58,7 @@ class NineMuService {
66
58
  }
67
59
  async generateAll_BAK(command2, targets, currentRoutes) {
68
60
  try {
69
- trace.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
61
+ trace$1.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
70
62
  const srcPath = __privateGet(this, _getSourcePath).call(this, "/admin/payment/order-list");
71
63
  const srcPath1 = {
72
64
  mybatis: "",
@@ -75,9 +67,9 @@ class NineMuService {
75
67
  javascriptFrom: "",
76
68
  javascriptTo: ""
77
69
  };
78
- trace.log(srcPath);
70
+ trace$1.log(srcPath);
79
71
  const src = await api.post("/nine-ai/source/read", srcPath);
80
- trace.log(src);
72
+ trace$1.log(src);
81
73
  const response = await fetch(`${this.connectorUrl}/api/mu/generateAll`, {
82
74
  method: "POST",
83
75
  headers: { "Content-Type": "application/json" },
@@ -88,14 +80,14 @@ class NineMuService {
88
80
  //currentRoutes
89
81
  })
90
82
  });
91
- trace.log(response);
83
+ trace$1.log(response);
92
84
  const result = await response.json();
93
85
  if (!result.success) {
94
86
  throw new Error(result.error || "์†Œ์Šค ์ƒ์„ฑ ์ค‘ ์„œ๋ฒ„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.");
95
87
  }
96
88
  return result;
97
89
  } catch (error) {
98
- trace.error("NineMu Service Error:", error);
90
+ trace$1.error("NineMu Service Error:", error);
99
91
  throw error;
100
92
  }
101
93
  }
@@ -108,7 +100,7 @@ class NineMuService {
108
100
  const res = await fetch(routeUrl);
109
101
  return await res.json();
110
102
  } catch (err) {
111
- trace.error("Route load fail", err);
103
+ trace$1.error("Route load fail", err);
112
104
  return [];
113
105
  }
114
106
  }
@@ -13617,21 +13609,21 @@ class NineChat extends HTMLElement {
13617
13609
  name: "nine-mcp-client",
13618
13610
  version: "1.0.0"
13619
13611
  }, { capabilities: { tools: {} } }));
13620
- trace1.log("Connecting to MCP via WebSocket...");
13612
+ trace.log("Connecting to MCP via WebSocket...");
13621
13613
  await __privateGet(this, _mcpClient).connect(transport);
13622
- trace1.log("โœ… Nine MCP Connected (WebSocket)");
13614
+ trace.log("โœ… Nine MCP Connected (WebSocket)");
13623
13615
  } catch (err) {
13624
- trace1.error("โŒ MCP ์ดˆ๊ธฐํ™” ์—๋Ÿฌ:", err);
13616
+ trace.error("โŒ MCP ์ดˆ๊ธฐํ™” ์—๋Ÿฌ:", err);
13625
13617
  }
13626
13618
  });
13627
13619
  __privateAdd(this, _makeMenuHandler, async (e) => {
13628
13620
  const prompt = await nine.prompt("๋ฉ”๋‰ด์ƒ์„ฑ์‹œ ํ•„์š”ํ•œ AI ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.").rgb();
13629
13621
  if (prompt === null || prompt === void 0) return;
13630
13622
  const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
13631
- trace1.log(res);
13623
+ trace.log(res);
13632
13624
  if (!res || !(res == null ? void 0 : res.contents)) return;
13633
13625
  const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
13634
- trace1.log(jsonRoutes);
13626
+ trace.log(jsonRoutes);
13635
13627
  const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
13636
13628
  routes: jsonRoutes,
13637
13629
  prompt
@@ -13728,7 +13720,7 @@ render_fn = function() {
13728
13720
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13729
13721
  this.shadowRoot.innerHTML = `
13730
13722
  <style>
13731
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.119"}/dist/css/nine-mu.css";
13723
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.121"}/dist/css/nine-mu.css";
13732
13724
  ${customImport}
13733
13725
  </style>
13734
13726
  <div class="wrapper">
@@ -39623,9 +39615,9 @@ class MergeButtonWidget extends WidgetType {
39623
39615
  button.className = "cm-merge-button accept";
39624
39616
  }
39625
39617
  button.addEventListener("click", () => {
39626
- trace.log(`๋ฒ„ํŠผ ํด๋ฆญ: ${this.isAsisButton ? "ASIS ์ชฝ (์‚ญ์ œ)" : "TOBE ์ชฝ (์ ์šฉ)"}`, this.textToApply);
39627
- trace.log("๋Œ€์ƒ ์—๋””ํ„ฐ:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39628
- trace.log("๋Œ€์ƒ ๋ฒ”์œ„:", this.diffRange);
39618
+ trace$1.log(`๋ฒ„ํŠผ ํด๋ฆญ: ${this.isAsisButton ? "ASIS ์ชฝ (์‚ญ์ œ)" : "TOBE ์ชฝ (์ ์šฉ)"}`, this.textToApply);
39619
+ trace$1.log("๋Œ€์ƒ ์—๋””ํ„ฐ:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39620
+ trace$1.log("๋Œ€์ƒ ๋ฒ”์œ„:", this.diffRange);
39629
39621
  this.applyChanges(this.textToApply, this.targetEditorView, this.diffRange);
39630
39622
  });
39631
39623
  const container = document.createElement("div");
@@ -39636,7 +39628,7 @@ class MergeButtonWidget extends WidgetType {
39636
39628
  // ์‹ค์ œ ๋ณ€๊ฒฝ ์ ์šฉ ๋กœ์ง
39637
39629
  applyChanges(text, editorView, range) {
39638
39630
  if (!editorView || !range) {
39639
- trace.error("Target editor view or range is undefined.", editorView, range);
39631
+ trace$1.error("Target editor view or range is undefined.", editorView, range);
39640
39632
  return;
39641
39633
  }
39642
39634
  editorView.dispatch({
@@ -39677,7 +39669,7 @@ class NineDiff extends HTMLElement {
39677
39669
  __privateSet(this, _asisEditorEl, this.shadowRoot.querySelector(".panel.asis"));
39678
39670
  __privateSet(this, _tobeEditorEl, this.shadowRoot.querySelector(".panel.tobe"));
39679
39671
  if (!__privateGet(this, _asisEditorEl) || !__privateGet(this, _tobeEditorEl)) {
39680
- trace.error("CodeMirror panel containers not found!");
39672
+ trace$1.error("CodeMirror panel containers not found!");
39681
39673
  return;
39682
39674
  }
39683
39675
  const basicExtensions = [
@@ -39718,7 +39710,7 @@ class NineDiff extends HTMLElement {
39718
39710
  EditorView.updateListener.of((update) => {
39719
39711
  if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
39720
39712
  update.view._initialAsisContentLoaded = true;
39721
- trace.log("CodeMirror ASIS view is ready for initial content.");
39713
+ trace$1.log("CodeMirror ASIS view is ready for initial content.");
39722
39714
  asisReady = true;
39723
39715
  checkAllReady();
39724
39716
  }
@@ -39740,7 +39732,7 @@ class NineDiff extends HTMLElement {
39740
39732
  EditorView.updateListener.of((update) => {
39741
39733
  if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
39742
39734
  update.view._initialTobeContentLoaded = true;
39743
- trace.log("CodeMirror TOBE view is ready for initial content.");
39735
+ trace$1.log("CodeMirror TOBE view is ready for initial content.");
39744
39736
  tobeReady = true;
39745
39737
  checkAllReady();
39746
39738
  }
@@ -39803,7 +39795,7 @@ class NineDiff extends HTMLElement {
39803
39795
  const tobeRangeStart = tobeCursor;
39804
39796
  switch (op) {
39805
39797
  case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
39806
- trace.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39798
+ trace$1.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39807
39799
  const tobeLines = text.split("\n");
39808
39800
  for (let i = 0; i < tobeLines.length; i++) {
39809
39801
  if (!(i === tobeLines.length - 1 && tobeLines[i] === "" && text.endsWith("\n"))) {
@@ -39831,7 +39823,7 @@ class NineDiff extends HTMLElement {
39831
39823
  );
39832
39824
  break;
39833
39825
  case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
39834
- trace.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39826
+ trace$1.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39835
39827
  const asisLines = text.split("\n");
39836
39828
  for (let i = 0; i < asisLines.length; i++) {
39837
39829
  if (!(i === asisLines.length - 1 && asisLines[i] === "" && text.endsWith("\n"))) {
@@ -39890,7 +39882,7 @@ class NineDiff extends HTMLElement {
39890
39882
  });
39891
39883
  __publicField(this, "initialize", (src1, src2, language2 = "javascript") => {
39892
39884
  if (!__privateGet(this, _asisEditorView) || !__privateGet(this, _tobeEditorView)) {
39893
- trace.warn("CodeMirror Editors not initialized yet.");
39885
+ trace$1.warn("CodeMirror Editors not initialized yet.");
39894
39886
  return;
39895
39887
  }
39896
39888
  __privateSet(this, _isScrollSyncActive, false);
@@ -39946,7 +39938,7 @@ class NineDiff extends HTMLElement {
39946
39938
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
39947
39939
  this.shadowRoot.innerHTML = `
39948
39940
  <style>
39949
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.119"}/dist/css/nine-mu.css";
39941
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.121"}/dist/css/nine-mu.css";
39950
39942
  ${customImport}
39951
39943
  </style>
39952
39944
 
@@ -39963,7 +39955,7 @@ class NineDiff extends HTMLElement {
39963
39955
  bubbles: true,
39964
39956
  composed: true
39965
39957
  }));
39966
- trace.log("dispatchEvent");
39958
+ trace$1.log("dispatchEvent");
39967
39959
  });
39968
39960
  }
39969
39961
  disconnectedCallback() {
@@ -40022,12 +40014,12 @@ class NineDiffPopup extends HTMLElement {
40022
40014
  if (typeof src === "string" && (src.startsWith("url:") || src.startsWith("file:"))) {
40023
40015
  const targetUrl = src.replace(/^(url:|file:)/, "");
40024
40016
  try {
40025
- trace.log(`๐Ÿ“ก ๋ฆฌ๋ชจํŠธ ๋กœ๋“œ: ${targetUrl}`);
40017
+ trace$1.log(`๐Ÿ“ก ๋ฆฌ๋ชจํŠธ ๋กœ๋“œ: ${targetUrl}`);
40026
40018
  const res = await fetch(targetUrl);
40027
40019
  if (!res.ok) throw new Error(`Status: ${res.status}`);
40028
40020
  return await res.text();
40029
40021
  } catch (e) {
40030
- trace.error(`๋กœ๋“œ ์‹คํŒจ [${targetUrl}]:`, e);
40022
+ trace$1.error(`๋กœ๋“œ ์‹คํŒจ [${targetUrl}]:`, e);
40031
40023
  return `// ๋กœ๋“œ ์‹คํŒจ: ${targetUrl}
40032
40024
  ${e.message}`;
40033
40025
  }
@@ -40056,7 +40048,7 @@ render_fn2 = function() {
40056
40048
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40057
40049
  this.shadowRoot.innerHTML = `
40058
40050
  <style>
40059
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.119"}/dist/css/nine-mu.css";
40051
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.121"}/dist/css/nine-mu.css";
40060
40052
  ${customImport}
40061
40053
  </style>
40062
40054
 
@@ -40095,9 +40087,9 @@ handleCancel_fn = function() {
40095
40087
  };
40096
40088
  customElements.define("nine-diff-popup", NineDiffPopup);
40097
40089
  const NineMu = {
40098
- version: "0.1.119",
40090
+ version: "0.1.121",
40099
40091
  init: (config2) => {
40100
- trace.log("๐Ÿ› ๏ธ Nine-Mu Engine initialized", config2);
40092
+ trace$1.log("๐Ÿ› ๏ธ Nine-Mu Engine initialized", config2);
40101
40093
  }
40102
40094
  };
40103
40095
  export {