ide-assi 0.107.0 → 0.109.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.
@@ -193510,13 +193510,42 @@ class IdeAi
193510
193510
  return o;
193511
193511
  };
193512
193512
 
193513
- #mybatis = async (userPrompt, namespace, tableDefinitions) => {
193513
+ #generateMyBatis = async (userPrompt, namespace, tableDefinitions) => {
193514
193514
 
193515
- return await this.#invoke('/prompts/meta/MyBatisMapper.txt', {
193515
+ const src = await this.#invoke('/prompts/meta/BuildMyBatisMapper.txt', {
193516
193516
  "userPrompt": userPrompt,
193517
193517
  "namespace": namespace,
193518
193518
  "tableDefinitions": tableDefinitions
193519
193519
  });
193520
+
193521
+ await fetch(`/api/source/tmpl/generateFile`, {
193522
+ method: "POST",
193523
+ headers: { "Content-Type": "application/json" },
193524
+ body: JSON.stringify({
193525
+ fileNm: "mybatis.xml",
193526
+ contents: src,
193527
+ })
193528
+ });
193529
+
193530
+ return src;
193531
+ };
193532
+
193533
+ #generateService = async (params) => {
193534
+
193535
+ const src = await this.#invoke('/prompts/meta/BuildService.txt', params);
193536
+
193537
+ const response3 = await fetch(`/api/source/tmpl/generateFile`, {
193538
+ method: "POST",
193539
+ headers: { "Content-Type": "application/json" },
193540
+ body: JSON.stringify({
193541
+ fileNm: "service.java",
193542
+ contents: src,
193543
+ })
193544
+ });
193545
+
193546
+ console.log(response3);
193547
+
193548
+ return "";
193520
193549
  };
193521
193550
 
193522
193551
  generateSourceClient = async (userPrompt) => {
@@ -193530,8 +193559,20 @@ class IdeAi
193530
193559
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193531
193560
  console.log(where);
193532
193561
 
193533
- const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
193534
- console.log(mybatis);
193562
+ const columnInfo = await this.#getColumnInfo(where.table);
193563
+
193564
+ const myBatisSrc = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
193565
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193566
+
193567
+ await this.#generateService({
193568
+ userPrompt: userPrompt,
193569
+ menuUrl: where.menu.url,
193570
+ classPackage: where.package + ".service",
193571
+ namespace: where.package,
193572
+ mybatisXmlSource: myBatisSrc,
193573
+ });
193574
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193575
+
193535
193576
 
193536
193577
  return "OK";
193537
193578
  }
@@ -193506,13 +193506,42 @@ class IdeAi
193506
193506
  return o;
193507
193507
  };
193508
193508
 
193509
- #mybatis = async (userPrompt, namespace, tableDefinitions) => {
193509
+ #generateMyBatis = async (userPrompt, namespace, tableDefinitions) => {
193510
193510
 
193511
- return await this.#invoke('/prompts/meta/MyBatisMapper.txt', {
193511
+ const src = await this.#invoke('/prompts/meta/BuildMyBatisMapper.txt', {
193512
193512
  "userPrompt": userPrompt,
193513
193513
  "namespace": namespace,
193514
193514
  "tableDefinitions": tableDefinitions
193515
193515
  });
193516
+
193517
+ await fetch(`/api/source/tmpl/generateFile`, {
193518
+ method: "POST",
193519
+ headers: { "Content-Type": "application/json" },
193520
+ body: JSON.stringify({
193521
+ fileNm: "mybatis.xml",
193522
+ contents: src,
193523
+ })
193524
+ });
193525
+
193526
+ return src;
193527
+ };
193528
+
193529
+ #generateService = async (params) => {
193530
+
193531
+ const src = await this.#invoke('/prompts/meta/BuildService.txt', params);
193532
+
193533
+ const response3 = await fetch(`/api/source/tmpl/generateFile`, {
193534
+ method: "POST",
193535
+ headers: { "Content-Type": "application/json" },
193536
+ body: JSON.stringify({
193537
+ fileNm: "service.java",
193538
+ contents: src,
193539
+ })
193540
+ });
193541
+
193542
+ console.log(response3);
193543
+
193544
+ return "";
193516
193545
  };
193517
193546
 
193518
193547
  generateSourceClient = async (userPrompt) => {
@@ -193526,8 +193555,20 @@ class IdeAi
193526
193555
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193527
193556
  console.log(where);
193528
193557
 
193529
- const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
193530
- console.log(mybatis);
193558
+ const columnInfo = await this.#getColumnInfo(where.table);
193559
+
193560
+ const myBatisSrc = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
193561
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193562
+
193563
+ await this.#generateService({
193564
+ userPrompt: userPrompt,
193565
+ menuUrl: where.menu.url,
193566
+ classPackage: where.package + ".service",
193567
+ namespace: where.package,
193568
+ mybatisXmlSource: myBatisSrc,
193569
+ });
193570
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193571
+
193531
193572
 
