ide-assi 0.650.0 → 0.651.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.
@@ -203215,15 +203215,169 @@ console.log(el, href, title);
203215
203215
  */
203216
203216
 
203217
203217
 
203218
- const where1 = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203218
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203219
203219
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
203220
203220
 
203221
- console.log(where1);
203221
+ console.log(where);
203222
203222
 
203223
- const srcPath1 = this.#getSourcePath(where1.menu.url);
203224
- console.log(srcPath1);
203223
+ const srcPath = this.#getSourcePath(where.menu.url);
203224
+ console.log(srcPath);
203225
203225
 
203226
- return;
203226
+
203227
+ /**
203228
+ * {
203229
+ * "package": "ide.assi.be.tmpla",
203230
+ * "namespace": "ide.assi.be.tmpla.docmanager",
203231
+ * "baseClass": "DocManager",
203232
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
203233
+ * "mybatis": "tmpla/DocManagerMapper.xml",
203234
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
203235
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
203236
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
203237
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
203238
+ * }
203239
+ */
203240
+ const src = await api.post("/api/source/read", srcPath);
203241
+ //console.log(src);
203242
+
203243
+ /**
203244
+ const response = await fetch(srcPath.javascript);
203245
+ src.javascript = await response.text();*/
203246
+
203247
+ //console.log(src);
203248
+ //const template = await fetch(path).then(res => res.text());
203249
+ /*
203250
+ arr.push({
203251
+ //menuId: elem.getAttribute("menu-id"),
203252
+ url: elem.getAttribute("href"),
203253
+ title: elem.getAttribute("title"),
203254
+ })*/
203255
+
203256
+
203257
+
203258
+
203259
+
203260
+ //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203261
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203262
+ progressMessageInstance.updateProgress('prepare2', 'completed');
203263
+
203264
+ console.log(where);
203265
+
203266
+ //const srcPath = this.#getSourcePath(where.menu.url);
203267
+
203268
+
203269
+
203270
+ const columnInfo = await this.#getColumnInfo(where.table);
203271
+
203272
+ let mybatisXmlSource;
203273
+ if (apply.mybatis) {
203274
+ mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
203275
+ userPrompt: userPrompt,
203276
+ originSrc: src.mybatis,
203277
+ resultType: srcPath.resultType,
203278
+ namespace: srcPath.namespace,
203279
+ tableDefinitions: JSON.stringify(columnInfo),
203280
+ });
203281
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
203282
+ progressMessageInstance.updateProgress('mybatis', 'completed');
203283
+ }
203284
+ else {
203285
+ mybatisXmlSource = src.mybatis;
203286
+ }
203287
+
203288
+ let serviceSrc;
203289
+ if (apply.service) {
203290
+ serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
203291
+ userPrompt: userPrompt,
203292
+ originSrc: src.service,
203293
+ baseClass: srcPath.baseClass,
203294
+ myBatisPath: srcPath.mybatis,
203295
+ namespace: srcPath.namespace,
203296
+ package: srcPath.package + ".service",
203297
+ mybatisXmlSource: mybatisXmlSource,
203298
+ });
203299
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
203300
+ progressMessageInstance.updateProgress('service', 'completed');
203301
+ }
203302
+ else {
203303
+ serviceSrc = src.service;
203304
+ }
203305
+
203306
+ let controllerSrc;
203307
+ if (apply.controller) {
203308
+ controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
203309
+ userPrompt: userPrompt,
203310
+ originSrc: src.controller,
203311
+ baseClass: srcPath.baseClass,
203312
+ menuUrl: where.menu.url,
203313
+ package: srcPath.package + ".controller",
203314
+ serviceSource: serviceSrc,
203315
+ });
203316
+ //this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
203317
+ progressMessageInstance.updateProgress('controller', 'completed');
203318
+ }
203319
+ else {
203320
+ controllerSrc = src.controller;
203321
+ }
203322
+
203323
+ let jsSrc;
203324
+ if (apply.javascript) {
203325
+ jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203326
+ userPrompt: userPrompt,
203327
+ mybatis: srcPath.mybatis,
203328
+ originSrc: src.javascript,
203329
+ menuUrl: where.menu.url,
203330
+ menuName: where.menu.name,
203331
+ baseClass: srcPath.baseClass,
203332
+ mybatisXmlSource: mybatisXmlSource,
203333
+ controllerSource: controllerSrc,
203334
+ tableDefinitions: JSON.stringify(columnInfo),
203335
+ });
203336
+ //this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
203337
+ progressMessageInstance.updateProgress('javascript', 'completed');
203338
+ }
203339
+ else {
203340
+ jsSrc = src.javascript;
203341
+ }
203342
+
203343
+ //await this.#generateRealFile(srcPath, apply);
203344
+
203345
+ const returnSrc = [];
203346
+
203347
+ const mapping = {
203348
+ mybatis: {
203349
+ path: srcPath.mybatisPullPath,
203350
+ src: mybatisXmlSource,
203351
+ },
203352
+ service: {
203353
+ path: srcPath.servicePullPath,
203354
+ src: serviceSrc,
203355
+ },
203356
+ controller: {
203357
+ path: srcPath.controllerPullPath,
203358
+ src: controllerSrc,
203359
+ },
203360
+ javascript: {
203361
+ path: srcPath.javascriptPullPath,
203362
+ src: jsSrc,
203363
+ }
203364
+ };
203365
+
203366
+ for (const key in apply) {
203367
+ if (apply[key]) {
203368
+ returnSrc.push({
203369
+ [key]: {
203370
+ asis: src[key],
203371
+ tobe: mapping[key].src,
203372
+ tobePath: mapping[key].path,
203373
+ }
203374
+ });
203375
+ }
203376
+ }
203377
+
203378
+ console.log(returnSrc);
203379
+
203380
+ return returnSrc;
203227
203381
  };
