spine-framework 0.1.60 → 0.2.0

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 (246) 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 -63
  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 +0 -9
  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 +1 -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/migrations/001_schema.sql +406 -0
  14. package/.framework/migrations/002_rls_and_functions.sql +710 -0
  15. package/.framework/migrations/003_system_data.sql +520 -0
  16. package/.framework/migrations/004_enhancements.sql +43 -0
  17. package/.framework/public/_redirects +3 -0
  18. package/.framework/public/spine-logo.jpg +0 -0
  19. package/.framework/public/spine-logo.svg +3 -0
  20. package/{scripts → .framework/scripts}/assemble-frontend.sh +1 -1
  21. package/{scripts → .framework/scripts}/assemble-functions.sh +1 -1
  22. package/{scripts → .framework/scripts}/assemble.sh +2 -8
  23. package/{scripts → .framework/scripts}/check-core-integrity.sh +0 -0
  24. package/.framework/seeds/link_types/account_cli_instances.json +9 -0
  25. package/.framework/seeds/types/funnel_signal_use.json +98 -0
  26. package/.framework/seeds/types/spine_instance.json +109 -0
  27. package/.framework/src/App.tsx +6 -4
  28. package/.framework/src/components/ui/accordion.tsx +1 -1
  29. package/.framework/src/components/ui/alert-dialog.tsx +1 -1
  30. package/.framework/src/components/ui/aspect-ratio.tsx +1 -1
  31. package/.framework/src/components/ui/avatar.tsx +1 -1
  32. package/.framework/src/components/ui/badge.tsx +2 -2
  33. package/.framework/src/components/ui/breadcrumb.tsx +2 -2
  34. package/.framework/src/components/ui/button-group.tsx +2 -2
  35. package/.framework/src/components/ui/button.tsx +2 -2
  36. package/.framework/src/components/ui/chart.tsx +6 -1
  37. package/.framework/src/components/ui/checkbox.tsx +1 -1
  38. package/.framework/src/components/ui/collapsible.tsx +1 -1
  39. package/.framework/src/components/ui/context-menu.tsx +1 -1
  40. package/.framework/src/components/ui/dialog.tsx +1 -1
  41. package/.framework/src/components/ui/direction.tsx +17 -1
  42. package/.framework/src/components/ui/dropdown-menu.tsx +1 -1
  43. package/.framework/src/components/ui/hover-card.tsx +1 -1
  44. package/.framework/src/components/ui/item.tsx +2 -2
  45. package/.framework/src/components/ui/label.tsx +1 -1
  46. package/.framework/src/components/ui/menubar.tsx +1 -1
  47. package/.framework/src/components/ui/navigation-menu.tsx +1 -1
  48. package/.framework/src/components/ui/popover.tsx +1 -1
  49. package/.framework/src/components/ui/progress.tsx +1 -1
  50. package/.framework/src/components/ui/radio-group.tsx +1 -1
  51. package/.framework/src/components/ui/scroll-area.tsx +1 -1
  52. package/.framework/src/components/ui/select.tsx +1 -1
  53. package/.framework/src/components/ui/separator.tsx +1 -1
  54. package/.framework/src/components/ui/sheet.tsx +1 -1
  55. package/.framework/src/components/ui/sidebar.tsx +6 -6
  56. package/.framework/src/components/ui/slider.tsx +1 -1
  57. package/.framework/src/components/ui/switch.tsx +1 -1
  58. package/.framework/src/components/ui/tabs.tsx +1 -1
  59. package/.framework/src/components/ui/toggle-group.tsx +1 -1
  60. package/.framework/src/components/ui/toggle.tsx +1 -1
  61. package/.framework/src/components/ui/tooltip.tsx +1 -1
  62. package/.framework/src/pages/auth/LoginPage.tsx +10 -9
  63. package/LICENSE.md +193 -0
  64. package/README.md +254 -0
  65. package/custom/.devin/skills/install-app/SKILL.md +39 -0
  66. package/custom/.devin/workflows/app-install.yaml +83 -0
  67. package/custom/README.md +79 -0
  68. package/docs/APPS.md +232 -0
  69. package/docs/ARCHITECTURE.md +246 -0
  70. package/docs/INSTALL.md +155 -0
  71. package/docs/README.md +170 -0
  72. package/docs/design-schema-spec.md +1837 -0
  73. package/docs/dev-guides/01-create-an-app.md +183 -0
  74. package/docs/dev-guides/02-create-a-function.md +178 -0
  75. package/docs/dev-guides/03-create-a-component.md +178 -0
  76. package/docs/dev-guides/04-webhook-handlers.md +129 -0
  77. package/docs/dev-guides/05-testing.md +168 -0
  78. package/docs/dev-guides/README.md +40 -0
  79. package/docs/npm-packages-plan.md +288 -0
  80. package/docs/spine-core--api-reference.md +822 -0
  81. package/package.json +78 -144
  82. package/.framework/cli/bin.cjs +0 -14
  83. package/.framework/cli/commands/init.ts +0 -186
  84. package/.framework/cli/commands/install-app.ts +0 -560
  85. package/.framework/cli/commands/migrate.ts +0 -139
  86. package/.framework/cli/commands/status.ts +0 -197
  87. package/.framework/cli/commands/uninstall-app.ts +0 -166
  88. package/.framework/cli/welcome.cjs +0 -45
  89. package/.framework/docs/STABILITY.md +0 -52
  90. package/.framework/docs/examples/custom-app/README.md +0 -77
  91. package/.framework/docs/examples/custom-function/README.md +0 -27
  92. package/.framework/docs/examples/custom-function/handler.ts +0 -48
  93. package/.framework/docs/examples/custom-webhook/README.md +0 -68
  94. package/.framework/migrations/000_foundation.sql +0 -1265
  95. package/.framework/migrations/001_seed.sql +0 -163
  96. package/.framework/migrations/002_seed_constraints.sql +0 -19
  97. package/.framework/migrations/003_auth_user_trigger.sql +0 -67
  98. package/.framework/src/pages/auth/RegisterPage.tsx +0 -163
  99. package/STRUCTURE.md +0 -150
  100. package/bin/spine-framework.cjs +0 -62
  101. package/bin/welcome.cjs +0 -45
  102. package/bin/ws-shim.cjs +0 -8
  103. package/bin/ws-shim.ts +0 -10
  104. package/config/components.json +0 -25
  105. package/config/deno.lock +0 -108
  106. package/config/package-lock.json +0 -17183
  107. package/config/postcss.config.cjs +0 -10
  108. package/config/tailwind.config.cjs +0 -78
  109. package/config/tsconfig.build.json +0 -32
  110. package/config/tsconfig.cli.json +0 -18
  111. package/config/tsconfig.json +0 -41
  112. package/config/tsconfig.node.json +0 -17
  113. package/config/tsconfig.node.tsbuildinfo +0 -1
  114. package/config/tsconfig.tsbuildinfo +0 -1
  115. package/config/typedoc.json +0 -16
  116. package/config/vite.config.d.ts +0 -2
  117. package/config/vite.config.ts +0 -72
  118. package/dist/cli/commands/agents.d.ts +0 -39
  119. package/dist/cli/commands/agents.d.ts.map +0 -1
  120. package/dist/cli/commands/auth.d.ts +0 -36
  121. package/dist/cli/commands/auth.d.ts.map +0 -1
  122. package/dist/cli/commands/create-app.d.ts +0 -23
  123. package/dist/cli/commands/create-app.d.ts.map +0 -1
  124. package/dist/cli/commands/dev.d.ts +0 -24
  125. package/dist/cli/commands/dev.d.ts.map +0 -1
  126. package/dist/cli/commands/doctor.d.ts +0 -42
  127. package/dist/cli/commands/doctor.d.ts.map +0 -1
  128. package/dist/cli/commands/generate.d.ts +0 -36
  129. package/dist/cli/commands/generate.d.ts.map +0 -1
  130. package/dist/cli/commands/init.d.ts +0 -20
  131. package/dist/cli/commands/init.d.ts.map +0 -1
  132. package/dist/cli/commands/install-app.d.ts +0 -30
  133. package/dist/cli/commands/install-app.d.ts.map +0 -1
  134. package/dist/cli/commands/items.d.ts +0 -45
  135. package/dist/cli/commands/items.d.ts.map +0 -1
  136. package/dist/cli/commands/migrate.d.ts +0 -21
  137. package/dist/cli/commands/migrate.d.ts.map +0 -1
  138. package/dist/cli/commands/migrations.d.ts +0 -41
  139. package/dist/cli/commands/migrations.d.ts.map +0 -1
  140. package/dist/cli/commands/pipelines.d.ts +0 -40
  141. package/dist/cli/commands/pipelines.d.ts.map +0 -1
  142. package/dist/cli/commands/status.d.ts +0 -23
  143. package/dist/cli/commands/status.d.ts.map +0 -1
  144. package/dist/cli/commands/system.d.ts +0 -29
  145. package/dist/cli/commands/system.d.ts.map +0 -1
  146. package/dist/cli/commands/test.d.ts +0 -46
  147. package/dist/cli/commands/test.d.ts.map +0 -1
  148. package/dist/cli/commands/uninstall-app.d.ts +0 -23
  149. package/dist/cli/commands/uninstall-app.d.ts.map +0 -1
  150. package/dist/cli/context.d.ts +0 -88
  151. package/dist/cli/context.d.ts.map +0 -1
  152. package/dist/cli/env-loader.d.ts +0 -14
  153. package/dist/cli/env-loader.d.ts.map +0 -1
  154. package/dist/cli/index.d.ts +0 -41
  155. package/dist/cli/index.d.ts.map +0 -1
  156. package/dist/functions/_shared/agent-runner.d.ts +0 -156
  157. package/dist/functions/_shared/agent-runner.d.ts.map +0 -1
  158. package/dist/functions/_shared/app-manifest.d.ts +0 -68
  159. package/dist/functions/_shared/app-manifest.d.ts.map +0 -1
  160. package/dist/functions/_shared/audit.d.ts +0 -91
  161. package/dist/functions/_shared/audit.d.ts.map +0 -1
  162. package/dist/functions/_shared/db.d.ts +0 -125
  163. package/dist/functions/_shared/db.d.ts.map +0 -1
  164. package/dist/functions/_shared/index.d.ts +0 -299
  165. package/dist/functions/_shared/index.d.ts.map +0 -1
  166. package/dist/functions/_shared/middleware.d.ts +0 -315
  167. package/dist/functions/_shared/middleware.d.ts.map +0 -1
  168. package/dist/functions/_shared/permissions.d.ts +0 -626
  169. package/dist/functions/_shared/permissions.d.ts.map +0 -1
  170. package/dist/functions/_shared/pipeline-runner.d.ts +0 -124
  171. package/dist/functions/_shared/pipeline-runner.d.ts.map +0 -1
  172. package/dist/functions/_shared/principal.d.ts +0 -284
  173. package/dist/functions/_shared/principal.d.ts.map +0 -1
  174. package/dist/functions/_shared/resolve-ids.d.ts +0 -10
  175. package/dist/functions/_shared/resolve-ids.d.ts.map +0 -1
  176. package/dist/functions/_shared/schema-utils.d.ts +0 -181
  177. package/dist/functions/_shared/schema-utils.d.ts.map +0 -1
  178. package/dist/functions/_shared/testing.d.ts +0 -172
  179. package/dist/functions/_shared/testing.d.ts.map +0 -1
  180. package/dist/functions/_shared/trigger-engine.d.ts +0 -140
  181. package/dist/functions/_shared/trigger-engine.d.ts.map +0 -1
  182. package/dist/functions/_shared/webhook-registration.d.ts +0 -81
  183. package/dist/functions/_shared/webhook-registration.d.ts.map +0 -1
  184. package/dist/functions/_shared/webhook-registry.d.ts +0 -57
  185. package/dist/functions/_shared/webhook-registry.d.ts.map +0 -1
  186. package/dist/functions/account-nodes.d.ts +0 -48
  187. package/dist/functions/account-nodes.d.ts.map +0 -1
  188. package/dist/functions/admin-data.d.ts +0 -178
  189. package/dist/functions/admin-data.d.ts.map +0 -1
  190. package/dist/functions/ai-agents.d.ts +0 -125
  191. package/dist/functions/ai-agents.d.ts.map +0 -1
  192. package/dist/functions/api-keys.d.ts +0 -140
  193. package/dist/functions/api-keys.d.ts.map +0 -1
  194. package/dist/functions/apps.d.ts +0 -163
  195. package/dist/functions/apps.d.ts.map +0 -1
  196. package/dist/functions/auth.d.ts +0 -74
  197. package/dist/functions/auth.d.ts.map +0 -1
  198. package/dist/functions/debug-auth.d.ts +0 -33
  199. package/dist/functions/debug-auth.d.ts.map +0 -1
  200. package/dist/functions/embeddings.d.ts +0 -205
  201. package/dist/functions/embeddings.d.ts.map +0 -1
  202. package/dist/functions/integration-routes.d.ts +0 -45
  203. package/dist/functions/integration-routes.d.ts.map +0 -1
  204. package/dist/functions/integrations.d.ts +0 -124
  205. package/dist/functions/integrations.d.ts.map +0 -1
  206. package/dist/functions/item-progress.d.ts +0 -41
  207. package/dist/functions/item-progress.d.ts.map +0 -1
  208. package/dist/functions/logs.d.ts +0 -162
  209. package/dist/functions/logs.d.ts.map +0 -1
  210. package/dist/functions/observability.d.ts +0 -123
  211. package/dist/functions/observability.d.ts.map +0 -1
  212. package/dist/functions/pipeline-executions.d.ts +0 -190
  213. package/dist/functions/pipeline-executions.d.ts.map +0 -1
  214. package/dist/functions/pipelines.d.ts +0 -171
  215. package/dist/functions/pipelines.d.ts.map +0 -1
  216. package/dist/functions/prompt-configs.d.ts +0 -125
  217. package/dist/functions/prompt-configs.d.ts.map +0 -1
  218. package/dist/functions/roles.d.ts +0 -118
  219. package/dist/functions/roles.d.ts.map +0 -1
  220. package/dist/functions/system-cron.d.ts +0 -65
  221. package/dist/functions/system-cron.d.ts.map +0 -1
  222. package/dist/functions/system.d.ts +0 -29
  223. package/dist/functions/system.d.ts.map +0 -1
  224. package/dist/functions/tests.d.ts +0 -28
  225. package/dist/functions/tests.d.ts.map +0 -1
  226. package/dist/functions/timers.d.ts +0 -139
  227. package/dist/functions/timers.d.ts.map +0 -1
  228. package/dist/functions/triggers.d.ts +0 -203
  229. package/dist/functions/triggers.d.ts.map +0 -1
  230. package/dist/functions/types.d.ts +0 -151
  231. package/dist/functions/types.d.ts.map +0 -1
  232. package/dist/src/types/types.d.ts +0 -364
  233. package/dist/src/types/types.d.ts.map +0 -1
  234. package/index.html +0 -13
  235. package/netlify.toml +0 -36
  236. package/package-project.json +0 -64
  237. package/scripts/ingest-chunks.cjs +0 -202
  238. package/scripts/kb-chunk-parser.cjs +0 -312
  239. package/scripts/kb-chunk-parser.ts +0 -330
  240. package/scripts/load-test-app-install.ts +0 -484
  241. package/scripts/netlify-dev-wrapper.sh +0 -22
  242. package/vitest.config.ts +0 -45
  243. /package/{scripts → .framework/scripts}/app-install-cli.ts +0 -0
  244. /package/{scripts → .framework/scripts}/boundary-check.sh +0 -0
  245. /package/{scripts → .framework/scripts}/build-manifest.sh +0 -0
  246. /package/{scripts → .framework/scripts}/verify-integrity.sh +0 -0
