create-sonicjs 2.0.7 → 2.0.9
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 +1 -1
- package/src/cli.js +7 -17
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -11,8 +11,10 @@ import validatePackageName from 'validate-npm-package-name'
|
|
|
11
11
|
|
|
12
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
const
|
|
14
|
+
// Read version from package.json
|
|
15
|
+
const packageJsonPath = path.join(__dirname, '../package.json')
|
|
16
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
17
|
+
const VERSION = packageJson.version
|
|
16
18
|
|
|
17
19
|
// Templates available
|
|
18
20
|
const TEMPLATES = {
|
|
@@ -98,20 +100,8 @@ async function getProjectDetails(initialName) {
|
|
|
98
100
|
})
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
// Template selection
|
|
102
|
-
|
|
103
|
-
questions.push({
|
|
104
|
-
type: 'select',
|
|
105
|
-
name: 'template',
|
|
106
|
-
message: 'Choose a template:',
|
|
107
|
-
choices: Object.entries(TEMPLATES).map(([key, { name, description }]) => ({
|
|
108
|
-
title: name,
|
|
109
|
-
description: description,
|
|
110
|
-
value: key
|
|
111
|
-
})),
|
|
112
|
-
initial: 0
|
|
113
|
-
})
|
|
114
|
-
}
|
|
103
|
+
// Template selection - always use 'starter' since it's the only template
|
|
104
|
+
// No need to ask user, just default to starter
|
|
115
105
|
|
|
116
106
|
// Database name
|
|
117
107
|
if (!flags.databaseName) {
|
|
@@ -207,7 +197,7 @@ async function getProjectDetails(initialName) {
|
|
|
207
197
|
|
|
208
198
|
return {
|
|
209
199
|
projectName: initialName || answers.projectName,
|
|
210
|
-
template: flags.template ||
|
|
200
|
+
template: flags.template || 'starter', // Always default to starter template
|
|
211
201
|
databaseName: flags.databaseName || answers.databaseName || `${initialName || answers.projectName}-db`,
|
|
212
202
|
bucketName: flags.bucketName || answers.bucketName || `${initialName || answers.projectName}-media`,
|
|
213
203
|
seedAdmin: answers.seedAdmin !== undefined ? answers.seedAdmin : true,
|