etherpad-lite/bin
John McLear 8c5de8446c
fix(bin): migrate importSqlFile & migrateDirtyDBtoRealDB to ueberdb2 promise API (#7983)
Both scripts still called the pre-v6 callback-style ueberdb2 API, producing
type errors (masked in places by `// @ts-ignore`) against the current
promise-based signatures (`set(key, value)`, `init()`, `close()` — no
callback/extra args):

  importSqlFile.ts(73)            initDb(null)        Expected 0 arguments, but got 1
  migrateDirtyDBtoRealDB.ts(51)   db.set(k,v,bcb,wcb) Expected 2 arguments, but got 4
  migrateDirtyDBtoRealDB.ts(56)   db.close(null)      Expected 0 arguments, but got 1
  migrateDirtyDBtoRealDB.ts(57)   dirty.close(null)   Expected 0 arguments, but got 1

- importSqlFile: drop the unused `util` import and the `util.promisify`
  wrappers; `await db.init()`, `await db.set(...)`, `await db.close()`
  directly. Removes two `// @ts-ignore` that were hiding the broken calls.
- migrateDirtyDBtoRealDB: replace the bcb/wcb callback machinery with
  `await db.set(key, value)` in the loop and call `close()` with no args.
  Also fixes the progress log which referenced an undefined `length`
  instead of `keys.length`.

Pure type/correctness cleanup; behaviour is unchanged (writes are now
awaited, which is equivalent or safer). `tsc --noEmit` on the bin package
is now clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:51:34 +01:00
..
deb-src
nsis
plugins Drop swagger-ui, document telemetry, add opt-outs (#7524) (#7757) 2026-05-16 18:34:22 +01:00
buildDebian.sh
buildForWindows.sh
checkAllPads.ts
checkPad.ts
cleanRun.sh
commonPlugins.ts
compactAllPads.ts docs: refresh docs for 3.2.0 — correct stale content, document recent features (#7888) 2026-06-05 13:44:25 +01:00
compactPad.ts docs: refresh docs for 3.2.0 — correct stale content, document recent features (#7888) 2026-06-05 13:44:25 +01:00
compactStalePads.ts docs: refresh docs for 3.2.0 — correct stale content, document recent features (#7888) 2026-06-05 13:44:25 +01:00
convertSettings.json.template
createUserSession.ts
debugRun.sh
deleteAllGroupSessions.ts
deletePad.ts
extractPadData.ts
fastRun.sh
functions.sh Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
generateReleaseNotes.ts
importSqlFile.ts fix(bin): migrate importSqlFile & migrateDirtyDBtoRealDB to ueberdb2 promise API (#7983) 2026-06-19 11:51:34 +01:00
installDeps.sh
installer.ps1 Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
installer.sh Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
installLocalPlugins.sh
make_docs.ts
migrateDB.ts fix(bin): close DBs in migrateDB so it flushes and exits (#7982) 2026-06-19 11:48:39 +01:00
migrateDirtyDBtoRealDB.ts fix(bin): migrate importSqlFile & migrateDirtyDBtoRealDB to ueberdb2 promise API (#7983) 2026-06-19 11:51:34 +01:00
package.json build(deps): bump ueberdb2 from 6.1.9 to 6.1.13 (#7979) 2026-06-18 21:47:16 +01:00
plugins.ts
push-after-release.sh
rebuildPad.ts
release.ts
repairPad.ts
run-frontend-tests-with-disables.sh
run.sh
safeRun.sh
setup-trusted-publishers.sh
tsconfig.json
updatePlugins.sh