ide-assi 0.193.0 → 0.194.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.
@@ -193326,7 +193326,7 @@ class IdeUtils
193326
193326
  result : "1"
193327
193327
  table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
193328
193328
  */
193329
-
193329
+ /**
193330
193330
  static toCamelCase = str =>
193331
193331
  str
193332
193332
  .toLowerCase()
@@ -193340,7 +193340,35 @@ class IdeUtils
193340
193340
  //.slice(0, -1)
193341
193341
  .map(IdeUtils.toCamelCase)
193342
193342
  .join('.');
193343
+ */
193343
193344
 
193345
+ static getSourcePath = (menuUrl) => {
193346
+ const path = menuUrl.replace(/^\/+/, '');
193347
+
193348
+ const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
193349
+ const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
193350
+ const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
193351
+
193352
+ //console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
193353
+
193354
+ return {
193355
+ basePackage: packageName,
193356
+ namespace: namespace,
193357
+ controller: `${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193358
+ service: `${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193359
+ mybatis: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193360
+ javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193361
+ };
193362
+ /***
193363
+ return {
193364
+ basePackage: packageName,
193365
+ namespace: namespace,
193366
+ controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193367
+ service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193368
+ mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193369
+ javascript: `/${jsroot}/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193370
+ };*/
193371
+ };
193344
193372
 
193345
193373
  static generatePrompt = async (path, params) => {
193346
193374
 
@@ -193577,9 +193605,6 @@ class IdeAi
193577
193605
  throw new Error(o);
193578
193606
  }
193579
193607
 
193580
- const a = IdeUtils.transformPath("aaa-bbb/ccc-ddd");
193581
- console.log(a);
193582
-
193583
193608
  return o.result;
193584
193609
  };
193585
193610
 
@@ -193601,24 +193626,6 @@ class IdeAi
193601
193626
  }
193602
193627
 
193603
193628
 
193604
- //aaaBbb.cccDdd
193605
- const path = o.menu.url.replace(/^\/+/, '');//IdeUtils.transformPath(o.menu.url);
193606
- const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
193607
- const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
193608
- const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
193609
-
193610
- console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
193611
-
193612
- o.source = {
193613
- basePackage: packageName,
193614
- controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193615
- service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193616
- mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193617
- javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193618
- };
193619
-
193620
- console.log(o.source);
193621
-
193622
193629
  return o;
193623
193630
  };
193624
193631
 
@@ -193322,7 +193322,7 @@ class IdeUtils
193322
193322
  result : "1"
193323
193323
  table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
193324
193324
  */
193325
-
193325
+ /**
193326
193326
  static toCamelCase = str =>
193327
193327
  str
193328
193328
  .toLowerCase()
@@ -193336,7 +193336,35 @@ class IdeUtils
193336
193336
  //.slice(0, -1)
193337
193337
  .map(IdeUtils.toCamelCase)
193338
193338
  .join('.');
193339
+ */
193339
193340
 
193341
+ static getSourcePath = (menuUrl) => {
193342
+ const path = menuUrl.replace(/^\/+/, '');
193343
+
193344
+ const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
193345
+ const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
193346
+ const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
193347
+
193348
+ //console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
193349
+
193350
+ return {
193351
+ basePackage: packageName,
193352
+ namespace: namespace,
193353
+ controller: `${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193354
+ service: `${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193355
+ mybatis: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193356
+ javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193357
+ };
193358
+ /***
193359
+ return {
193360
+ basePackage: packageName,
193361
+ namespace: namespace,
193362
+ controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193363
+ service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193364
+ mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193365
+ javascript: `/${jsroot}/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193366
+ };*/
193367
+ };
193340
193368
 
193341
193369
  static generatePrompt = async (path, params) => {
193342
193370
 
@@ -193573,9 +193601,6 @@ class IdeAi
193573
193601
  throw new Error(o);
193574
193602
  }
193575
193603
 
193576
- const a = IdeUtils.transformPath("aaa-bbb/ccc-ddd");
193577
- console.log(a);
193578
-
193579
193604
  return o.result;
193580
193605
  };
193581
193606
 
@@ -193597,24 +193622,6 @@ class IdeAi
193597
193622
  }
193598
193623
 
193599
193624
 
193600
- //aaaBbb.cccDdd
193601
- const path = o.menu.url.replace(/^\/+/, '');//IdeUtils.transformPath(o.menu.url);
193602
- const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
193603
- const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
193604
- const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
193605
-
193606
- console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
193607
-
193608
- o.source = {
193609
- basePackage: packageName,
193610
- controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
193611
- service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
193612
- mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
193613
- javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
193614
- };
193615
-
193616
- console.log(o.source);
193617
-
193618
193625
  return o;
