Commit Graph

2138 Commits

Author SHA1 Message Date
Girish Ramakrishnan 81659d4bf2 eventlog: add params for from and to date 2026-02-16 20:52:02 +01:00
Girish Ramakrishnan b5a1554631 Fix various linter errors 2026-02-15 19:37:30 +01:00
Girish Ramakrishnan c7b321315c integrity: add stats 2026-02-15 14:41:10 +01:00
Girish Ramakrishnan 9f2eefcbb3 embed integrity check task in backup API responses
The UI is polling for the taskId, might as well attach it
2026-02-15 14:11:56 +01:00
Girish Ramakrishnan fc2e39f41b Rename getByIdentifierAndStatePaged to listByIdentifierAndStatePaged 2026-02-15 12:22:43 +01:00
Girish Ramakrishnan 2597402496 make build work across server restart
tmp files disappear on server restart
2026-02-14 19:37:14 +01:00
Girish Ramakrishnan 36aa641cb9 migrate to "export default"
also, set no-use-before-define in linter
2026-02-14 15:43:24 +01:00
Girish Ramakrishnan 96dc79cfe6 Migrate codebase from CommonJS to ES Modules
- Convert all require()/module.exports to import/export across 260+ files
- Add "type": "module" to package.json to enable ESM by default
- Add migrations/package.json with "type": "commonjs" to keep db-migrate compatible
- Convert eslint.config.js to ESM with sourceType: "module"
- Replace __dirname/__filename with import.meta.dirname/import.meta.filename
- Replace require.main === module with process.argv[1] === import.meta.filename
- Remove 'use strict' directives (implicit in ESM)
- Convert dynamic require() in switch statements to static import lookup maps
  (dns.js, domains.js, backupformats.js, backupsites.js, network.js)
- Extract self-referencing exports.CONSTANT patterns into standalone const
  declarations (apps.js, services.js, locks.js, users.js, mail.js, etc.)
- Lazify SERVICES object in services.js to avoid circular dependency TDZ issues
- Add clearMailQueue() to mailer.js for ESM-safe queue clearing in tests
- Add _setMockApp() to ldapserver.js for ESM-safe test mocking
- Add _setMockResolve() wrapper to dig.js for ESM-safe DNS mocking in tests
- Convert backupupload.js to use dynamic imports so --check exits before
  loading the module graph (which requires BOX_ENV)
- Update check-install to use ESM import for infra_version.js
- Convert scripts/ (hotfix, release, remote_hotfix.js, find-unused-translations)
- All 1315 tests passing

