@azure-net/cli 1.3.7 → 1.3.8
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/package.json
CHANGED
|
@@ -45,7 +45,6 @@ export default async function generateCrud() {
|
|
|
45
45
|
|
|
46
46
|
const rawName = answers.className.trim();
|
|
47
47
|
const capital = rawName[0].toUpperCase() + rawName.slice(1);
|
|
48
|
-
const lower = rawName[0].toLowerCase() + rawName.slice(1);
|
|
49
48
|
const endpoint = answers.endpoint.trim();
|
|
50
49
|
const datasource = answers.datasource.trim();
|
|
51
50
|
const selectedModule = answers.module;
|
|
@@ -53,7 +52,7 @@ export default async function generateCrud() {
|
|
|
53
52
|
const baseArch = path.join(process.cwd(), 'src/app/contexts');
|
|
54
53
|
const basePath = selectedModule ? path.join(baseArch, selectedModule) : path.join(baseArch, 'app-context');
|
|
55
54
|
|
|
56
|
-
const domainPath = path.join(basePath, 'Domain',
|
|
55
|
+
const domainPath = path.join(basePath, 'Domain', capital);
|
|
57
56
|
const serviceDir = path.join(basePath, 'Application', 'Services');
|
|
58
57
|
const repoPath = path.join(basePath, 'Infra', 'Repo');
|
|
59
58
|
|
|
@@ -66,7 +65,7 @@ export default async function generateCrud() {
|
|
|
66
65
|
|
|
67
66
|
const templateData = {
|
|
68
67
|
className: capital,
|
|
69
|
-
domainName:
|
|
68
|
+
domainName: capital,
|
|
70
69
|
endpoint,
|
|
71
70
|
datasource,
|
|
72
71
|
aliasDomain: `${aliasCurrent}/Domain`,
|
|
@@ -105,7 +104,6 @@ export default async function generateCrud() {
|
|
|
105
104
|
path.join(domainPath, 'index.ts'),
|
|
106
105
|
[`export * from './Abstracts';`, `export * from './Request';`].join('\n') + '\n'
|
|
107
106
|
);
|
|
108
|
-
await updateIndexTs(domainPath);
|
|
109
107
|
|
|
110
108
|
// === 5) Repo
|
|
111
109
|
const repoTpl = await fs.readFile(path.join(__dirname, '../templates/data/repo/ClassRepo.ejs'), 'utf-8');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseRequest } from '@azure-net/kit';
|
|
2
|
-
import type { I<%= className %>CreateRequest } from '../
|
|
2
|
+
import type { I<%= className %>CreateRequest } from '../Abstracts';
|
|
3
3
|
|
|
4
4
|
export class <%= className %>CreateRequest extends BaseRequest<I<%= className %>CreateRequest> {
|
|
5
5
|
override rules() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseRequest } from '@azure-net/kit';
|
|
2
|
-
import type { I<%= className %>UpdateRequest } from '../
|
|
2
|
+
import type { I<%= className %>UpdateRequest } from '../Abstracts';
|
|
3
3
|
|
|
4
4
|
export class <%= className %>UpdateRequest extends BaseRequest<I<%= className %>UpdateRequest> {
|
|
5
5
|
override rules() {
|