@azure-net/cli 1.3.4 → 1.3.5
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
CHANGED
|
@@ -42,9 +42,9 @@ program
|
|
|
42
42
|
.command('init')
|
|
43
43
|
.description('Run all initialization steps: structure, aliases, lint')
|
|
44
44
|
.action(async () => {
|
|
45
|
-
|
|
46
|
-
initStructure();
|
|
45
|
+
await initStructure();
|
|
47
46
|
await initAliases();
|
|
47
|
+
await initLint();
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
program.parse();
|
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ export default async function generateCrud() {
|
|
|
47
47
|
const datasource = answers.datasource.trim();
|
|
48
48
|
const selectedModule = answers.module;
|
|
49
49
|
|
|
50
|
-
const baseArch = path.join(process.cwd(), 'src/app/
|
|
50
|
+
const baseArch = path.join(process.cwd(), 'src/app/contexts');
|
|
51
51
|
const basePath = selectedModule ? path.join(baseArch, selectedModule) : baseArch;
|
|
52
52
|
|
|
53
53
|
const domainPath = path.join(basePath, 'domain', lower);
|
|
@@ -4,7 +4,7 @@ import { loadUserConfig } from '../utils/loadConfig.js';
|
|
|
4
4
|
|
|
5
5
|
const BASE_STRUCTURE = ['domain', 'infra', 'application', 'presentation'];
|
|
6
6
|
const APP_ROOT = path.join(process.cwd(), 'src', 'app');
|
|
7
|
-
const ARCHITECTURE_PATH = path.join(APP_ROOT, '
|
|
7
|
+
const ARCHITECTURE_PATH = path.join(APP_ROOT, 'contexts');
|
|
8
8
|
|
|
9
9
|
async function createDirIfNotExists(dirPath) {
|
|
10
10
|
try {
|
|
@@ -11,16 +11,16 @@ function generateAliases(config) {
|
|
|
11
11
|
|
|
12
12
|
if (hasModules) {
|
|
13
13
|
return Object.fromEntries(
|
|
14
|
-
config.modules.map(m => [`$${m}`, `./src/app/
|
|
14
|
+
config.modules.map(m => [`$${m}`, `./src/app/contexts/${m}`])
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return {
|
|
19
|
-
'$domain': './src/app/
|
|
20
|
-
'$infra': './src/app/
|
|
21
|
-
'$application': './src/app/
|
|
22
|
-
'$presentation': './src/app/
|
|
23
|
-
'$services': './src/app/
|
|
19
|
+
'$domain': './src/app/contexts/domain',
|
|
20
|
+
'$infra': './src/app/contexts/infra',
|
|
21
|
+
'$application': './src/app/contexts/application',
|
|
22
|
+
'$presentation': './src/app/contexts/presentation',
|
|
23
|
+
'$services': './src/app/contexts/application/services'
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -89,7 +89,6 @@ async function updateAliases() {
|
|
|
89
89
|
// Run formatter
|
|
90
90
|
try {
|
|
91
91
|
execSync('npm run format', { stdio: 'inherit' });
|
|
92
|
-
console.log('✅ Ran npm run format');
|
|
93
92
|
} catch {
|
|
94
93
|
console.warn('⚠️ Failed to run format. Make sure you have a format script in package.json');
|
|
95
94
|
}
|
package/src/commands/initLint.js
CHANGED
|
@@ -133,6 +133,6 @@ export default async function initLint() {
|
|
|
133
133
|
|
|
134
134
|
console.log('🔧 Initializing Husky...');
|
|
135
135
|
execSync(`${manager === 'npm' ? 'npx' : manager} husky`, { stdio: 'inherit' });
|
|
136
|
-
|
|
136
|
+
execSync('npm run format', { stdio: 'inherit' });
|
|
137
137
|
console.log('✅ Linting and release setup completed! Change your prepare script in package.json: node -e \"if (process.env.NODE_ENV !== \'production\'){process.exit(1)} \" || (husky && svelte-kit sync)');
|
|
138
138
|
}
|