@alevnyacow/nzmt 0.3.1 → 0.3.2
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/cli.js +6 -6
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -241,7 +241,7 @@ function initDI() {
|
|
|
241
241
|
].join('\n'))
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
-
if (command === 'init') {
|
|
244
|
+
if (command.toLowerCase() === 'init' || command === 'i') {
|
|
245
245
|
createDefaultConfig()
|
|
246
246
|
initDI()
|
|
247
247
|
process.exit(0)
|
|
@@ -431,7 +431,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
|
|
|
431
431
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
if (command === 'store') {
|
|
434
|
+
if (command.toLowerCase() === 'store' || command === 's') {
|
|
435
435
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
436
436
|
generateStores(lowerCase, upperCase)
|
|
437
437
|
process.exit(0);
|
|
@@ -476,7 +476,7 @@ function generateEntity(upperCase) {
|
|
|
476
476
|
fs.writeFileSync(path.resolve(folder, 'index.ts'), `export * from './${entityName}.entity'`)
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
if (command === 'entity') {
|
|
479
|
+
if (command.toLowerCase() === 'entity' || command === 'e') {
|
|
480
480
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
481
481
|
generateEntity(upperCase)
|
|
482
482
|
process.exit(0)
|
|
@@ -519,7 +519,7 @@ function generateValueObject(upperCase) {
|
|
|
519
519
|
fs.writeFileSync(path.resolve(folder, 'index.ts'), `export * from './${entityName}.value-object'`)
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
if (command === 'value-object') {
|
|
522
|
+
if (command.toLowerCase() === 'value-object' || command === 'vo') {
|
|
523
523
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
524
524
|
generateValueObject(upperCase)
|
|
525
525
|
process.exit(0)
|
|
@@ -675,13 +675,13 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
675
675
|
)
|
|
676
676
|
}
|
|
677
677
|
|
|
678
|
-
if (command === 'service') {
|
|
678
|
+
if (command.toLowerCase() === 'service' || command === 'S') {
|
|
679
679
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
680
680
|
generateService(lowerCase, upperCase, false)
|
|
681
681
|
process.exit(0)
|
|
682
682
|
}
|
|
683
683
|
|
|
684
|
-
if (command === 'crud') {
|
|
684
|
+
if (command.toLowerCase() === 'crud') {
|
|
685
685
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
686
686
|
generateEntity(upperCase)
|
|
687
687
|
generateStores(lowerCase, upperCase, true)
|