migrate to "export default"

also, set no-use-before-define in linter
This commit is contained in:
Girish Ramakrishnan
2026-02-14 15:43:24 +01:00
parent ddb46646fa
commit 36aa641cb9
231 changed files with 2846 additions and 2728 deletions
+11 -10
View File
@@ -1,19 +1,11 @@
import assert from 'node:assert';
import BoxError from './boxerror.js';
import crypto from 'node:crypto';
import * as database from './database.js';
import database from './database.js';
import hat from './hat.js';
import safe from 'safetydance';
import * as _ from './underscore.js';
import _ from './underscore.js';
export {
get,
add,
list,
del,
removePrivateFields
};
const APP_PASSWORD_FIELDS = [ 'id', 'name', 'userId', 'identifier', 'hashedPassword', 'creationTime', 'expiresAt' ].join(',');
@@ -85,3 +77,12 @@ async function del(id) {
const result = await database.query('DELETE FROM appPasswords WHERE id = ?', [ id ]);
if (result.affectedRows !== 1) throw new BoxError(BoxError.NOT_FOUND, 'password not found');
}
export default {
get,
add,
list,
del,
removePrivateFields
};