203228
203382
 
203229
203383
  #generateDetailSource = async (userPrompt, apply, progressMessageInstance) => {
@@ -203211,15 +203211,169 @@ console.log(el, href, title);
203211
203211
  */
203212
203212
 
203213
203213
 
203214
- const where1 = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203214
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203215
203215
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
203216
203216
 
203217
- console.log(where1);
203217
+ console.log(where);
203218
203218
 
203219
- const srcPath1 = this.#getSourcePath(where1.menu.url);
203220
- console.log(srcPath1);
203219
+ const srcPath = this.#getSourcePath(where.menu.url);
203220
+ console.log(srcPath);
203221
203221
 
203222
- return;
203222
+
203223
+ /**
203224
+ * {
203225
+ * "package": "ide.assi.be.tmpla",
203226
+ * "namespace": "ide.assi.be.tmpla.docmanager",
203227
+ * "baseClass": "DocManager",
203228
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
203229
+ * "mybatis": "tmpla/DocManagerMapper.xml",
203230
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
203231
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
203232
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
203233
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
203234
+ * }
203235
+ */
203236
+ const src = await api.post("/api/source/read", srcPath);
203237
+ //console.log(src);
203238
+
203239
+ /**
203240
+ const response = await fetch(srcPath.javascript);
203241
+ src.javascript = await response.text();*/
203242
+
203243
+ //console.log(src);
203244
+ //const template = await fetch(path).then(res => res.text());
203245
+ /*
203246
+ arr.push({
203247
+ //menuId: elem.getAttribute("menu-id"),
203248
+ url: elem.getAttribute("href"),
203249
+ title: elem.getAttribute("title"),
203250
+ })*/
203251
+
203252
+
203253
+
203254
+
203255
+
203256
+ //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203257
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203258
+ progressMessageInstance.updateProgress('prepare2', 'completed');
203259
+
203260
+ console.log(where);
203261
+
203262
+ //const srcPath = this.#getSourcePath(where.menu.url);
203263
+
203264
+
203265
+
203266
+ const columnInfo = await this.#getColumnInfo(where.table);
203267
+
203268
+ let mybatisXmlSource;
203269
+ if (apply.mybatis) {
203270
+ mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
203271
+ userPrompt: userPrompt,
203272
+ originSrc: src.mybatis,
203273
+ resultType: srcPath.resultType,
203274
+ namespace: srcPath.namespace,
203275
+ tableDefinitions: JSON.stringify(columnInfo),
203276
+ });
203277
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
203278
+ progressMessageInstance.updateProgress('mybatis', 'completed');
203279
+ }
203280
+ else {
203281
+ mybatisXmlSource = src.mybatis;
203282
+ }
203283
+
203284
+ let serviceSrc;
203285
+ if (apply.service) {
203286
+ serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
203287
+ userPrompt: userPrompt,
203288
+ originSrc: src.service,
203289
+ baseClass: srcPath.baseClass,
203290
+ myBatisPath: srcPath.mybatis,
203291
+ namespace: srcPath.namespace,
203292
+ package: srcPath.package + ".service",
203293
+ mybatisXmlSource: mybatisXmlSource,
203294
+ });
203295
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
203296
+ progressMessageInstance.updateProgress('service', 'completed');
203297
+ }
203298
+ else {
203299
+ serviceSrc = src.service;
203300
+ }
203301
+
203302
+ let controllerSrc;
203303
+ if (apply.controller) {
203304
+ controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
203305
+ userPrompt: userPrompt,
203306
+ originSrc: src.controller,
203307
+ baseClass: srcPath.baseClass,
203308
+ menuUrl: where.menu.url,
203309
+ package: srcPath.package + ".controller",
203310
+ serviceSource: serviceSrc,
203311
+ });
203312
+ //this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
203313
+ progressMessageInstance.updateProgress('controller', 'completed');
203314
+ }
203315
+ else {
203316
+ controllerSrc = src.controller;
203317
+ }
203318
+
203319
+ let jsSrc;
203320
+ if (apply.javascript) {
203321
+ jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203322
+ userPrompt: userPrompt,
203323
+ mybatis: srcPath.mybatis,
203324
+ originSrc: src.javascript,
203325
+ menuUrl: where.menu.url,
203326
+ menuName: where.menu.name,
203327
+ baseClass: srcPath.baseClass,
203328
+ mybatisXmlSource: mybatisXmlSource,
203329
+ controllerSource: controllerSrc,
203330
+ tableDefinitions: JSON.stringify(columnInfo),
203331
+ });
203332
+ //this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
203333
+ progressMessageInstance.updateProgress('javascript', 'completed');
203334
+ }
203335
+ else {
203336
+ jsSrc = src.javascript;
203337
+ }
203338
+
203339
+ //await this.#generateRealFile(srcPath, apply);
203340
+
203341
+ const returnSrc = [];
203342
+
203343
+ const mapping = {
203344
+ mybatis: {
203345
+ path: srcPath.mybatisPullPath,
203346
+ src: mybatisXmlSource,
203347
+ },
203348
+ service: {
203349
+ path: srcPath.servicePullPath,
203350
+ src: serviceSrc,
203351
+ },
203352
+ controller: {
203353
+ path: srcPath.controllerPullPath,
203354
+ src: controllerSrc,
203355
+ },
203356
+ javascript: {
203357
+ path: srcPath.javascriptPullPath,
203358
+ src: jsSrc,
203359
+ }
203360
+ };
203361
+
203362
+ for (const key in apply) {
203363
+ if (apply[key]) {
203364
+ returnSrc.push({
203365
+ [key]: {
203366
+ asis: src[key],
203367
+ tobe: mapping[key].src,
203368
+ tobePath: mapping[key].path,
203369
+ }
203370
+ });
203371
+ }
203372
+ }
203373
+
203374
+ console.log(returnSrc);
203375
+
203376
+ return returnSrc;
203223
203377
  };
