ide-assi 0.495.0 → 0.497.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.
@@ -202370,10 +202370,22 @@ class IdeAi
202370
202370
  const returnSrc = [];
202371
202371
 
202372
202372
  const mapping = {
202373
- mybatis: mybatisXmlSource,
202374
- service: serviceSrc,
202375
- controller: controllerSrc,
202376
- javascript: jsSrc
202373
+ mybatis: {
202374
+ path: srcPath.mybatisPullPath,
202375
+ src: mybatisXmlSource,
202376
+ },
202377
+ service: {
202378
+ path: srcPath.servicePullPath,
202379
+ src: serviceSrc,
202380
+ },
202381
+ controller: {
202382
+ path: srcPath.controllerPullPath,
202383
+ src: controllerSrc,
202384
+ },
202385
+ javascript: {
202386
+ path: srcPath.javascriptPullPath,
202387
+ src: jsSrc,
202388
+ }
202377
202389
  };
202378
202390
 
202379
202391
  for (const key in apply) {
@@ -202381,7 +202393,8 @@ class IdeAi
202381
202393
  returnSrc.push({
202382
202394
  [key]: {
202383
202395
  asis: src[key],
202384
- tobe: mapping[key]
202396
+ tobe: mapping[key].src,
202397
+ tobePath: mapping[key].path,
202385
202398
  }
202386
202399
  });
202387
202400
  }
@@ -202994,12 +203007,12 @@ export default DocManager;
202994
203007
  <th>최종수정일</th>
202995
203008
  </tr>
202996
203009
  `; */
202997
- this.shadowRoot.querySelector("ide-diff-popup").popup({
203010
+ this.shadowRoot.querySelector("ide-diff-popup").popup([{
202998
203011
  javascript: {
202999
203012
  asis: src1,
203000
203013
  tobe: src2
203001
203014
  }
203002
- });
203015
+ }]);
203003
203016
 
203004
203017
  return;
203005
203018
  }
@@ -203181,6 +203194,8 @@ customElements.define("ide-assi-settings", ideAssiSettings);
203181
203194
 
203182
203195
  class IdeDiffPopup extends HTMLElement
203183
203196
  {
203197
+ #changedSource;
203198
+
203184
203199
  constructor() {
203185
203200
 
203186
203201
  super();
@@ -203194,8 +203209,13 @@ class IdeDiffPopup extends HTMLElement
203194
203209
 
203195
203210
  this.shadowRoot.innerHTML = `
203196
203211
  <style>
203212
+
203197
203213
  </style>
203198
203214
 
203215
+ <div>
203216
+ <button onclick="this.#apply()">소스 적용</button>
203217
+ </div>
203218
+
203199
203219
  <nx-dialog>
203200
203220
  <nx-tab theme="theme-4">
203201
203221
  <nx-tab-page caption="mybatis">
@@ -203214,9 +203234,34 @@ class IdeDiffPopup extends HTMLElement
203214
203234
  </nx-dialog>
