ide-assi 0.222.0 → 0.224.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.
@@ -193688,6 +193688,7 @@ class IdeAi
193688
193688
  baseClass: fileName,
193689
193689
  resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
193690
193690
  mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
193691
+ javascript: `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}.jsx`,
193691
193692
  mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
193692
193693
  controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193693
193694
  servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
@@ -193781,12 +193782,18 @@ class IdeAi
193781
193782
  * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
193782
193783
  * }
193783
193784
  */
193784
- const template = await api.post("/api/source/read", srcPath);
193785
- console.log(template);
193785
+ const src = await api.post("/api/source/read", srcPath);
193786
+ console.log(src);
193787
+
193788
+ const response = await fetch(srcPath.javascript);
193789
+ src.javascript = await response.text();
193790
+
193791
+ console.log(src);
193786
193792
 
193787
193793
  //const template = await fetch(path).then(res => res.text());
193788
193794
 
193789
193795
 
193796
+
193790
193797
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193791
193798
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193792
193799
 
@@ -193798,44 +193805,16 @@ class IdeAi
193798
193805
 
193799
193806
  const columnInfo = await this.#getColumnInfo(where.table);
193800
193807
 
193801
- const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/BuildMyBatisMapper.txt", "mybatis.xml", {
193808
+ await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
193802
193809
  userPrompt: userPrompt,
193810
+ originSrc: src.mybatis,
193803
193811
  resultType: srcPath.resultType,
193804
193812
  namespace: srcPath.namespace,
193805
- tableDefinitions: columnInfo
193806
- });
193807
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193808
-
193809
- const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
193810
- userPrompt: userPrompt,
193811
- baseClass: srcPath.baseClass,
193812
- myBatisPath: srcPath.mybatis,
193813
- namespace: srcPath.namespace,
193814
- package: srcPath.package + ".service",
193815
- mybatisXmlSource: mybatisXmlSource,
193816
- });
193817
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193818
-
193819
- const controllerSrc = await this.#generateTmplFile("/prompts/meta/BuildController.txt", "controller.java", {
193820
- userPrompt: userPrompt,
193821
- baseClass: srcPath.baseClass,
193822
- menuUrl: where.menu.url,
193823
- package: srcPath.package + ".controller",
193824
- serviceSource: serviceSrc,
193825
- });
193826
- this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193827
-
193828
- await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193829
- userPrompt: userPrompt,
193830
- menuUrl: where.menu.url,
193831
- menuName: where.menu.name,
193832
- baseClass: srcPath.baseClass,
193833
- controllerSource: controllerSrc,
193834
193813
  tableDefinitions: columnInfo,
193835
193814
  });
193836
- this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193815
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193837
193816
 
193838
- await this.#generateRealFile(srcPath);
193817
+ return;
193839
193818
  };
193840
193819
 
193841
193820
  generateSourceClient = async (userPrompt) => {
@@ -193684,6 +193684,7 @@ class IdeAi
193684
193684
  baseClass: fileName,
193685
193685
  resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
193686
193686
  mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
193687
+ javascript: `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}.jsx`,
193687
193688
  mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
193688
193689
  controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193689
193690
  servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
@@ -193777,12 +193778,18 @@ class IdeAi
193777
193778
  * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
193778
193779
  * }
193779
193780
  */
193780
- const template = await api.post("/api/source/read", srcPath);
193781
- console.log(template);
193781
+ const src = await api.post("/api/source/read", srcPath);
193782
+ console.log(src);
193783
+
193784
+ const response = await fetch(srcPath.javascript);
193785
+ src.javascript = await response.text();
193786
+
193787
+ console.log(src);
193782
193788
 
193783
193789
  //const template = await fetch(path).then(res => res.text());
193784
193790
 
193785
193791
 
193792
+
193786
193793
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193787
193794
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193788
193795
 
@@ -193794,44 +193801,16 @@ class IdeAi
193794
193801
 
193795
193802
  const columnInfo = await this.#getColumnInfo(where.table);
193796
193803
 
193797
- const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/BuildMyBatisMapper.txt", "mybatis.xml", {
193804
+ await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
193798
193805
  userPrompt: userPrompt,
193806
+ originSrc: src.mybatis,
193799
193807
  resultType: srcPath.resultType,
193800
193808
  namespace: srcPath.namespace,
