@azure-net/cli 1.3.3 → 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
@@ -38,4 +38,13 @@ program
38
38
  .description('Generate alias mappings for modules or default architecture')
39
39
  .action(initAliases);
40
40
 
41
+ program
42
+ .command('init')
43
+ .description('Run all initialization steps: structure, aliases, lint')
44
+ .action(async () => {
45
+ await initStructure();
46
+ await initAliases();
47
+ await initLint();
48
+ });
49
+
41
50
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "azure-net": "bin/azure-net.js"
@@ -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/context');
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, 'context');
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/context/${m}`])
14
+ config.modules.map(m => [`$${m}`, `./src/app/contexts/${m}`])
15
15
  );
16
16
  }
17
17
 
18
18
  return {
19
- '$domain': './src/app/context/domain',
20
- '$infra': './src/app/context/infra',
21
- '$application': './src/app/context/application',
22
- '$presentation': './src/app/context/presentation',
23
- '$services': './src/app/context/application/services'
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
  }
@@ -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
  }