package/package.json CHANGED
@@ -1,68 +1,56 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.1.60",
4
- "private": false,
5
- "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
3
+ "version": "0.2.0",
4
+ "description": "Multi-tenant, modular application platform for modern SaaS systems",
6
5
  "type": "module",
7
- "license": "MIT",
6
+ "bin": {
7
+ "spine-framework": "./.framework/cli/index.ts"
8
+ },
9
+ "files": [
10
+ ".framework/cli/",
11
+ ".framework/docs/",
12
+ ".framework/functions/",
13
+ ".framework/migrations/001_schema.sql",
14
+ ".framework/migrations/002_rls_and_functions.sql",
15
+ ".framework/migrations/003_system_data.sql",
16
+ ".framework/migrations/004_enhancements.sql",
17
+ ".framework/public/",
18
+ ".framework/scripts/",
19
+ ".framework/seeds/",
20
+ ".framework/src/",
21
+ ".framework/index.html",
22
+ ".framework/README.md",
23
+ "custom/.devin/",
24
+ "custom/README.md",
25
+ "docs/APPS.md",
26
+ "docs/ARCHITECTURE.md",
27
+ "docs/INSTALL.md",
28
+ "docs/README.md",
29
+ "docs/spine-core--api-reference.md",
30
+ "docs/design-schema-spec.md",
31
+ "docs/dev-guides/",
32
+ "docs/npm-packages-plan.md",
33
+ "README.md",
34
+ "LICENSE.md"
35
+ ],
8
36
  "keywords": [
9
37
  "spine",
10
38
  "framework",
39
+ "multi-tenant",
40
+ "saas",
11
41
  "supabase",
12
- "netlify",
13
42
  "react",
14
- "enterprise",
15
- "agentic"
43
+ "typescript"
16
44
  ],
