spine-framework 0.3.16 → 0.3.18

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.
Files changed (269) hide show
  1. package/.framework/cli/commands/create-app.ts +1 -1
  2. package/.framework/cli/commands/dev.ts +215 -33
  3. package/.framework/cli/index.ts +37 -75
  4. package/.framework/functions/_shared/app-manifest.ts +8 -15
  5. package/.framework/functions/_shared/db.ts +11 -15
  6. package/.framework/functions/_shared/index.ts +7 -16
  7. package/.framework/functions/_shared/principal.ts +4 -62
  8. package/.framework/functions/_shared/resolve-ids.ts +6 -6
  9. package/.framework/functions/_shared/webhook-registry.ts +43 -1
  10. package/.framework/functions/admin-funnel.ts +104 -0
  11. package/.framework/functions/admin-install-funnel.ts +225 -0
  12. package/.framework/functions/admin-signals.ts +241 -0
  13. package/.framework/functions/integration-routes.ts +3 -7
  14. package/.framework/migrations/001_schema.sql +406 -0
  15. package/.framework/migrations/002_rls_and_functions.sql +710 -0
  16. package/.framework/migrations/003_system_data.sql +520 -0
  17. package/.framework/migrations/004_enhancements.sql +43 -0
  18. package/.framework/public/_redirects +3 -0
  19. package/.framework/public/spine-logo.jpg +0 -0
  20. package/.framework/public/spine-logo.svg +3 -0
  21. package/{scripts → .framework/scripts}/assemble-frontend.sh +8 -5
  22. package/{scripts → .framework/scripts}/assemble-functions.sh +4 -47
  23. package/{scripts → .framework/scripts}/assemble.sh +2 -8
  24. package/{scripts → .framework/scripts}/boundary-check.sh +5 -9
  25. package/{scripts → .framework/scripts}/check-core-integrity.sh +0 -0
  26. package/.framework/seeds/link_types/account_cli_instances.json +9 -0
  27. package/.framework/seeds/types/funnel_signal_use.json +98 -0
  28. package/.framework/seeds/types/spine_instance.json +109 -0
  29. package/.framework/src/App.tsx +11 -21
  30. package/.framework/src/components/CustomAppLoader.tsx +2 -19
  31. package/.framework/src/components/ui/accordion.tsx +1 -1
  32. package/.framework/src/components/ui/alert-dialog.tsx +1 -1
  33. package/.framework/src/components/ui/aspect-ratio.tsx +1 -1
  34. package/.framework/src/components/ui/avatar.tsx +1 -1
  35. package/.framework/src/components/ui/badge.tsx +2 -2
  36. package/.framework/src/components/ui/breadcrumb.tsx +2 -2
  37. package/.framework/src/components/ui/button-group.tsx +2 -2
  38. package/.framework/src/components/ui/button.tsx +2 -2
  39. package/.framework/src/components/ui/chart.tsx +6 -1
  40. package/.framework/src/components/ui/checkbox.tsx +1 -1
  41. package/.framework/src/components/ui/collapsible.tsx +1 -1
  42. package/.framework/src/components/ui/context-menu.tsx +1 -1
  43. package/.framework/src/components/ui/dialog.tsx +1 -1
  44. package/.framework/src/components/ui/direction.tsx +17 -1
  45. package/.framework/src/components/ui/dropdown-menu.tsx +1 -1
  46. package/.framework/src/components/ui/hover-card.tsx +1 -1
  47. package/.framework/src/components/ui/item.tsx +2 -2
  48. package/.framework/src/components/ui/label.tsx +1 -1
  49. package/.framework/src/components/ui/menubar.tsx +1 -1
  50. package/.framework/src/components/ui/navigation-menu.tsx +1 -1
  51. package/.framework/src/components/ui/popover.tsx +1 -1
  52. package/.framework/src/components/ui/progress.tsx +1 -1
  53. package/.framework/src/components/ui/radio-group.tsx +1 -1
  54. package/.framework/src/components/ui/scroll-area.tsx +1 -1
  55. package/.framework/src/components/ui/select.tsx +1 -1
  56. package/.framework/src/components/ui/separator.tsx +1 -1
  57. package/.framework/src/components/ui/sheet.tsx +1 -1
  58. package/.framework/src/components/ui/sidebar.tsx +6 -6
  59. package/.framework/src/components/ui/slider.tsx +1 -1
  60. package/.framework/src/components/ui/switch.tsx +1 -1
  61. package/.framework/src/components/ui/tabs.tsx +1 -1
  62. package/.framework/src/components/ui/toggle-group.tsx +1 -1
  63. package/.framework/src/components/ui/toggle.tsx +1 -1
  64. package/.framework/src/components/ui/tooltip.tsx +1 -1
  65. package/.framework/src/pages/auth/LoginPage.tsx +10 -9
  66. package/LICENSE.md +63 -93
  67. package/README.md +254 -129
  68. package/custom/.devin/skills/install-app/SKILL.md +39 -0
  69. package/custom/.devin/workflows/app-install.yaml +83 -0
  70. package/custom/README.md +79 -0
  71. package/docs/APPS.md +232 -0
  72. package/docs/ARCHITECTURE.md +246 -0
  73. package/docs/INSTALL.md +155 -0
  74. package/docs/README.md +170 -0
  75. package/docs/design-schema-spec.md +1837 -0
  76. package/docs/dev-guides/01-create-an-app.md +183 -0
  77. package/docs/dev-guides/02-create-a-function.md +178 -0
  78. package/docs/dev-guides/03-create-a-component.md +178 -0
  79. package/docs/dev-guides/04-webhook-handlers.md +129 -0
  80. package/docs/dev-guides/05-testing.md +168 -0
  81. package/docs/dev-guides/README.md +40 -0
  82. package/docs/npm-packages-plan.md +288 -0
  83. package/docs/spine-core--api-reference.md +822 -0
  84. package/package.json +78 -150
  85. package/.framework/cli/bin.cjs +0 -14
  86. package/.framework/cli/commands/claim.ts +0 -430
  87. package/.framework/cli/commands/init.ts +0 -219
  88. package/.framework/cli/commands/install-app.ts +0 -685
  89. package/.framework/cli/commands/migrate.ts +0 -178
  90. package/.framework/cli/commands/publish.ts +0 -191
  91. package/.framework/cli/commands/status.ts +0 -268
  92. package/.framework/cli/commands/uninstall-app.ts +0 -166
  93. package/.framework/cli/commands/update-app.ts +0 -397
  94. package/.framework/cli/welcome.cjs +0 -45
  95. package/.framework/config/signal-client.ts +0 -147
  96. package/.framework/config/signals.ts +0 -70
  97. package/.framework/docs/STABILITY.md +0 -52
  98. package/.framework/docs/examples/custom-app/README.md +0 -77
  99. package/.framework/docs/examples/custom-function/README.md +0 -27
  100. package/.framework/docs/examples/custom-function/handler.ts +0 -48
  101. package/.framework/docs/examples/custom-webhook/README.md +0 -68
  102. package/.framework/functions/handler-registry.ts +0 -22
  103. package/.framework/functions/signal.ts +0 -168
  104. package/.framework/migrations/000_foundation.sql +0 -1302
  105. package/.framework/migrations/001_seed.sql +0 -163
  106. package/.framework/migrations/002_seed_constraints.sql +0 -19
  107. package/.framework/migrations/003_auth_user_trigger.sql +0 -67
  108. package/.framework/migrations/004_app_version_tracking.sql +0 -8
  109. package/.framework/migrations/005_pipelines_slug_stages.sql +0 -21
  110. package/.framework/src/pages/auth/RegisterPage.tsx +0 -163
  111. package/CHANGELOG.md +0 -68
  112. package/STRUCTURE.md +0 -150
  113. package/bin/spine-framework.cjs +0 -62
  114. package/bin/welcome.cjs +0 -58
  115. package/bin/ws-shim.ts +0 -10
  116. package/config/components.json +0 -25
  117. package/config/deno.lock +0 -108
  118. package/config/package-lock.json +0 -17183
  119. package/config/postcss.config.cjs +0 -10
  120. package/config/tailwind.config.cjs +0 -78
  121. package/config/tsconfig.build.json +0 -32
  122. package/config/tsconfig.cli.json +0 -18
  123. package/config/tsconfig.json +0 -41
  124. package/config/tsconfig.node.json +0 -17
  125. package/config/tsconfig.node.tsbuildinfo +0 -1
  126. package/config/tsconfig.tsbuildinfo +0 -1
  127. package/config/typedoc.json +0 -16
  128. package/config/vite.config.d.ts +0 -2
  129. package/config/vite.config.ts +0 -71
  130. package/dist/cli/commands/agents.d.ts +0 -39
  131. package/dist/cli/commands/agents.d.ts.map +0 -1
  132. package/dist/cli/commands/auth.d.ts +0 -36
  133. package/dist/cli/commands/auth.d.ts.map +0 -1
  134. package/dist/cli/commands/claim.d.ts +0 -38
  135. package/dist/cli/commands/claim.d.ts.map +0 -1
  136. package/dist/cli/commands/create-app.d.ts +0 -23
  137. package/dist/cli/commands/create-app.d.ts.map +0 -1
  138. package/dist/cli/commands/dev.d.ts +0 -24
  139. package/dist/cli/commands/dev.d.ts.map +0 -1
  140. package/dist/cli/commands/doctor.d.ts +0 -42
  141. package/dist/cli/commands/doctor.d.ts.map +0 -1
  142. package/dist/cli/commands/generate.d.ts +0 -36
  143. package/dist/cli/commands/generate.d.ts.map +0 -1
  144. package/dist/cli/commands/init.d.ts +0 -20
  145. package/dist/cli/commands/init.d.ts.map +0 -1
  146. package/dist/cli/commands/install-app.d.ts +0 -30
  147. package/dist/cli/commands/install-app.d.ts.map +0 -1
  148. package/dist/cli/commands/items.d.ts +0 -45
  149. package/dist/cli/commands/items.d.ts.map +0 -1
  150. package/dist/cli/commands/migrate.d.ts +0 -21
  151. package/dist/cli/commands/migrate.d.ts.map +0 -1
  152. package/dist/cli/commands/migrations.d.ts +0 -41
  153. package/dist/cli/commands/migrations.d.ts.map +0 -1
  154. package/dist/cli/commands/pipelines.d.ts +0 -40
  155. package/dist/cli/commands/pipelines.d.ts.map +0 -1
  156. package/dist/cli/commands/publish.d.ts +0 -23
  157. package/dist/cli/commands/publish.d.ts.map +0 -1
  158. package/dist/cli/commands/status.d.ts +0 -23
  159. package/dist/cli/commands/status.d.ts.map +0 -1
  160. package/dist/cli/commands/system.d.ts +0 -29
  161. package/dist/cli/commands/system.d.ts.map +0 -1
  162. package/dist/cli/commands/test.d.ts +0 -46
  163. package/dist/cli/commands/test.d.ts.map +0 -1
  164. package/dist/cli/commands/uninstall-app.d.ts +0 -23
  165. package/dist/cli/commands/uninstall-app.d.ts.map +0 -1
  166. package/dist/cli/commands/update-app.d.ts +0 -24
  167. package/dist/cli/commands/update-app.d.ts.map +0 -1
  168. package/dist/cli/context.d.ts +0 -88
  169. package/dist/cli/context.d.ts.map +0 -1
  170. package/dist/cli/env-loader.d.ts +0 -14
  171. package/dist/cli/env-loader.d.ts.map +0 -1
  172. package/dist/cli/index.d.ts +0 -44
  173. package/dist/cli/index.d.ts.map +0 -1
  174. package/dist/config/signals.d.ts +0 -82
  175. package/dist/config/signals.d.ts.map +0 -1
  176. package/dist/functions/_shared/agent-runner.d.ts +0 -156
  177. package/dist/functions/_shared/agent-runner.d.ts.map +0 -1
  178. package/dist/functions/_shared/app-manifest.d.ts +0 -68
  179. package/dist/functions/_shared/app-manifest.d.ts.map +0 -1
  180. package/dist/functions/_shared/audit.d.ts +0 -91
  181. package/dist/functions/_shared/audit.d.ts.map +0 -1
  182. package/dist/functions/_shared/db.d.ts +0 -125
  183. package/dist/functions/_shared/db.d.ts.map +0 -1
  184. package/dist/functions/_shared/index.d.ts +0 -299
  185. package/dist/functions/_shared/index.d.ts.map +0 -1
  186. package/dist/functions/_shared/middleware.d.ts +0 -315
  187. package/dist/functions/_shared/middleware.d.ts.map +0 -1
  188. package/dist/functions/_shared/permissions.d.ts +0 -626
  189. package/dist/functions/_shared/permissions.d.ts.map +0 -1
  190. package/dist/functions/_shared/pipeline-runner.d.ts +0 -124
  191. package/dist/functions/_shared/pipeline-runner.d.ts.map +0 -1
  192. package/dist/functions/_shared/principal.d.ts +0 -284
  193. package/dist/functions/_shared/principal.d.ts.map +0 -1
  194. package/dist/functions/_shared/resolve-ids.d.ts +0 -10
  195. package/dist/functions/_shared/resolve-ids.d.ts.map +0 -1
  196. package/dist/functions/_shared/schema-utils.d.ts +0 -181
  197. package/dist/functions/_shared/schema-utils.d.ts.map +0 -1
  198. package/dist/functions/_shared/testing.d.ts +0 -172
  199. package/dist/functions/_shared/testing.d.ts.map +0 -1
  200. package/dist/functions/_shared/trigger-engine.d.ts +0 -140
  201. package/dist/functions/_shared/trigger-engine.d.ts.map +0 -1
  202. package/dist/functions/_shared/webhook-registration.d.ts +0 -81
  203. package/dist/functions/_shared/webhook-registration.d.ts.map +0 -1
  204. package/dist/functions/_shared/webhook-registry.d.ts +0 -41
  205. package/dist/functions/_shared/webhook-registry.d.ts.map +0 -1
  206. package/dist/functions/account-nodes.d.ts +0 -48
  207. package/dist/functions/account-nodes.d.ts.map +0 -1
  208. package/dist/functions/admin-data.d.ts +0 -178
  209. package/dist/functions/admin-data.d.ts.map +0 -1
  210. package/dist/functions/ai-agents.d.ts +0 -125
  211. package/dist/functions/ai-agents.d.ts.map +0 -1
  212. package/dist/functions/api-keys.d.ts +0 -140
  213. package/dist/functions/api-keys.d.ts.map +0 -1
  214. package/dist/functions/apps.d.ts +0 -163
  215. package/dist/functions/apps.d.ts.map +0 -1
  216. package/dist/functions/auth.d.ts +0 -74
  217. package/dist/functions/auth.d.ts.map +0 -1
  218. package/dist/functions/debug-auth.d.ts +0 -33
  219. package/dist/functions/debug-auth.d.ts.map +0 -1
  220. package/dist/functions/embeddings.d.ts +0 -205
  221. package/dist/functions/embeddings.d.ts.map +0 -1
  222. package/dist/functions/handler-registry.d.ts +0 -22
  223. package/dist/functions/handler-registry.d.ts.map +0 -1
  224. package/dist/functions/integration-routes.d.ts +0 -45
  225. package/dist/functions/integration-routes.d.ts.map +0 -1
  226. package/dist/functions/integrations.d.ts +0 -124
  227. package/dist/functions/integrations.d.ts.map +0 -1
  228. package/dist/functions/item-progress.d.ts +0 -41
  229. package/dist/functions/item-progress.d.ts.map +0 -1
  230. package/dist/functions/logs.d.ts +0 -162
  231. package/dist/functions/logs.d.ts.map +0 -1
  232. package/dist/functions/observability.d.ts +0 -123
  233. package/dist/functions/observability.d.ts.map +0 -1
  234. package/dist/functions/pipeline-executions.d.ts +0 -190
  235. package/dist/functions/pipeline-executions.d.ts.map +0 -1
  236. package/dist/functions/pipelines.d.ts +0 -171
  237. package/dist/functions/pipelines.d.ts.map +0 -1
  238. package/dist/functions/prompt-configs.d.ts +0 -125
  239. package/dist/functions/prompt-configs.d.ts.map +0 -1
  240. package/dist/functions/roles.d.ts +0 -118
  241. package/dist/functions/roles.d.ts.map +0 -1
  242. package/dist/functions/signal.d.ts +0 -73
  243. package/dist/functions/signal.d.ts.map +0 -1
  244. package/dist/functions/system-cron.d.ts +0 -65
  245. package/dist/functions/system-cron.d.ts.map +0 -1
  246. package/dist/functions/system.d.ts +0 -29
  247. package/dist/functions/system.d.ts.map +0 -1
  248. package/dist/functions/tests.d.ts +0 -28
  249. package/dist/functions/tests.d.ts.map +0 -1
  250. package/dist/functions/timers.d.ts +0 -139
  251. package/dist/functions/timers.d.ts.map +0 -1
  252. package/dist/functions/triggers.d.ts +0 -203
  253. package/dist/functions/triggers.d.ts.map +0 -1
  254. package/dist/functions/types.d.ts +0 -151
  255. package/dist/functions/types.d.ts.map +0 -1
  256. package/dist/src/types/types.d.ts +0 -364
  257. package/dist/src/types/types.d.ts.map +0 -1
  258. package/index.html +0 -13
  259. package/netlify.toml +0 -36
  260. package/package-project.json +0 -71
  261. package/scripts/ingest-chunks.cjs +0 -202
  262. package/scripts/kb-chunk-parser.cjs +0 -312
  263. package/scripts/kb-chunk-parser.ts +0 -330
  264. package/scripts/load-test-app-install.ts +0 -484
  265. package/scripts/netlify-dev-wrapper.sh +0 -22
  266. package/vitest.config.ts +0 -45
  267. /package/{scripts → .framework/scripts}/app-install-cli.ts +0 -0
  268. /package/{scripts → .framework/scripts}/build-manifest.sh +0 -0
  269. /package/{scripts → .framework/scripts}/verify-integrity.sh +0 -0
