@riligar/elysia-sqlite 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -40,16 +40,16 @@ const app = new Elysia()
40
40
  .use(
41
41
  sqliteAdmin({
42
42
  dbPath: 'demo.db',
43
- prefix: '/admin', // Optional: defaults to /admin
43
+ prefix: '/database', // Optional: defaults to /database
44
44
  })
45
45
  )
46
46
  .listen(3000)
47
47
 
48
48
  console.log('🦊 Server running at http://localhost:3000')
49
- console.log('📊 Admin Dashboard at http://localhost:3000/admin')
49
+ console.log('📊 Admin Dashboard at http://localhost:3000/database')
50
50
  ```
51
51
 
52
- On first run, navigate to `/admin` (or your configured prefix) to start the onboarding wizard and configure your admin credentials.
52
+ On first run, navigate to `/database` (or your configured prefix) to start the onboarding wizard and configure your admin credentials.
53
53
 
54
54
  ## ⚙️ Configuration
55
55
 
@@ -60,7 +60,7 @@ These options are passed to the `sqliteAdmin` plugin at initialization.
60
60
  | Option | Type | Default | Description |
61
61
  | ------------ | ------ | ----------------------------- | --------------------------------------------------------------- |
62
62
  | `dbPath` | string | **Required** | Path to the SQLite database file |
63
- | `prefix` | string | `"/admin"` | URL prefix for the admin dashboard and API |
63
+ | `prefix` | string | `"/database"` | URL prefix for the admin dashboard and API |
64
64
  | `configPath` | string | Same directory as `dbPath` | Path to save the runtime authentication config (JSON). Defaults to `sqlite-admin-config.json` in the same directory as your database file |
65
65
 
66
66
  ### Runtime Configuration (via UI)
@@ -100,7 +100,7 @@ The config file is automatically stored alongside your database, so both will pe
100
100
 
101
101
  ## 🔌 API Endpoints
102
102
 
103
- The plugin adds the following routes under your configured `prefix` (default `/admin`):
103
+ The plugin adds the following routes under your configured `prefix` (default `/database`):
104
104
 
105
105
  ### Authentication
106
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riligar/elysia-sqlite",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Plugin ElysiaJS para gerenciamento de bancos de dados SQLite",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -22,11 +22,11 @@ const mimeTypes = {
22
22
  * Plugin de administração SQLite para ElysiaJS
23
23
  * @param {Object} config - Configuração do plugin
24
24
  * @param {string} config.dbPath - Caminho para o arquivo do banco SQLite
25
- * @param {string} config.prefix - Prefixo da rota (ex: '/admin')
25
+ * @param {string} config.prefix - Prefixo da rota (ex: '/database')
26
26
  * @param {string} config.configPath - Caminho para o arquivo de configuração de auth.
27
27
  * Se não especificado, será salvo no mesmo diretório do banco de dados (recomendado para persistência em ambientes cloud como Fly.io)
28
28
  */
29
- export const sqliteAdmin = ({ dbPath, prefix = "/admin", configPath }) => {
29
+ export const sqliteAdmin = ({ dbPath, prefix = "/database", configPath }) => {
30
30
  const db = new Database(dbPath);
31
31
  const uiPath = join(import.meta.dir, "ui", "dist");
32
32