17
- "homepage": "https://github.com/art-mojo-admin/spine#readme",
18
- "bugs": {
19
- "url": "https://github.com/art-mojo-admin/spine/issues"
20
- },
45
+ "license": "SEE LICENSE IN LICENSE.md",
21
46
  "repository": {
22
47
  "type": "git",
23
- "url": "https://github.com/art-mojo-admin/spine"
24
- },
25
- "engines": {
26
- "node": ">=18.0.0"
27
- },
28
- "bin": {
29
- "spine-framework": "./bin/spine-framework.cjs"
48
+ "url": "https://github.com/spine-framework/spine-framework.git"
30
49
  },
31
- "exports": {
32
- ".": {
33
- "types": "./dist/functions/_shared/index.d.ts",
34
- "import": "./.framework/functions/_shared/index.ts"
35
- },
36
- "./_shared": {
37
- "types": "./dist/functions/_shared/index.d.ts",
38
- "import": "./.framework/functions/_shared/index.ts"
39
- },
40
- "./_shared/*": {
41
- "types": "./dist/functions/_shared/*.d.ts",
42
- "import": "./.framework/functions/_shared/*.ts"
43
- },
44
- "./cli": {
45
- "types": "./dist/cli/index.d.ts",
46
- "import": "./.framework/cli/index.ts"
47
- }
50
+ "homepage": "https://spine-framework.com",
51
+ "bugs": {
52
+ "url": "https://github.com/spine-framework/spine-framework/issues"
48
53
  },
49
- "files": [
50
- "bin/",
51
- "dist/",
52
- ".framework/cli/",
53
- ".framework/functions/",
54
- ".framework/migrations/",
55
- ".framework/docs/",
56
- ".framework/src/",
57
- "scripts/",
58
- "config/",
59
- "netlify.toml",
60
- "vitest.config.ts",
61
- "index.html",
62
- "package-project.json",
63
- "STRUCTURE.md",
64
- "README.md"
65
- ],
66
54
  "scripts": {
67
55
  "spine-framework": "tsx .framework/cli/index.ts",
68
56
  "dev": "vite --config config/vite.config.ts",
@@ -73,8 +61,6 @@
73
61
  "verify": "bash scripts/verify-integrity.sh",
74
62
  "prebuild": "npm run assemble && npm run verify",
75
63
  "build": "tsc -b config/tsconfig.json && vite build --config config/vite.config.ts",
76
- "build:lib": "tsc -p config/tsconfig.build.json",
77
- "prepublishOnly": "npm run build:lib && npm run test:boundary && npm run test:unit",
78
64
  "preview": "vite preview --config config/vite.config.ts",
79
65
  "lint": "eslint .",
80
66
  "app-install": "tsx scripts/app-install-cli.ts",
@@ -84,72 +70,12 @@
84
70
  "test:core": "vitest run .framework/tests/unit/core-isolation.test.ts",
85
71
  "test:integration": "vitest run .framework/tests/integration",
86
72
  "test:boundary": "bash scripts/boundary-check.sh",
87
- "test:custom": "vitest run custom/tests",
88
- "postinstall": "node bin/welcome.cjs || true",
89
- "docs": "typedoc --config config/typedoc.json"
73
+ "docs": "typedoc --entryPoints .framework/functions/_shared/index.ts --out docs/generated"
90
74
  },
91
75
  "dependencies": {
92
- "@supabase/supabase-js": "^2.49.1",
93
- "commander": "^12.0.0",
94
- "jsonwebtoken": "^9.0.3",
95
- "jwt-decode": "^4.0.0",
96
- "pg": "^8.13.0",
97
- "tsx": "^4.21.0",
98
- "ws": "^8.21.0"
99
- },
100
- "peerDependencies": {
101
- "@netlify/functions": "^2.0.0",
102
- "react": "^18.0.0 || ^19.0.0",
103
- "react-dom": "^18.0.0 || ^19.0.0",
104
- "react-router-dom": "^6.0.0",
105
- "vite": "^5.0.0 || ^6.0.0",
106
- "@tiptap/react": "^3.24.0",
107
- "@tiptap/starter-kit": "^3.24.0",
108
- "@tiptap/extension-code-block-lowlight": "^3.24.0",
109
- "@tiptap/extension-placeholder": "^3.24.0",
110
- "lowlight": "^3.3.0",
111
- "highlight.js": "^11.11.1"
112
- },
113
- "peerDependenciesMeta": {
114
- "@netlify/functions": {
115
- "optional": false
116
- },
117
- "react": {
118
- "optional": false
119
- },
120
- "react-dom": {
121
- "optional": false
122
- },
123
- "react-router-dom": {
124
- "optional": false
125
- },
126
- "vite": {
127
- "optional": true
128
- },
129
- "@tiptap/react": {
130
- "optional": true
131
- },
132
- "@tiptap/starter-kit": {
133
- "optional": true
134
- },
135
- "@tiptap/extension-code-block-lowlight": {
136
- "optional": true
137
- },
138
- "@tiptap/extension-placeholder": {
139
- "optional": true
140
- },
141
- "lowlight": {
142
- "optional": true
143
- },
144
- "highlight.js": {
145
- "optional": true
146
- }
147
- },
148
- "devDependencies": {
149
76
  "@base-ui/react": "^1.4.1",
150
77
  "@fontsource-variable/inter": "^5.2.8",
151
78
  "@heroicons/react": "^2.2.0",
152
- "@netlify/functions": "^2.8.2",
153
79
  "@radix-ui/react-accordion": "^1.2.12",
154
80
  "@radix-ui/react-avatar": "^1.1.3",
155
81
  "@radix-ui/react-dialog": "^1.1.6",
@@ -166,29 +92,21 @@
166
92
  "@radix-ui/react-toast": "^1.2.6",
167
93
  "@radix-ui/react-tooltip": "^1.1.8",
168
94
  "@supabase/supabase-js": "^2.49.1",
169
- "@tailwindcss/typography": "^0.5.19",
170
95
  "@tanstack/react-query": "^5.95.2",
171
- "@tiptap/extension-code-block-lowlight": "^3.24.0",
172
- "@tiptap/extension-image": "^3.24.0",
173
- "@tiptap/extension-link": "^3.24.0",
174
- "@tiptap/extension-placeholder": "^3.24.0",
175
- "@tiptap/extension-table": "^3.24.0",
176
- "@tiptap/extension-table-cell": "^3.24.0",
177
- "@tiptap/extension-table-header": "^3.24.0",
178
- "@tiptap/extension-table-row": "^3.24.0",
179
- "@tiptap/extension-youtube": "^3.24.0",
180
- "@tiptap/pm": "^3.24.0",
181
- "@tiptap/react": "^3.24.0",
182
- "@tiptap/starter-kit": "^3.24.0",
183
- "@types/js-yaml": "^4.0.9",
184
- "@types/node": "^22.12.0",
185
- "@types/react": "^18.3.18",
186
- "@types/react-dom": "^18.3.5",
96
+ "@tiptap/extension-code-block-lowlight": "^3.20.0",
97
+ "@tiptap/extension-image": "^3.20.0",
98
+ "@tiptap/extension-link": "^3.20.0",
99
+ "@tiptap/extension-placeholder": "^3.20.0",
100
+ "@tiptap/extension-table": "^3.20.0",
101
+ "@tiptap/extension-table-cell": "^3.20.0",
102
+ "@tiptap/extension-table-header": "^3.20.0",
103
+ "@tiptap/extension-table-row": "^3.20.0",
104
+ "@tiptap/extension-youtube": "^3.20.0",
105
+ "@tiptap/pm": "^3.20.0",
106
+ "@tiptap/react": "^3.20.0",
107
+ "@tiptap/starter-kit": "^3.20.0",
187
108
  "@types/react-grid-layout": "^1.3.6",
188
- "@vitejs/plugin-react": "^4.3.4",
189
109
  "@xyflow/react": "^12.10.1",
190
- "ajv": "^8.12.0",
191
- "autoprefixer": "^10.4.20",
192
110
  "class-variance-authority": "^0.7.1",
193
111
  "clsx": "^2.1.1",
194
112
  "cmdk": "^1.1.1",
@@ -199,13 +117,13 @@
199
117
  "github-markdown-css": "^5.9.0",
200
118
  "highlight.js": "^11.11.1",
201
119
  "input-otp": "^1.4.2",
202
- "js-yaml": "^4.1.0",
120
+ "jsonwebtoken": "^9.0.3",
121
+ "jwt-decode": "^4.0.0",
203
122
  "lowlight": "^3.3.0",
204
123
  "lucide-react": "^1.14.0",
205
124
  "marked": "^17.0.3",
206
- "mermaid": "^11.15.0",
125
+ "mermaid": "^11.12.3",
207
126
  "next-themes": "^0.4.6",
208
- "postcss": "^8.5.15",
209
127
  "radix-ui": "^1.4.3",
210
128
  "react": "^18.3.1",
211
129
  "react-day-picker": "^10.0.0",
@@ -213,10 +131,9 @@
213
131
  "react-grid-layout": "^2.2.2",
214
132
  "react-is": "^19.2.4",
215
133
  "react-markdown": "^10.1.0",
216
- "react-refresh": "^0.14.0",
217
134
  "react-resizable-panels": "^4.11.0",
218
135
  "react-router-dom": "^6.28.1",
219
- "recharts": "^3.8.1",
136
+ "recharts": "3.8.0",
220
137
  "rehype-autolink-headings": "^7.1.0",
221
138
  "rehype-raw": "^7.0.0",
222
139
  "rehype-sanitize": "^6.0.0",
@@ -225,15 +142,32 @@
225
142
  "shadcn": "^4.7.0",
226
143
  "sonner": "^2.0.7",
227
144
  "tailwind-merge": "^3.5.0",
228
- "tailwindcss": "^3.4.17",
229
145
  "tailwindcss-animate": "^1.0.7",
230
146
  "tiptap-markdown": "^0.9.0",
231
147
  "tw-animate-css": "^1.4.0",
148
+ "vaul": "^1.1.2"
149
+ },
150
+ "devDependencies": {
151
+ "@netlify/functions": "^2.8.2",
152
+ "@supabase/supabase-js": "^2.49.1",
153
+ "@tailwindcss/typography": "^0.5.19",
154
+ "@types/js-yaml": "^4.0.9",
155
+ "@types/node": "^22.12.0",
156
+ "@types/react": "^18.3.18",
157
+ "@types/react-dom": "^18.3.5",
158
+ "@vitejs/plugin-react": "^4.3.4",
159
+ "ajv": "^8.12.0",
160
+ "autoprefixer": "^10.4.20",
161
+ "commander": "^12.0.0",
162
+ "js-yaml": "^4.1.0",
163
+ "postcss": "^8.5.1",
164
+ "react-refresh": "^0.14.0",
165
+ "tailwindcss": "^3.4.17",
166
+ "tsx": "^4.21.0",
232
167
  "typedoc": "^0.27.0",
233
168
  "typescript": "~5.6.2",
234
- "vaul": "^1.1.2",
235
- "vite": "^6.4.3",
236
- "vitest": "^4.1.8"
169
+ "vite": "^6.0.11",
170
+ "vitest": "^2.1.9"
237
171
  },
238
172
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
239
173
  }
