|
|
@ -1,7 +1,4 @@
|
|
|
|
import { AssFile, AssUser, NID, FilesSchema, UsersSchema } from 'ass';
|
|
|
|
import { AssFile, AssUser, NID } from 'ass';
|
|
|
|
|
|
|
|
|
|
|
|
import fs from 'fs-extra';
|
|
|
|
|
|
|
|
import { path } from '@tycrek/joint';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { log } from './log';
|
|
|
|
import { log } from './log';
|
|
|
|
import { UserConfig } from './UserConfig';
|
|
|
|
import { UserConfig } from './UserConfig';
|
|
|
@ -12,14 +9,6 @@ import { DBManager } from './sql/database';
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
type DataSector = 'files' | 'users';
|
|
|
|
type DataSector = 'files' | 'users';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Absolute filepaths for JSON data files
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
const PATHS = {
|
|
|
|
|
|
|
|
files: path.join('.ass-data/files.json'),
|
|
|
|
|
|
|
|
users: path.join('.ass-data/users.json')
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* database kind -> name mapping
|
|
|
|
* database kind -> name mapping
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|