spine-framework 0.3.82 → 0.3.83
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.
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Command } from 'commander'
|
|
19
|
-
import { existsSync, mkdirSync, writeFileSync, copyFileSync, readdirSync, statSync, cpSync } from 'fs'
|
|
19
|
+
import { existsSync, mkdirSync, writeFileSync, copyFileSync, readdirSync, statSync, cpSync, readFileSync } from 'fs'
|
|
20
20
|
import { resolve, dirname, join } from 'path'
|
|
21
21
|
import { fileURLToPath } from 'url'
|
|
22
22
|
import { execSync } from 'child_process'
|
|
@@ -212,7 +212,14 @@ export function registerInitCommands(program: Command) {
|
|
|
212
212
|
console.log(' ✓ .gitignore written')
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
// Read installed package version from the package's own package.json
|
|
216
|
+
let pkgVersion = 'unknown'
|
|
217
|
+
try {
|
|
218
|
+
const pkgJson = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8'))
|
|
219
|
+
pkgVersion = pkgJson.version ?? 'unknown'
|
|
220
|
+
} catch { /* non-fatal */ }
|
|
221
|
+
|
|
222
|
+
console.log(`\n✅ Project initialized! (spine-framework@${pkgVersion})\n`)
|
|
216
223
|
console.log('Next steps:')
|
|
217
224
|
console.log(' 1. Edit .env with your Supabase credentials')
|
|
218
225
|
console.log(' 2. Run: npx spine-framework migrate')
|