@@ -1,14 +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
-
7
- const tsx = resolve(__dirname, '../../node_modules/.bin/tsx')
8
- const entry = resolve(__dirname, 'index.ts')
9
-
10
- try {
11
- execFileSync(tsx, [entry, ...process.argv.slice(2)], { stdio: 'inherit' })
12
- } catch (e) {
13
- process.exit(e.status ?? 1)
14
- }
@@ -1,186 +0,0 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module cli/commands/init
4
- * @audience installer
5
- * @layer cli
6
- * @stability stable
7
- *
8
- * `spine-framework init` — Write .env and scaffold the custom/ workspace.
9
- *
10
- * Intentionally does NOT touch the database — run `spine-framework migrate`
11
- * after init to apply SQL migrations via a direct Postgres connection.
12
- *
13
- * **Usage:**
14
- * ```bash
15
- * spine-framework init --url https://xyz.supabase.co --anon-key eyJ... --service-role-key eyJ...
16
- * spine-framework migrate --db-password <password>
17
- * ```
18
- */
19
-
20
- import type { Command } from 'commander'
21
- import { existsSync, mkdirSync, writeFileSync, cpSync } from 'fs'
22
- import { resolve, dirname } from 'path'
23
- import { fileURLToPath } from 'url'
24
- import { execSync } from 'child_process'
25
-
26
- const __filename = fileURLToPath(import.meta.url)
27
- const __dirname = dirname(__filename)
28
- const PROJECT_ROOT = process.cwd()
29
- // Package root: node_modules/spine-framework/ — 3 levels up from .framework/cli/commands/
30
- const PACKAGE_ROOT = resolve(__dirname, '../../..')
31
-
32
- interface InitOptions {
33
- dryRun: boolean
34
- }
35
-
36
- function scaffoldCustomWorkspace(dryRun: boolean): void {
37
- const dirs = [
38
- 'custom/apps',
39
- 'custom/functions',
40
- 'custom/components',
41
- 'custom/migrations',
42
- 'custom/tests',
43
- ]
44
-
45
- for (const dir of dirs) {
46
- const fullPath = resolve(PROJECT_ROOT, dir)
47
- if (existsSync(fullPath)) {
48
- console.log(` ⏭️ ${dir}/ already exists`)
49
- } else if (dryRun) {
50
- console.log(` [dry-run] Would create: ${dir}/`)
51
- } else {
52
- mkdirSync(fullPath, { recursive: true })
53
- writeFileSync(resolve(fullPath, '.gitkeep'), '')
54
- console.log(` ✓ Created ${dir}/`)
55
- }
56
- }
57
- }
58
-
59
- function writeEnvFile(dryRun: boolean): void {
60
- const envPath = resolve(PROJECT_ROOT, '.env')
61
-
62
- if (existsSync(envPath)) {
63
- console.log(' ⏭️ .env already exists, skipping')
64
- return
65
- }
66
-
67
- const envContent = [
68
- '# ─── Supabase ────────────────────────────────────────────────────────────────',
69
- '# Get these from: https://supabase.com/dashboard/project/_/settings/api',
70
- 'SUPABASE_URL=https://your-project.supabase.co',
71
- 'SUPABASE_ANON_KEY=your-anon-key',
72
- 'SUPABASE_SERVICE_ROLE_KEY=your-service-role-key',
73
- '',
74
- '# DB password for running migrations (direct Postgres connection)',
75
- '# Get from: https://supabase.com/dashboard/project/_/settings/database',
76
- 'SUPABASE_DB_PASSWORD=your-db-password',
77
- '',
78
- '# ─── Vite / Frontend ─────────────────────────────────────────────────────────',
79
- 'VITE_SUPABASE_URL=https://your-project.supabase.co',
80
- 'VITE_SUPABASE_ANON_KEY=your-anon-key',
81
- 'VITE_APP_NAME=Spine',
82
- '',
83
- '# ─── OpenAI ──────────────────────────────────────────────────────────────────',
84
- 'OPENAI_API_KEY=your-openai-api-key',
85
- '',
86
- '# ─── App config ──────────────────────────────────────────────────────────────',
87
- 'DB_SCHEMA=public',
88
- ].join('\n') + '\n'
89
-
90
- if (dryRun) {
91
- console.log(' [dry-run] Would write .env with placeholder values')
92
- return
93
- }
94
-
95
- writeFileSync(envPath, envContent, 'utf8')
96
- console.log(' ✓ Created .env')
97
- }
98
-
99
- function copyFrameworkFiles(dryRun: boolean): void {
100
- // Directories and files to copy from the package root into the consumer project root
101
- const items = [
102
- { src: '.framework', dest: '.framework' },
103
- { src: 'bin', dest: 'bin' },
104
- { src: 'config', dest: 'config' },
105
- { src: 'scripts', dest: 'scripts' },
106
- { src: 'netlify.toml', dest: 'netlify.toml' },
107
- { src: 'vitest.config.ts', dest: 'vitest.config.ts' },
108
- { src: 'index.html', dest: 'index.html' },
109
- { src: 'package-project.json', dest: 'package.json' },
110
- { src: 'STRUCTURE.md', dest: 'STRUCTURE.md' },
111
- ]
112
-
113
- for (const item of items) {
114
- const src = resolve(PACKAGE_ROOT, item.src)
115
- const dest = resolve(PROJECT_ROOT, item.dest)
116
-
117
- if (!existsSync(src)) {
118
- console.log(` ⏭️ ${item.src} not found in package, skipping`)
119
- continue
120
- }
121
-
122
- // Always overwrite package.json (npm creates a minimal one during install)
123
- if (existsSync(dest) && item.dest !== 'package.json') {
124
- console.log(` ⏭️ ${item.dest} already exists, skipping`)
125
- continue
126
- }
127
-
128
- if (dryRun) {
129
- console.log(` [dry-run] Would copy: ${item.src} → ./${item.dest}`)
130
- continue
131
- }
132
-
133
- cpSync(src, dest, { recursive: true })
134
- console.log(` ✓ Copied ${item.dest}`)
135
- }
136
- }
137
-
138
- async function initCommand(options: InitOptions): Promise<void> {
139
- console.log('\n🚀 Spine Framework — Init\n')
140
-
141
- // Step 1: Copy framework files to project root
142
- console.log('📦 Step 1: Installing framework files...')
143
- copyFrameworkFiles(options.dryRun)
144
-
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...')
158
- scaffoldCustomWorkspace(options.dryRun)
159
-
160
- // Step 4: Write .env with placeholders
161
- console.log('\n🔑 Step 4: Writing environment configuration...')
162
- writeEnvFile(options.dryRun)
163
-
164
- console.log('\n✅ Project initialized!')
165
- console.log('\n Next steps:')
166
- console.log(' 1. Fill in your Supabase credentials in .env')
167
- console.log(' (get them from https://supabase.com/dashboard/project/_/settings/api)')
168
- console.log(' 2. Run: npx spine-framework migrate')
169
- console.log(' (ensure SUPABASE_DB_PASSWORD is set in .env)')
170
- }
171
-
172
- export function registerInitCommands(program: Command) {
173
- program
174
- .command('init')
175
- .description('Install framework files, scaffold custom/ workspace, and write .env template')
176
- .option('--dry-run', 'Show what would happen without making changes', false)
177
- .action(async (opts) => {
178
- try {
179
- await initCommand(opts)
180
- } catch (err: any) {
181
- console.error('Error:', err.message)
182
- if (process.env.SPINE_CLI_DEBUG) console.error(err.stack)
183
- process.exit(1)
184
- }
185
- })
186
- }