zova-cli-set-front 1.1.76 → 1.1.77

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.
@@ -1,7 +1,14 @@
1
- const __snippet_export =
2
- "export * as NSController<%=argv.nameMeta.fullCapitalize%> from '../component/<%=argv.componentName%>/controller.js';\n";
1
+ const __snippet_export = `export * as NSController<%=argv.nameMeta.fullCapitalize%> from '../component/<%=argv.componentName%>/controller.js';
2
+ import * as NSController<%=argv.nameMeta.fullCapitalize%> from '../component/<%=argv.componentName%>/controller.js';\n`;
3
3
  const __snippet_import = "import <%=argv.nameMeta.full%> from '../component/<%=argv.componentName%>/index.vue';\n";
4
4
  const __snippet_interface = '<%=argv.nameMeta.full%>,\n';
5
+ const __snippet_zova = `
6
+ import 'zova';
7
+ declare module 'zova' {
8
+ export interface IComponentRecord {}
9
+ }`;
10
+ const __snippet_iComponentRecord =
11
+ "'<%=argv.moduleInfo.relativeName%>:<%=argv.nameMeta.full%>': NSController<%=argv.nameMeta.fullCapitalize%>.Controller<%=argv.nameMeta.fullCapitalize%>;\n";
5
12
 
6
13
  module.exports = {
7
14
  file: 'src/resource/components.ts',
@@ -15,6 +22,13 @@ module.exports = {
15
22
  // interface
16
23
  code = await cli.template.renderContent({ content: __snippet_interface });
17
24
  ast.replace('export const components = {$$$0}', `export const components = {$$$0, ${code}}`);
25
+ // interface IComponentRecord
26
+ if (!ast.has("import 'zova'")) {
27
+ code = await cli.template.renderContent({ content: __snippet_zova });
28
+ ast.find('export const components = {$$$0}').after(code);
29
+ }
30
+ code = await cli.template.renderContent({ content: __snippet_iComponentRecord });
31
+ ast.replace('export interface IComponentRecord {$$$0}', `export interface IComponentRecord {$$$0 \n ${code}}`);
18
32
  // ok
19
33
  return ast;
20
34
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.1.76",
3
+ "version": "1.1.77",
4
4
  "description": "zova cli-set-front",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -44,8 +44,8 @@
44
44
  "svg-baker": "1.7.0",
45
45
  "svgo": "^3.2.0",
46
46
  "urllib": "^3.24.0",
47
- "zova-core": "^5.0.69",
48
- "zova-vite": "^1.0.88"
47
+ "zova-core": "^5.0.70",
48
+ "zova-vite": "^1.0.89"
49
49
  },
50
- "gitHead": "cc2deb52ef4b916866434e16ae08ba943fa00f54"
50
+ "gitHead": "336496a9527c14f709d0b416ce9030732f261b93"
51
51
  }