@alevnyacow/nzmt 0.0.24 → 0.0.26
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
|
@@ -100,7 +100,7 @@ function generateStores(lowerCase, upperCase) {
|
|
|
100
100
|
|
|
101
101
|
fs.writeFileSync(path.resolve(folder, `${entityName}.store.ts`), [
|
|
102
102
|
"import z from 'zod'",
|
|
103
|
-
"import { Store } from '@alevnyacow/nzmt'",
|
|
103
|
+
"import type { Store } from '@alevnyacow/nzmt'",
|
|
104
104
|
config?.paths?.entities ? `import { ${upperCase} } from '${config?.paths?.entities.replace('./src', '@')}/${entityName}'` : undefined,
|
|
105
105
|
"",
|
|
106
106
|
`export const ${lowerCase}StoreMetadata = {`,
|
|
@@ -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
|
}
|