spine-framework 0.3.2 → 0.3.4
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.
|
@@ -127,8 +127,23 @@ function copyFrameworkFiles(dryRun: boolean): void {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
if (existsSync(dest)) {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
// For package.json: only skip if it already has scripts (i.e. it's a real project package.json)
|
|
131
|
+
// A bare stub created by `npm install` has no scripts and should be overwritten
|
|
132
|
+
if (item.template) {
|
|
133
|
+
try {
|
|
134
|
+
const existing = JSON.parse(readFileSync(dest, 'utf8'))
|
|
135
|
+
if (existing.scripts && Object.keys(existing.scripts).length > 0) {
|
|
136
|
+
console.log(` ⏭️ ${item.dest} already exists, skipping`)
|
|
137
|
+
continue
|
|
138
|
+
}
|
|
139
|
+
// Fall through — bare stub, overwrite it
|
|
140
|
+
} catch {
|
|
141
|
+
// Unparseable — overwrite it
|
|
142
|
+
}
|
|
143
|
+
} else {
|
|
144
|
+
console.log(` ⏭️ ${item.dest} already exists, skipping`)
|
|
145
|
+
continue
|
|
146
|
+
}
|
|
132
147
|
}
|
|
133
148
|
|
|
134
149
|
if (dryRun) {
|
package/bin/welcome.cjs
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
// Tells the agent (or developer) exactly what to do next.
|
|
4
4
|
// Uses only Node built-ins — no dependencies.
|
|
5
5
|
|
|
6
|
+
const path = require('path')
|
|
7
|
+
const fs = require('fs')
|
|
8
|
+
|
|
9
|
+
let version = '0.x'
|
|
10
|
+
try {
|
|
11
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'))
|
|
12
|
+
version = pkg.version || version
|
|
13
|
+
} catch { /* ignore */ }
|
|
14
|
+
|
|
15
|
+
const versionLabel = ('Framework v' + version).padEnd(14)
|
|
16
|
+
|
|
6
17
|
const lines = [
|
|
7
18
|
'',
|
|
8
19
|
'╭──────────────────────────────────────────────────────────────╮',
|
|
@@ -12,31 +23,33 @@ const lines = [
|
|
|
12
23
|
'│ ███████╗██████╔╝██║██╔██╗ ██║█████╗ │',
|
|
13
24
|
'│ ╚════██║██╔═══╝ ██║██║╚██╗██║██╔══╝ │',
|
|
14
25
|
'│ ███████║██║ ██║██║ ╚████║███████╗ │',
|
|
15
|
-
|
|
26
|
+
`│ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ${versionLabel}│`,
|
|
16
27
|
'│ │',
|
|
17
28
|
'╰──────────────────────────────────────────────────────────────╯',
|
|
18
29
|
'',
|
|
19
30
|
' Spine Framework installed successfully!',
|
|
20
31
|
'',
|
|
21
|
-
'
|
|
32
|
+
' Next steps:',
|
|
22
33
|
' ─────────────────────────────────────────────',
|
|
23
|
-
'
|
|
34
|
+
' 1. Run init to scaffold the project:',
|
|
24
35
|
'',
|
|
25
|
-
'
|
|
26
|
-
' --url https://<project>.supabase.co \\',
|
|
27
|
-
' --anon-key <anon-key> \\',
|
|
28
|
-
' --service-role-key <service-role-key>',
|
|
36
|
+
' npx spine-framework init',
|
|
29
37
|
'',
|
|
30
|
-
'
|
|
31
|
-
'
|
|
38
|
+
' 2. Fill in your Supabase credentials in .env',
|
|
39
|
+
' (get them from Supabase Dashboard → Project → Settings → API)',
|
|
32
40
|
'',
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
41
|
+
' 3. Apply database migrations:',
|
|
42
|
+
'',
|
|
43
|
+
' npx spine-framework migrate',
|
|
44
|
+
'',
|
|
45
|
+
' 4. Install apps (optional):',
|
|
46
|
+
'',
|
|
47
|
+
' npx spine-framework install-app spine-framework-cortex@latest',
|
|
48
|
+
' npx spine-framework install-app spine-framework-portal@latest',
|
|
49
|
+
'',
|
|
50
|
+
' 5. Start the dev server:',
|
|
36
51
|
'',
|
|
37
|
-
'
|
|
38
|
-
' spine-framework install-app <app-slug> # optional apps',
|
|
39
|
-
' npm run assemble && netlify dev # start dev server',
|
|
52
|
+
' npm run assemble && netlify dev',
|
|
40
53
|
'',
|
|
41
54
|
' Docs: https://github.com/spine-framework/spine-framework',
|
|
42
55
|
'',
|
|
@@ -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;AAsLxC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAcpD"}
|