203215
203235
  `;
203216
203236
  }
203237
+
203238
+ #apply = () => {
203239
+ let params = [];
203240
+
203241
+ for (const o of this.#changedSource) {
203242
+ console.log(o);
203243
+ const type = Object.keys(o)[0];
203244
+
203245
+ const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
203246
+
203247
+ console.log(diff);
203248
+
203249
+ params.push({
203250
+ path: o.tobePath,
203251
+ contents: diff.getContents(),
203252
+ });
203253
+ }
203254
+
203255
+ console.log(params);
203256
+
203257
+ api.post(`/api/source/generateRealFile`, { list: params });
203258
+ }
203259
+
203217
203260
 
203218
203261
  popup = (changedSource) => {
203219
203262
 
203263
+ this.#changedSource = changedSource;
203264
+
203220
203265
  const tab = this.shadowRoot.querySelector('nx-tab');
203221
203266
 
203222
203267
  setTimeout(() => {
@@ -235833,6 +235878,10 @@ class IdeDiff extends HTMLElement {
235833
235878
  }
235834
235879
  }
235835
235880
 
235881
+ getContents = () => {
235882
+ return (this.#tobeEditorView) ? this.#tobeEditorView.state.doc.toString() : "";
235883
+ };
235884
+
235836
235885
  #initCodeMirror = () => {
235837
235886
  this.#asisEditorEl = this.shadowRoot.querySelector('.panel.asis');
235838
235887
  this.#tobeEditorEl = this.shadowRoot.querySelector('.panel.tobe');
@@ -202366,10 +202366,22 @@ class IdeAi
202366
202366
  const returnSrc = [];
202367
202367
 
202368
202368
  const mapping = {
202369
- mybatis: mybatisXmlSource,
202370
- service: serviceSrc,
202371
- controller: controllerSrc,
202372
- javascript: jsSrc
202369
+ mybatis: {
202370
+ path: srcPath.mybatisPullPath,
202371
+ src: mybatisXmlSource,
202372
+ },
202373
+ service: {
202374
+ path: srcPath.servicePullPath,
202375
+ src: serviceSrc,
202376
+ },
202377
+ controller: {
202378
+ path: srcPath.controllerPullPath,
202379
+ src: controllerSrc,
202380
+ },
202381
+ javascript: {
202382
+ path: srcPath.javascriptPullPath,
202383
+ src: jsSrc,
202384
+ }
202373
202385
  };
202374
202386
 
202375
202387
  for (const key in apply) {
@@ -202377,7 +202389,8 @@ class IdeAi
202377
202389
  returnSrc.push({
202378
202390
  [key]: {
202379
202391
  asis: src[key],
202380
- tobe: mapping[key]
202392
+ tobe: mapping[key].src,
202393
+ tobePath: mapping[key].path,
202381
202394
  }
202382
202395
  });
202383
202396
  }
@@ -202990,12 +203003,12 @@ export default DocManager;
202990
203003
  <th>최종수정일</th>
202991
203004
  </tr>
202992
203005
  `; */
202993
- this.shadowRoot.querySelector("ide-diff-popup").popup({
203006
+ this.shadowRoot.querySelector("ide-diff-popup").popup([{
202994
203007
  javascript: {
202995
203008
  asis: src1,
202996
203009
  tobe: src2
202997
203010
  }
202998
- });
203011
+ }]);
202999
203012
 
203000
203013
  return;
203001
203014
  }
@@ -203177,6 +203190,8 @@ customElements.define("ide-assi-settings", ideAssiSettings);
203177
203190
 
203178
203191
  class IdeDiffPopup extends HTMLElement
203179
203192
  {
203193
+ #changedSource;
203194
+
203180
203195
  constructor() {
203181
203196
 
203182
203197
  super();
@@ -203190,8 +203205,13 @@ class IdeDiffPopup extends HTMLElement
203190
203205
 
203191
203206
  this.shadowRoot.innerHTML = `
203192
203207
  <style>
203208
+
203193
203209
  </style>
203194
203210
 
203211
+ <div>
203212
+ <button onclick="this.#apply()">소스 적용</button>
203213
+ </div>
203214
+
203195
203215
  <nx-dialog>
203196
203216
  <nx-tab theme="theme-4">
203197
203217
  <nx-tab-page caption="mybatis">
@@ -203210,9 +203230,34 @@ class IdeDiffPopup extends HTMLElement
203210
203230
  </nx-dialog>
203211
203231
  `;
203212
203232
  }
203233
+
203234
+ #apply = () => {
203235
+ let params = [];
203236
+
203237
+ for (const o of this.#changedSource) {
203238
+ console.log(o);
203239
+ const type = Object.keys(o)[0];
203240
+
203241
+ const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
203242
+
203243
+ console.log(diff);
203244
+
203245
+ params.push({
203246
+ path: o.tobePath,
203247
+ contents: diff.getContents(),
203248
+ });
203249
+ }
203250
+
203251
+ console.log(params);
203252
+
203253
+ api.post(`/api/source/generateRealFile`, { list: params });
203254
+ }
203255
+
203213
203256
 
