mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
aling eslint config with main branch (#3238)
* chore: update linter tools * fix: eslint warnings * fix: eslint warnings * chore: set max warnings
This commit is contained in:
parent
f8df6d2ef9
commit
23b5c1d6ef
101 changed files with 574 additions and 447 deletions
|
@ -1,3 +1,4 @@
|
|||
# files
|
||||
node_modules
|
||||
coverage/
|
||||
wiki/
|
||||
|
@ -5,10 +6,16 @@ static/
|
|||
flow-typed/
|
||||
website/
|
||||
build/
|
||||
Dockerfile
|
||||
test/unit/partials/
|
||||
types/custom.d.ts
|
||||
LICENSE
|
||||
.pnp.js
|
||||
|
||||
# extensions
|
||||
*.md
|
||||
*.lock
|
||||
*.yaml
|
||||
Dockerfile
|
||||
*.rpi
|
||||
*.html
|
||||
*.scss
|
||||
|
@ -16,8 +23,3 @@ Dockerfile
|
|||
*.jpg
|
||||
*.sh
|
||||
*.ico
|
||||
test/unit/partials/
|
||||
types/custom.d.ts
|
||||
docker-examples/
|
||||
LICENSE
|
||||
.pnp.js
|
||||
|
|
BIN
.yarn/cache/@babel-runtime-corejs3-npm-7.18.3-076e6beb32-cdfe57255d.zip
vendored
Normal file
BIN
.yarn/cache/@babel-runtime-corejs3-npm-7.18.3-076e6beb32-cdfe57255d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@babel-runtime-npm-7.18.3-1883c70fa6-70aa471de7.zip
vendored
Normal file
BIN
.yarn/cache/@babel-runtime-npm-7.18.3-1883c70fa6-70aa471de7.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@trivago-prettier-plugin-sort-imports-npm-3.2.0-c5d59a3a56-3f52dcdd94.zip
vendored
Normal file
BIN
.yarn/cache/@trivago-prettier-plugin-sort-imports-npm-3.2.0-c5d59a3a56-3f52dcdd94.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@types-json-schema-npm-7.0.11-79462ae5ca-5f32333a4f.zip
vendored
Normal file
BIN
.yarn/cache/@types-json-schema-npm-7.0.11-79462ae5ca-5f32333a4f.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-5.22.0-73921901f2-2efadb991e.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-5.22.0-73921901f2-2efadb991e.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-parser-npm-5.22.0-79ad1d0156-d15e01aaba.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-parser-npm-5.22.0-79ad1d0156-d15e01aaba.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.22.0-0d5f18433c-ccf6299799.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.22.0-0d5f18433c-ccf6299799.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.28.0-226e0104a0-5bfa78508c.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.28.0-226e0104a0-5bfa78508c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-5.22.0-b6cda0654b-204fed84f1.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-5.22.0-b6cda0654b-204fed84f1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-types-npm-5.22.0-1fd3cf9dec-f09eb46c74.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-types-npm-5.22.0-1fd3cf9dec-f09eb46c74.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-types-npm-5.28.0-1ca2d9fd34-724237c381.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-types-npm-5.28.0-1ca2d9fd34-724237c381.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.22.0-daef66b0fe-17d5dbf33c.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.22.0-daef66b0fe-17d5dbf33c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.28.0-295ef500dc-bbd28f457c.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.28.0-295ef500dc-bbd28f457c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.22.0-90d9a70166-9ef37f95f6.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.22.0-90d9a70166-9ef37f95f6.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.28.0-4141c5605c-83f0d2acd4.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.28.0-4141c5605c-83f0d2acd4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.22.0-3640d09d3e-7f73bc2842.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.22.0-3640d09d3e-7f73bc2842.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.28.0-a8c415586b-e548ea7886.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.28.0-a8c415586b-e548ea7886.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/aria-query-npm-4.2.2-e0c4f1a309-dc7631b6f9.zip
vendored
Normal file
BIN
.yarn/cache/aria-query-npm-4.2.2-e0c4f1a309-dc7631b6f9.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/ast-types-flow-npm-0.0.7-7d32a3abf5-4211a734ae.zip
vendored
Normal file
BIN
.yarn/cache/ast-types-flow-npm-0.0.7-7d32a3abf5-4211a734ae.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/axe-core-npm-4.4.2-4872658842-12057e1eec.zip
vendored
Normal file
BIN
.yarn/cache/axe-core-npm-4.4.2-4872658842-12057e1eec.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/axobject-query-npm-2.2.0-6553738f52-c963a3ba9f.zip
vendored
Normal file
BIN
.yarn/cache/axobject-query-npm-2.2.0-6553738f52-c963a3ba9f.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-1da6e47f7c.zip
vendored
Normal file
BIN
.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-1da6e47f7c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/core-js-pure-npm-3.23.1-352ee71e9f-bb20413b8f.zip
vendored
Normal file
BIN
.yarn/cache/core-js-pure-npm-3.23.1-352ee71e9f-bb20413b8f.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/damerau-levenshtein-npm-1.0.8-bda7311c69-f2ab4598e3.zip
vendored
Normal file
BIN
.yarn/cache/damerau-levenshtein-npm-1.0.8-bda7311c69-f2ab4598e3.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/emoji-regex-npm-9.2.2-e6fac8d058-f3029ec432.zip
vendored
Normal file
BIN
.yarn/cache/emoji-regex-npm-9.2.2-e6fac8d058-f3029ec432.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/eslint-config-prettier-npm-8.5.0-a1dd58b6d8-ed43f6bfba.zip
vendored
Normal file
BIN
.yarn/cache/eslint-config-prettier-npm-8.5.0-a1dd58b6d8-ed43f6bfba.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/eslint-plugin-jest-npm-26.1.5-d3fedf9af7-958a09fa30.zip
vendored
Normal file
BIN
.yarn/cache/eslint-plugin-jest-npm-26.1.5-d3fedf9af7-958a09fa30.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/eslint-plugin-jsx-a11y-npm-6.5.1-ea493bf2f2-66cbe93962.zip
vendored
Normal file
BIN
.yarn/cache/eslint-plugin-jsx-a11y-npm-6.5.1-ea493bf2f2-66cbe93962.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/eslint-plugin-prettier-npm-4.0.0-e632552861-6ae81c8c43.zip
vendored
Normal file
BIN
.yarn/cache/eslint-plugin-prettier-npm-4.0.0-e632552861-6ae81c8c43.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/eslint-visitor-keys-npm-3.3.0-d329af7c8c-dd2991ba80.zip
vendored
Normal file
BIN
.yarn/cache/eslint-visitor-keys-npm-3.3.0-d329af7c8c-dd2991ba80.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/execa-npm-5.1.1-191347acf5-4286ade8cd.zip
vendored
Normal file
BIN
.yarn/cache/execa-npm-5.1.1-191347acf5-4286ade8cd.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/globals-npm-13.15.0-c0b0c83a7a-e7e4a811de.zip
vendored
Normal file
BIN
.yarn/cache/globals-npm-13.15.0-c0b0c83a7a-e7e4a811de.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/is-core-module-npm-2.9.0-5ba77c35ae-a3a5c33082.zip
vendored
Normal file
BIN
.yarn/cache/is-core-module-npm-2.9.0-5ba77c35ae-a3a5c33082.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/jsx-ast-utils-npm-3.3.0-2a1320dc77-f606ff0acd.zip
vendored
Normal file
BIN
.yarn/cache/jsx-ast-utils-npm-3.3.0-2a1320dc77-f606ff0acd.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/language-subtag-registry-npm-0.3.21-b2d9abe624-91bcb4717a.zip
vendored
Normal file
BIN
.yarn/cache/language-subtag-registry-npm-0.3.21-b2d9abe624-91bcb4717a.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/language-tags-npm-1.0.5-3a50e75c96-a3d30a9118.zip
vendored
Normal file
BIN
.yarn/cache/language-tags-npm-1.0.5-3a50e75c96-a3d30a9118.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/listr2-npm-3.14.0-446f504112-e637d23d07.zip
vendored
Normal file
BIN
.yarn/cache/listr2-npm-3.14.0-446f504112-e637d23d07.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/minimatch-npm-3.1.2-9405269906-1a7584a6de.zip
vendored
Normal file
BIN
.yarn/cache/minimatch-npm-3.1.2-9405269906-1a7584a6de.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-56b3aeedcc.zip
vendored
Normal file
BIN
.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-56b3aeedcc.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/prettier-npm-2.6.2-05918420da-10af3147ee.zip
vendored
Normal file
BIN
.yarn/cache/prettier-npm-2.6.2-05918420da-10af3147ee.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/regexpp-npm-3.2.0-2513f32cfc-91aaccadd0.zip
vendored
Normal file
BIN
.yarn/cache/regexpp-npm-3.2.0-2513f32cfc-91aaccadd0.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/resolve-npm-1.22.1-3980488690-ceb58a1317.zip
vendored
Normal file
BIN
.yarn/cache/resolve-npm-1.22.1-3980488690-ceb58a1317.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/resolve-patch-addf17e57d-2029682d25.zip
vendored
Normal file
BIN
.yarn/cache/resolve-patch-addf17e57d-2029682d25.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/rfdc-npm-1.3.0-272f288ad8-34dd5c5acf.zip
vendored
Normal file
BIN
.yarn/cache/rfdc-npm-1.3.0-272f288ad8-34dd5c5acf.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/rxjs-npm-6.6.7-055046ea3c-1146975cbd.zip
vendored
BIN
.yarn/cache/rxjs-npm-6.6.7-055046ea3c-1146975cbd.zip
vendored
Binary file not shown.
BIN
.yarn/cache/rxjs-npm-7.5.5-d0546b1ccb-424d231f81.zip
vendored
Normal file
BIN
.yarn/cache/rxjs-npm-7.5.5-d0546b1ccb-424d231f81.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/tsconfig-paths-npm-3.14.1-17a815b5c5-f9e00c9b78.zip
vendored
Normal file
BIN
.yarn/cache/tsconfig-paths-npm-3.14.1-17a815b5c5-f9e00c9b78.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tslib-npm-2.4.0-9cb6dc5030-6964ab2376.zip
vendored
Normal file
BIN
.yarn/cache/tslib-npm-2.4.0-9cb6dc5030-6964ab2376.zip
vendored
Normal file
Binary file not shown.
|
@ -6,9 +6,9 @@ module.exports = {
|
|||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:import/typescript',
|
||||
'prettier',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
plugins: ['import', 'jest'],
|
||||
plugins: ['import', 'jest', 'prettier'],
|
||||
env: {
|
||||
es6: true,
|
||||
node: true,
|
||||
|
@ -23,20 +23,18 @@ module.exports = {
|
|||
ecmaVersion: 11,
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true,
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
node: {
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
extensions: ['.js', '.ts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
rules: {
|
||||
curly: ['error', 'all'],
|
||||
'react/prop-types': 0,
|
||||
'jest/no-export': 0,
|
||||
'jest/no-test-callback': 0,
|
||||
'jest/expect-expect': 0,
|
||||
|
@ -49,7 +47,6 @@ module.exports = {
|
|||
'padded-blocks': 'off',
|
||||
'require-jsdoc': 'off',
|
||||
'valid-jsdoc': 'off',
|
||||
'import/order': ['warn'],
|
||||
'eol-last': 'error',
|
||||
'no-irregular-whitespace': 'error',
|
||||
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
|
||||
|
|
20
package.json
20
package.json
|
@ -88,7 +88,7 @@
|
|||
"@commitlint/cli": "12.1.4",
|
||||
"@commitlint/config-conventional": "12.1.4",
|
||||
"@octokit/rest": "18.12.0",
|
||||
"@trivago/prettier-plugin-sort-imports": "3.1.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "3.2.0",
|
||||
"@types/async": "3.2.13",
|
||||
"@types/express": "4.17.13",
|
||||
"@types/express-rate-limit": "5.1.3",
|
||||
|
@ -102,8 +102,8 @@
|
|||
"@types/pino": "6.3.12",
|
||||
"@types/request": "2.48.8",
|
||||
"@types/semver": "7.3.9",
|
||||
"@typescript-eslint/eslint-plugin": "4.33.0",
|
||||
"@typescript-eslint/parser": "4.33.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.22.0",
|
||||
"@typescript-eslint/parser": "5.22.0",
|
||||
"@verdaccio-scope/verdaccio-auth-foo": "0.0.2",
|
||||
"@verdaccio/eslint-config": "^10.0.0",
|
||||
"@verdaccio/types": "10.5.1",
|
||||
|
@ -116,12 +116,14 @@
|
|||
"detect-secrets": "1.0.6",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-google": "0.14.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-babel": "5.3.1",
|
||||
"eslint-plugin-import": "2.25.4",
|
||||
"eslint-plugin-jest": "24.7.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jest": "26.1.5",
|
||||
"eslint-plugin-jsx-a11y": "6.5.1",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-simple-import-sort": "7.0.0",
|
||||
"eslint-plugin-verdaccio": "9.6.1",
|
||||
"eslint-plugin-verdaccio": "10.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"husky": "6.0.0",
|
||||
"jest": "26.6.3",
|
||||
|
@ -133,7 +135,7 @@
|
|||
"nock": "12.0.3",
|
||||
"node-mocks-http": "^1.10.1",
|
||||
"pinst": "2.1.6",
|
||||
"prettier": "2.5.1",
|
||||
"prettier": "2.6.2",
|
||||
"puppeteer": "5.5.0",
|
||||
"rimraf": "3.0.2",
|
||||
"selfsigned": "1.10.14",
|
||||
|
@ -170,7 +172,7 @@
|
|||
"test:all": "yarn run test && yarn run test:functional && yarn run test:e2e & yarn run test:e2e:pkg",
|
||||
"pre:ci": "yarn run lint",
|
||||
"lint": "yarn run type-check && yarn run lint:ts",
|
||||
"lint:ts": "eslint \"**/*.{js,jsx,ts,tsx}\" -c ./eslintrc.js",
|
||||
"lint:ts": "eslint \"**/*.{js,jsx,ts}\" --max-warnings 145 -c ./eslintrc.js",
|
||||
"lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts verdaccio npm yarn",
|
||||
"start": "yarn babel-node --extensions \".ts,.tsx\" src/lib/cli --inspect",
|
||||
"start:brk": "yarn babel-node --extensions \".ts,.tsx\" src/lib/cli --inspect-brk",
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
import { Router } from 'express';
|
||||
|
||||
import { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../../../../types';
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
|
||||
*/
|
||||
import { Response, Router } from 'express';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
import { Router } from 'express';
|
||||
|
||||
import { Package } from '@verdaccio/types';
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
/**
|
||||
* @prettier
|
||||
*/
|
||||
import express, { Request, Response, Router } from 'express';
|
||||
import { Request, Response, Router } from 'express';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { Config, JWTSignOptions, RemoteUser } from '@verdaccio/types';
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const APP_ROOT = path.resolve(__dirname, '../../');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import constants from 'constants';
|
||||
import { Application } from 'express';
|
||||
import express from 'express';
|
||||
import { Application } from 'express';
|
||||
import fs from 'fs';
|
||||
import http from 'http';
|
||||
import https from 'https';
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
import assert from 'assert';
|
||||
import _ from 'lodash';
|
||||
import minimatch from 'minimatch';
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
*/
|
||||
|
||||
// @flow
|
||||
|
||||
export const DEFAULT_PORT = '4873';
|
||||
export const DEFAULT_PROTOCOL = 'http';
|
||||
export const DEFAULT_DOMAIN = 'localhost';
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
import _ from 'lodash';
|
||||
import semver from 'semver';
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import Stream from 'stream';
|
|||
|
||||
import { VerdaccioError } from '@verdaccio/commons-api';
|
||||
import { ReadTarball } from '@verdaccio/streams';
|
||||
import { GenericBody, Token, TokenFilter } from '@verdaccio/types';
|
||||
import { Callback, Config, DistFile, IReadTarball, IUploadTarball, Logger, MergeTags, Package, Version, Versions } from '@verdaccio/types';
|
||||
import { GenericBody, Token, TokenFilter } from '@verdaccio/types';
|
||||
|
||||
import { IGetPackageOptions, IPluginFilters, IProxy, IStorage, IStorageHandler, ISyncUplinks, ProxyList, StringValue } from '../../types';
|
||||
import { logger } from '../lib/logger';
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
{
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"env": {
|
||||
"node": true,
|
||||
"mocha": true,
|
||||
"es6": true,
|
||||
"browser": true
|
||||
},
|
||||
|
@ -24,10 +20,7 @@
|
|||
}
|
||||
],
|
||||
"no-useless-escape": 0,
|
||||
"@typescript-eslint/explicit-function-return-type": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"handle-callback-err": 0,
|
||||
"import/order": 0,
|
||||
"prefer-const": 0,
|
||||
"prefer-promise-reject-errors": 1
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { IReadTarball, IUploadTarball } from '@verdaccio/streams';
|
||||
import { Config as AppConfig, IBasicAuth, IPluginMiddleware, IStorageManager, RemoteUser } from '@verdaccio/types';
|
||||
import { Package } from '@verdaccio/types';
|
||||
import { Config as AppConfig, IBasicAuth, IPluginMiddleware, IStorageManager, RemoteUser } from '@verdaccio/types';
|
||||
|
||||
import Config from '../../../../src/lib/config';
|
||||
import { generatePackageTemplate } from '../../../../src/lib/storage-utils';
|
||||
|
|
|
@ -1,41 +1,16 @@
|
|||
import _ from 'lodash';
|
||||
import nock from 'nock';
|
||||
import path from 'path';
|
||||
import rimraf from 'rimraf';
|
||||
import { Readable } from 'stream';
|
||||
import request from 'supertest';
|
||||
|
||||
import endPointAPI from '../../../../src/api';
|
||||
import { API_ERROR, API_MESSAGE, HEADERS, HEADER_TYPE, HTTP_STATUS, TOKEN_BEARER } from '../../../../src/lib/constants';
|
||||
import { buildToken, encodeScopedUri } from '../../../../src/lib/utils';
|
||||
import { HEADERS, HEADER_TYPE, HTTP_STATUS } from '../../../../src/lib/constants';
|
||||
import { DOMAIN_SERVERS } from '../../../functional/config.functional';
|
||||
import { generateUnPublishURI, getNewToken, getPackage, putPackage, verifyPackageVersionDoesExist } from '../../__helper/api';
|
||||
import { mockServer } from '../../__helper/mock';
|
||||
import { generateDeprecateMetadata, generatePackageMetadata, generatePackageUnpublish, generateStarMedatada, generateVersion } from '../../__helper/utils';
|
||||
import configDefault from '../../partials/config';
|
||||
import publishMetadata from '../../partials/publish-api';
|
||||
|
||||
const sleep = (delay) => {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, delay);
|
||||
});
|
||||
};
|
||||
|
||||
require('../../../../src/lib/logger').setup([{ type: 'stdout', format: 'pretty', level: 'debug' }]);
|
||||
|
||||
const credentials = { name: 'jota', password: 'secretPass' };
|
||||
|
||||
const putVersion = (app, name, publishMetadata) => {
|
||||
return request(app)
|
||||
.put(name)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.send(JSON.stringify(publishMetadata))
|
||||
.expect(HTTP_STATUS.CREATED)
|
||||
.set('accept', 'gzip')
|
||||
.set('accept-encoding', HEADERS.JSON)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON);
|
||||
};
|
||||
|
||||
describe('endpoint unit test', () => {
|
||||
let app;
|
||||
const mockServerPort = 55549;
|
||||
|
|
|
@ -19,7 +19,6 @@ import { setup } from '../../../../src/lib/logger';
|
|||
import { buildToken, convertPayloadToBase64, parseConfigFile } from '../../../../src/lib/utils';
|
||||
import { IAuth } from '../../../../types';
|
||||
import { parseConfigurationFile } from '../../__helper';
|
||||
// $FlowFixMe
|
||||
import configExample from '../../partials/config';
|
||||
|
||||
setup([]);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue