mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-10 23:39:31 -05:00
refactor: relocate middleware file
This commit is contained in:
parent
824ad7d180
commit
ae1829e080
9 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
const {media, allow} = require('../../web/middleware');
|
||||
const {media, allow} = require('../../middleware');
|
||||
const mime = require('mime');
|
||||
const _ = require('lodash');
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const _ = require('lodash');
|
||||
const createError = require('http-errors');
|
||||
|
||||
const {allow} = require('../../web/middleware');
|
||||
const {allow} = require('../../middleware');
|
||||
const Utils = require('../../../lib/utils');
|
||||
|
||||
export default function(route, auth, storage, config) {
|
||||
|
|
|
@ -2,7 +2,7 @@ const _ = require('lodash');
|
|||
const Path = require('path');
|
||||
const createError = require('http-errors');
|
||||
|
||||
const {media, expect_json, allow} = require('../../web/middleware');
|
||||
const {media, expect_json, allow} = require('../../middleware');
|
||||
const Notify = require('../../../lib/notify');
|
||||
const Utils = require('../../../lib/utils');
|
||||
const mime = require('mime');
|
||||
|
|
|
@ -13,7 +13,7 @@ import publish from './api/publish';
|
|||
import search from './api/search';
|
||||
import pkg from './api/package';
|
||||
|
||||
const {match, validate_name, validatePackage, encodeScopePackage, anti_loop} = require('../web/middleware');
|
||||
const {match, validate_name, validatePackage, encodeScopePackage, anti_loop} = require('../middleware');
|
||||
|
||||
export default function(config: Config, auth: IAuth, storage: IStorage) {
|
||||
/* eslint new-cap:off */
|
||||
|
|
|
@ -11,7 +11,7 @@ import apiEndpoint from './endpoint';
|
|||
|
||||
const Logger = require('../lib/logger');
|
||||
const Config = require('../lib/config');
|
||||
const Middleware = require('./web/middleware');
|
||||
const Middleware = require('./middleware');
|
||||
const Cats = require('../lib/status-cats');
|
||||
|
||||
export default function(configHash) {
|
||||
|
|
|
@ -4,9 +4,9 @@ import {
|
|||
validate_name as utilValidateName,
|
||||
validate_package as utilValidatePackage,
|
||||
isObject,
|
||||
ErrorCode} from '../../lib/utils';
|
||||
ErrorCode} from '../lib/utils';
|
||||
|
||||
const Logger = require('../../lib/logger');
|
||||
const Logger = require('../lib/logger');
|
||||
|
||||
export function match(regexp) {
|
||||
return function(req, res, next, value) {
|
|
@ -5,7 +5,7 @@ import addPackageWebApi from './endpoint/package';
|
|||
import addSearchWebApi from './endpoint/search';
|
||||
|
||||
import Search from '../../lib/search';
|
||||
import {match, validate_name, validatePackage, securityIframe} from './middleware';
|
||||
import {match, validate_name, validatePackage, securityIframe} from '../middleware';
|
||||
|
||||
const route = Router(); /* eslint new-cap: 0 */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
import {addScope, addGravatarSupport, deleteProperties, sortByName} from '../../../lib/utils';
|
||||
import {allow} from '../middleware';
|
||||
import {allow} from '../../middleware';
|
||||
import async from 'async';
|
||||
import marked from 'marked';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import fs from 'fs';
|
|||
import Search from '../../lib/search';
|
||||
import * as Utils from '../../lib/utils';
|
||||
|
||||
const {securityIframe} = require('./middleware');
|
||||
const {securityIframe} = require('../middleware');
|
||||
/* eslint new-cap:off */
|
||||
const router = express.Router();
|
||||
const env = require('../../config/env');
|
||||
|
|
Loading…
Add table
Reference in a new issue