@azure-net/cli 1.0.0 → 1.0.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "azure-net": "bin/azure-net.js"
@@ -8,7 +8,7 @@ import { loadUserConfig } from "../utils/loadConfig.js";
8
8
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
9
 
10
10
  export default async function generateCrudRepository() {
11
- const config = loadUserConfig();
11
+ const config = await loadUserConfig();
12
12
  const answers = await prompts([
13
13
  { type: 'text', name: 'className', message: 'Class name:' },
14
14
  { type: 'text', name: 'endpoint', message: 'API endpoint:' },
@@ -19,7 +19,7 @@ export default async function generateCrudRepository() {
19
19
  const result = ejs.render(template, answers);
20
20
 
21
21
  const outputDir = config.output.repository;
22
- const outFile = path.join(process.cwd(), outputDir, `${answers.className}.ts`);
22
+ const outFile = path.join(process.cwd(), outputDir, `${answers.className}Repo.ts`);
23
23
  await fs.mkdir(path.dirname(outFile), { recursive: true });
24
24
  await fs.writeFile(outFile, result, 'utf-8');
25
25