193801
- tableDefinitions: columnInfo
193802
- });
193803
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193804
-
193805
- const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
193806
- userPrompt: userPrompt,
193807
- baseClass: srcPath.baseClass,
193808
- myBatisPath: srcPath.mybatis,
193809
- namespace: srcPath.namespace,
193810
- package: srcPath.package + ".service",
193811
- mybatisXmlSource: mybatisXmlSource,
193812
- });
193813
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193814
-
193815
- const controllerSrc = await this.#generateTmplFile("/prompts/meta/BuildController.txt", "controller.java", {
193816
- userPrompt: userPrompt,
193817
- baseClass: srcPath.baseClass,
193818
- menuUrl: where.menu.url,
193819
- package: srcPath.package + ".controller",
193820
- serviceSource: serviceSrc,
193821
- });
193822
- this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193823
-
193824
- await this.#generateTmplFile("/prompts/meta/BuildReactJsx.txt", "react.jsx", {
193825
- userPrompt: userPrompt,
193826
- menuUrl: where.menu.url,
193827
- menuName: where.menu.name,
193828
- baseClass: srcPath.baseClass,
193829
- controllerSource: controllerSrc,
193830
193809
  tableDefinitions: columnInfo,
193831
193810
  });
193832
- this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193811
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193833
193812
 
193834
- await this.#generateRealFile(srcPath);
193813
+ return;
193835
193814
  };
193836
193815
 
193837
193816
  generateSourceClient = async (userPrompt) => {
@@ -272,6 +272,7 @@ export class IdeAi
272
272
  baseClass: fileName,
273
273
  resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
274
274
  mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
275
+ javascript: `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}.jsx`,
275
276
  mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
276
277
  controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
277
278
  servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
@@ -365,12 +366,18 @@ export class IdeAi
365
366
  * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
366
367
  * }
367
368
  */
368
- const template = await api.post("/api/source/read", srcPath);
369
- console.log(template);
369
+ const src = await api.post("/api/source/read", srcPath);
370
+ console.log(src);
371
+
372
+ const response = await fetch(srcPath.javascript);
373
+ src.javascript = await response.text();
374
+
375
+ console.log(src);
370
376
 
371
377
  //const template = await fetch(path).then(res => res.text());
372
378
 
373
379
 
380
+
374
381
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
375
382
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
376
383
 
@@ -382,14 +389,17 @@ export class IdeAi
382
389
 
383
390
  const columnInfo = await this.#getColumnInfo(where.table);
384
391
 
385
- const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/BuildMyBatisMapper.txt", "mybatis.xml", {
392
+ const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
386
393
  userPrompt: userPrompt,
394
+ originSrc: src.mybatis,
387
395
  resultType: srcPath.resultType,
388
396
  namespace: srcPath.namespace,
389
- tableDefinitions: columnInfo
397
+ tableDefinitions: columnInfo,
390
398
  });
391
399
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
392
400
 
401
+ return;
402
+
393
403
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
394
404
  userPrompt: userPrompt,
395
405
  baseClass: srcPath.baseClass,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.222.0",
4
+ "version": "0.224.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -272,6 +272,7 @@ export class IdeAi
272
272
  baseClass: fileName,
273
273
  resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
274
274
  mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
275
+ javascript: `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}.jsx`,
275
276
  mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
276
277
  controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
277
278
  servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
@@ -365,12 +366,18 @@ export class IdeAi
365
366
  * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
366
367
  * }
367
368
  */
368
- const template = await api.post("/api/source/read", srcPath);
369
- console.log(template);
369
+ const src = await api.post("/api/source/read", srcPath);
370
+ console.log(src);
371
+
372
+ const response = await fetch(srcPath.javascript);
373
+ src.javascript = await response.text();
374
+
375
+ console.log(src);
370
376
 
371
377
  //const template = await fetch(path).then(res => res.text());
372
378
 
373
379
 
380
+
374
381
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
375
382
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
376
383
 
@@ -382,14 +389,17 @@ export class IdeAi
382
389
 
383
390
  const columnInfo = await this.#getColumnInfo(where.table);
384
391
 
385
- const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/BuildMyBatisMapper.txt", "mybatis.xml", {
392
+ const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
386
393
  userPrompt: userPrompt,
394
+ originSrc: src.mybatis,
387
395
  resultType: srcPath.resultType,
388
396
  namespace: srcPath.namespace,
389
- tableDefinitions: columnInfo
397
+ tableDefinitions: columnInfo,
390
398
  });
391
399
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
392
400
 
401
+ return;
402
+
393
403
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
394
404
  userPrompt: userPrompt,
395
405
  baseClass: srcPath.baseClass,