spine-framework 0.1.27 ā 0.1.29
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.
|
@@ -21,6 +21,7 @@ import type { Command } from 'commander'
|
|
|
21
21
|
import { existsSync, mkdirSync, writeFileSync, cpSync } from 'fs'
|
|
22
22
|
import { resolve, dirname } from 'path'
|
|
23
23
|
import { fileURLToPath } from 'url'
|
|
24
|
+
import { execSync } from 'child_process'
|
|
24
25
|
|
|
25
26
|
const __filename = fileURLToPath(import.meta.url)
|
|
26
27
|
const __dirname = dirname(__filename)
|
|
@@ -141,20 +142,31 @@ async function initCommand(options: InitOptions): Promise<void> {
|
|
|
141
142
|
console.log('š¦ Step 1: Installing framework files...')
|
|
142
143
|
copyFrameworkFiles(options.dryRun)
|
|
143
144
|
|
|
144
|
-
// Step 2:
|
|
145
|
-
|
|
145
|
+
// Step 2: Install dev dependencies (vite, netlify-cli)
|
|
146
|
+
if (!options.dryRun) {
|
|
147
|
+
console.log('\nš¦ Step 2: Installing dev dependencies...')
|
|
148
|
+
try {
|
|
149
|
+
execSync('npm install', { stdio: 'inherit', cwd: PROJECT_ROOT })
|
|
150
|
+
console.log(' ā Dev dependencies installed')
|
|
151
|
+
} catch (err) {
|
|
152
|
+
console.log(' ā ļø npm install failed ā run manually: npm install')
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Step 3: Scaffold custom workspace
|
|
157
|
+
console.log('\nš Step 3: Scaffolding custom workspace...')
|
|
146
158
|
scaffoldCustomWorkspace(options.dryRun)
|
|
147
159
|
|
|
148
|
-
// Step
|
|
149
|
-
console.log('\nš Step
|
|
160
|
+
// Step 4: Write .env with placeholders
|
|
161
|
+
console.log('\nš Step 4: Writing environment configuration...')
|
|
150
162
|
writeEnvFile(options.dryRun)
|
|
151
163
|
|
|
152
164
|
console.log('\nā
Project initialized!')
|
|
153
165
|
console.log('\n Next steps:')
|
|
154
166
|
console.log(' 1. Fill in your Supabase credentials in .env')
|
|
155
167
|
console.log(' (get them from https://supabase.com/dashboard/project/_/settings/api)')
|
|
156
|
-
console.log(' 2. Run: npx spine-framework migrate
|
|
157
|
-
console.log(' (
|
|
168
|
+
console.log(' 2. Run: npx spine-framework migrate')
|
|
169
|
+
console.log(' (ensure SUPABASE_DB_PASSWORD is set in .env)')
|
|
158
170
|
}
|
|
159
171
|
|
|
160
172
|
export function registerInitCommands(program: Command) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/init.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../.framework/cli/commands/init.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwJxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
|
package/package-project.json
CHANGED