@basicbenframework/core 0.1.8 → 0.1.9

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basicbenframework/create",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Create a new BasicBen application",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,3 +1,4 @@
1
+ import { useState, useEffect } from 'react'
1
2
  import { useAuth, useNavigate } from '@basicbenframework/core/client'
2
3
  import { useTheme } from '../components/ThemeContext'
3
4
  import { Card } from '../components/Card'
@@ -9,6 +10,14 @@ export function Home() {
9
10
  const { user } = useAuth()
10
11
  const navigate = useNavigate()
11
12
  const { t, dark } = useTheme()
13
+ const [version, setVersion] = useState(null)
14
+
15
+ useEffect(() => {
16
+ fetch('https://registry.npmjs.org/@basicbenframework/core/latest')
17
+ .then(res => res.json())
18
+ .then(data => setVersion(data.version))
19
+ .catch(() => {})
20
+ }, [])
12
21
 
13
22
  const features = [
14
23
  {
@@ -197,9 +206,9 @@ export default (router) => {
197
206
  )}
198
207
 
199
208
  {/* Footer */}
200
- <footer className={`text-center text-xs ${t.subtle} space-y-2`}>
209
+ <footer className={`text-center text-xs ${t.subtle} space-y-1`}>
201
210
  <p>Built with Node.js built-ins. Inspired by Laravel.</p>
202
- <p>BasicBen v0.1.0</p>
211
+ {version && <p>BasicBen v{version}</p>}
203
212
  </footer>
204
213
  </div>
205
214
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basicbenframework/core",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "A full-stack framework for React. Minimal dependencies, maximum clarity.",
5
5
  "author": "ctmakes",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -2,7 +2,9 @@
2
2
  * BasicBen framework public API
3
3
  */
4
4
 
5
- export const VERSION = '0.1.0'
5
+ import pkg from '../package.json' with { type: 'json' }
6
+
7
+ export const VERSION = pkg.version
6
8
 
7
9
  // Database
8
10
  export { db, query, getDb, QueryBuilder, Grammar } from './db/index.js'