Commit Graph

9 Commits

Author SHA1 Message Date
wuzf
ca0e495ab4 fix(deploy): make KV detection env-aware to prevent misreporting
Step 2.5 in deploy.js was env-blind, so 'npm run deploy:dev' falsely
reported reusing the production KV while wrangler silently fell back to
the env binding. Combined with [env.development] inheriting top-level
routes, dev deploys could also hijack the production custom domain.
Make extractWorkerName / injectKvNamespaceId / findExistingKvId accept
an envName parameter, and preserve [env.development].routes across
Sync Upstream merges so 'routes = []' overrides survive upgrades.
2026-05-10 11:02:12 +08:00
wuzf
efe5f3b43a chore(release): v1.4.0
Bump package manifests, logger/monitoring defaults, and README badges
to 1.4.0 covering the backup/export refactor and offline fallback.
Single-file release bundles now inject a timestamped
serviceWorkerVersion via esbuild define (previously fell back to
SW_VERSION='v1' and left PWA clients on stale caches), and the
generated DEPLOY.md lists the cache version plus the cloud-drive
OAuth secrets (ONEDRIVE_*, GOOGLE_DRIVE_*, OAUTH_REDIRECT_BASE_URL).
2026-04-19 01:28:21 +08:00
wuzf
88b9cd8878 refactor(backup): unify backup formats and indexing
Centralize backup serialization in utils/backup-format.js with a
single createBackupEntry() path shared by scheduled backups, manual
backups and exports. Introduce utils/backup-index.js for KV key
listing/pruning and utils/data-hash.js for change detection,
replacing ad-hoc helpers scattered across api/secrets/backup.js,
restore.js and worker.js. UI backup/export modules consume the shared
format so HTML/JSON/CSV exports round-trip through the same schema.
2026-04-11 23:35:46 +08:00
wuzf
7fe83d489a chore(release): v1.3.0
- unify version metadata for v1.3.0\n- prefer production KV namespace in deploy script
2026-03-30 00:10:35 +08:00
wuzf
c89ca68ecd feat(sync): auto-merge wrangler config during upstream sync 2026-03-21 20:31:30 +08:00
wuzf
2ca7e7747d feat(deploy): auto-detect and reuse existing KV namespace in deploy scripts 2026-03-21 19:52:02 +08:00
wuzf
06a20123e2 fix: prevent deploy platform from creating unused KV namespace
Comment out all [[kv_namespaces]] in wrangler.toml (both production and
development) so deploy.workers.cloudflare.com no longer creates an empty
"2fa" KV. Updated deploy.js to handle fully commented KV config: search
for existing "SECRETS_KV" namespace first (exact match only), create one
if not found, then inject the binding block into wrangler.toml before
deploying.
2026-02-27 02:07:50 +08:00
wuzf
e024051171 fix: remove hardcoded KV namespace IDs for one-click deploy 2026-02-27 00:36:42 +08:00
wuzf
83e9042759 feat: restructure into modular architecture with full open-source setup
- Refactor monolithic worker into layered modules (api, otp, ui, utils)
- Add Vitest test suite with 598 tests across 17 files
- Set up GitHub Actions CI/CD, Dependabot
- Add community files (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, templates)
- Add comprehensive documentation (API reference, architecture, deployment)
- Configure ESLint, Prettier, and Husky pre-commit hooks
- Implement PWA frontend with modular scripts, styles, and service worker
2025-06-07 23:31:55 +08:00