mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
refactor: devDependencies strictly defined in each package (#1884)
* refactor: new babel preset * chore: using pnpm let's see how it goes, all seems works fine by far, pretty solid.
This commit is contained in:
parent
eb0dae5fa7
commit
9f2a29a275
22
.babelrc
Normal file
22
.babelrc
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"presets": [ [
|
||||||
|
"@babel/env",
|
||||||
|
{
|
||||||
|
"targets": {
|
||||||
|
"node": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@babel/typescript"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"babel-plugin-dynamic-import-node",
|
||||||
|
"@babel/proposal-class-properties",
|
||||||
|
"@babel/proposal-object-rest-spread",
|
||||||
|
"@babel/plugin-proposal-optional-chaining",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator"
|
||||||
|
],
|
||||||
|
"ignore": [
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -1,143 +0,0 @@
|
|||||||
version: 2.1
|
|
||||||
|
|
||||||
executors:
|
|
||||||
node_latest_browser:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:latest-browsers
|
|
||||||
node_latest:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:13
|
|
||||||
node_lts_12:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:12
|
|
||||||
default_executor: node_latest
|
|
||||||
|
|
||||||
aliases:
|
|
||||||
- &repo_path
|
|
||||||
~/verdaccio
|
|
||||||
- &defaults
|
|
||||||
working_directory: *repo_path
|
|
||||||
- &yarn_cache_key
|
|
||||||
yarn-sha-{{ checksum "yarn.lock" }}
|
|
||||||
- &coverage_key
|
|
||||||
coverage-{{ .Branch }}-{{ .Revision }}
|
|
||||||
- &ignore_non_dev_branches
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- gh-pages
|
|
||||||
- /release\/.*/
|
|
||||||
|
|
||||||
commands:
|
|
||||||
restore_repo:
|
|
||||||
description: Restore repository from workspace
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: *repo_path
|
|
||||||
run_test:
|
|
||||||
description: Run test and functional test
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: Test
|
|
||||||
command: yarn run test
|
|
||||||
- store_test_results:
|
|
||||||
path: reports/
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
<<: *defaults
|
|
||||||
executor: default_executor
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
key: *yarn_cache_key
|
|
||||||
- run:
|
|
||||||
name: Install dependencies
|
|
||||||
command: yarn
|
|
||||||
- run:
|
|
||||||
name: Install dependencies
|
|
||||||
command: yarn bootstrap
|
|
||||||
- run:
|
|
||||||
name: Prepare CI
|
|
||||||
command: yarn lint
|
|
||||||
- run:
|
|
||||||
name: Clean project
|
|
||||||
command: yarn clean
|
|
||||||
- run:
|
|
||||||
name: Build project
|
|
||||||
command: yarn build
|
|
||||||
- save_cache:
|
|
||||||
key: *yarn_cache_key
|
|
||||||
paths:
|
|
||||||
- ~/.yarn
|
|
||||||
- ~/.cache/yarn
|
|
||||||
- node_modules
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: *repo_path
|
|
||||||
paths:
|
|
||||||
- ./*
|
|
||||||
|
|
||||||
test_node_latest:
|
|
||||||
<<: *defaults
|
|
||||||
executor: node_latest
|
|
||||||
steps:
|
|
||||||
- restore_repo
|
|
||||||
- run_test
|
|
||||||
- save_cache:
|
|
||||||
key: *coverage_key
|
|
||||||
paths:
|
|
||||||
- coverage
|
|
||||||
test_node_lts_12:
|
|
||||||
<<: *defaults
|
|
||||||
executor: node_lts_12
|
|
||||||
steps:
|
|
||||||
- restore_repo
|
|
||||||
- run_test
|
|
||||||
# test_e2e_cli:
|
|
||||||
# <<: *defaults
|
|
||||||
# executor: node_latest
|
|
||||||
# steps:
|
|
||||||
# - restore_repo
|
|
||||||
# - run:
|
|
||||||
# name: Test End-to-End ClI
|
|
||||||
# command: yarn run test:e2e:cli
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
<<: *defaults
|
|
||||||
executor: default_executor
|
|
||||||
steps:
|
|
||||||
- restore_repo
|
|
||||||
- restore_cache:
|
|
||||||
key: *coverage_key
|
|
||||||
- run:
|
|
||||||
name: Publish coverage
|
|
||||||
command: yarn run coverage:publish
|
|
||||||
- store_artifacts:
|
|
||||||
path: coverage
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
workflow:
|
|
||||||
jobs:
|
|
||||||
- prepare:
|
|
||||||
<<: *ignore_non_dev_branches
|
|
||||||
- test_node_latest:
|
|
||||||
requires:
|
|
||||||
- prepare
|
|
||||||
<<: *ignore_non_dev_branches
|
|
||||||
- test_node_lts_12:
|
|
||||||
requires:
|
|
||||||
- prepare
|
|
||||||
<<: *ignore_non_dev_branches
|
|
||||||
# - test_e2e_cli:
|
|
||||||
# requires:
|
|
||||||
# - prepare
|
|
||||||
# - test_node_latest
|
|
||||||
# - test_node_lts_12
|
|
||||||
# <<: *ignore_non_dev_branches
|
|
||||||
# - coverage:
|
|
||||||
# requires:
|
|
||||||
# - test_e2e_cli
|
|
||||||
# <<: *ignore_non_dev_branches
|
|
116
.eslintrc
116
.eslintrc
@ -1,21 +1,123 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"@verdaccio"
|
"eslint:recommended",
|
||||||
|
"google",
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:jest/recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:jsx-a11y/recommended",
|
||||||
|
"prettier/@typescript-eslint"
|
||||||
],
|
],
|
||||||
|
"plugins": [
|
||||||
|
"import",
|
||||||
|
"jest",
|
||||||
|
"prettier",
|
||||||
|
"jsx-a11y",
|
||||||
|
"react-hooks"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"es6": true,
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"jest": true
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"__APP_VERSION__": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"allowImportExportEverywhere": true,
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaVersion": 2019,
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"impliedStrict": true,
|
||||||
|
"jsx": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"react": {
|
||||||
|
"version": "detect"
|
||||||
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
"node": {
|
||||||
|
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-var-requires": 0,
|
"curly": [
|
||||||
|
"error", "all"
|
||||||
|
],
|
||||||
|
"prettier/prettier": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"endOfLine": "auto",
|
||||||
|
"printWidth": 120,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": true,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"singleQuote": true,
|
||||||
|
"bracketSpacing": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"keyword-spacing": "off",
|
||||||
|
"no-tabs": "off",
|
||||||
|
"no-useless-escape": "off",
|
||||||
|
"padded-blocks": "off",
|
||||||
|
"require-jsdoc": "off",
|
||||||
|
"valid-jsdoc": "off",
|
||||||
|
"import/order": ["warn"],
|
||||||
|
"react/prop-types": 0,
|
||||||
|
"jest/no-export": 0,
|
||||||
|
"jest/no-test-callback": 0,
|
||||||
|
"jest/no-try-expect": 1,
|
||||||
|
"jest/no-identical-title": 1,
|
||||||
|
"eol-last": "warn",
|
||||||
|
"no-irregular-whitespace": "warn",
|
||||||
|
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
|
||||||
|
"no-trailing-spaces": "warn",
|
||||||
|
|
||||||
|
"camelcase": "off",
|
||||||
|
"guard-for-in": "error",
|
||||||
|
"new-cap": "error",
|
||||||
|
"max-len": ["warn", 180],
|
||||||
|
"no-console": ["error", { "allow": ["warn"] }],
|
||||||
|
"no-constant-condition": "error",
|
||||||
|
"no-debugger": "error",
|
||||||
|
"no-empty": "error",
|
||||||
|
"no-fallthrough": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-new-require": "error",
|
||||||
|
"no-undef": "error",
|
||||||
|
"no-unreachable": "error",
|
||||||
|
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
|
||||||
|
"no-var": "error",
|
||||||
|
"one-var": "error",
|
||||||
|
"prefer-rest-params": "warn",
|
||||||
|
"prefer-spread": "warn",
|
||||||
|
"semi": 0,
|
||||||
|
"@typescript-eslint/camelcase": 0,
|
||||||
"@typescript-eslint/ban-ts-ignore": 0,
|
"@typescript-eslint/ban-ts-ignore": 0,
|
||||||
|
"@typescript-eslint/no-var-requires": 0,
|
||||||
"@typescript-eslint/no-inferrable-types": 0,
|
"@typescript-eslint/no-inferrable-types": 0,
|
||||||
|
"@typescript-eslint/interface-name-prefix": 0,
|
||||||
"@typescript-eslint/no-empty-function": 0,
|
"@typescript-eslint/no-empty-function": 0,
|
||||||
"@typescript-eslint/no-this-alias": ["warn"],
|
"@typescript-eslint/no-this-alias": 0,
|
||||||
"@typescript-eslint/no-use-before-define": 0,
|
"@typescript-eslint/no-use-before-define": 0,
|
||||||
"@typescript-eslint/array-type": ["warn"],
|
"@typescript-eslint/array-type": ["warn"],
|
||||||
"@typescript-eslint/no-explicit-any": 0,
|
"@typescript-eslint/no-explicit-any": 0,
|
||||||
"@typescript-eslint/indent": 0,
|
"@typescript-eslint/indent": 0,
|
||||||
"@typescript-eslint/interface-name-prefix": 0,
|
"@typescript-eslint/ban-ts-comment": 0,
|
||||||
"import/order": 0,
|
"@typescript-eslint/ban-types": 0,
|
||||||
"handle-callback-err": 1,
|
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||||
"prefer-const": 1,
|
"@typescript-eslint/explicit-member-accessibility": ["warn"],
|
||||||
|
"@typescript-eslint/prefer-optional-chain": ["warn"],
|
||||||
|
"handle-callback-err": 0,
|
||||||
|
"prefer-const": 0,
|
||||||
"prefer-promise-reject-errors": 1
|
"prefer-promise-reject-errors": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
0
.github/workflows/e2e-angular-cli-workflow.yml → .github/disabled/e2e-angular-cli-workflow.yml
vendored
0
.github/workflows/e2e-angular-cli-workflow.yml → .github/disabled/e2e-angular-cli-workflow.yml
vendored
0
.github/workflows/e2e-gatsbyjs-cli-workflow.yml → .github/disabled/e2e-gatsbyjs-cli-workflow.yml
vendored
0
.github/workflows/e2e-gatsbyjs-cli-workflow.yml → .github/disabled/e2e-gatsbyjs-cli-workflow.yml
vendored
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -10,7 +10,7 @@ on:
|
|||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
- 'jest/**'
|
- 'jest/**'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'lerna.json'
|
- 'pnpm-workspace.yaml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
@ -19,25 +19,27 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node_version: [10, 12, 13, 14]
|
node_version: [10, 12, 14]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.1
|
- uses: actions/checkout@v2.3.1
|
||||||
- name: Use Node ${{ matrix.node_version }}
|
- name: Use Node ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@v2.1.1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node_version: ${{ matrix.node_version }}
|
node_version: ${{ matrix.node_version }}
|
||||||
|
- name: Install pnpm
|
||||||
|
run: npm i -g pnpm
|
||||||
- name: Install
|
- name: Install
|
||||||
run: yarn --frozen-lockfile
|
run: pnpm recursive install
|
||||||
- name: Bootstrap Lerna
|
- name: Install packages
|
||||||
run: yarn bootstrap
|
run: pnpm install -r
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: yarn lint
|
run: pnpm lint
|
||||||
- name: Clean
|
- name: Clean
|
||||||
run: yarn clean
|
run: pnpm clean
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: pnpm build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: pnpm test
|
||||||
|
@ -16,7 +16,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.1
|
- uses: actions/checkout@v2.3.1
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn docker
|
run: npm run docker
|
||||||
env:
|
env:
|
||||||
VERDACCIO_BUILD_REGISTRY: https://registry.verdaccio.org
|
VERDACCIO_BUILD_REGISTRY: https://registry.verdaccio.org
|
||||||
|
|
||||||
|
2
.npmrc
2
.npmrc
@ -1,2 +1,2 @@
|
|||||||
always-auth = true
|
always-auth = true
|
||||||
fetch-retries="10"
|
recursive-install = true
|
||||||
|
14
Dockerfile
14
Dockerfile
@ -1,6 +1,6 @@
|
|||||||
FROM node:12.18.3-alpine as builder
|
FROM node:12.18.3-alpine as builder
|
||||||
|
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=development \
|
||||||
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
||||||
|
|
||||||
RUN apk --no-cache add openssl ca-certificates wget && \
|
RUN apk --no-cache add openssl ca-certificates wget && \
|
||||||
@ -12,12 +12,12 @@ RUN apk --no-cache add openssl ca-certificates wget && \
|
|||||||
WORKDIR /opt/verdaccio-build
|
WORKDIR /opt/verdaccio-build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn config set registry $VERDACCIO_BUILD_REGISTRY && \
|
RUN npm -g i pnpm@latest && \
|
||||||
yarn install --production=false && \
|
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
|
||||||
yarn build && \
|
pnpm recursive install --frozen-lockfile && \
|
||||||
yarn lint && \
|
pnpm run build && \
|
||||||
yarn cache clean && \
|
pnpm run lint && \
|
||||||
yarn install --production=true
|
pnpm install --prod
|
||||||
|
|
||||||
FROM node:12.18.3-alpine
|
FROM node:12.18.3-alpine
|
||||||
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/babel-preset": "9.4.0",
|
"@verdaccio/babel-preset": "9.4.0",
|
||||||
"@verdaccio/eslint-config": "9.3.2"
|
"@verdaccio/cli": "5.0.0-alpha.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
lerna.json
14
lerna.json
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5.0.0-alpha.0",
|
|
||||||
"packages": [
|
|
||||||
"packages/*"
|
|
||||||
],
|
|
||||||
"npmClient": "yarn",
|
|
||||||
"useWorkspaces": true,
|
|
||||||
"stream": true,
|
|
||||||
"command": {
|
|
||||||
"publish": {
|
|
||||||
"message": "chore: publish release %s"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
65
package.json
65
package.json
@ -9,15 +9,35 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://verdaccio.org",
|
"homepage": "https://verdaccio.org",
|
||||||
"private": true,
|
"private": true,
|
||||||
"workspaces": [
|
|
||||||
"packages/*",
|
|
||||||
"website"
|
|
||||||
],
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/verdaccio"
|
"url": "https://opencollective.com/verdaccio"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/cli": "7.10.5",
|
||||||
|
"@babel/core": "7.10.5",
|
||||||
|
"@babel/node": "7.10.5",
|
||||||
|
"@babel/plugin-proposal-class-properties": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-decorators": "7.10.5",
|
||||||
|
"@babel/plugin-proposal-export-namespace-from": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-function-sent": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-json-strings": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-numeric-separator": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-object-rest-spread": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-optional-chaining": "7.10.4",
|
||||||
|
"@babel/plugin-proposal-throw-expressions": "7.10.4",
|
||||||
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
||||||
|
"@babel/plugin-syntax-import-meta": "7.10.4",
|
||||||
|
"@babel/plugin-transform-async-to-generator": "7.10.4",
|
||||||
|
"@babel/plugin-transform-classes": "7.10.4",
|
||||||
|
"@babel/plugin-transform-runtime": "7.10.5",
|
||||||
|
"@babel/polyfill": "7.10.4",
|
||||||
|
"@babel/preset-env": "7.10.4",
|
||||||
|
"@babel/preset-react": "7.10.4",
|
||||||
|
"@babel/preset-typescript": "7.10.4",
|
||||||
|
"@babel/register": "7.10.5",
|
||||||
|
"@babel/runtime": "7.10.5",
|
||||||
"@commitlint/cli": "8.3.5",
|
"@commitlint/cli": "8.3.5",
|
||||||
"@commitlint/config-conventional": "8.2.0",
|
"@commitlint/config-conventional": "8.2.0",
|
||||||
"@octokit/rest": "17.0.0",
|
"@octokit/rest": "17.0.0",
|
||||||
@ -32,13 +52,29 @@
|
|||||||
"@types/request": "2.48.3",
|
"@types/request": "2.48.3",
|
||||||
"@types/semver": "7.2.0",
|
"@types/semver": "7.2.0",
|
||||||
"@types/supertest": "2.0.9",
|
"@types/supertest": "2.0.9",
|
||||||
"@verdaccio/babel-preset": "9.6.1",
|
"@typescript-eslint/eslint-plugin": "^3.8.0",
|
||||||
"@verdaccio/eslint-config": "9.3.2",
|
"@typescript-eslint/parser": "^3.8.0",
|
||||||
"@verdaccio/types": "9.5.0",
|
"@verdaccio/types": "9.5.0",
|
||||||
|
"babel-core": "7.0.0-bridge.0",
|
||||||
|
"babel-eslint": "10.1.0",
|
||||||
|
"babel-jest": "26.1.0",
|
||||||
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||||
|
"babel-plugin-emotion": "10.0.33",
|
||||||
"codecov": "3.6.1",
|
"codecov": "3.6.1",
|
||||||
"cross-env": "7.0.2",
|
"cross-env": "7.0.2",
|
||||||
"detect-secrets": "1.0.6",
|
"detect-secrets": "1.0.6",
|
||||||
"eslint": "7.0.0",
|
"eslint": "7.5.0",
|
||||||
|
"eslint-config-google": "0.14.0",
|
||||||
|
"eslint-config-prettier": "6.10.0",
|
||||||
|
"eslint-plugin-babel": "5.3.0",
|
||||||
|
"eslint-plugin-import": "2.22.0",
|
||||||
|
"eslint-plugin-jest": "23.8.0",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||||
|
"eslint-plugin-prettier": "3.1.2",
|
||||||
|
"eslint-plugin-react": "^7.20.5",
|
||||||
|
"eslint-plugin-react-hooks": "^4.0.8",
|
||||||
|
"eslint-plugin-simple-import-sort": "5.0.2",
|
||||||
|
"eslint-plugin-verdaccio": "8.4.2",
|
||||||
"fs-extra": "8.1.0",
|
"fs-extra": "8.1.0",
|
||||||
"get-stdin": "7.0.0",
|
"get-stdin": "7.0.0",
|
||||||
"husky": "2.7.0",
|
"husky": "2.7.0",
|
||||||
@ -47,7 +83,6 @@
|
|||||||
"jest-environment-node": "26.1.0",
|
"jest-environment-node": "26.1.0",
|
||||||
"jest-junit": "11.0.1",
|
"jest-junit": "11.0.1",
|
||||||
"kleur": "3.0.3",
|
"kleur": "3.0.3",
|
||||||
"lerna": "3.22.1",
|
|
||||||
"lint-staged": "8.2.1",
|
"lint-staged": "8.2.1",
|
||||||
"nock": "12.0.3",
|
"nock": "12.0.3",
|
||||||
"prettier": "1.19.1",
|
"prettier": "1.19.1",
|
||||||
@ -61,21 +96,13 @@
|
|||||||
"verdaccio-memory": "9.7.0"
|
"verdaccio-memory": "9.7.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "lerna bootstrap",
|
|
||||||
"debug": "node debug/bootstrap.js",
|
"debug": "node debug/bootstrap.js",
|
||||||
"dev": "cross-env BABEL_ENV=registry babel-node --extensions \".ts,.tsx\" packages/cli/src",
|
"dev": "cross-env BABEL_ENV=registry babel-node --extensions \".ts,.tsx\" packages/cli/src",
|
||||||
"clean": "lerna run clean",
|
"clean": "pnpm recursive run clean",
|
||||||
"build": "lerna run build",
|
"build": "pnpm recursive run build",
|
||||||
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
|
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
|
||||||
"release": "lerna version --conventional-commits",
|
|
||||||
"version:canary": "lerna version --conventional-commits --conventional-prerelease --no-commit-hooks --exact --no-changelog --yes --preid alpha",
|
|
||||||
"publish:canary": "lerna publish from-package --canary --yes --no-git-reset --no-git-tag-version --no-push --force-publish --concurrency 1",
|
|
||||||
"release:from-prerelease": "lerna version --conventional-commits --conventional-graduate",
|
|
||||||
"release:prerelease": "lerna version --conventional-commits --conventional-prerelease --preid next --registry http://localhost:4873",
|
|
||||||
"release:publish": "lerna publish from-git",
|
|
||||||
"release:publish-prerelease": "lerna publish from-git --pre-dist-tag next",
|
|
||||||
"lint": "eslint \"packages/**/@(src|tests|test)/**\"",
|
"lint": "eslint \"packages/**/@(src|tests|test)/**\"",
|
||||||
"test": "lerna run test --concurrency 1",
|
"test": "pnpm recursive test",
|
||||||
"test:e2e:cli": "cross-env NODE_ENV=test jest --config ./test/e2e-cli/jest.config.e2e.cli.js --passWithNoTests",
|
"test:e2e:cli": "cross-env NODE_ENV=test jest --config ./test/e2e-cli/jest.config.e2e.cli.js --passWithNoTests",
|
||||||
"website:lint": "cd website && yarn lint",
|
"website:lint": "cd website && yarn lint",
|
||||||
"website:develop": "cd website && yarn develop",
|
"website:develop": "cd website && yarn develop",
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -37,6 +37,8 @@
|
|||||||
"mime": "2.4.4"
|
"mime": "2.4.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/config": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/server": "5.0.0-alpha.0",
|
||||||
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
||||||
"@verdaccio/types": "9.5.0",
|
"@verdaccio/types": "9.5.0",
|
||||||
"body-parser": "1.19.0",
|
"body-parser": "1.19.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import Path from 'path';
|
import Path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
import mime from 'mime';
|
import mime from 'mime';
|
||||||
import { Router } from 'express';
|
import { Router } from 'express';
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import { getApiToken } from '@verdaccio/auth';
|
|||||||
import { logger } from '@verdaccio/logger';
|
import { logger } from '@verdaccio/logger';
|
||||||
import { Response, Router } from 'express';
|
import { Response, Router } from 'express';
|
||||||
|
|
||||||
import {$NextFunctionVer, $RequestExtend, IAuth, IStorageHandler} from '../../../types';
|
|
||||||
import { Config, RemoteUser, Token } from '@verdaccio/types';
|
import { Config, RemoteUser, Token } from '@verdaccio/types';
|
||||||
|
import {$NextFunctionVer, $RequestExtend, IAuth, IStorageHandler} from '../../../types';
|
||||||
|
|
||||||
export type NormalizeToken = Token & {
|
export type NormalizeToken = Token & {
|
||||||
created: string;
|
created: string;
|
||||||
|
@ -8,10 +8,10 @@ import { Config } from '@verdaccio/config';
|
|||||||
import { Storage } from '@verdaccio/store';
|
import { Storage } from '@verdaccio/store';
|
||||||
import { final, handleError, errorReportingMiddleware } from '@verdaccio/middleware';
|
import { final, handleError, errorReportingMiddleware } from '@verdaccio/middleware';
|
||||||
import { Auth } from '@verdaccio/auth';
|
import { Auth } from '@verdaccio/auth';
|
||||||
import apiEndpoints from '../../src';
|
|
||||||
import {IAuth} from "@verdaccio/dev-types";
|
import {IAuth} from "@verdaccio/dev-types";
|
||||||
import {HEADER_TYPE, HTTP_STATUS, generatePackageMetadata} from "@verdaccio/dev-commons";
|
import {HEADER_TYPE, HTTP_STATUS, generatePackageMetadata} from "@verdaccio/dev-commons";
|
||||||
import {HEADERS} from "@verdaccio/commons-api";
|
import {HEADERS} from "@verdaccio/commons-api";
|
||||||
|
import apiEndpoints from '../../src';
|
||||||
|
|
||||||
const getConf = (conf) => {
|
const getConf = (conf) => {
|
||||||
const configPath = path.join(__dirname, 'config', conf);
|
const configPath = path.join(__dirname, 'config', conf);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
|
|
||||||
import {initializeServer, publishTaggedVersion, publishVersion} from './_helper';
|
|
||||||
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
||||||
import {HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
import {HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
||||||
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
||||||
|
import {initializeServer, publishTaggedVersion, publishVersion} from './_helper';
|
||||||
|
|
||||||
const mockApiJWTmiddleware = jest.fn(() =>
|
const mockApiJWTmiddleware = jest.fn(() =>
|
||||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
|
|
||||||
import {initializeServer } from './_helper';
|
|
||||||
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
||||||
import {HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
import {HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
||||||
|
import {initializeServer } from './_helper';
|
||||||
|
|
||||||
describe('ping', () => {
|
describe('ping', () => {
|
||||||
test('should return the reply the ping', async () => {
|
test('should return the reply the ping', async () => {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {initializeServer, publishVersion} from './_helper';
|
|
||||||
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
||||||
import {API_ERROR, API_MESSAGE, generatePackageMetadata, HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
import {API_ERROR, API_MESSAGE, generatePackageMetadata, HEADER_TYPE, HEADERS} from '@verdaccio/dev-commons';
|
||||||
import {$RequestExtend, $ResponseExtend} from '@verdaccio/dev-types';
|
import {$RequestExtend, $ResponseExtend} from '@verdaccio/dev-types';
|
||||||
import supertest from "supertest";
|
import supertest from "supertest";
|
||||||
|
import {initializeServer, publishVersion} from './_helper';
|
||||||
|
|
||||||
const mockApiJWTmiddleware = jest.fn(() =>
|
const mockApiJWTmiddleware = jest.fn(() =>
|
||||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
|
|
||||||
import { initializeServer } from './_helper';
|
|
||||||
import { HTTP_STATUS, API_ERROR } from '@verdaccio/commons-api';
|
import { HTTP_STATUS, API_ERROR } from '@verdaccio/commons-api';
|
||||||
import {HEADERS, HEADER_TYPE, API_MESSAGE} from '@verdaccio/dev-commons';
|
import {HEADERS, HEADER_TYPE, API_MESSAGE} from '@verdaccio/dev-commons';
|
||||||
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
||||||
import {getBadRequest, getConflict, getUnauthorized} from "@verdaccio/commons-api/lib";
|
import {getBadRequest, getConflict, getUnauthorized} from "@verdaccio/commons-api/lib";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { initializeServer } from './_helper';
|
||||||
|
|
||||||
const mockApiJWTmiddleware = jest.fn(() =>
|
const mockApiJWTmiddleware = jest.fn(() =>
|
||||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
|
|
||||||
import {initializeServer } from './_helper';
|
|
||||||
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
||||||
import { HEADERS} from '@verdaccio/dev-commons';
|
import { HEADERS} from '@verdaccio/dev-commons';
|
||||||
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
import {$RequestExtend, $ResponseExtend} from "@verdaccio/dev-types";
|
||||||
|
import {initializeServer } from './_helper';
|
||||||
|
|
||||||
const mockApiJWTmiddleware = jest.fn(() =>
|
const mockApiJWTmiddleware = jest.fn(() =>
|
||||||
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
(req: $RequestExtend, res: $ResponseExtend, _next): void => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { addVersion, uploadPackageTarball, removeTarball, unPublishPackage, publishPackage } from '../../src/publish';
|
|
||||||
import { HTTP_STATUS, API_ERROR } from '@verdaccio/dev-commons';
|
import { HTTP_STATUS, API_ERROR } from '@verdaccio/dev-commons';
|
||||||
|
import { addVersion, uploadPackageTarball, removeTarball, unPublishPackage, publishPackage } from '../../src/publish';
|
||||||
|
|
||||||
const REVISION_MOCK = '15-e53a77096b0ee33e';
|
const REVISION_MOCK = '15-e53a77096b0ee33e';
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -32,7 +32,10 @@
|
|||||||
"lodash": "4.17.15"
|
"lodash": "4.17.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@verdaccio/dev-types": "5.0.0-alpha.0"
|
"@verdaccio/config": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/mock": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/dev-types": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/types": "9.5.0"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ export async function getApiToken(auth: IAuthWebUI, config: Config, remoteUser:
|
|||||||
// i am wiling to use here _.isNil but flow does not like it yet.
|
// i am wiling to use here _.isNil but flow does not like it yet.
|
||||||
const { jwt } = security.api;
|
const { jwt } = security.api;
|
||||||
|
|
||||||
if (jwt && jwt.sign) {
|
if (jwt?.sign) {
|
||||||
return await auth.jwtEncrypt(remoteUser, jwt.sign);
|
return await auth.jwtEncrypt(remoteUser, jwt.sign);
|
||||||
}
|
}
|
||||||
return await new Promise((resolve): void => {
|
return await new Promise((resolve): void => {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
import path from "path";
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Auth } from '@verdaccio/auth';
|
import { Auth } from '../src';
|
||||||
import {CHARACTER_ENCODING, TOKEN_BEARER} from '@verdaccio/dev-commons';
|
import {CHARACTER_ENCODING, TOKEN_BEARER} from '@verdaccio/dev-commons';
|
||||||
|
|
||||||
import { configExample } from '@verdaccio/mock';
|
import { configExample } from '@verdaccio/mock';
|
||||||
@ -19,16 +20,15 @@ import {
|
|||||||
signPayload
|
signPayload
|
||||||
} from '@verdaccio/utils';
|
} from '@verdaccio/utils';
|
||||||
|
|
||||||
|
|
||||||
|
import { IAuth } from '@verdaccio/dev-types';
|
||||||
|
import {Config, Security, RemoteUser} from '@verdaccio/types';
|
||||||
import {
|
import {
|
||||||
getMiddlewareCredentials,
|
getMiddlewareCredentials,
|
||||||
getApiToken,
|
getApiToken,
|
||||||
verifyJWTPayload,
|
verifyJWTPayload,
|
||||||
getSecurity } from '../src'
|
getSecurity } from '../src'
|
||||||
|
|
||||||
import { IAuth } from '@verdaccio/dev-types';
|
|
||||||
import {Config, Security, RemoteUser} from '@verdaccio/types';
|
|
||||||
import path from "path";
|
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
const parseConfigurationFile = (conf) => {
|
const parseConfigurationFile = (conf) => {
|
||||||
@ -48,6 +48,7 @@ describe('Auth utilities', () => {
|
|||||||
|
|
||||||
function getConfig(configFileName: string, secret: string) {
|
function getConfig(configFileName: string, secret: string) {
|
||||||
const conf = parseConfigFile(parseConfigurationSecurityFile(configFileName));
|
const conf = parseConfigFile(parseConfigurationSecurityFile(configFileName));
|
||||||
|
// @ts-ignore
|
||||||
const secConf= _.merge(configExample(), conf);
|
const secConf= _.merge(configExample(), conf);
|
||||||
secConf.secret = secret;
|
secConf.secret = secret;
|
||||||
const config: Config = new AppConfig(secConf);
|
const config: Config = new AppConfig(secConf);
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Auth } from '@verdaccio/auth';
|
import { Config as AppConfig } from '@verdaccio/config';
|
||||||
import {Config as AppConfig } from '@verdaccio/config';
|
import { setup } from '@verdaccio/logger';
|
||||||
import {setup} from '@verdaccio/logger';
|
import { IAuth } from '@verdaccio/dev-types';
|
||||||
import {IAuth} from '@verdaccio/dev-types';
|
import { Config } from '@verdaccio/types';
|
||||||
import {Config} from '@verdaccio/types';
|
|
||||||
import { ROLES } from '@verdaccio/dev-commons';
|
import { ROLES } from '@verdaccio/dev-commons';
|
||||||
import { getInternalError } from '@verdaccio/commons-api';
|
import { getInternalError } from '@verdaccio/commons-api';
|
||||||
|
|
||||||
|
import { Auth } from '../src';
|
||||||
|
|
||||||
import { authProfileConf, authPluginFailureConf, authPluginPassThrougConf } from './helper/plugin';
|
import { authProfileConf, authPluginFailureConf, authPluginPassThrougConf } from './helper/plugin';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
11
packages/auth/test/partials/plugin/authenticate.fail.js
Normal file
11
packages/auth/test/partials/plugin/authenticate.fail.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { getInternalError } from '@verdaccio/commons-api';
|
||||||
|
|
||||||
|
module.exports = function ( ) {
|
||||||
|
return {
|
||||||
|
authenticate( user, pass, callback ) {
|
||||||
|
// we return an 500 error, the second argument must be false.
|
||||||
|
// https://verdaccio.org/docs/en/dev-plugins#onerror
|
||||||
|
callback(getInternalError(), false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
module.exports = function ( ) {
|
||||||
|
return {
|
||||||
|
authenticate( user, pass, callback ) {
|
||||||
|
/* user and pass are used here to forward errors
|
||||||
|
and success types respectively for testing purposes */
|
||||||
|
callback(user, pass);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
10
packages/auth/test/partials/plugin/authenticate.success.js
Normal file
10
packages/auth/test/partials/plugin/authenticate.success.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
module.exports = function ( ) {
|
||||||
|
return {
|
||||||
|
authenticate( user, pass, callback ) {
|
||||||
|
// https://verdaccio.org/docs/en/dev-plugins#onsuccess
|
||||||
|
// this is a successful login and return a simple group
|
||||||
|
callback(null, ['test']);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types",
|
"build": "pnpm run build:js && pnpm run build:types",
|
||||||
"bundle": "cross-env BABEL_ENV=registry webpack --config scripts/bundle.js --profile --json > compilation-stats.json"
|
"bundle": "cross-env BABEL_ENV=registry webpack --config scripts/bundle.js --profile --json > compilation-stats.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/config": "5.0.0-alpha.0",
|
"@verdaccio/config": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/logger": "5.0.0-alpha.0",
|
||||||
"@verdaccio/node-api": "5.0.0-alpha.0",
|
"@verdaccio/node-api": "5.0.0-alpha.0",
|
||||||
"@verdaccio/utils": "5.0.0-alpha.0",
|
"@verdaccio/utils": "5.0.0-alpha.0",
|
||||||
"commander": "5.1.0",
|
"commander": "5.1.0",
|
||||||
|
@ -19,7 +19,7 @@ export default function initProgram(commander, pkgVersion, pkgName) {
|
|||||||
verdaccioConfiguration = parseConfigFile(configPathLocation);
|
verdaccioConfiguration = parseConfigFile(configPathLocation);
|
||||||
const { web, https, self_path } = verdaccioConfiguration;
|
const { web, https, self_path } = verdaccioConfiguration;
|
||||||
|
|
||||||
process.title = web && web.title || DEFAULT_PROCESS_NAME;
|
process.title = web?.title || DEFAULT_PROCESS_NAME;
|
||||||
|
|
||||||
// note: self_path is only being used by @verdaccio/storage , not really useful and migth be removed soon
|
// note: self_path is only being used by @verdaccio/storage , not really useful and migth be removed soon
|
||||||
if (!self_path) {
|
if (!self_path) {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,16 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@verdaccio/dev-types": "workspace:5.0.0-alpha.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/logger": "5.0.0-alpha.0",
|
"@verdaccio/dev-commons": "workspace:5.0.0-alpha.0",
|
||||||
"@verdaccio/utils": "5.0.0-alpha.0"
|
"@verdaccio/logger": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/utils": "workspace:5.0.0-alpha.0",
|
||||||
|
"mkdirp": "0.5.5"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import _ from 'lodash';
|
|
||||||
import Path from 'path';
|
import Path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
import { logger } from '@verdaccio/logger';
|
import { logger } from '@verdaccio/logger';
|
||||||
import mkdirp from 'mkdirp';
|
import mkdirp from 'mkdirp';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getMatchedPackagesSpec,
|
getMatchedPackagesSpec,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { Config, readDefaultConfig } from '@verdaccio/config';
|
import { Config, readDefaultConfig } from '../src';
|
||||||
import { setup } from '@verdaccio/logger';
|
import { setup } from '@verdaccio/logger';
|
||||||
import {DEFAULT_REGISTRY, DEFAULT_UPLINK, ROLES, WEB_TITLE} from '@verdaccio/dev-commons';
|
import {DEFAULT_REGISTRY, DEFAULT_UPLINK, ROLES, WEB_TITLE} from '@verdaccio/dev-commons';
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
"request": "2.87.0"
|
"request": "2.87.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/auth": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/config": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/utils": "5.0.0-alpha.0",
|
||||||
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
||||||
"@verdaccio/types": "9.5.0"
|
"@verdaccio/types": "9.5.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -30,7 +34,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,15 @@
|
|||||||
"url": "git://github.com/verdaccio/verdaccio"
|
"url": "git://github.com/verdaccio/verdaccio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
"@verdaccio/dev-commons": "workspace:5.0.0-alpha.0",
|
||||||
"@verdaccio/logger": "5.0.0-alpha.0",
|
"@verdaccio/logger": "workspace:5.0.0-alpha.0",
|
||||||
"lodash": "4.17.15"
|
"lodash": "4.17.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/mock": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/dev-types": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/config": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/commons-api": "^9.7.1",
|
||||||
"@verdaccio/types": "9.5.0"
|
"@verdaccio/types": "9.5.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://verdaccio.org",
|
"homepage": "https://verdaccio.org",
|
||||||
@ -28,7 +32,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
|
||||||
"@verdaccio"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"guard-for-in": 0
|
"guard-for-in": 0
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf ./build",
|
"clean": "rimraf ./build",
|
||||||
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest",
|
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest",
|
||||||
"type-check": "tsc --noEmit",
|
|
||||||
"lint": "yarn type-check && eslint \"@(src|tests)/**\"",
|
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/commons-api": "9.6.1",
|
"@verdaccio/commons-api": "9.6.1",
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest --runTestsByPath",
|
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest --runTestsByPath",
|
||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps"
|
||||||
"build": "npm run build:js && npm run build:types"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/logger-prettify": "5.0.0-alpha.0",
|
"@verdaccio/logger-prettify": "5.0.0-alpha.0",
|
||||||
@ -28,7 +27,7 @@
|
|||||||
"pino": "5.17.0"
|
"pino": "5.17.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/pino": "6.0.1",
|
"@types/pino": "5.20.0",
|
||||||
"@verdaccio/types": "9.5.0"
|
"@verdaccio/types": "9.5.0"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/commons-api": "9.6.1",
|
"@verdaccio/commons-api": "9.6.1",
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
||||||
"@verdaccio/utils": "5.0.0-alpha.0",
|
"@verdaccio/utils": "5.0.0-alpha.0",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import _ from 'lodash';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import {parseConfigFile} from '@verdaccio/utils';
|
import {parseConfigFile} from '@verdaccio/utils';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import * as fsExtra from 'fs-extra';
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
import * as fsExtra from 'fs-extra';
|
||||||
import {DOMAIN_SERVERS} from './constants';
|
import {DOMAIN_SERVERS} from './constants';
|
||||||
import VerdaccioProcess from './server_process';
|
import VerdaccioProcess from './server_process';
|
||||||
import {VerdaccioConfig} from './verdaccio-server';
|
import {VerdaccioConfig} from './verdaccio-server';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
import _ from 'lodash';
|
||||||
import request from 'request';
|
import request from 'request';
|
||||||
import { IRequestPromise } from './types';
|
import { IRequestPromise } from './types';
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {API_MESSAGE, HEADERS, HTTP_STATUS, TOKEN_BASIC} from '@verdaccio/dev-commons';
|
||||||
|
import {buildToken} from "@verdaccio/utils";
|
||||||
import smartRequest from './request';
|
import smartRequest from './request';
|
||||||
import {IServerBridge} from './types';
|
import {IServerBridge} from './types';
|
||||||
|
|
||||||
import {API_MESSAGE, HEADERS, HTTP_STATUS, TOKEN_BASIC} from '@verdaccio/dev-commons';
|
|
||||||
import {buildToken} from "@verdaccio/utils";
|
|
||||||
|
|
||||||
import {CREDENTIALS} from "./constants"
|
import {CREDENTIALS} from "./constants"
|
||||||
import getPackage from './fixtures/package';
|
import getPackage from './fixtures/package';
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Version } from "@verdaccio/types";
|
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
import { pseudoRandomBytes } from 'crypto';
|
import { pseudoRandomBytes } from 'crypto';
|
||||||
|
import { Version } from "@verdaccio/types";
|
||||||
|
|
||||||
export function generateRamdonStorage() {
|
export function generateRamdonStorage() {
|
||||||
const tempStorage = pseudoRandomBytes(5).toString('hex');
|
const tempStorage = pseudoRandomBytes(5).toString('hex');
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types",
|
"build": "pnpm run build:js && pnpm run build:types",
|
||||||
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest"
|
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -26,9 +26,11 @@
|
|||||||
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
||||||
"@verdaccio/logger": "5.0.0-alpha.0",
|
"@verdaccio/logger": "5.0.0-alpha.0",
|
||||||
"@verdaccio/server": "5.0.0-alpha.0",
|
"@verdaccio/server": "5.0.0-alpha.0",
|
||||||
"@verdaccio/utils": "5.0.0-alpha.0"
|
"@verdaccio/utils": "5.0.0-alpha.0",
|
||||||
|
"selfsigned": "1.10.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/mock": "5.0.0-alpha.0",
|
||||||
"@verdaccio/types": "9.7.0"
|
"@verdaccio/types": "9.7.0"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { assign, isObject, isFunction } from 'lodash';
|
|
||||||
import URL from 'url';
|
import URL from 'url';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import https from 'https';
|
import https from 'https';
|
||||||
import { Application } from 'express';
|
|
||||||
import constants from 'constants';
|
import constants from 'constants';
|
||||||
|
import { Application } from 'express';
|
||||||
|
import { assign, isObject, isFunction } from 'lodash';
|
||||||
|
|
||||||
import { Callback, ConfigWithHttps, HttpsConfKeyCert, HttpsConfPfx } from '@verdaccio/types';
|
import { Callback, ConfigWithHttps, HttpsConfKeyCert, HttpsConfPfx } from '@verdaccio/types';
|
||||||
import { API_ERROR, certPem, csrPem, keyPem } from '@verdaccio/dev-commons';
|
import { API_ERROR, certPem, csrPem, keyPem } from '@verdaccio/dev-commons';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import selfsigned from 'selfsigned';
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import selfsigned from 'selfsigned';
|
||||||
|
|
||||||
import { configExample } from '@verdaccio/mock';
|
import { configExample } from '@verdaccio/mock';
|
||||||
import {DEFAULT_DOMAIN, DEFAULT_PROTOCOL} from '@verdaccio/dev-commons';
|
import {DEFAULT_DOMAIN, DEFAULT_PROTOCOL} from '@verdaccio/dev-commons';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {getListListenAddresses} from "../src/cli-utils";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import {DEFAULT_DOMAIN, DEFAULT_PORT, DEFAULT_PROTOCOL} from "@verdaccio/dev-commons";
|
import {DEFAULT_DOMAIN, DEFAULT_PORT, DEFAULT_PROTOCOL} from "@verdaccio/dev-commons";
|
||||||
|
import {getListListenAddresses} from "../src/cli-utils";
|
||||||
|
|
||||||
jest.mock('@verdaccio/logger', () => ({
|
jest.mock('@verdaccio/logger', () => ({
|
||||||
setup: jest.fn(),
|
setup: jest.fn(),
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import zlib from 'zlib';
|
import zlib from 'zlib';
|
||||||
|
import Stream from 'stream';
|
||||||
|
import URL, {UrlWithStringQuery} from 'url';
|
||||||
import JSONStream from 'JSONStream';
|
import JSONStream from 'JSONStream';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import request from 'request';
|
import request from 'request';
|
||||||
import Stream, { Readable } from 'stream';
|
|
||||||
import URL, {UrlWithStringQuery} from 'url';
|
|
||||||
import { parseInterval, isObject, ErrorCode, buildToken } from '@verdaccio/utils';
|
import { parseInterval, isObject, ErrorCode, buildToken } from '@verdaccio/utils';
|
||||||
import { ReadTarball } from '@verdaccio/streams';
|
import { ReadTarball } from '@verdaccio/streams';
|
||||||
import { ERROR_CODE, TOKEN_BASIC, TOKEN_BEARER, HEADERS, HTTP_STATUS, API_ERROR, HEADER_TYPE, CHARACTER_ENCODING } from '@verdaccio/dev-commons';
|
import { ERROR_CODE, TOKEN_BASIC, TOKEN_BEARER, HEADERS, HTTP_STATUS, API_ERROR, HEADER_TYPE, CHARACTER_ENCODING } from '@verdaccio/dev-commons';
|
||||||
@ -574,7 +574,7 @@ class ProxyStorage implements IProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// always attach Via header to avoid loops, even if we're not proxying
|
// always attach Via header to avoid loops, even if we're not proxying
|
||||||
headers['Via'] = req && req.headers['via'] ? req.headers['via'] + ', ' : '';
|
headers['Via'] = req?.headers['via'] ? req.headers['via'] + ', ' : '';
|
||||||
|
|
||||||
headers['Via'] += '1.1 ' + this.server_id + ' (Verdaccio)';
|
headers['Via'] += '1.1 ' + this.server_id + ' (Verdaccio)';
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
"lodash": "4.17.15"
|
"lodash": "4.17.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/proxy": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/commons-api": "9.7.1",
|
||||||
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
||||||
"@verdaccio/mock": "5.0.0-alpha.0",
|
"@verdaccio/mock": "5.0.0-alpha.0",
|
||||||
"http-errors": "1.7.3",
|
"http-errors": "1.7.3",
|
||||||
@ -43,7 +45,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
import path from 'path';
|
||||||
import request from 'supertest';
|
import request from 'supertest';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
import endPointAPI from '@verdaccio/server';
|
|
||||||
import {
|
import {
|
||||||
HEADERS,
|
HEADERS,
|
||||||
HTTP_STATUS,
|
HTTP_STATUS,
|
||||||
@ -33,6 +32,8 @@ import {
|
|||||||
generateStarMedatada, generateVersion
|
generateStarMedatada, generateVersion
|
||||||
} from './helpers/utils';
|
} from './helpers/utils';
|
||||||
|
|
||||||
|
import endPointAPI from '../../src';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
const credentials = { name: 'jota', password: 'secretPass' };
|
const credentials = { name: 'jota', password: 'secretPass' };
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import path from "path";
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import request from 'request';
|
import request from 'request';
|
||||||
import path from "path";
|
|
||||||
|
|
||||||
import {API_ERROR} from '@verdaccio/dev-commons';
|
import {API_ERROR} from '@verdaccio/dev-commons';
|
||||||
import {parseConfigFile} from "@verdaccio/utils";
|
import {parseConfigFile} from "@verdaccio/utils";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import request from 'supertest';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
import endPointAPI from '@verdaccio/server';
|
|
||||||
import {HEADERS, HTTP_STATUS, HEADER_TYPE, TOKEN_BEARER, TOKEN_BASIC, API_ERROR} from '@verdaccio/dev-commons';
|
import {HEADERS, HTTP_STATUS, HEADER_TYPE, TOKEN_BEARER, TOKEN_BASIC, API_ERROR} from '@verdaccio/dev-commons';
|
||||||
import {mockServer, generateRamdonStorage} from '@verdaccio/mock';
|
import {mockServer, generateRamdonStorage} from '@verdaccio/mock';
|
||||||
import {buildUserBuffer, buildToken} from '@verdaccio/utils';
|
import {buildUserBuffer, buildToken} from '@verdaccio/utils';
|
||||||
@ -9,6 +8,8 @@ import {configExample, DOMAIN_SERVERS, addUser, getPackage, loginUserToken} from
|
|||||||
|
|
||||||
import {setup, logger} from '@verdaccio/logger';
|
import {setup, logger} from '@verdaccio/logger';
|
||||||
|
|
||||||
|
import endPointAPI from '../../src';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
const credentials = { name: 'JotaJWT', password: 'secretPass' };
|
const credentials = { name: 'JotaJWT', password: 'secretPass' };
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import request from 'supertest';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
import {setup, logger} from '@verdaccio/logger'
|
import {setup, logger} from '@verdaccio/logger'
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
import { HEADERS, HTTP_STATUS } from '@verdaccio/dev-commons';
|
import { HEADERS, HTTP_STATUS } from '@verdaccio/dev-commons';
|
||||||
import endPointAPI from '@verdaccio/server';
|
import endPointAPI from '../../src';
|
||||||
|
|
||||||
import {generateRamdonStorage, mockServer, configExample, DOMAIN_SERVERS} from '@verdaccio/mock';
|
import {generateRamdonStorage, mockServer, configExample, DOMAIN_SERVERS} from '@verdaccio/mock';
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import request from 'supertest';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
import endPointAPI from '@verdaccio/server';
|
|
||||||
import {mockServer} from '@verdaccio/mock';
|
import {mockServer} from '@verdaccio/mock';
|
||||||
import {API_ERROR, HTTP_STATUS, SUPPORT_ERRORS} from '@verdaccio/dev-commons';
|
import {API_ERROR, HTTP_STATUS, SUPPORT_ERRORS} from '@verdaccio/dev-commons';
|
||||||
import {setup, logger} from '@verdaccio/logger';
|
import {setup, logger} from '@verdaccio/logger';
|
||||||
|
|
||||||
import {generateRamdonStorage, getNewToken, getProfile, postProfile, configExample, DOMAIN_SERVERS} from '@verdaccio/mock';
|
import {generateRamdonStorage, getNewToken, getProfile, postProfile, configExample, DOMAIN_SERVERS} from '@verdaccio/mock';
|
||||||
|
|
||||||
|
import endPointAPI from '../../src';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { Config as AppConfig } from '@verdaccio/config';
|
import { Config as AppConfig } from '@verdaccio/config';
|
||||||
import {Config, UpLinkConf} from '@verdaccio/types';
|
import {Config, UpLinkConf} from '@verdaccio/types';
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import request from 'supertest';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import request from 'supertest';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import endPointAPI from '@verdaccio/server';
|
|
||||||
import {
|
import {
|
||||||
HEADERS,
|
HEADERS,
|
||||||
HTTP_STATUS,
|
HTTP_STATUS,
|
||||||
@ -14,6 +13,8 @@ import {generateRamdonStorage, DOMAIN_SERVERS, mockServer, getNewToken, configEx
|
|||||||
|
|
||||||
import {setup, logger} from '@verdaccio/logger';
|
import {setup, logger} from '@verdaccio/logger';
|
||||||
|
|
||||||
|
import endPointAPI from '../../src';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
const credentials = { name: 'jota_token', password: 'secretPass' };
|
const credentials = { name: 'jota_token', password: 'secretPass' };
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import request from 'supertest';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
import publishMetadata from './partials/publish-api';
|
|
||||||
import forbiddenPlace from './partials/forbidden-place';
|
|
||||||
|
|
||||||
import endPointAPI from '../../src';
|
|
||||||
import { HEADERS, API_ERROR, HTTP_STATUS, HEADER_TYPE, DIST_TAGS} from '@verdaccio/dev-commons';
|
import { HEADERS, API_ERROR, HTTP_STATUS, HEADER_TYPE, DIST_TAGS} from '@verdaccio/dev-commons';
|
||||||
|
|
||||||
import {addUser, mockServer, DOMAIN_SERVERS, configExample, generateRamdonStorage} from '@verdaccio/mock';
|
import {addUser, mockServer, DOMAIN_SERVERS, configExample, generateRamdonStorage} from '@verdaccio/mock';
|
||||||
|
|
||||||
import {setup, logger} from '@verdaccio/logger';
|
import {setup, logger} from '@verdaccio/logger';
|
||||||
|
import endPointAPI from '../../src';
|
||||||
|
import forbiddenPlace from './partials/forbidden-place';
|
||||||
|
import publishMetadata from './partials/publish-api';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/commons-api": "9.6.1",
|
"@verdaccio/commons-api": "9.6.1",
|
||||||
@ -32,10 +32,14 @@
|
|||||||
"@verdaccio/streams": "9.6.1",
|
"@verdaccio/streams": "9.6.1",
|
||||||
"@verdaccio/utils": "5.0.0-alpha.0",
|
"@verdaccio/utils": "5.0.0-alpha.0",
|
||||||
"async": "3.1.1",
|
"async": "3.1.1",
|
||||||
|
"lunr-mutable-indexes": "^2.3.2",
|
||||||
"lodash": "4.17.15",
|
"lodash": "4.17.15",
|
||||||
"semver": "7.1.2"
|
"semver": "7.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@verdaccio/config": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/mock": "5.0.0-alpha.0",
|
||||||
|
"@verdaccio/dev-types": "5.0.0-alpha.0",
|
||||||
"@verdaccio/types": "9.5.0"
|
"@verdaccio/types": "9.5.0"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
|
@ -873,7 +873,7 @@ class LocalStorage implements IStorage {
|
|||||||
return this.storagePlugin.deleteToken(user, tokenKey);
|
return this.storagePlugin.deleteToken(user, tokenKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public readTokens(filter: TokenFilter): Promise<Array<Token>> {
|
public readTokens(filter: TokenFilter): Promise<Token[]> {
|
||||||
if (_.isFunction(this.storagePlugin.readTokens) === false) {
|
if (_.isFunction(this.storagePlugin.readTokens) === false) {
|
||||||
return Promise.reject(ErrorCode.getCode(HTTP_STATUS.SERVICE_UNAVAILABLE, SUPPORT_ERRORS.PLUGIN_MISSING_INTERFACE));
|
return Promise.reject(ErrorCode.getCode(HTTP_STATUS.SERVICE_UNAVAILABLE, SUPPORT_ERRORS.PLUGIN_MISSING_INTERFACE));
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { SearchInstance } from './search';
|
|
||||||
|
|
||||||
import { ErrorCode, isObject, normalizeDistTags, semverSort, generateRandomHexString } from '@verdaccio/utils';
|
import { ErrorCode, isObject, normalizeDistTags, semverSort, generateRandomHexString } from '@verdaccio/utils';
|
||||||
|
|
||||||
import { Package, Version, Author } from '@verdaccio/types';
|
import { Package, Version, Author } from '@verdaccio/types';
|
||||||
import { IStorage } from '@verdaccio/dev-types';
|
import { IStorage } from '@verdaccio/dev-types';
|
||||||
import { API_ERROR, HTTP_STATUS, DIST_TAGS, USERS, STORAGE } from '@verdaccio/dev-commons';
|
import { API_ERROR, HTTP_STATUS, DIST_TAGS, USERS, STORAGE } from '@verdaccio/dev-commons';
|
||||||
|
import { SearchInstance } from './search';
|
||||||
|
|
||||||
export function generatePackageTemplate(name: string): Package {
|
export function generatePackageTemplate(name: string): Package {
|
||||||
return {
|
return {
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import async, { AsyncResultArrayCallback } from 'async';
|
|
||||||
import Stream from 'stream';
|
import Stream from 'stream';
|
||||||
|
import async, { AsyncResultArrayCallback } from 'async';
|
||||||
|
import _ from 'lodash';
|
||||||
import { ProxyStorage } from '@verdaccio/proxy';
|
import { ProxyStorage } from '@verdaccio/proxy';
|
||||||
import { SearchInstance }from './search';
|
|
||||||
import { API_ERROR, HTTP_STATUS, DIST_TAGS } from '@verdaccio/dev-commons';
|
import { API_ERROR, HTTP_STATUS, DIST_TAGS } from '@verdaccio/dev-commons';
|
||||||
import { ReadTarball } from '@verdaccio/streams';
|
import { ReadTarball } from '@verdaccio/streams';
|
||||||
import {
|
import {
|
||||||
@ -19,6 +18,7 @@ import { IStorage, IProxy, IStorageHandler, ProxyList, StringValue, IGetPackageO
|
|||||||
import { GenericBody, TokenFilter, Token } from '@verdaccio/types';
|
import { GenericBody, TokenFilter, Token } from '@verdaccio/types';
|
||||||
import { logger } from '@verdaccio/logger';
|
import { logger } from '@verdaccio/logger';
|
||||||
import { VerdaccioError } from '@verdaccio/commons-api';
|
import { VerdaccioError } from '@verdaccio/commons-api';
|
||||||
|
import { SearchInstance }from './search';
|
||||||
|
|
||||||
import { LocalStorage } from './local-storage';
|
import { LocalStorage } from './local-storage';
|
||||||
import { mergeVersions } from './metadata-utils';
|
import { mergeVersions } from './metadata-utils';
|
||||||
@ -75,7 +75,7 @@ class Storage implements IStorageHandler {
|
|||||||
return typeof this.config.publish !== 'undefined' && _.isBoolean(this.config.publish.allow_offline) && this.config.publish.allow_offline;
|
return typeof this.config.publish !== 'undefined' && _.isBoolean(this.config.publish.allow_offline) && this.config.publish.allow_offline;
|
||||||
}
|
}
|
||||||
|
|
||||||
public readTokens(filter: TokenFilter): Promise<Array<Token>> {
|
public readTokens(filter: TokenFilter): Promise<Token[]> {
|
||||||
return this.localStorage.readTokens(filter);
|
return this.localStorage.readTokens(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import rimRaf from 'rimraf';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import rimRaf from 'rimraf';
|
||||||
|
|
||||||
import { LocalStorage } from '@verdaccio/store/src/local-storage';
|
|
||||||
import {Config as AppConfig } from '@verdaccio/config';
|
import {Config as AppConfig } from '@verdaccio/config';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { logger, setup} from '@verdaccio/logger';
|
import { logger, setup} from '@verdaccio/logger';
|
||||||
import { configExample, generateNewVersion } from '@verdaccio/mock';
|
import { configExample, generateNewVersion } from '@verdaccio/mock';
|
||||||
import {IStorage} from '@verdaccio/dev-types';
|
import {IStorage} from '@verdaccio/dev-types';
|
||||||
|
import { LocalStorage } from '../src/local-storage';
|
||||||
|
|
||||||
import {generatePackageTemplate} from '../src/storage-utils';
|
|
||||||
import {readFile} from './fixtures/test.utils';
|
|
||||||
|
|
||||||
const readMetadata = (fileName = 'metadata') => readFile(`../fixtures/${fileName}`).toString();
|
const readMetadata = (fileName = 'metadata') => readFile(`../fixtures/${fileName}`).toString();
|
||||||
import {Config, MergeTags, Package} from '@verdaccio/types';
|
import {Config, MergeTags, Package} from '@verdaccio/types';
|
||||||
import { API_ERROR, HTTP_STATUS, DIST_TAGS} from '@verdaccio/dev-commons';
|
import { API_ERROR, HTTP_STATUS, DIST_TAGS} from '@verdaccio/dev-commons';
|
||||||
import { VerdaccioError } from '@verdaccio/commons-api';
|
import { VerdaccioError } from '@verdaccio/commons-api';
|
||||||
|
import {generatePackageTemplate} from '../src/storage-utils';
|
||||||
|
import {readFile} from './fixtures/test.utils';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Config } from '@verdaccio/config';
|
import { Config } from '@verdaccio/config';
|
||||||
import { Storage } from '@verdaccio/store';
|
|
||||||
import { configExample } from '@verdaccio/mock';
|
import { configExample } from '@verdaccio/mock';
|
||||||
import { setup } from '@verdaccio/logger';
|
import { setup } from '@verdaccio/logger';
|
||||||
|
|
||||||
|
import { Storage } from '../src';
|
||||||
import { SearchInstance } from '../src/search';
|
import { SearchInstance } from '../src/search';
|
||||||
|
|
||||||
setup([]);
|
setup([]);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {normalizePackage, mergeUplinkTimeIntoLocal} from '../src/storage-utils';
|
|
||||||
import {Package} from '@verdaccio/types';
|
import {Package} from '@verdaccio/types';
|
||||||
import { STORAGE, DIST_TAGS } from '@verdaccio/dev-commons';
|
import { STORAGE, DIST_TAGS } from '@verdaccio/dev-commons';
|
||||||
|
import {normalizePackage, mergeUplinkTimeIntoLocal} from '../src/storage-utils';
|
||||||
|
|
||||||
import {readFile} from "./fixtures/test.utils";
|
import {readFile} from "./fixtures/test.utils";
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/verdaccio/verdaccio"
|
"url": "git://github.com/verdaccio/verdaccio"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lunr-mutable-indexes": "^2.3.2"
|
||||||
|
},
|
||||||
"homepage": "https://verdaccio.org",
|
"homepage": "https://verdaccio.org",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@verdaccio"]]
|
"extends": "../../.babelrc"
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://verdaccio.org",
|
"homepage": "https://verdaccio.org",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@verdaccio/dev-commons": "5.0.0-alpha.0",
|
"@verdaccio/commons-api": "^9.7.1",
|
||||||
|
"@verdaccio/dev-commons": "workspace:5.0.0-alpha.0",
|
||||||
"@verdaccio/readme": "9.6.1",
|
"@verdaccio/readme": "9.6.1",
|
||||||
"js-yaml": "3.13.1",
|
"js-yaml": "3.13.1",
|
||||||
"jsonwebtoken": "8.5.1",
|
"jsonwebtoken": "8.5.1",
|
||||||
@ -23,8 +24,10 @@
|
|||||||
"semver": "7.3.2"
|
"semver": "7.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"lodash": "^4.17.19",
|
||||||
"@types/minimatch": "3.0.3",
|
"@types/minimatch": "3.0.3",
|
||||||
"@verdaccio/dev-types": "5.0.0-alpha.0"
|
"@verdaccio/logger": "workspace:5.0.0-alpha.0",
|
||||||
|
"@verdaccio/dev-types": "workspace:5.0.0-alpha.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf ./build",
|
"clean": "rimraf ./build",
|
||||||
@ -32,7 +35,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
"build:types": "tsc --emitDeclarationOnly --declaration true",
|
||||||
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
"build:js": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||||
"build": "npm run build:js && npm run build:types"
|
"build": "pnpm run build:js && pnpm run build:types"
|
||||||
},
|
},
|
||||||
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
"gitHead": "7c246ede52ff717707fcae66dd63fc4abd536982"
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
import _ from 'lodash';
|
||||||
import minimatch from 'minimatch';
|
import minimatch from 'minimatch';
|
||||||
|
|
||||||
import { ErrorCode } from './utils';
|
|
||||||
|
|
||||||
import { PackageList, UpLinksConfList } from '@verdaccio/types';
|
import { PackageList, UpLinksConfList } from '@verdaccio/types';
|
||||||
import { MatchedPackage, LegacyPackageList } from '@verdaccio/dev-types';
|
import { MatchedPackage, LegacyPackageList } from '@verdaccio/dev-types';
|
||||||
|
import { ErrorCode } from './utils';
|
||||||
|
|
||||||
const BLACKLIST = {
|
const BLACKLIST = {
|
||||||
all: true,
|
all: true,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import URL from 'url';
|
import URL from 'url';
|
||||||
|
import { IncomingHttpHeaders } from 'http';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import YAML from 'js-yaml';
|
import YAML from 'js-yaml';
|
||||||
@ -33,7 +34,6 @@ import {
|
|||||||
getCode,
|
getCode,
|
||||||
} from '@verdaccio/commons-api';
|
} from '@verdaccio/commons-api';
|
||||||
|
|
||||||
import { IncomingHttpHeaders } from 'http';
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
@ -314,7 +314,7 @@ export function normalizeDistTags(pkg: Package): void {
|
|||||||
if (!pkg[DIST_TAGS].latest) {
|
if (!pkg[DIST_TAGS].latest) {
|
||||||
// overwrite latest with highest known version based on semver sort
|
// overwrite latest with highest known version based on semver sort
|
||||||
sorted = semverSort(Object.keys(pkg.versions));
|
sorted = semverSort(Object.keys(pkg.versions));
|
||||||
if (sorted && sorted.length) {
|
if (sorted?.length) {
|
||||||
pkg[DIST_TAGS].latest = sorted.pop();
|
pkg[DIST_TAGS].latest = sorted.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { API_ERROR, ROLES } from "@verdaccio/dev-commons";
|
||||||
|
import { VerdaccioError, getForbidden } from "@verdaccio/commons-api";
|
||||||
import {
|
import {
|
||||||
allow_action,
|
allow_action,
|
||||||
createAnonymousRemoteUser,
|
createAnonymousRemoteUser,
|
||||||
@ -9,9 +11,6 @@ import {
|
|||||||
createSessionToken,
|
createSessionToken,
|
||||||
getAuthenticatedMessage,
|
getAuthenticatedMessage,
|
||||||
} from "../src";
|
} from "../src";
|
||||||
import { API_ERROR, ROLES } from "@verdaccio/dev-commons";
|
|
||||||
import { VerdaccioError, getForbidden } from "@verdaccio/commons-api";
|
|
||||||
import { Config, IPluginAuth } from '@verdaccio/types';
|
|
||||||
jest.mock('@verdaccio/logger', () => ({
|
jest.mock('@verdaccio/logger', () => ({
|
||||||
logger: { trace: jest.fn() }
|
logger: { trace: jest.fn() }
|
||||||
}));
|
}));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import {PACKAGE_ACCESS, ROLES} from '@verdaccio/dev-commons';
|
import {PACKAGE_ACCESS} from '@verdaccio/dev-commons';
|
||||||
|
|
||||||
import {spliceURL} from '../src/string';
|
import {spliceURL} from '../src/string';
|
||||||
import {parseConfigFile} from '../src/utils';
|
import {parseConfigFile} from '../src/utils';
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {parseAddress as parse} from '@verdaccio/utils';
|
|
||||||
import {DEFAULT_DOMAIN, DEFAULT_PORT} from '@verdaccio/dev-commons';
|
import {DEFAULT_DOMAIN, DEFAULT_PORT} from '@verdaccio/dev-commons';
|
||||||
|
|
||||||
|
import {parseAddress as parse} from '../src/utils';
|
||||||
|
|
||||||
describe('Parse listen address', () => {
|
describe('Parse listen address', () => {
|
||||||
const useCases: any[] = [];
|
const useCases: any[] = [];
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user