@azure-net/cli 1.3.6 → 1.3.7

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.
package/bin/azure-net.js CHANGED
@@ -19,7 +19,7 @@ program.command('generate:crud-repo')
19
19
  .action(generateRepository);
20
20
 
21
21
  program
22
- .command('generate:crud')
22
+ .command('make:crud')
23
23
  .description('Generate CRUD Domain/Repo/Service')
24
24
  .action(generateCrud);
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/cli",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "azure-net": "bin/azure-net.js"
@@ -32,7 +32,10 @@ export default async function generateCrud() {
32
32
  type: 'select',
33
33
  name: 'module',
34
34
  message: 'Select target module:',
35
- choices: config.modules.map(m => ({ title: m, value: m }))
35
+ choices: [...config.modules, 'shared-context'].map(m => ({
36
+ title: m === 'shared-context' ? 'shared-context (shared)' : m,
37
+ value: m
38
+ }))
36
39
  }
37
40
  : null,
38
41
  { type: 'text', name: 'className', message: 'Class name (PascalCase):' },
@@ -54,7 +57,11 @@ export default async function generateCrud() {
54
57
  const serviceDir = path.join(basePath, 'Application', 'Services');
55
58
  const repoPath = path.join(basePath, 'Infra', 'Repo');
56
59
 
57
- const aliasCurrent = selectedModule ? `$${selectedModule}` : '$app-context';
60
+ const aliasCurrent = selectedModule === 'shared-context'
61
+ ? '$shared-context'
62
+ : selectedModule
63
+ ? `$${selectedModule}`
64
+ : '$app-context';
58
65
  const aliasShared = '$shared-context';
59
66
 
60
67
  const templateData = {
@@ -65,7 +72,8 @@ export default async function generateCrud() {
65
72
  aliasDomain: `${aliasCurrent}/Domain`,
66
73
  aliasShared: aliasShared,
67
74
  aliasApplication: `${aliasCurrent}/Application`,
68
- aliasInfra: `${aliasCurrent}/Infra`
75
+ aliasInfra: `${aliasCurrent}/Infra`,
76
+ aliasRepo: `${aliasCurrent}/Infra/Repo`,
69
77
  };
70
78
 
71
79
  // === 1) Abstracts