zova-cli-set-front 1.2.36 → 1.2.38

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -373,6 +373,8 @@ import type { TypePagePathSchema } from 'zova-module-a-router';
373
373
  export type { IPagePathRecord } from 'zova-module-a-router';
374
374
  import type { IActionRecord, TypeActionOptions } from 'zova-module-a-action';
375
375
  export type { IActionRecord } from 'zova-module-a-action';
376
+ import type { IVonaComponentRecord, TypeComponentOptions } from 'zova-module-a-bean';
377
+ export type { IVonaComponentRecord } from 'zova-module-a-bean';
376
378
  export type {
377
379
  IResourceComponentActionBulkRecord,
378
380
  IResourceComponentActionRowRecord,
@@ -426,8 +428,16 @@ export type {
426
428
  } else if (fse.existsSync(dirStartOpenapi)) {
427
429
  content += `import 'zova-module-start-openapi';\n`;
428
430
  }
431
+ // actions
429
432
  content += `export function Action<K extends keyof IActionRecord>(options: TypeActionOptions<K>) {
430
- return options.name.replace(':','.tableCell.');
433
+ if(!options.name) throw new Error('should specify the action name');
434
+ return options.name.replace(':','.action.');
435
+ }
436
+ `;
437
+ // components
438
+ content += `export function Component<K extends keyof IVonaComponentRecord>(options: TypeComponentOptions<K>) {
439
+ if (!options.name) throw new Error('should specify the component name');
440
+ return options.name;
431
441
  }
432
442
  `;
433
443
  return content;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.36",
4
- "gitHead": "9664b8fb5bcc3d8f2836fce8481d3c3a093f3aef",
3
+ "version": "1.2.38",
4
+ "gitHead": "6162f8e212146d3e5f98145fcf43adc52912694e",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
7
7
  "framework",