@dckj-npm/lowcode-plugin-code-generator 1.0.1 → 1.0.2

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.
@@ -43,13 +43,19 @@ export function CodeGenActionBtn(_ref) {
43
43
  case 4:
44
44
  originalSchema = _context.sent;
45
45
  console.log('ctx ', ctx);
46
- _context.next = 8;
46
+ console.log('isActive ', ctx.workspace.isActive);
47
+ console.log('window ', ctx.workspace.window);
48
+ console.log('skeleton ', ctx.workspace.skeleton);
49
+ console.log('windows ', ctx.workspace.windows);
50
+ console.log('resourceList ', ctx.workspace.resourceList());
51
+ console.log('ctx ', ctx.workspace.currentProject);
52
+ _context.next = 14;
47
53
  return ctx.project.exportSchema();
48
- case 8:
54
+ case 14:
49
55
  originalSchema2 = _context.sent;
50
- _context.next = 11;
56
+ _context.next = 17;
51
57
  return fixSchema(originalSchema);
52
- case 11:
58
+ case 17:
53
59
  schema = _context.sent;
54
60
  console.log('got schema:222222 ', schema);
55
61
  console.log('got schema:33333333 ', originalSchema2);
@@ -61,13 +67,13 @@ export function CodeGenActionBtn(_ref) {
61
67
  });
62
68
 
63
69
  // 出码...
64
- _context.next = 17;
70
+ _context.next = 23;
65
71
  return CodeGenerator.generateCode({
66
72
  solution: 'vuejs3',
67
73
  schema: schema,
68
74
  flattenResult: true
69
75
  });
70
- case 17:
76
+ case 23:
71
77
  result = _context.sent;
72
78
  console.log('generated: ', result);
73
79
  setState(function (prev) {
@@ -76,10 +82,10 @@ export function CodeGenActionBtn(_ref) {
76
82
  result: result
77
83
  });
78
84
  });
79
- _context.next = 26;
85
+ _context.next = 32;
80
86
  break;
81
- case 22:
82
- _context.prev = 22;
87
+ case 28:
88
+ _context.prev = 28;
83
89
  _context.t0 = _context["catch"](0);
84
90
  console.error('failed to run code generator: ', _context.t0);
85
91
  setState(function (prev) {
@@ -88,11 +94,11 @@ export function CodeGenActionBtn(_ref) {
88
94
  error: _context.t0 instanceof Error ? _context.t0 : new Error("" + ((_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || _context.t0))
89
95
  });
90
96
  });
91
- case 26:
97
+ case 32:
92
98
  case "end":
93
99
  return _context.stop();
94
100
  }
95
- }, _callee, null, [[0, 22]]);
101
+ }, _callee, null, [[0, 28]]);
96
102
  }));
97
103
  return function handleClick() {
98
104
  return _ref2.apply(this, arguments);
@@ -51,13 +51,19 @@ function CodeGenActionBtn(_ref) {
51
51
  case 4:
52
52
  originalSchema = _context.sent;
53
53
  console.log('ctx ', ctx);
54
- _context.next = 8;
54
+ console.log('isActive ', ctx.workspace.isActive);
55
+ console.log('window ', ctx.workspace.window);
56
+ console.log('skeleton ', ctx.workspace.skeleton);
57
+ console.log('windows ', ctx.workspace.windows);
58
+ console.log('resourceList ', ctx.workspace.resourceList());
59
+ console.log('ctx ', ctx.workspace.currentProject);
60
+ _context.next = 14;
55
61
  return ctx.project.exportSchema();
56
- case 8:
62
+ case 14:
57
63
  originalSchema2 = _context.sent;
58
- _context.next = 11;
64
+ _context.next = 17;
59
65
  return fixSchema(originalSchema);
60
- case 11:
66
+ case 17:
61
67
  schema = _context.sent;
62
68
  console.log('got schema:222222 ', schema);
63
69
  console.log('got schema:33333333 ', originalSchema2);
@@ -69,13 +75,13 @@ function CodeGenActionBtn(_ref) {
69
75
  });
70
76
 
71
77
  // 出码...
72
- _context.next = 17;
78
+ _context.next = 23;
73
79
  return CodeGenerator.generateCode({
74
80
  solution: 'vuejs3',
75
81
  schema: schema,
76
82
  flattenResult: true
77
83
  });
78
- case 17:
84
+ case 23:
79
85
  result = _context.sent;
80
86
  console.log('generated: ', result);
81
87
  setState(function (prev) {
@@ -84,10 +90,10 @@ function CodeGenActionBtn(_ref) {
84
90
  result: result
85
91
  });
86
92
  });
87
- _context.next = 26;
93
+ _context.next = 32;
88
94
  break;
89
- case 22:
90
- _context.prev = 22;
95
+ case 28:
96
+ _context.prev = 28;
91
97
  _context.t0 = _context["catch"](0);
92
98
  console.error('failed to run code generator: ', _context.t0);
93
99
  setState(function (prev) {
@@ -96,11 +102,11 @@ function CodeGenActionBtn(_ref) {
96
102
  error: _context.t0 instanceof Error ? _context.t0 : new Error("" + ((_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || _context.t0))
97
103
  });
98
104
  });
99
- case 26:
105
+ case 32:
100
106
  case "end":
101
107
  return _context.stop();
102
108
  }
103
- }, _callee, null, [[0, 22]]);
109
+ }, _callee, null, [[0, 28]]);
104
110
  }));
105
111
  return function handleClick() {
106
112
  return _ref2.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dckj-npm/lowcode-plugin-code-generator",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "集团低代码引擎 - 浏览器出码插件",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",