ide-assi 0.142.0 → 0.143.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.
@@ -11170,16 +11170,19 @@ class ninegrid {
11170
11170
  }
11171
11171
  };
11172
11172
 
11173
- static decode = (args) => {
11174
- console.log(args);
11173
+ static decode = (...args) => {
11174
+ const key = args[0];
11175
11175
 
11176
- for (var i = 1; i < args.length ; i+=2) {
11177
- if (args[0] === args[i]) return args[i+1];
11176
+ for (let i = 1; i < args.length - 1; i += 2) {
11177
+ if (args[i] === key) return args[i + 1];
11178
11178
  }
11179
11179
 
11180
- return args.length % 2 == 0 ? args[args.length - 1] : null;
11180
+ // fallback 처리 (짝이 맞지 않을 경우)
11181
+ return args.length % 2 === 0 ? args[args.length - 1] : null;
11181
11182
  };
11182
11183
 
11184
+
11185
+
11183
11186
  static isMobile = () => {
11184
11187
  return /(iPhone|iPad|Android|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
11185
11188
  };
@@ -193565,8 +193568,6 @@ class IdeAi
193565
193568
  const files = ["mybatis.xml", "service.java", "controller.java", "react.jsx"];
193566
193569
 
193567
193570
  const params = await Promise.all(
193568
-
193569
-
193570
193571
  files.map(async (file) => ({
193571
193572
  path: ninegrid.decode(file, "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript),
193572
193573
  contents: await fetch(`/api/templates/${file}`).then(res => res.text()),
@@ -193609,11 +193610,6 @@ class IdeAi
193609
193610
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193610
193611
  console.log(where);
193611
193612
 
193612
- console.log(where.mybatis, await ninegrid.decode("mybatis.xml", "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript, "xx"));
193613
-
193614
-
193615
-
193616
- /**
193617
193613
  const columnInfo = await this.#getColumnInfo(where.table);
193618
193614
 
193619
193615
  //const mybatisXmlSource = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
@@ -193642,13 +193638,13 @@ class IdeAi
193642
193638
  });
193643
193639
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193644
193640
 
193645
- const jsSrc = await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193641
+ await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193646
193642
  userPrompt: userPrompt,
193647
193643
  menuUrl: where.menu.url,
193648
193644
  controllerSource: controllerSrc,
193649
193645
  });
193650
193646
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193651
- */
193647
+
193652
193648
  await this.#generateRealFile(where);
193653
193649
 
193654
193650
  return "OK";
@@ -11166,16 +11166,19 @@ class ninegrid {
11166
11166
  }
11167
11167
  };
11168
11168
 
11169
- static decode = (args) => {
11170
- console.log(args);
11169
+ static decode = (...args) => {
11170
+ const key = args[0];
11171
11171
 
11172
- for (var i = 1; i < args.length ; i+=2) {
11173
- if (args[0] === args[i]) return args[i+1];
11172
+ for (let i = 1; i < args.length - 1; i += 2) {
11173
+ if (args[i] === key) return args[i + 1];
11174
11174
  }
11175
11175
 
11176
- return args.length % 2 == 0 ? args[args.length - 1] : null;
11176
+ // fallback 처리 (짝이 맞지 않을 경우)
11177
+ return args.length % 2 === 0 ? args[args.length - 1] : null;
11177
11178
  };
11178
11179
 
11180
+
11181
+
11179
11182
  static isMobile = () => {
11180
11183
  return /(iPhone|iPad|Android|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
11181
11184
  };
@@ -193561,8 +193564,6 @@ class IdeAi
193561
193564
  const files = ["mybatis.xml", "service.java", "controller.java", "react.jsx"];
193562
193565
 
193563
193566
  const params = await Promise.all(
193564
-
193565
-
193566
193567
  files.map(async (file) => ({
193567
193568
  path: ninegrid.decode(file, "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript),
193568
193569
  contents: await fetch(`/api/templates/${file}`).then(res => res.text()),
@@ -193605,11 +193606,6 @@ class IdeAi
193605
193606
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193606
193607
  console.log(where);
193607
193608
 
193608
- console.log(where.mybatis, await ninegrid.decode("mybatis.xml", "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript, "xx"));
193609
-
193610
-
193611
-
193612
- /**
193613
193609
  const columnInfo = await this.#getColumnInfo(where.table);
193614
193610
 
193615
193611
  //const mybatisXmlSource = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
@@ -193638,13 +193634,13 @@ class IdeAi
193638
193634
  });
193639
193635
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193640
193636
 
193641
- const jsSrc = await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193637
+ await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193642
193638
  userPrompt: userPrompt,
193643
193639
  menuUrl: where.menu.url,
193644
193640
  controllerSource: controllerSrc,
193645
193641
  });
193646
193642
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193647
- */
193643
+
193648
193644
  await this.#generateRealFile(where);
193649
193645
 
193650
193646
  return "OK";
@@ -221,8 +221,6 @@ export class IdeAi
221
221
  const files = ["mybatis.xml", "service.java", "controller.java", "react.jsx"];
222
222
 
223
223
  const params = await Promise.all(
224
-
225
-
226
224
  files.map(async (file) => ({
227
225
  path: ninegrid.decode(file, "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript),
228
226
  contents: await fetch(`/api/templates/${file}`).then(res => res.text()),
@@ -279,11 +277,6 @@ export class IdeAi
279
277
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
280
278
  console.log(where);
281
279
 
282
- console.log(where.mybatis, await ninegrid.decode("mybatis.xml", "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript, "xx"));
283
-
284
-
285
-
286
- /**
287
280
  const columnInfo = await this.#getColumnInfo(where.table);
288
281
 
289
282
  //const mybatisXmlSource = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
@@ -318,7 +311,7 @@ export class IdeAi
318
311
  controllerSource: controllerSrc,
319
312
  });
320
313
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
321
- */
314
+
322
315
  await this.#generateRealFile(where);
323
316
 
324
317
  return "OK";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.142.0",
4
+ "version": "0.143.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -221,8 +221,6 @@ export class IdeAi
221
221
  const files = ["mybatis.xml", "service.java", "controller.java", "react.jsx"];
222
222
 
223
223
  const params = await Promise.all(
224
-
225
-
226
224
  files.map(async (file) => ({
227
225
  path: ninegrid.decode(file, "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript),
228
226
  contents: await fetch(`/api/templates/${file}`).then(res => res.text()),
@@ -279,11 +277,6 @@ export class IdeAi
279
277
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
280
278
  console.log(where);
281
279
 
282
- console.log(where.mybatis, await ninegrid.decode("mybatis.xml", "mybatis.xml", where.mybatis, "service.java", where.service, "controller.java", where.controller, "react.jsx", where.javascript, "xx"));
283
-
284
-
285
-
286
- /**
287
280
  const columnInfo = await this.#getColumnInfo(where.table);
288
281
 
289
282
  //const mybatisXmlSource = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
@@ -318,7 +311,7 @@ export class IdeAi
318
311
  controllerSource: controllerSrc,
319
312
  });
320
313
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
321
- */
314
+
322
315
  await this.#generateRealFile(where);
323
316
 
324
317
  return "OK";