193619
193626
  };
193620
193627
 
@@ -201,9 +201,6 @@ export class IdeAi
201
201
  throw new Error(o);
202
202
  }
203
203
 
204
- const a = IdeUtils.transformPath("aaa-bbb/ccc-ddd");
205
- console.log(a);
206
-
207
204
  return o.result;
208
205
  };
209
206
 
@@ -225,24 +222,6 @@ export class IdeAi
225
222
  }
226
223
 
227
224
 
228
- //aaaBbb.cccDdd
229
- const path = o.menu.url.replace(/^\/+/, '');//IdeUtils.transformPath(o.menu.url);
230
- const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
231
- const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
232
- const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
233
-
234
- console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
235
-
236
- o.source = {
237
- basePackage: packageName,
238
- controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
239
- service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
240
- mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
241
- javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
242
- }
243
-
244
- console.log(o.source);
245
-
246
225
  return o;
247
226
  };
248
227
 
@@ -16,7 +16,7 @@ export class IdeUtils
16
16
  result : "1"
17
17
  table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
18
18
  */
19
-
19
+ /**
20
20
  static toCamelCase = str =>
21
21
  str
22
22
  .toLowerCase()
@@ -30,7 +30,35 @@ export class IdeUtils
30
30
  //.slice(0, -1)
31
31
  .map(IdeUtils.toCamelCase)
32
32
  .join('.');
33
+ */
34
+
35
+ static getSourcePath = (menuUrl) => {
36
+ const path = menuUrl.replace(/^\/+/, '');
37
+
38
+ const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
39
+ const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
40
+ const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
33
41
 
42
+ //console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
43
+
44
+ return {
45
+ basePackage: packageName,
46
+ namespace: namespace,
47
+ controller: `${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
48
+ service: `${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
49
+ mybatis: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
50
+ javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
51
+ };
52
+ /***
53
+ return {
54
+ basePackage: packageName,
55
+ namespace: namespace,
56
+ controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
57
+ service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
58
+ mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
59
+ javascript: `/${jsroot}/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
60
+ };*/
61
+ };
34
62
 
35
63
  static generatePrompt = async (path, params) => {
36
64
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.193.0",
4
+ "version": "0.194.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -201,9 +201,6 @@ export class IdeAi
201
201
  throw new Error(o);
202
202
  }
203
203
 
204
- const a = IdeUtils.transformPath("aaa-bbb/ccc-ddd");
205
- console.log(a);
206
-
207
204
  return o.result;
208
205
  };
209
206
 
@@ -225,24 +222,6 @@ export class IdeAi
225
222
  }
226
223
 
227
224
 
228
- //aaaBbb.cccDdd
229
- const path = o.menu.url.replace(/^\/+/, '');//IdeUtils.transformPath(o.menu.url);
230
- const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
231
- const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
232
- const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
233
-
234
- console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
235
-
236
- o.source = {
237
- basePackage: packageName,
238
- controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
239
- service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
240
- mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
241
- javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
242
- }
243
-
244
- console.log(o.source);
245
-
246
225
  return o;
247
226
  };
248
227
 
@@ -16,7 +16,7 @@ export class IdeUtils
16
16
  result : "1"
17
17
  table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
18
18
  */
19
-
19
+ /**
20
20
  static toCamelCase = str =>
21
21
  str
22
22
  .toLowerCase()
@@ -30,7 +30,35 @@ export class IdeUtils
30
30
  //.slice(0, -1)
31
31
  .map(IdeUtils.toCamelCase)
32
32
  .join('.');
33
+ */
34
+
35
+ static getSourcePath = (menuUrl) => {
36
+ const path = menuUrl.replace(/^\/+/, '');
37
+
38
+ const packageName = `${this.#parent.config.basePackage}.${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
39
+ const namespace = path.split("/").slice(0, -1).join(".").toLowerCase();
40
+ const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
33
41
 
42
+ //console.log(this.#parent, this.#parent.config, packageName, namespace, fileName);
43
+
44
+ return {
45
+ basePackage: packageName,
46
+ namespace: namespace,
47
+ controller: `${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
48
+ service: `${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
49
+ mybatis: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
50
+ javascript: `${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
51
+ };
52
+ /***
53
+ return {
54
+ basePackage: packageName,
55
+ namespace: namespace,
56
+ controller: `/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
57
+ service: `/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
58
+ mybatis: `/src/main/resource/mapper/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${fileName}Mapper.xml`,
59
+ javascript: `/${jsroot}/${path.split("/").slice(0, -1).join("/").toLowerCase()}/${path.split("/").at(-1)}.jsx`,
60
+ };*/
61
+ };
34
62
 
35
63
  static generatePrompt = async (path, params) => {
36
64