@alevnyacow/nzmt 0.0.23 → 0.0.25
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 +7 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -101,7 +101,7 @@ function generateStores(lowerCase, upperCase) {
|
|
|
101
101
|
fs.writeFileSync(path.resolve(folder, `${entityName}.store.ts`), [
|
|
102
102
|
"import z from 'zod'",
|
|
103
103
|
"import { Store } from '@alevnyacow/nzmt'",
|
|
104
|
-
config?.paths?.entities ? `import ${upperCase} from ${config?.paths?.entities.replace('./src', '@')}/${entityName}` : undefined,
|
|
104
|
+
config?.paths?.entities ? `import { ${upperCase} } from '${config?.paths?.entities.replace('./src', '@')}/${entityName}'` : undefined,
|
|
105
105
|
"",
|
|
106
106
|
`export const ${lowerCase}StoreMetadata = {`,
|
|
107
107
|
"\tmodels: {",
|
|
@@ -301,4 +301,10 @@ if (command === 'entity') {
|
|
|
301
301
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
302
302
|
generateEntity(upperCase)
|
|
303
303
|
process.exit(0)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (command === 'crud') {
|
|
307
|
+
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
308
|
+
generateEntity(upperCase)
|
|
309
|
+
generateStores(lowerCase, upperCase)
|
|
304
310
|
}
|