@avleon/cli 0.0.29 → 0.0.31

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.
Files changed (2) hide show
  1. package/dist/create.js +16 -5
  2. package/package.json +2 -2
package/dist/create.js CHANGED
@@ -42,6 +42,9 @@ const paths_1 = require("./paths");
42
42
  const prettier = __importStar(require("prettier"));
43
43
  const win32_1 = __importDefault(require("path/win32"));
44
44
  const inquirer_1 = __importDefault(require("inquirer"));
45
+ const child_process_1 = require("child_process");
46
+ const util_1 = __importDefault(require("util"));
47
+ const execAsync = util_1.default.promisify(child_process_1.exec);
45
48
  async function askForPackageManager() {
46
49
  const { packageManager } = await inquirer_1.default.prompt([
47
50
  {
@@ -128,8 +131,8 @@ serve();
128
131
  "keywords": ["avleon","nodejs","typescript"],
129
132
  "license": "ISC",
130
133
  "dependencies": {
131
- "@avleon/core": "^0.0.25",
132
- "@avleon/cli": "^0.0.25",
134
+ "@avleon/core": "^0.0.27",
135
+ "@avleon/cli": "^0.0.28",
133
136
  "class-transformer": "^0.5.1",
134
137
  "class-validator": "^0.14.1",
135
138
  "reflect-metadata": "^0.2.2"
@@ -195,8 +198,16 @@ serve();
195
198
  // create basic service
196
199
  // create basic controller
197
200
  console.info("App created successfully. Run the following command to get start.");
198
- console.log(`cd ${fname} && ${pm} install`);
199
- console.log(pm == 'npm' ? `npm run start:dev` : `${pm} start:dev`);
200
- //execSync(`cd ${fname} && pnpm install && pnpm add @avleon/core`, { stdio: 'inherit' })
201
+ // console.log(`cd ${fname} && ${pm} install`);
202
+ // console.log(pm == 'npm' ? `npm run start:dev` : `${pm} start:dev`);
203
+ try {
204
+ console.log(`Running ${pm} install...`);
205
+ await execAsync(`cd ${fname}`);
206
+ await execAsync(`${pm} install`);
207
+ console.log('✅ Dependencies installed successfully.');
208
+ }
209
+ catch (error) {
210
+ console.error('❌ Installation failed:', error);
211
+ }
201
212
  console.info("Enjoy :D");
202
213
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@avleon/cli",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "bin": {
5
- "av": "./dist/cli.js"
5
+ "avleon": "./dist/cli.js"
6
6
  },
7
7
  "description": "",
8
8
  "main": "dist/index.js",