@riligar/elysia-backup 1.8.1 → 1.8.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riligar/elysia-backup",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Elysia plugin for R2/S3 backup with a built-in UI dashboard",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -5,7 +5,7 @@ import { authenticator } from 'otplib'
5
5
  import QRCode from 'qrcode'
6
6
  import { writeFile } from 'node:fs/promises'
7
7
  import { readFileSync, existsSync } from 'node:fs'
8
- import { html, Html } from '@elysiajs/html'
8
+ import { html } from '@elysiajs/html'
9
9
 
10
10
  // Import core modules
11
11
  import { createSessionManager } from './core/session.js'
@@ -76,7 +76,7 @@ export const r2Backup = initialConfig => app => {
76
76
  // Setup initial cron schedule
77
77
  scheduler.setup(config.cronSchedule, config.cronEnabled !== false)
78
78
 
79
- return app.use(html()).group('/backup', app => {
79
+ return app.use(html({ autoDoctype: 'full' })).group('/backup', app => {
80
80
  // Authentication Middleware
81
81
  const authMiddleware = context => {
82
82
  // Skip auth entirely if no valid config (needs onboarding)
@@ -138,7 +138,7 @@ export const r2Backup = initialConfig => app => {
138
138
  return
139
139
  }
140
140
 
141
- return Html(LoginPage({ totpEnabled: !!config.auth?.totpSecret }))
141
+ return LoginPage({ totpEnabled: !!config.auth?.totpSecret })
142
142
  })
143
143
 
144
144
  // AUTH: Login Endpoint
@@ -452,7 +452,7 @@ export const r2Backup = initialConfig => app => {
452
452
  set.headers['Location'] = '/backup'
453
453
  return
454
454
  }
455
- return Html(OnboardingPage({ sourceDir: config.sourceDir }))
455
+ return OnboardingPage({ sourceDir: config.sourceDir })
456
456
  })
457
457
 
458
458
  // ONBOARDING: Save Initial Config
@@ -535,7 +535,7 @@ export const r2Backup = initialConfig => app => {
535
535
 
536
536
  const jobStatus = scheduler.getStatus(config.cronEnabled)
537
537
  const hasAuth = !!(config.auth && config.auth.username && config.auth.password)
538
- return Html(DashboardPage({ config, jobStatus, hasAuth }))
538
+ return DashboardPage({ config, jobStatus, hasAuth })
539
539
  })
540
540
  )
541
541
  })