generator-codedesignplus 0.2.0-alpha.2 → 0.2.0-alpha.4

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.
@@ -36,8 +36,8 @@ export default class Utils {
36
36
 
37
37
  async getOptions(answers) {
38
38
  const pathJson = path.join(this._generator.destinationRoot(), 'archetype.json');
39
-
40
- if (!fsSync.existsSync(pathJson))
39
+
40
+ if (this._generator.options.template != 'microservice' && !fsSync.existsSync(pathJson))
41
41
  throw new Error('⚠️ File archetype.json not found, using the answers provided.');
42
42
 
43
43
  const archetypeValues = this._generator.fs.readJSON(pathJson);
@@ -1,6 +1,6 @@
1
1
  namespace <%= ns %>;
2
2
 
3
- public class <%= handler %>(<%= repository %> repository, IUserContext user, IMessage message) : IRequestHandler<<%= name %>>
3
+ public class <%= handler %>(<%= repository %> repository, IUserContext user, IPubSub pubsub) : IRequestHandler<<%= name %>>
4
4
  {
5
5
  public Task Handle(<%= name %> request, CancellationToken cancellationToken)
6
6
  {
@@ -1,6 +1,6 @@
1
1
  namespace <%= ns %>;
2
2
 
3
- public class <%= handler %>(<%= repository %> repository, IMapper mapper) : IRequestHandler<<%= name %>, <%= dto %>>
3
+ public class <%= handler %>(<%= repository %> repository, IMapper mapper, IUserContext user) : IRequestHandler<<%= name %>, <%= dto %>>
4
4
  {
5
5
  public Task<<%= dto %>> Handle(<%= name %> request, CancellationToken cancellationToken)
6
6
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-codedesignplus",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.4",
4
4
  "description": "Yeoman generator for creating microservices based on the CodeDesignPlus.Net.Microservice archetype.",
5
5
  "private": false,
6
6
  "main": "generators/index.mjs",