@bmstravel/nvp-plop-templates 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +1,17 @@
1
1
  import { Options } from '@bmstravel/nvp-decorator';
2
2
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
3
  import { ServiceActionsSchema } from "moleculer";
4
- import { DbServiceSettings } from 'moleculer-db';
5
4
  import {
6
5
  IBaseService,
7
6
  IBaseServiceActions,
8
7
  IBaseServiceMethods,
9
8
  } from "./db.service-interface";
10
9
 
11
- export interface {{pascalCase serviceName}}ServiceSettingsOptions extends Omit<DbServiceSettings, "fields"> {
10
+ export interface {{pascalCase serviceName}}ServiceSettingsOptions {
12
11
  /**
13
12
  * if implements will replace /v1/{{camelCase serviceName}}/* to /{{camelCase serviceName}}/*
14
13
  */
15
14
  rest?: "/{{camelCase serviceName}}";
16
- fields?: (keyof Required<any>)[];
17
- populates?: any;
18
15
  [x: string]: any;
19
16
  }
20
17
 
@@ -0,0 +1,52 @@
1
+ import { Options } from '@bmstravel/nvp-decorator';
2
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
+ import { ServiceActionsSchema } from "moleculer";
4
+ import { DbServiceSettings } from 'moleculer-db';
5
+ import {
6
+ IBaseService,
7
+ IBaseServiceActions,
8
+ IBaseServiceMethods,
9
+ } from "./db.service-interface";
10
+
11
+ export interface {{pascalCase serviceName}}ServiceSettingsOptions extends Omit<DbServiceSettings, "fields"> {
12
+ /**
13
+ * if implements will replace /v1/{{camelCase serviceName}}/* to /{{camelCase serviceName}}/*
14
+ */
15
+ rest?: "/{{camelCase serviceName}}";
16
+ fields?: (keyof Required<any>)[];
17
+ populates?: any;
18
+ [x: string]: any;
19
+ }
20
+
21
+ export interface {{pascalCase serviceName}}ServiceOptions extends Options {
22
+ name: '{{camelCase serviceName}}';
23
+ settings: {{pascalCase serviceName}}ServiceSettingsOptions;
24
+ }
25
+
26
+ export enum {{pascalCase serviceName}}Action {
27
+ // DELETED = 'user.deleted'
28
+ }
29
+
30
+ export enum {{pascalCase serviceName}}Event {
31
+ // DELETED = 'user.deleted'
32
+ }
33
+
34
+ export enum {{pascalCase serviceName}}RouterAlias {
35
+ // {{constantCase serviceName}} = "v1.{{pascalCase serviceName}}",
36
+ }
37
+
38
+ export interface I{{pascalCase serviceName}}Actions extends IBaseServiceActions {
39
+ /* MOL_ACTION */
40
+ {{#if hasHelloAction}}
41
+ hello: ServiceActionsSchema;
42
+ {{/if}}
43
+ }
44
+
45
+ export interface I{{pascalCase serviceName}}Methods extends IBaseServiceMethods {
46
+ /* MOL_METHOD */
47
+ }
48
+
49
+ export interface I{{pascalCase serviceName}}Service extends IBaseService<I{{pascalCase serviceName}}Actions, I{{pascalCase serviceName}}Methods>, I{{pascalCase serviceName}}Methods {
50
+ actions: I{{pascalCase serviceName}}Actions;
51
+ methods: I{{pascalCase serviceName}}Methods;
52
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bmstravel/nvp-plop-templates",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "🏆 Using for plop templates",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -15,5 +15,5 @@
15
15
  "phongnv86 <phongnguyenvan86@gmail.com>",
16
16
  "phongnv86 <phongnv@media-one.vn>"
17
17
  ],
18
- "gitHead": "4b89a461aa8662200dfab904b7735324b6e7912d"
18
+ "gitHead": "880febbd450ae91a020097f58140922fea1beb1e"
19
19
  }