@enfyra/create-app 0.1.32 → 0.1.34

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/README.md CHANGED
@@ -19,20 +19,17 @@ npx @enfyra/create-server my-backend
19
19
 
20
20
  ```bash
21
21
  # Using npx (recommended)
22
- npx @enfyra/create-app my-app
22
+ npx @enfyra/create-app
23
23
 
24
24
  # Using yarn
25
- yarn create @enfyra/app my-app
25
+ yarn create @enfyra/app
26
26
 
27
27
  # Using pnpm
28
- pnpm create @enfyra/app my-app
29
-
30
- # Using bun
31
- bun create @enfyra/app my-app
28
+ pnpm create @enfyra/app
32
29
 
33
30
  # Or install globally
34
31
  npm install -g @enfyra/create-app
35
- create-app my-app
32
+ create-app
36
33
  ```
37
34
 
38
35
  ## Demo
@@ -58,7 +55,9 @@ create-app my-app
58
55
 
59
56
  ### Create a new project
60
57
  ```bash
61
- npx @enfyra/create-app my-project
58
+ npx @enfyra/create-app
59
+ # Optional: specify a name
60
+ npx @enfyra/create-app my-enfyra-app
62
61
  ```
63
62
 
64
63
  ### Interactive setup
@@ -73,10 +73,7 @@ async function setupProject(config, projectPath) {
73
73
  spinner.succeed(chalk.green('Package.json updated'));
74
74
 
75
75
 
76
- // Update Nuxt config with API URL
77
- spinner.start(chalk.blue('Configuring Nuxt with API URL...'));
78
- await updateNuxtConfig(projectPath, config);
79
- spinner.succeed(chalk.green('Nuxt configuration updated'));
76
+ // Skip modifying Nuxt config; API URL is managed via .env only
80
77
 
81
78
  // Generate environment file
82
79
  spinner.start(chalk.blue('Generating environment file...'));
@@ -171,30 +168,7 @@ async function cleanPackageManagerRestrictions(projectPath) {
171
168
  }
172
169
 
173
170
 
174
- async function updateNuxtConfig(projectPath, config) {
175
- const nuxtConfigPath = path.join(projectPath, 'nuxt.config.ts');
176
-
177
- if (fs.existsSync(nuxtConfigPath)) {
178
- let nuxtConfig = await fs.readFile(nuxtConfigPath, 'utf8');
179
-
180
- // Update enfyraSDK apiUrl
181
- if (nuxtConfig.includes('enfyraSDK:')) {
182
- nuxtConfig = nuxtConfig.replace(
183
- /enfyraSDK:\s*\{[^}]*\}/,
184
- `enfyraSDK: {\n apiUrl: "${config.apiUrl}"\n }`
185
- );
186
- } else {
187
- // Add enfyraSDK config
188
- nuxtConfig = nuxtConfig.replace(
189
- /}\);?\s*$/,
190
- ` enfyraSDK: {\n apiUrl: "${config.apiUrl}"\n },\n});\n`
191
- );
192
- }
193
-
194
-
195
- await fs.writeFile(nuxtConfigPath, nuxtConfig);
196
- }
197
- }
171
+ // No-op: Nuxt configuration is not altered by the scaffolder anymore
198
172
 
199
173
  async function installDependencies(projectPath, config) {
200
174
  const commands = {
package/index.js CHANGED
@@ -43,7 +43,7 @@ async function main() {
43
43
  });
44
44
  console.log('');
45
45
 
46
- // Get project name from command line or prompt
46
+ // Get project name from command line or prompt with default
47
47
  let projectName = program.args[0];
48
48
 
49
49
  if (!projectName) {
@@ -52,6 +52,7 @@ async function main() {
52
52
  type: 'input',
53
53
  name: 'name',
54
54
  message: 'Project name:',
55
+ default: 'my-enfyra-app',
55
56
  validate: (input) => {
56
57
  if (!input || input.trim().length === 0) {
57
58
  return 'Project name is required';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enfyra/create-app",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Create Enfyra frontend applications with ease",
5
5
  "main": "index.js",
6
6
  "bin": {