package/STRUCTURE.md DELETED
@@ -1,150 +0,0 @@
1
- # Spine Enterprise Directory Structure
2
-
3
- This document explains the directory layout for the Spine framework.
4
-
5
- ## Overview
6
-
7
- ```
8
- my-app/
9
- ├── .framework/ # 🔒 CLI-managed framework code (read-only)
10
- ├── custom/ # ✏️ Developer workspace (your code)
11
- ├── .assembled/ # 🏗️ Build output (gitignored)
12
- ├── config/ # ⚙️ Build tool configuration
13
- ├── scripts/ # 🔧 Build automation
14
- ├── archive/ # 📦 Historical artifacts
15
- ├── docs/ # 📚 Documentation
16
- ├── netlify.toml # 🌐 Netlify configuration (must be at root)
17
- ├── package.json # Root package manifest
18
- └── STRUCTURE.md # This file
19
- ```
20
-
21
- ## Directory Details
22
-
23
- ### `.framework/` — Framework Core (Hidden)
24
- **Managed by:** Spine CLI (read-only)
25
- **Contains:**
26
- - `functions/` — Core Netlify function handlers
27
- - `src/` — Core React components (Admin shell, app router)
28
- - `migrations/` — Base database schema
29
- - `cli/` — Framework CLI tools
30
- - `tests/` — Core test suites
31
-
32
- **You should not edit files here.** The CLI manages updates to this directory.
33
-
34
- ### `custom/` — Developer Workspace
35
- **Managed by:** You
36
- **Contains:**
37
- - `functions/` — Your custom Netlify function handlers
38
- - `apps/` — Your applications (one folder per app)
39
- - `components/` — Shared UI components across your apps
40
- - `migrations/` — Your database schema changes
41
- - `tests/` — Your test suites
42
-
43
- **This is where you build your product.** Everything here is yours.
44
-
45
- ### `.assembled/` — Build Output (Hidden, Gitignored)
46
- **Generated by:** Assembly scripts
47
- **Contains:**
48
- - `netlify/functions/` — Merged: `.framework/functions` + `custom/functions`
49
- - `src/` — Merged: `.framework/src` + `custom/apps/*`
50
-
51
- **Never edit files here.** This is rebuilt on every `netlify dev` or deployment.
52
-
53
- ### `config/` — Build Tool Configuration
54
- **Contains:**
55
- - `vite.config.ts` — Vite build configuration
56
- - `tsconfig.json` — TypeScript configuration
57
- - `tailwind.config.ts` — Styling configuration
58
- - `postcss.config.js` — CSS processing
59
-
60
- ### `netlify.toml` — Netlify Configuration (Root)
61
- **Must be at project root** (Netlify CLI requirement)
62
- - Functions path: `.assembled/netlify/functions/`
63
- - Dev server settings: port 3001 (Vite) → 8888 (Netlify proxy)
64
-
65
- ### `scripts/` — Build Automation
66
- **Contains:**
67
- - Assembly scripts that merge `.framework/` + `custom/` → `.assembled/`
68
- - Verification scripts for integrity checking
69
-
70
- ### `archive/` — Historical Artifacts
71
- **Contains:**
72
- - Old audit documents
73
- - Completed project reports
74
- - Test artifacts
75
-
76
- ## Assembly Flow
77
-
78
- ```bash
79
- Development:
80
- .framework/ + custom/ ──► scripts/assemble.sh ──► .assembled/
81
- ──► netlify dev
82
-
83
- Production:
84
- .framework/ + custom/ ──► scripts/assemble.sh ──► .assembled/
85
- ──► Netlify deploy
86
- ```
87
-
88
- ## Path Aliases
89
-
90
- After assembly, code uses these aliases:
91
- - `@core` → `.framework/src/`
92
- - `@custom` → `custom/apps/`
93
-
94
- ## Adding New Code
95
-
96
- ### New App
97
- ```bash
98
- mkdir custom/apps/my-app
99
- cd custom/apps/my-app
100
- # Create src/, components/, pages/
101
- ```
102
-
103
- ### New Function
104
- ```bash
105
- touch custom/functions/my-handler.ts
106
- # Edit with your logic
107
- ```
108
-
109
- ### New Migration
110
- ```bash
111
- touch custom/migrations/101_my_change.sql
112
- # Write ALTER TABLE statements
113
- ```
114
-
115
- ## Updating Framework
116
-
117
- ```bash
118
- spine-framework update
119
- # CLI updates .framework/ to latest version
120
- # Your custom/ code is untouched
121
- ```
122
-
123
- ## Important Rules
124
-
125
- 1. **Never edit `.framework/`** — use `custom/` instead
126
- 2. **Never commit `.assembled/`** — it's in `.gitignore`
127
- 3. **Always use assembly** — don't manually copy to `.assembled/`
128
- 4. **Test after update** — run `netlify dev` after `spine-framework update`
129
-
130
- ## Troubleshooting
131
-
132
- ### "Where do I put X?"
133
- - Framework extension → `.framework/` (via CLI or PR)
134
- - Custom business logic → `custom/`
135
- - App-specific code → `custom/apps/{app-name}/`
136
-
137
- ### "Assembly failed"
138
- 1. Check both `.framework/` and `custom/` exist
139
- 2. Verify no duplicate function names
140
- 3. Run `scripts/assemble.sh` manually for error details
141
-
142
- ### "Functions not found"
143
- 1. Check `.assembled/netlify/functions/` exists
144
- 2. Verify `netlify.toml` (in project root) points to correct path
145
- 3. Ensure assembly ran without errors
146
-
147
- ### "Netlify dev can't connect"
148
- 1. Check Vite is running on port 3001
149
- 2. Verify `netlify.toml` is in project root (not config/)
150
- 3. Check `targetPort = 3001` in netlify.toml [dev] section
@@ -1,62 +0,0 @@
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 } = require('child_process')
5
- const { resolve } = require('path')
6
- const fs = require('fs')
7
-
8
- const pkgRoot = resolve(__dirname, '..')
9
- const projectRoot = resolve(pkgRoot, '../..')
10
-
11
- // Handle no-args case here — before spawning tsx or loading db.ts
12
- if (process.argv.length === 2) {
13
- require(resolve(__dirname, 'welcome.cjs'))
14
- process.exit(0)
15
- }
16
-
17
- // Pre-parse credential flags and load .env so db.ts sees env vars at module load time.
18
- // tsx evaluates db.ts before Commander parses args, so we must inject here.
19
- const args = process.argv.slice(2)
20
- const childEnv = { ...process.env }
21
-
22
- // Load .env from the consumer project root (process.cwd())
23
- const dotenvPath = resolve(process.cwd(), '.env')
24
- if (fs.existsSync(dotenvPath)) {
25
- const lines = fs.readFileSync(dotenvPath, 'utf8').split('\n')
26
- for (const line of lines) {
27
- const trimmed = line.trim()
28
- if (!trimmed || trimmed.startsWith('#')) continue
29
- const eq = trimmed.indexOf('=')
30
- if (eq === -1) continue
31
- const key = trimmed.slice(0, eq).trim()
32
- const val = trimmed.slice(eq + 1).trim()
33
- if (key && !(key in childEnv)) childEnv[key] = val
34
- }
35
- }
36
-
37
- // CLI flags override .env values
38
- for (let i = 0; i < args.length; i++) {
39
- if (args[i] === '--url' && args[i + 1]) childEnv.SUPABASE_URL = args[++i]
40
- if (args[i] === '--anon-key' && args[i + 1]) childEnv.SUPABASE_ANON_KEY = args[++i]
41
- if (args[i] === '--service-role-key' && args[i + 1]) childEnv.SUPABASE_SERVICE_ROLE_KEY = args[++i]
42
- }
43
-
44
- const entry = resolve(pkgRoot, 'bin/ws-shim.ts')
45
-
46
- // Find tsx: prefer consuming project's copy, fall back to our own
47
- const tsxPaths = [
48
- resolve(projectRoot, 'node_modules/.bin/tsx'),
49
- resolve(pkgRoot, 'node_modules/.bin/tsx'),
50
- ]
51
- const tsx = tsxPaths.find(p => { try { fs.accessSync(p); return true } catch { return false } })
52
-
53
- if (!tsx) {
54
- console.error('spine-framework: tsx not found. Run: npm install tsx')
55
- process.exit(1)
56
- }
57
-
58
- try {
59
- execFileSync(tsx, [entry, ...process.argv.slice(2)], { stdio: 'inherit', env: childEnv })
60
- } catch (e) {
61
- process.exit(e.status ?? 1)
62
- }
package/bin/welcome.cjs DELETED
@@ -1,58 +0,0 @@
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 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
-
17
- const lines = [
18
- '',
19
- '╭──────────────────────────────────────────────────────────────╮',
20
- '│ │',
21
- '│ ███████╗██████╗ ██╗███╗ ██╗███████╗ │',
22
- '│ ██╔════╝██╔══██╗██║████╗ ██║██╔════╝ │',
23
- '│ ███████╗██████╔╝██║██╔██╗ ██║█████╗ │',
24
- '│ ╚════██║██╔═══╝ ██║██║╚██╗██║██╔══╝ │',
25
- '│ ███████║██║ ██║██║ ╚████║███████╗ │',
26
- `│ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ${versionLabel}│`,
27
- '│ │',
28
- '╰──────────────────────────────────────────────────────────────╯',
29
- '',
30
- ' Spine Framework installed successfully!',
31
- '',
32
- ' Next steps:',
33
- ' ─────────────────────────────────────────────',
34
- ' 1. Run init to scaffold the project:',
35
- '',
36
- ' npx spine-framework init',
37
- '',
38
- ' 2. Fill in your Supabase credentials in .env',
39
- ' (get them from Supabase Dashboard → Project → Settings → API)',
40
- '',
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:',
51
- '',
52
- ' npm run assemble && netlify dev',
53
- '',
54
- ' Docs: https://github.com/spine-framework/spine-framework',
55
- '',
56
- ]
57
-
58
- console.log(lines.join('\n'))
package/bin/ws-shim.ts DELETED
@@ -1,10 +0,0 @@
1
- // Entry point for the CLI on Node < 22.
2
- // Sets globalThis.WebSocket before any supabase-js module is imported,
3
- // preventing the "Node.js 20 detected without native WebSocket" crash.
4
- import { WebSocket } from 'ws'
5
- if (typeof globalThis.WebSocket === 'undefined') {
6
- ;(globalThis as any).WebSocket = WebSocket
7
- }
8
-
9
- // Now import the real CLI — all supabase createClient() calls happen after this point
10
- await import('../.framework/cli/index.ts')
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "radix-mira",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.ts",
8
- "css": "src/v2-assembled/index.css",
9
- "baseColor": "zinc",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "lucide",
14
- "rtl": false,
15
- "aliases": {
16
- "components": "@/components",
17
- "utils": "@/lib/utils",
18
- "ui": "@/components/ui",
19
- "lib": "@/lib",
20
- "hooks": "@/hooks"
21
- },
22
- "menuColor": "default",
23
- "menuAccent": "subtle",
24
- "registries": {}
25
- }
package/config/deno.lock DELETED
@@ -1,108 +0,0 @@
1
- {
2
- "version": "5",
3
- "remote": {
4
- "https://edge.netlify.com/": "fd941d61d88673d5f28aab283fb86fcc50f08a3bc80ee5470498fcfa88c65cfb",
5
- "https://edge.netlify.com/bootstrap/config.ts": "6a2ce0e544e15e8f8883a5c18da5948e37fd0f2619f68cb31f3af53c51817025",
6
- "https://edge.netlify.com/bootstrap/context.ts": "e97240232121e2f369f6546ce961490f34d961ea1ea54be3ff09633e3f08373f",
7
- "https://edge.netlify.com/bootstrap/cookie.ts": "8b0baae708989ca183c6f3b4ab3d029e6abcbc2e43f93edeb0ff447b3bbc3a05",
8
- "https://edge.netlify.com/bootstrap/edge_function.ts": "b8253e86aa83c67341f5cfedeba5049d77fbf84dcab7eceff7566b7728ae9b39",
9
- "https://edge.netlify.com/bootstrap/globals/types.ts": "eaa6148ded3121d8dee62dd91c86e7fe76601df0f3ca8d7962243a30f4c8935f"
10
- },
11
- "workspace": {
12
- "packageJson": {
13
- "dependencies": [
14
- "npm:@base-ui/react@^1.4.1",
15
- "npm:@fontsource-variable/inter@^5.2.8",
16
- "npm:@heroicons/react@^2.2.0",
17
- "npm:@netlify/functions@^2.8.2",
18
- "npm:@radix-ui/react-accordion@^1.2.12",
19
- "npm:@radix-ui/react-avatar@^1.1.3",
20
- "npm:@radix-ui/react-dialog@^1.1.6",
21
- "npm:@radix-ui/react-dropdown-menu@^2.1.6",
22
- "npm:@radix-ui/react-icons@^1.3.2",
23
- "npm:@radix-ui/react-label@^2.1.2",
24
- "npm:@radix-ui/react-popover@^1.1.6",
25
- "npm:@radix-ui/react-select@^2.1.6",
26
- "npm:@radix-ui/react-separator@^1.1.2",
27
- "npm:@radix-ui/react-slider@^1.3.6",
28
- "npm:@radix-ui/react-slot@^1.1.2",
29
- "npm:@radix-ui/react-switch@^1.1.3",
30
- "npm:@radix-ui/react-tabs@^1.1.3",
31
- "npm:@radix-ui/react-toast@^1.2.6",
32
- "npm:@radix-ui/react-tooltip@^1.1.8",
33
- "npm:@supabase/supabase-js@^2.49.1",
34
- "npm:@tailwindcss/typography@~0.5.19",
35
- "npm:@tanstack/react-query@^5.95.2",
36
- "npm:@tiptap/extension-code-block-lowlight@^3.20.0",
37
- "npm:@tiptap/extension-image@^3.20.0",
38
- "npm:@tiptap/extension-link@^3.20.0",
39
- "npm:@tiptap/extension-placeholder@^3.20.0",
40
- "npm:@tiptap/extension-table-cell@^3.20.0",
41
- "npm:@tiptap/extension-table-header@^3.20.0",
42
- "npm:@tiptap/extension-table-row@^3.20.0",
43
- "npm:@tiptap/extension-table@^3.20.0",
44
- "npm:@tiptap/extension-youtube@^3.20.0",
45
- "npm:@tiptap/pm@^3.20.0",
46
- "npm:@tiptap/react@^3.20.0",
47
- "npm:@tiptap/starter-kit@^3.20.0",
48
- "npm:@types/node@^22.12.0",
49
- "npm:@types/react-dom@^18.3.5",
50
- "npm:@types/react-grid-layout@^1.3.6",
51
- "npm:@types/react@^18.3.18",
52
- "npm:@vitejs/plugin-react@^4.3.4",
53
- "npm:@xyflow/react@^12.10.1",
54
- "npm:ajv@^8.12.0",
55
- "npm:autoprefixer@^10.4.20",
56
- "npm:class-variance-authority@~0.7.1",
57
- "npm:clsx@^2.1.1",
58
- "npm:cmdk@^1.1.1",
59
- "npm:commander@12",
60
- "npm:dagre@~0.8.5",
61
- "npm:date-fns@^4.1.0",
62
- "npm:embla-carousel-react@^8.6.0",
63
- "npm:framer-motion@^12.34.3",
64
- "npm:github-markdown-css@^5.9.0",
65
- "npm:highlight.js@^11.11.1",
66
- "npm:input-otp@^1.4.2",
67
- "npm:js-yaml@^4.1.0",
68
- "npm:jsonwebtoken@^9.0.3",
69
- "npm:jwt-decode@4",
70
- "npm:lowlight@^3.3.0",
71
- "npm:lucide-react@^1.14.0",
72
- "npm:marked@^17.0.3",
73
- "npm:mermaid@^11.12.3",
74
- "npm:next-themes@~0.4.6",
75
- "npm:postcss@^8.5.1",
76
- "npm:radix-ui@^1.4.3",
77
- "npm:react-day-picker@10",
78
- "npm:react-dom@^18.3.1",
79
- "npm:react-grid-layout@^2.2.2",
80
- "npm:react-is@^19.2.4",
81
- "npm:react-markdown@^10.1.0",
82
- "npm:react-refresh@0.14",
83
- "npm:react-resizable-panels@^4.11.0",
84
- "npm:react-router-dom@^6.28.1",
85
- "npm:react@^18.3.1",
86
- "npm:recharts@3.8.0",
87
- "npm:rehype-autolink-headings@^7.1.0",
88
- "npm:rehype-raw@7",
89
- "npm:rehype-sanitize@6",
90
- "npm:rehype-slug@6",
91
- "npm:remark-gfm@^4.0.1",
92
- "npm:shadcn@^4.7.0",
93
- "npm:sonner@^2.0.7",
94
- "npm:tailwind-merge@^3.5.0",
95
- "npm:tailwindcss-animate@^1.0.7",
96
- "npm:tailwindcss@^3.4.17",
97
- "npm:tiptap-markdown@0.9",
98
- "npm:tsx@^4.21.0",
99
- "npm:tw-animate-css@^1.4.0",
100
- "npm:typedoc@0.27",
101
- "npm:typescript@~5.6.2",
102
- "npm:vaul@^1.1.2",
103
- "npm:vite@^6.0.11",
104
- "npm:vitest@^2.1.9"
105
- ]
106
- }
107
- }
108
- }