zova-cli-set-front 1.2.44 → 1.2.46

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.
@@ -14,7 +14,7 @@
14
14
  "description": "<%=argv.description%>",
15
15
  "keywords": ["Zova Module"],
16
16
  "author": "<%=argv.author%>",
17
- "files": ["mock", "dist", "src", "icons", "assets", "rest"],
17
+ "files": ["mock", "dist", "src", "icons", "assets"],
18
18
  "scripts": {
19
19
  "clean": "rimraf dist tsconfig.build.tsbuildinfo",
20
20
  "tsc:publish": "npm run clean && zova :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
@@ -1,7 +1,9 @@
1
+ import type { PrefixKeys } from 'zova';
1
2
  import type { IActionRecord, TypeActionOptions } from 'zova-module-a-action';
2
3
  import type { IVonaComponentRecord, TypeComponentOptions } from 'zova-module-a-bean';
3
4
  import type { IIconRecord } from 'zova-module-a-icon';
4
5
  import type { TypePagePathSchema } from 'zova-module-a-router';
6
+ import type { CssBase } from 'zova-module-home-theme';
5
7
 
6
8
  declare module 'zova-module-a-router' {
7
9
  export interface IPagePathRecord {
@@ -12,6 +14,24 @@ declare module 'zova-module-a-router' {
12
14
  }
13
15
  }
14
16
 
17
+ export function $cssBase<K extends PrefixKeys<CssBase, 'c'>>(name: K): string {
18
+ return `cssBase:${name}`;
19
+ }
20
+
21
+ export function $cssMerge(
22
+ ...classes: (
23
+ | string
24
+ | false
25
+ | undefined
26
+ | null
27
+ | {
28
+ [className: string]: any;
29
+ }
30
+ )[]
31
+ ): any[] {
32
+ return classes;
33
+ }
34
+
15
35
  export function $iconName<K extends keyof IIconRecord>(name: K): any {
16
36
  return name;
17
37
  }
package/dist/index.js CHANGED
@@ -2966,20 +2966,9 @@ ${contentResourceIcons}
2966
2966
  }
2967
2967
  /** icons: end */
2968
2968
  `;
2969
- // restComponent
2970
- await generateRestIcon(moduleName, modulePath);
2971
2969
  // ok
2972
2970
  return content;
2973
2971
  }
2974
- async function generateRestIcon(moduleName, modulePath, _resourceIcons) {
2975
- // icons
2976
- const contentResourceIcons = `export * from 'zova-module-${moduleName}';\n`;
2977
- const fileIcons = path.join(modulePath, 'rest/icons.ts');
2978
- await fse.outputFile(fileIcons, contentResourceIcons);
2979
- // index
2980
- const exportIndexContent = "export * from './icons.js';";
2981
- await generateRestIndex(modulePath, exportIndexContent);
2982
- }
2983
2972
  async function _generateFileConfigIcons(groups) {
2984
2973
  const groupsFrontImport = [];
2985
2974
  const groupsFrontExport = [];
@@ -3062,18 +3051,6 @@ function _getRecordId(moduleName, groupName, iconName) {
3062
3051
  if (groupName === 'default') groupName = '';
3063
3052
  return `${moduleName}:${groupName}:${iconName}`;
3064
3053
  }
3065
- async function generateRestIndex(modulePath, append) {
3066
- // index
3067
- const fileIndex = path.join(modulePath, 'rest/index.ts');
3068
- let contentIndex = '';
3069
- if (fse.existsSync(fileIndex)) {
3070
- contentIndex = (await fse.readFile(fileIndex)).toString();
3071
- }
3072
- if (!contentIndex.includes(append)) {
3073
- contentIndex = `${contentIndex}${append}\n`;
3074
- await fse.outputFile(fileIndex, contentIndex);
3075
- }
3076
- }
3077
3054
 
3078
3055
  // import SVGCompiler from 'svg-baker';
3079
3056
  // const svgSymbol = await new SVGCompiler().addSymbol({
@@ -10,4 +10,3 @@ export declare function extractBeanInfo(sceneName: string, fileContent: string,
10
10
  };
11
11
  export declare function beanFullNameFromOnionName(onionName: string, sceneName: string): string;
12
12
  export declare function onionNameFromBeanFullName(beanFullName: string, sceneName: string): string;
13
- export declare function generateRestIndex(modulePath: string, append: string): Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.44",
4
- "gitHead": "b6da8c02893f8002151fdd2eeec44c597570d5d6",
3
+ "version": "1.2.46",
4
+ "gitHead": "ddec2a32e5fd0e85af5967caa29e4d0e5e0f6117",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
7
7
  "framework",
@@ -40,7 +40,7 @@
40
40
  "@cabloy/extend": "^3.1.0",
41
41
  "@cabloy/module-info": "^2.0.0",
42
42
  "@cabloy/openapi-typescript": "^7.9.2",
43
- "@cabloy/utils": "^2.1.15",
43
+ "@cabloy/utils": "^2.1.16",
44
44
  "@cabloy/vite-plugin-babel": "^1.3.3",
45
45
  "@cabloy/vue-babel-plugin-jsx": "^2.0.1",
46
46
  "@cabloy/word-utils": "^2.1.9",