tweak: clean up some dead imports

This commit is contained in:
jelveh 2024-11-23 10:44:45 -08:00
parent 5ec2d8f6ba
commit b6a9d957aa
12 changed files with 7 additions and 20 deletions

View File

@ -21,8 +21,8 @@ const express = require('express');
const router = new express.Router(); const router = new express.Router();
const auth = require('../middleware/auth.js'); const auth = require('../middleware/auth.js');
const config = require('../config'); const config = require('../config');
const { app_name_exists, refresh_apps_cache, chkperm, convert_path_to_fsentry, get_app } = require('../helpers'); const { get_app } = require('../helpers');
const { DB_WRITE, DB_READ } = require('../services/database/consts.js'); const { DB_READ } = require('../services/database/consts.js');
const subdomain = require('../middleware/subdomain.js'); const subdomain = require('../middleware/subdomain.js');
// -----------------------------------------------------------------------// // -----------------------------------------------------------------------//

View File

@ -17,11 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
"use strict" "use strict"
const validator = require('validator');
const crypto = require('crypto');
const eggspress = require('../api/eggspress.js'); const eggspress = require('../api/eggspress.js');
const APIError = require('../api/APIError.js'); const APIError = require('../api/APIError.js');
const { DB_READ, DB_WRITE } = require('../services/database/consts.js'); const { DB_WRITE } = require('../services/database/consts.js');
const config = require('../config.js'); const config = require('../config.js');

View File

@ -18,7 +18,6 @@
*/ */
"use strict" "use strict"
const express = require('express'); const express = require('express');
const { invalidate_cached_user } = require('../helpers');
const router = new express.Router(); const router = new express.Router();
const auth = require('../middleware/auth.js'); const auth = require('../middleware/auth.js');
const { DB_WRITE } = require('../services/database/consts'); const { DB_WRITE } = require('../services/database/consts');

View File

@ -20,7 +20,6 @@
const express = require('express'); const express = require('express');
const router = express.Router(); const router = express.Router();
const auth = require('../middleware/auth.js'); const auth = require('../middleware/auth.js');
const config = require('../config');
const { get_user, generate_random_str } = require('../helpers'); const { get_user, generate_random_str } = require('../helpers');
const { DB_WRITE } = require('../services/database/consts.js'); const { DB_WRITE } = require('../services/database/consts.js');

View File

@ -17,10 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
"use strict" "use strict"
const express = require('express');
const router = new express.Router();
const auth = require('../middleware/auth.js');
const config = require('../config');
const eggspress = require('../api/eggspress.js'); const eggspress = require('../api/eggspress.js');
const FSNodeParam = require('../api/filesystem/FSNodeParam.js'); const FSNodeParam = require('../api/filesystem/FSNodeParam.js');
const { Context } = require('../util/context.js'); const { Context } = require('../util/context.js');

View File

@ -22,9 +22,7 @@ const router = new express.Router();
const {get_taskbar_items, username_exists, send_email_verification_code, send_email_verification_token, invalidate_cached_user, get_user } = require('../helpers'); const {get_taskbar_items, username_exists, send_email_verification_code, send_email_verification_token, invalidate_cached_user, get_user } = require('../helpers');
const auth = require('../middleware/auth.js'); const auth = require('../middleware/auth.js');
const config = require('../config'); const config = require('../config');
const { Context } = require('../util/context');
const { DB_WRITE } = require('../services/database/consts'); const { DB_WRITE } = require('../services/database/consts');
const { can } = require('../util/langutil.js');
// -----------------------------------------------------------------------// // -----------------------------------------------------------------------//
// POST /save_account // POST /save_account

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
"use strict" "use strict"
const {sign_file, convert_path_to_fsentry, uuid2fsentry, chkperm, get_app} = require('../helpers'); const {sign_file, get_app} = require('../helpers');
const eggspress = require('../api/eggspress.js'); const eggspress = require('../api/eggspress.js');
const APIError = require('../api/APIError.js'); const APIError = require('../api/APIError.js');
const { Context } = require('../util/context.js'); const { Context } = require('../util/context.js');

View File

@ -19,7 +19,7 @@
"use strict" "use strict"
const express = require('express'); const express = require('express');
const router = new express.Router(); const router = new express.Router();
const {get_taskbar_items, generate_random_username, generate_system_fsentries, body_parser_error_handler, send_email_verification_code, send_email_verification_token, username_exists, invalidate_cached_user_by_id, get_user } = require('../helpers'); const {get_taskbar_items, generate_random_username, generate_system_fsentries, send_email_verification_code, send_email_verification_token, username_exists, invalidate_cached_user_by_id, get_user } = require('../helpers');
const config = require('../config'); const config = require('../config');
const eggspress = require('../api/eggspress'); const eggspress = require('../api/eggspress');
const { Context } = require('../util/context'); const { Context } = require('../util/context');

View File

@ -42,7 +42,7 @@ router.post('/suggest_apps', auth, express.json(), async (req, res, next)=>{
return res.status(400).send({message: '`uid` or `path` required'}) return res.status(400).send({message: '`uid` or `path` required'})
// modules // modules
const {convert_path_to_fsentry, uuid2fsentry, chkperm, suggest_app_for_fsentry} = require('../helpers') const {convert_path_to_fsentry, uuid2fsentry, suggest_app_for_fsentry} = require('../helpers')
let fsentry; let fsentry;
// by uid // by uid

View File

@ -20,8 +20,7 @@
const express = require('express') const express = require('express')
const router = new express.Router() const router = new express.Router()
const config = require('../config') const config = require('../config')
const { invalidate_cached_user_by_id, get_user } = require('../helpers') const { get_user } = require('../helpers')
const { DB_WRITE } = require('../services/database/consts')
const jwt = require('jsonwebtoken'); const jwt = require('jsonwebtoken');

View File

@ -20,7 +20,6 @@
const express = require('express'); const express = require('express');
const router = new express.Router(); const router = new express.Router();
const {uuid2fsentry, validate_signature_auth, get_url_from_req, sign_file} = require('../helpers'); const {uuid2fsentry, validate_signature_auth, get_url_from_req, sign_file} = require('../helpers');
const multer = require('multer');
const fs = require('../middleware/fs.js'); const fs = require('../middleware/fs.js');
const { NodePathSelector, NodeUIDSelector } = require('../filesystem/node/selectors'); const { NodePathSelector, NodeUIDSelector } = require('../filesystem/node/selectors');
const eggspress = require('../api/eggspress'); const eggspress = require('../api/eggspress');

View File

@ -19,7 +19,6 @@
import { END_HARD, END_SOFT } from "../definitions.js"; import { END_HARD, END_SOFT } from "../definitions.js";
import UIAlert from "./UIAlert.js"; import UIAlert from "./UIAlert.js";
import UIContextMenu from "./UIContextMenu.js"; import UIContextMenu from "./UIContextMenu.js";
import UIWindow from "./UIWindow.js";
import { Component, defineComponent } from '../util/Component.js'; import { Component, defineComponent } from '../util/Component.js';
import UIComponentWindow from './UIComponentWindow.js'; import UIComponentWindow from './UIComponentWindow.js';
import Table from './Components/Table.js'; import Table from './Components/Table.js';