@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 +1 -1
- package/package.json +1 -1
- package/src/commands/generateCrud.js +11 -3
package/bin/azure-net.js
CHANGED
package/package.json
CHANGED
|
@@ -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 => ({
|
|
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
|
|
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
|