Migration stats (AI-assisted using Cursor with Claude):
- Wall clock time: ~3-4 hours
- Assistant completions: ~80-100
- Estimated token usage: ~1-2M tokens

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 15:11:45 +01:00
Johannes Zellner 5724ca73b4 Add passkey support 2026-02-13 17:18:56 +01:00
Girish Ramakrishnan ae09c19b69 filemanager: open terminal in cwd 2026-02-12 20:30:57 +01:00
Girish Ramakrishnan e76d4b3474 tests: fix app passwords test 2026-02-12 19:57:34 +01:00
Girish Ramakrishnan e9c3e42aa6 appPassword: add expiry 2026-02-12 16:23:31 +01:00
Girish Ramakrishnan 93a0063941 backups: add stop_integrity_check route 2026-02-09 22:00:40 +01:00
Girish Ramakrishnan 5276321ade integrity: add integrity check fields and initial UI 2026-02-08 23:26:57 +01:00
Girish Ramakrishnan a9ae34b149 community: download iconUrl
also rename existing db field appStoreIcon to packageIcon
2026-02-06 19:13:55 +01:00
Girish Ramakrishnan 5ca2078461 add iconUrl to manifest 2026-02-06 18:04:47 +01:00
Girish Ramakrishnan d6eb6d3e3e community: store versionsUrl in the database 2026-02-05 19:32:29 +01:00
Girish Ramakrishnan a7de7fb286 initial implementation of community packages 2026-02-05 14:21:50 +01:00
Girish Ramakrishnan dfe2d27709 comment out some logs 2026-01-31 12:09:55 +01:00
Johannes Zellner aa84cb0079 Actually make multiplart also optional 2026-01-28 14:17:22 +01:00
Johannes Zellner a7929e142f Build local image for updates in apptask 2026-01-27 22:01:18 +01:00
Johannes Zellner fd0d65b8ce Keep the app source archive with the app instance data dir 2026-01-27 22:01:18 +01:00
Johannes Zellner ef2a94c2c8 use local/id:version-ts as docker image tag for locally built apps 2026-01-27 22:01:18 +01:00
Johannes Zellner b43daf2f08 Use the uploaded app source tarball to build a local docker image 2026-01-27 22:01:18 +01:00
Johannes Zellner 280f628746 Accept json body or formdata in app install route 2026-01-27 22:01:18 +01:00
Girish Ramakrishnan c0ad75cc4d mailserver: typo where port was not used 2025-12-16 11:48:34 +01:00
Girish Ramakrishnan bbefca71e5 profile: add hasAvatar 2025-12-10 18:57:02 +01:00
Girish Ramakrishnan f714cd66f7 rework mail domain stats
We can now show list count, alias count as well in the mail domains UI
2025-12-05 13:32:07 +01:00
Girish Ramakrishnan 964fb5d251 typo 2025-12-02 15:16:26 +01:00
Girish Ramakrishnan 29e2be47d0 password reset: show error message if any 2025-11-12 11:55:29 +01:00
Johannes Zellner dbaf6c6ce2 Use full URLs for page preview icons and favicon 2025-11-10 15:21:22 +01:00
Girish Ramakrishnan 20d4ce6632 add fsused to block_devices output 2025-11-10 11:01:19 +01:00
Girish Ramakrishnan 829512dd13 Fix tests 2025-11-06 18:01:35 +01:00
Girish Ramakrishnan fb04f78112 backupcleaner: fix listing of backups by site 2025-10-21 13:56:08 +02:00
Johannes Zellner a781a46f13 Do not sort dashboard domain first in the REST api 2025-10-17 18:55:22 +02:00
Girish Ramakrishnan 0dd6446f3e apps: add route to list sites for operators
the main backup listing route is only available for admins
2025-10-14 14:22:41 +02:00
Girish Ramakrishnan 2fdb3668e2 Fix misleading comment 2025-10-10 16:26:40 +02:00
Girish Ramakrishnan 43e426ab9f Revert "Add no-use-before-define linter rule"
This reverts commit fdcc5d68a2.

Unfortunately, this requires us to move exports to the bottom.
This in turn causes circular dep issues and also access of
exports.GLOBAL_VAR in the global context
2025-10-08 21:17:52 +02:00
Girish Ramakrishnan b790d085bb volumes: remove usage of secret placeholder 2025-10-08 18:05:30 +02:00
Girish Ramakrishnan 2c5fd7effa Fix test 2025-10-08 16:47:30 +02:00
Girish Ramakrishnan 6ac914904e backups: make listing by site only return box backups 2025-10-07 12:13:14 +02:00
Girish Ramakrishnan 6869380500 Fix tests 2025-10-07 10:01:35 +02:00
Girish Ramakrishnan d732adf34b restore: complete the latest full backup task of site id
when creating a full backup, the task is still running and the database
dump which is part of the backup, still says it is still running.

during restore, we mark the taskId as completed. detection of the task
is using the siteId in config (when restoring via backup config) or
just blindly setting the last backup task as completed (in manual form fill).
2025-10-06 19:50:58 +02:00
Girish Ramakrishnan b21d29098b tasks: refactor listByTypePaged into list with options
this way we can list by prefix (coming commit)
2025-10-06 19:28:51 +02:00
Girish Ramakrishnan 43962c4a5a add route to list backups by site 2025-10-06 14:52:29 +02:00
Girish Ramakrishnan f7c85d8aa2 mail: add api to list domains 2025-09-30 17:11:10 +02:00
Johannes Zellner 38267a26c1 Send some metrics 2025-09-29 16:16:22 +02:00
Girish Ramakrishnan 98d4d99c1b appstore: add unlink account route 2025-09-24 21:49:24 +02:00
Girish Ramakrishnan aefe69c4b5 Fix test 2025-09-23 19:07:45 +02:00
Girish Ramakrishnan 50d37ad752 Fix consistent use of enabledForUpdates -> enableForUpdates 2025-09-23 16:43:17 +02:00