203224
203378
 
203225
203379
  #generateDetailSource = async (userPrompt, apply, progressMessageInstance) => {
@@ -666,15 +666,13 @@ console.log(el, href, title);
666
666
  */
667
667
 
668
668
 
669
- const where1 = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
669
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
670
670
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
671
671
 
672
- console.log(where1);
673
-
674
- const srcPath1 = this.#getSourcePath(where1.menu.url);
675
- console.log(srcPath1);
672
+ console.log(where);
676
673
 
677
- return;
674
+ const srcPath = this.#getSourcePath(where.menu.url);
675
+ console.log(srcPath);
678
676
 
679
677
 
680
678
  /**
@@ -710,7 +708,7 @@ console.log(el, href, title);
710
708
 
711
709
 
712
710
 
713
- const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
711
+ //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
714
712
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
715
713
  progressMessageInstance.updateProgress('prepare2', 'completed');
716
714
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.650.0",
4
+ "version": "0.651.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -666,15 +666,13 @@ console.log(el, href, title);
666
666
  */
667
667
 
668
668
 
669
- const where1 = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
669
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
670
670
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
671
671
 
672
- console.log(where1);
673
-
674
- const srcPath1 = this.#getSourcePath(where1.menu.url);
675
- console.log(srcPath1);
672
+ console.log(where);
676
673
 
677
- return;
674
+ const srcPath = this.#getSourcePath(where.menu.url);
675
+ console.log(srcPath);
678
676
 
679
677
 
680
678
  /**
@@ -710,11 +708,11 @@ console.log(el, href, title);
710
708
 
711
709
 
712
710
 
713
- const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
711
+ //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
714
712
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
715
713
  progressMessageInstance.updateProgress('prepare2', 'completed');
716
714
 
717
- console.log(where);
715
+ //console.log(where);
718
716
 
719
717
  //const srcPath = this.#getSourcePath(where.menu.url);
720
718