203214
203257
  popup = (changedSource) => {
203215
203258
 
203259
+ this.#changedSource = changedSource;
203260
+
203216
203261
  const tab = this.shadowRoot.querySelector('nx-tab');
203217
203262
 
203218
203263
  setTimeout(() => {
@@ -235829,6 +235874,10 @@ class IdeDiff extends HTMLElement {
235829
235874
  }
235830
235875
  }
235831
235876
 
235877
+ getContents = () => {
235878
+ return (this.#tobeEditorView) ? this.#tobeEditorView.state.doc.toString() : "";
235879
+ };
235880
+
235832
235881
  #initCodeMirror = () => {
235833
235882
  this.#asisEditorEl = this.shadowRoot.querySelector('.panel.asis');
235834
235883
  this.#tobeEditorEl = this.shadowRoot.querySelector('.panel.tobe');
@@ -522,10 +522,22 @@ export class IdeAi
522
522
  const returnSrc = [];
523
523
 
524
524
  const mapping = {
525
- mybatis: mybatisXmlSource,
526
- service: serviceSrc,
527
- controller: controllerSrc,
528
- javascript: jsSrc
525
+ mybatis: {
526
+ path: srcPath.mybatisPullPath,
527
+ src: mybatisXmlSource,
528
+ },
529
+ service: {
530
+ path: srcPath.servicePullPath,
531
+ src: serviceSrc,
532
+ },
533
+ controller: {
534
+ path: srcPath.controllerPullPath,
535
+ src: controllerSrc,
536
+ },
537
+ javascript: {
538
+ path: srcPath.javascriptPullPath,
539
+ src: jsSrc,
540
+ }
529
541
  };
530
542
 
531
543
  for (const key in apply) {
@@ -533,7 +545,8 @@ export class IdeAi
533
545
  returnSrc.push({
534
546
  [key]: {
535
547
  asis: src[key],
536
- tobe: mapping[key]
548
+ tobe: mapping[key].src,
549
+ tobePath: mapping[key].path,
537
550
  }
538
551
  });
539
552
  }
@@ -491,12 +491,12 @@ export default DocManager;
491
491
  <th>최종수정일</th>
492
492
  </tr>
493
493
  `; */
494
- this.shadowRoot.querySelector("ide-diff-popup").popup({
494
+ this.shadowRoot.querySelector("ide-diff-popup").popup([{
495
495
  javascript: {
496
496
  asis: src1,
497
497
  tobe: src2
498
498
  }
499
- });
499
+ }]);
500
500
 
501
501
  return;
502
502
 
@@ -222,6 +222,10 @@ export class IdeDiff extends HTMLElement {
222
222
  }
223
223
  }
224
224
 
225
+ getContents = () => {
226
+ return (this.#tobeEditorView) ? this.#tobeEditorView.state.doc.toString() : "";
227
+ };
228
+
225
229
  #initCodeMirror = () => {
226
230
  this.#asisEditorEl = this.shadowRoot.querySelector('.panel.asis');
227
231
  this.#tobeEditorEl = this.shadowRoot.querySelector('.panel.tobe');
@@ -1,7 +1,10 @@
1
1
  import ninegrid from "ninegrid2";
2
+ import {api} from "./ideFetch.js";
2
3
 
3
4
  class IdeDiffPopup extends HTMLElement
4
5
  {
6
+ #changedSource;
7
+
5
8
  constructor() {
6
9
 
7
10
  super();
@@ -15,8 +18,13 @@ class IdeDiffPopup extends HTMLElement
15
18
 
16
19
  this.shadowRoot.innerHTML = `
17
20
  <style>
21
+
18
22
  </style>
19
23
 
24
+ <div>
25
+ <button onclick="this.#apply()">소스 적용</button>
26
+ </div>
27
+
20
28
  <nx-dialog>
21
29
  <nx-tab theme="theme-4">
22
30
  <nx-tab-page caption="mybatis">
@@ -35,9 +43,34 @@ class IdeDiffPopup extends HTMLElement
35
43
  </nx-dialog>
36
44
  `;
37
45
  }
46
+
47
+ #apply = () => {
48
+ let params = [];
49
+
50
+ for (const o of this.#changedSource) {
51
+ console.log(o);
52
+ const type = Object.keys(o)[0];
53
+
54
+ const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
55
+
56
+ console.log(diff);
57
+
58
+ params.push({
59
+ path: o.tobePath,
60
+ contents: diff.getContents(),
61
+ })
62
+ }
63
+
64
+ console.log(params);
65
+
66
+ api.post(`/api/source/generateRealFile`, { list: params });
67
+ }
68
+
38
69
 
39
70
  popup = (changedSource) => {
40
71
 
72
+ this.#changedSource = changedSource;
73
+
41
74
  const tab = this.shadowRoot.querySelector('nx-tab');
42
75
 
43
76
  setTimeout(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.495.0",
4
+ "version": "0.497.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -522,10 +522,22 @@ export class IdeAi
522
522
  const returnSrc = [];
523
523
 
524
524
  const mapping = {
525
- mybatis: mybatisXmlSource,
526
- service: serviceSrc,
527
- controller: controllerSrc,
528
- javascript: jsSrc
525
+ mybatis: {
526
+ path: srcPath.mybatisPullPath,
527
+ src: mybatisXmlSource,
528
+ },
529
+ service: {
530
+ path: srcPath.servicePullPath,
531
+ src: serviceSrc,
532
+ },
533
+ controller: {
534
+ path: srcPath.controllerPullPath,
535
+ src: controllerSrc,
536
+ },
537
+ javascript: {
538
+ path: srcPath.javascriptPullPath,
539
+ src: jsSrc,
540
+ }
529
541
  };
530
542
 
531
543
  for (const key in apply) {
@@ -533,7 +545,8 @@ export class IdeAi
533
545
  returnSrc.push({
534
546
  [key]: {
535
547
  asis: src[key],
536
- tobe: mapping[key]
548
+ tobe: mapping[key].src,
549
+ tobePath: mapping[key].path,
537
550
  }
538
551
  });
539
552
  }
@@ -491,12 +491,12 @@ export default DocManager;
491
491
  <th>최종수정일</th>
492
492
  </tr>
493
493
  `; */
494
- this.shadowRoot.querySelector("ide-diff-popup").popup({
494
+ this.shadowRoot.querySelector("ide-diff-popup").popup([{
495
495
  javascript: {
496
496
  asis: src1,
497
497
  tobe: src2
498
498
  }
499
- });
499
+ }]);
500
500
 
501
501
  return;
502
502
 
@@ -222,6 +222,10 @@ export class IdeDiff extends HTMLElement {
222
222
  }
223
223
  }
224
224
 
225
+ getContents = () => {
226
+ return (this.#tobeEditorView) ? this.#tobeEditorView.state.doc.toString() : "";
227
+ };
228
+
225
229
  #initCodeMirror = () => {
226
230
  this.#asisEditorEl = this.shadowRoot.querySelector('.panel.asis');
227
231
  this.#tobeEditorEl = this.shadowRoot.querySelector('.panel.tobe');
@@ -1,7 +1,10 @@
1
1
  import ninegrid from "ninegrid2";
2
+ import {api} from "./ideFetch.js";
2
3
 
3
4
  class IdeDiffPopup extends HTMLElement
4
5
  {
6
+ #changedSource;
7
+
5
8
  constructor() {
6
9
 
7
10
  super();
@@ -15,8 +18,13 @@ class IdeDiffPopup extends HTMLElement
15
18
 
16
19
  this.shadowRoot.innerHTML = `
17
20
  <style>
21
+
18
22
  </style>
19
23
 
24
+ <div>
25
+ <button onclick="this.#apply()">소스 적용</button>
26
+ </div>
27
+
20
28
  <nx-dialog>
21
29
  <nx-tab theme="theme-4">
22
30
  <nx-tab-page caption="mybatis">
@@ -35,9 +43,34 @@ class IdeDiffPopup extends HTMLElement
35
43
  </nx-dialog>
36
44
  `;
37
45
  }
46
+
47
+ #apply = () => {
48
+ let params = [];
49
+
50
+ for (const o of this.#changedSource) {
51
+ console.log(o);
52
+ const type = Object.keys(o)[0];
53
+
54
+ const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
55
+
56
+ console.log(diff);
57
+
58
+ params.push({
59
+ path: o.tobePath,
60
+ contents: diff.getContents(),
61
+ })
62
+ }
63
+
64
+ console.log(params);
65
+
66
+ api.post(`/api/source/generateRealFile`, { list: params });
67
+ }
68
+
38
69
 
39
70
  popup = (changedSource) => {
40
71
 
72
+ this.#changedSource = changedSource;
73
+
41
74
  const tab = this.shadowRoot.querySelector('nx-tab');
42
75
 
43
76
  setTimeout(() => {