Commit Graph

656 Commits

Author SHA1 Message Date
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
ddb46646fa remove esm migration files 2026-02-14 15:12:07 +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
Girish Ramakrishnan
49d5d10d77 typo 2026-02-06 16:17:22 +01:00
Girish Ramakrishnan
84374f03e9 cloudron-setup: fix the echo 2026-02-06 12:10:09 +01:00
Girish Ramakrishnan
f8a44014f7 installer: check for process instead of locks 2026-02-06 12:02:46 +01:00
Girish Ramakrishnan
6befb64691 cloudron-setup: wait for apt setup 2026-02-06 12:01:14 +01:00
Girish Ramakrishnan
1dec4f0070 cloudron-support: try ipv4 and ipv6 image pull 2026-01-30 17:20:35 +01:00
Girish Ramakrishnan
89b6513217 installer: need at least ubuntu 22 2026-01-30 09:55:53 +01:00
Girish Ramakrishnan
16a8caa8db installer: better log messages 2026-01-30 09:54:33 +01:00
Girish Ramakrishnan
4b36de5200 Update docker to 29.1.5 2026-01-23 10:02:57 +01:00
Girish Ramakrishnan
88d37e99aa docker: compare debian package version instead of docker version
this way after an ubuntu upgrade, we update it with the correct
docker package on the next cloudron upgrade
2026-01-23 09:30:44 +01:00
Girish Ramakrishnan
057fd18139 Update nodejs to 24.13.0 2026-01-23 09:04:57 +01:00
Johannes Zellner
3bf4bddc10 Remove very old ubuntu 16 and 18 from cloudron-setup 2026-01-22 12:23:45 +01:00
Girish Ramakrishnan
b2c434a1fd installer: make docker pull timeout if pull hangs 2026-01-13 10:37:14 +01:00
Girish Ramakrishnan
0d2bcbf25b cloudron-support: add --disable-ipv6 2026-01-13 10:24:37 +01:00
Girish Ramakrishnan
a3d1838a8c cloudron-support: remove --patch 2026-01-13 10:20:57 +01:00
Girish Ramakrishnan
409f185f7e cloudron-support: do not use nc 2026-01-05 09:30:43 +01:00
Girish Ramakrishnan
60420c3e32 cloudron-support: make troubleshoot script work when not set up yet 2025-12-30 17:17:35 +01:00
Girish Ramakrishnan
854f7d7f2e cloudron-support: handle systemd-detect-virt error 2025-12-09 16:06:20 +01:00
Girish Ramakrishnan
c7f5e6b5b0 typo 2025-12-09 13:01:13 +01:00
Girish Ramakrishnan
64cb848a37 sftp: give it a static ip 2025-12-04 09:09:19 +01:00
Girish Ramakrishnan
1cbad1057d cloudron-support: with equal timestamps, order by name 2025-12-02 09:33:55 +01:00
Girish Ramakrishnan
71affc0239 cloudron-support: add env type 2025-12-01 15:10:23 +01:00
Girish Ramakrishnan
720dc14ecf query root dns to detect udp 53 blockage 2025-11-27 18:42:11 +01:00
Girish Ramakrishnan
51f5f0b82d typo 2025-11-27 18:18:15 +01:00
Girish Ramakrishnan
f380a6f8cf cloudron-support: make nameserver list customizable 2025-11-27 18:15:32 +01:00
Girish Ramakrishnan
790ba406bf cloudron-support: remove cloudron from arg
'cloudron' is a bit redundant and matches our UI text 'services'
reorder the help to be alphabetical
change cli args to plural
2025-11-25 09:42:42 +01:00
Elias Hackradt
e0367056bd cloudron-support: add --check-cloudron-services and add it to troubleshoot 2025-11-25 09:24:30 +01:00
Johannes Zellner
347cf4f67d Remove early return leftover from debugging 2025-11-24 15:02:33 +01:00
Elias Hackradt
7f9344a556 Added --check- and --apply-db-migration and add --check-db-migration to troubleshoot 2025-11-24 14:28:03 +01:00
Johannes Zellner
6c0d5cb601 Remove yesno node module 2025-11-24 13:58:03 +01:00
Elias Hackradt
eaf363635e Remove collectd from send_diagnostics 2025-11-13 23:07:38 +01:00
Johannes Zellner
8cac83ed98 Add script to find and purge unused translations 2025-10-20 09:55:19 +02:00
Girish Ramakrishnan
a14dfc171d add current release file 2025-10-15 23:00:31 +02:00
Girish Ramakrishnan
73ed60059f Update node to 22.20.0 2025-10-02 08:31:19 +02:00
Girish Ramakrishnan
c69bc77a7a cloudron-support: fix docker version script 2025-09-11 09:18:01 +02:00
Girish Ramakrishnan
1720feeeee add note on docker version 2025-08-26 10:26:03 +02:00
Girish Ramakrishnan
148c0d9213 cloudron-support: typo 2025-07-11 12:25:50 +02:00
Girish Ramakrishnan
871a6f23e2 cloudron-support: enable-ssh is gone 2025-07-11 10:44:35 +02:00
Girish Ramakrishnan
b043e6bf52 cloudron-support: embed the terms 2025-07-11 10:33:22 +02:00
Girish Ramakrishnan
6ac0cd421a use the @cloudron/superagent module 2025-07-10 10:56:05 +02:00
Johannes Zellner
cb3dffc7fc Use docker 28.1.1 since that is the highest on ubuntu 20 focal 2025-06-30 22:30:54 +02:00
Girish Ramakrishnan
2caf8d6a4e Fix node version in release script 2025-06-25 11:31:53 +02:00
Girish Ramakrishnan
27c4069187 Update node to 22.7.0 2025-06-25 11:17:57 +02:00
Girish Ramakrishnan
4b2c0b0771 Update docker to 28.3.0 2025-06-25 11:16:42 +02:00
Girish Ramakrishnan
7e1216a3d3 cloudron-support: keep help alphabetical 2025-06-24 16:53:42 +02:00
Girish Ramakrishnan
1ba9513a4e installer: directly stop box code
the idea (previously) was that the box code knew how to stop itself.
this is why stop.sh of the _old_ code was invoked. we can just inline
the code needed to stop the old version into installer.sh itself.
2025-06-15 17:40:45 +02:00
Girish Ramakrishnan
1095e47e6f installer: better variable name 2025-06-15 17:38:39 +02:00
Girish Ramakrishnan
2d5ef36a7f cloudron-support: make user press enter 2025-06-15 13:20:24 +02:00