spine-framework 0.1.2 → 0.1.5

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.
@@ -51,7 +51,7 @@ const __dirname = dirname(__filename)
51
51
  function printWelcome() {
52
52
  const require = createRequire(import.meta.url)
53
53
  try {
54
- require(resolve(__dirname, 'welcome.cjs'))
54
+ require(resolve(__dirname, '../../bin/welcome.cjs'))
55
55
  } catch {
56
56
  console.log('Spine Framework — run `spine-framework --help` for commands.')
57
57
  }
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ // Thin shebang wrapper — invokes the TypeScript CLI via tsx.
3
+ // This file is the npm bin entry point for spine-framework.
4
+ const { execFileSync, spawnSync } = require('child_process')
5
+ const { resolve } = require('path')
6
+
7
+ // __dirname = <project>/node_modules/spine-framework/bin
8
+ // tsx lives at <project>/node_modules/.bin/tsx
9
+ const pkgRoot = resolve(__dirname, '..')
10
+ const projectRoot = resolve(pkgRoot, '../..')
11
+ const entry = resolve(pkgRoot, '.framework/cli/index.ts')
12
+
13
+ // Find tsx: prefer consuming project's copy, fall back to our own
14
+ const tsxPaths = [
15
+ resolve(projectRoot, 'node_modules/.bin/tsx'),
16
+ resolve(pkgRoot, 'node_modules/.bin/tsx'),
17
+ ]
18
+
19
+ const tsx = tsxPaths.find(p => { try { require('fs').accessSync(p); return true } catch { return false } })
20
+
21
+ if (!tsx) {
22
+ console.error('spine-framework: tsx not found. Run: npm install tsx')
23
+ process.exit(1)
24
+ }
25
+
26
+ try {
27
+ execFileSync(tsx, [entry, ...process.argv.slice(2)], { stdio: 'inherit' })
28
+ } catch (e) {
29
+ process.exit(e.status ?? 1)
30
+ }
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ // Postinstall welcome message — runs automatically after npm install spine-framework.
3
+ // Tells the agent (or developer) exactly what to do next.
4
+ // Uses only Node built-ins — no dependencies.
5
+
6
+ const lines = [
7
+ '',
8
+ '╭──────────────────────────────────────────────────────────────╮',
9
+ '│ │',
10
+ '│ ███████╗██████╗ ██╗███╗ ██╗███████╗ │',
11
+ '│ ██╔════╝██╔══██╗██║████╗ ██║██╔════╝ │',
12
+ '│ ███████╗██████╔╝██║██╔██╗ ██║█████╗ │',
13
+ '│ ╚════██║██╔═══╝ ██║██║╚██╗██║██╔══╝ │',
14
+ '│ ███████║██║ ██║██║ ╚████║███████╗ │',
15
+ '│ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ Framework v0.1 │',
16
+ '│ │',
17
+ '╰──────────────────────────────────────────────────────────────╯',
18
+ '',
19
+ ' Spine Framework installed successfully!',
20
+ '',
21
+ ' To complete setup you need a Supabase project.',
22
+ ' ─────────────────────────────────────────────',
23
+ ' If you have one already, run:',
24
+ '',
25
+ ' spine-framework init \\',
26
+ ' --url https://<project>.supabase.co \\',
27
+ ' --anon-key <anon-key> \\',
28
+ ' --service-role-key <service-role-key>',
29
+ '',
30
+ ' Your credentials are at:',
31
+ ' Supabase Dashboard → Your Project → Settings → API',
32
+ '',
33
+ ' ─────────────────────────────────────────────',
34
+ ' If you need a Supabase project, create one at:',
35
+ ' https://supabase.com/dashboard → New project',
36
+ '',
37
+ ' After init:',
38
+ ' spine-framework install-app <app-slug> # optional apps',
39
+ ' npm run assemble && netlify dev # start dev server',
40
+ '',
41
+ ' Docs: https://github.com/art-mojo-admin/spine',
42
+ '',
43
+ ]
44
+
45
+ console.log(lines.join('\n'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "node": ">=18.0.0"
27
27
  },
28
28
  "bin": {
29
- "spine-framework": "./.framework/cli/bin.cjs"
29
+ "spine-framework": "./bin/spine-framework.cjs"
30
30
  },
31
31
  "exports": {
32
32
  ".": {
@@ -47,9 +47,8 @@
47
47
  }
48
48
  },
49
49
  "files": [
50
+ "bin/",
50
51
  "dist/",
51
- ".framework/cli/bin.cjs",
52
- ".framework/cli/welcome.cjs",
53
52
  ".framework/cli/",
54
53
  ".framework/functions/",
55
54
  ".framework/migrations/",
@@ -82,7 +81,7 @@
82
81
  "test:integration": "vitest run .framework/tests/integration",
83
82
  "test:boundary": "bash scripts/boundary-check.sh",
84
83
  "test:custom": "vitest run custom/tests",
85
- "postinstall": "node .framework/cli/welcome.cjs || true",
84
+ "postinstall": "node bin/welcome.cjs || true",
86
85
  "docs": "typedoc --config config/typedoc.json"
87
86
  },
88
87
  "dependencies": {