Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
bug fix - meta templates
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-sabo committed Dec 20, 2019
1 parent e451dc8 commit 24849c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/templates/meta/names.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import * as MoleculerTs from 'moleculer-ts';
const meta: any = {
{{#names}}
{{#actions}}
'Services{{name}}ActionsName{{.}}': Object.keys(enumerate<Services.{{name}}.Actions[{{.}}]['name']>())[0],
'Services{{name}}ActionsName{{.}}': Object.keys(enumerate<Services.{{name}}.DerivedActions[{{.}}]['name']>())[0],
{{/actions}}
{{#events}}
'Services{{name}}EventsName{{.}}': Object.keys(enumerate<Services.{{name}}.Events[{{.}}]['name']>())[0],
'Services{{name}}EventsName{{.}}': Object.keys(enumerate<Services.{{name}}.DerivedEvents[{{.}}]['name']>())[0],
{{/events}}
{{/names}}
};
Expand Down
6 changes: 3 additions & 3 deletions src/templates/meta/raw.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import * as MoleculerTs from 'moleculer-ts';
const meta: any = {
{{#serviceNames}}
'{{.}}': {
actionsLength: Object.keys(enumerate<MoleculerTs.GetAllNameKeysAndLength<Services.{{.}}.Actions>>()).length -1,
eventsLength: Object.keys(enumerate<MoleculerTs.GetAllNameKeysAndLength<Services.{{.}}.Events>>()).length -1,
actionsEnum: enumerate<MoleculerTs.GetNames<Services.{{.}}.Actions>>()
actionsLength: Object.keys(enumerate<MoleculerTs.GetAllNameKeysAndLength<Services.{{.}}.DerivedActions>>()).length -1,
eventsLength: Object.keys(enumerate<MoleculerTs.GetAllNameKeysAndLength<Services.{{.}}.DerivedEvents>>()).length -1,
actionsEnum: enumerate<MoleculerTs.GetNames<Services.{{.}}.DerivedActions>>()
},
{{/serviceNames}}
};
Expand Down

0 comments on commit 24849c3

Please sign in to comment.