193532
193573
  return "OK";
193533
193574
  }
@@ -215,13 +215,42 @@ export class IdeAi
215
215
  return o;
216
216
  };
217
217
 
218
- #mybatis = async (userPrompt, namespace, tableDefinitions) => {
218
+ #generateMyBatis = async (userPrompt, namespace, tableDefinitions) => {
219
219
 
220
- return await this.#invoke('/prompts/meta/MyBatisMapper.txt', {
220
+ const src = await this.#invoke('/prompts/meta/BuildMyBatisMapper.txt', {
221
221
  "userPrompt": userPrompt,
222
222
  "namespace": namespace,
223
223
  "tableDefinitions": tableDefinitions
224
224
  });
225
+
226
+ await fetch(`/api/source/tmpl/generateFile`, {
227
+ method: "POST",
228
+ headers: { "Content-Type": "application/json" },
229
+ body: JSON.stringify({
230
+ fileNm: "mybatis.xml",
231
+ contents: src,
232
+ })
233
+ });
234
+
235
+ return src;
236
+ };
237
+
238
+ #generateService = async (params) => {
239
+
240
+ const src = await this.#invoke('/prompts/meta/BuildService.txt', params);
241
+
242
+ const response3 = await fetch(`/api/source/tmpl/generateFile`, {
243
+ method: "POST",
244
+ headers: { "Content-Type": "application/json" },
245
+ body: JSON.stringify({
246
+ fileNm: "service.java",
247
+ contents: src,
248
+ })
249
+ });
250
+
251
+ console.log(response3);
252
+
253
+ return "";
225
254
  };
226
255
 
227
256
  generateSourceClient = async (userPrompt) => {
@@ -235,8 +264,20 @@ export class IdeAi
235
264
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
236
265
  console.log(where);
237
266
 
238
- const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
239
- console.log(mybatis);
267
+ const columnInfo = await this.#getColumnInfo(where.table);
268
+
269
+ const myBatisSrc = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
270
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
271
+
272
+ const serviceSrc = await this.#generateService({
273
+ userPrompt: userPrompt,
274
+ menuUrl: where.menu.url,
275
+ classPackage: where.package + ".service",
276
+ namespace: where.package,
277
+ mybatisXmlSource: myBatisSrc,
278
+ });
279
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
280
+
240
281
 
241
282
  return "OK";
242
283
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.107.0",
4
+ "version": "0.109.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -215,13 +215,42 @@ export class IdeAi
215
215
  return o;
216
216
  };
217
217
 
218
- #mybatis = async (userPrompt, namespace, tableDefinitions) => {
218
+ #generateMyBatis = async (userPrompt, namespace, tableDefinitions) => {
219
219
 
220
- return await this.#invoke('/prompts/meta/MyBatisMapper.txt', {
220
+ const src = await this.#invoke('/prompts/meta/BuildMyBatisMapper.txt', {
221
221
  "userPrompt": userPrompt,
222
222
  "namespace": namespace,
223
223
  "tableDefinitions": tableDefinitions
224
224
  });
225
+
226
+ await fetch(`/api/source/tmpl/generateFile`, {
227
+ method: "POST",
228
+ headers: { "Content-Type": "application/json" },
229
+ body: JSON.stringify({
230
+ fileNm: "mybatis.xml",
231
+ contents: src,
232
+ })
233
+ });
234
+
235
+ return src;
236
+ };
237
+
238
+ #generateService = async (params) => {
239
+
240
+ const src = await this.#invoke('/prompts/meta/BuildService.txt', params);
241
+
242
+ const response3 = await fetch(`/api/source/tmpl/generateFile`, {
243
+ method: "POST",
244
+ headers: { "Content-Type": "application/json" },
245
+ body: JSON.stringify({
246
+ fileNm: "service.java",
247
+ contents: src,
248
+ })
249
+ });
250
+
251
+ console.log(response3);
252
+
253
+ return "";
225
254
  };
226
255
 
227
256
  generateSourceClient = async (userPrompt) => {
@@ -235,8 +264,20 @@ export class IdeAi
235
264
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
236
265
  console.log(where);
237
266
 
238
- const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
239
- console.log(mybatis);
267
+ const columnInfo = await this.#getColumnInfo(where.table);
268
+
269
+ const myBatisSrc = await this.#generateMyBatis(userPrompt, where.package, columnInfo);
270
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
271
+
272
+ const serviceSrc = await this.#generateService({
273
+ userPrompt: userPrompt,
274
+ menuUrl: where.menu.url,
275
+ classPackage: where.package + ".service",
276
+ namespace: where.package,
277
+ mybatisXmlSource: myBatisSrc,
278
+ });
279
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
280
+
240
281
 
241
282
  return "OK";
242
283
  }