diff --git a/.dockerignore b/.dockerignore
index 8ad2f7f8d..7bd034374 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -8,22 +8,22 @@
.*
# you can add exceptions like in .gitignore to maintain a whitelist:
# e.g.
-!babel.config.js
-!eslintrc.js
-!.prettierrc
+!.babelrc
+!.eslintrc
+!.prettierrc.json
+!.prettierignore
!.eslintignore
!.stylelintrc
-!.jest.config.js
-!.jestEnvironment.js
-!.yarnrc.yml
-!.yarn/releases/yarn-*.cjs
-!.yarn/plugins/*
-!.pnp.js
-# just in case, yarn 2 pnp is enabled
+# do not copy over node_modules we will run `pnpm install` anyway
node_modules
-.husky/
-.git/
+website
+jest
+docs
+contrib
+docker-examples
+website
+systemd
# output from test runs and similar things
*.log
@@ -33,21 +33,7 @@ coverage/
# IDE config files
jsconfig.json
*.iml
+
# let's not get too recursive ;)
Dockerfile*
docker-compose*.yaml
-.github/
-.husky/
-*.log
-coverage/
-.vscode/
-*.md
-contrib/
-docs/
-docker-examples/
-systemd/
-assets/
-jest*.js
-test/
-wiki/
-debug/
diff --git a/.github/workflows/docker-apm.yml b/.github/workflows/docker-apm.yml
deleted file mode 100644
index c6a5a9874..000000000
--- a/.github/workflows/docker-apm.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: Docker publish apm to docker.io
-
-on:
- push:
- paths:
- - '.github/workflows/docker-apm.yml'
- - 'src/**'
- - 'conf/**'
- - 'types/**'
- - 'docker-bin/**'
- - 'bin/**'
- - 'package.json'
- - 'yarn.lock'
- - '.yarn/**'
- - '.yarnrc.yaml'
- - '.pnp.js'
- - '.dockerignore'
- - 'docker-compose.yml'
- - 'Dockerfile'
- branches:
- - 'apm'
-
-permissions:
- contents: read # to fetch code (actions/checkout)
-
-jobs:
- docker:
- runs-on: ubuntu-latest
- if: github.repository == 'mbtools/verdaccio'
- steps:
- - uses: actions/checkout@v4
- - uses: docker/setup-qemu-action@v3
- - uses: docker/setup-buildx-action@v3
- with:
- driver-opts: network=host
- - uses: docker/login-action@v3
- name: Login Docker Hub
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- - name: Prepare docker image tags
- id: docker_meta
- uses: docker/metadata-action@v5
- with:
- images: abappm/registry
- tags: |
- type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'apm') }}
- - name: Build & Push
- uses: docker/build-push-action@v6
- with:
- context: .
- file: ./Dockerfile
- platforms: linux/amd64,linux/arm64
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.prettierrc b/.prettierrc
index 83ad2ca06..d10be3bb6 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,5 +1,5 @@
{
- "endOfLine": "auto",
+ "endOfLine": "lf",
"useTabs": false,
"printWidth": 100,
"tabWidth": 2,
diff --git a/.vscode/settings.json b/.vscode/settings.json
index c99d14a44..e2229d6bd 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,14 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
- "**/node_modules/**/node_modules": true,
"**/build": false,
"**/coverage": true,
".idea": true,
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
- "editor.formatOnSave": false,
- "[jsonc]": {
- "editor.defaultFormatter": "esbenp.prettier-vscode"
- },
+ "editor.formatOnSave": true
}
diff --git a/Dockerfile b/Dockerfile
index 686633b80..3950b62cb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,13 +1,9 @@
-FROM --platform=${BUILDPLATFORM:-linux/amd64} node:20.15.1-alpine AS builder
+FROM --platform=${BUILDPLATFORM:-linux/amd64} node:21-alpine AS builder
-ENV NODE_ENV=production \
- VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org \
- HUSKY_SKIP_INSTALL=1 \
- CI=true \
- HUSKY_DEBUG=1
+ENV NODE_ENV=development \
+ VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org
-RUN apk add --force-overwrite && \
- apk --no-cache add openssl ca-certificates wget && \
+RUN apk --no-cache add openssl ca-certificates wget && \
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python3 && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk && \
@@ -15,24 +11,17 @@ RUN apk add --force-overwrite && \
WORKDIR /opt/verdaccio-build
COPY . .
+RUN npm -g i pnpm@8.9.0 && \
+ pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
+ pnpm install --frozen-lockfile --ignore-scripts && \
+ rm -Rf test && \
+ pnpm run build
+# FIXME: need to remove devDependencies from the build
+# NODE_ENV=production pnpm install --frozen-lockfile --ignore-scripts
+# RUN pnpm install --prod --ignore-scripts
-## build the project and create a tarball of the project for later
-## global installation
-RUN yarn config set npmRegistryServer $VERDACCIO_BUILD_REGISTRY && \
- yarn config set enableProgressBars true && \
- yarn config set enableScripts false && \
- yarn install --immutable && \
- yarn build
-## pack the project
-RUN yarn pack --dry-run \
- && yarn pack --out verdaccio.tgz \
- && mkdir -p /opt/tarball \
- && mv /opt/verdaccio-build/verdaccio.tgz /opt/tarball
-## clean up and reduce bundle size
-RUN rm -Rf /opt/verdaccio-build
-
-FROM node:20.15.1-alpine
-LABEL maintainer="https://github.com/abapPM/abapPM"
+FROM node:21-alpine
+LABEL maintainer="https://github.com/verdaccio/verdaccio"
ENV VERDACCIO_APPDIR=/opt/verdaccio \
VERDACCIO_USER_NAME=verdaccio \
@@ -44,33 +33,17 @@ ENV PATH=$VERDACCIO_APPDIR/docker-bin:$PATH \
WORKDIR $VERDACCIO_APPDIR
-# https://github.com/Yelp/dumb-init
RUN apk --no-cache add openssl dumb-init
RUN mkdir -p /verdaccio/storage /verdaccio/plugins /verdaccio/conf
-COPY --from=builder /opt/tarball .
+COPY --from=builder /opt/verdaccio-build .
-USER root
-# install verdaccio as a global package so is fully handled by npm
-# ensure none dependency is being missing and is prod by default
-RUN npm install -g $VERDACCIO_APPDIR/verdaccio.tgz \
- ## clean up cache
- && npm cache clean --force \
- && rm -Rf .npm/ \
- && rm $VERDACCIO_APPDIR/verdaccio.tgz \
- # yarn is not need it after this step
- # Also remove the symlinks added in the [`node:alpine` Docker image](https://github.com/nodejs/docker-node/blob/02a64a08a98a472c6141cd583d2e9fc47bcd9bfd/18/alpine3.16/Dockerfile#L91-L92).
- && rm -Rf /opt/yarn-v1.22.19/ /usr/local/bin/yarn /usr/local/bin/yarnpkg
-
-# apm assets and config
-ADD abappm /verdaccio/abappm
-ADD config.yaml /verdaccio/conf/config.yaml
-
-ADD docker-bin $VERDACCIO_APPDIR/docker-bin
+RUN ls packages/config/src/conf
+ADD packages/config/src/conf/docker.yaml /verdaccio/conf/config.yaml
RUN adduser -u $VERDACCIO_USER_UID -S -D -h $VERDACCIO_APPDIR -g "$VERDACCIO_USER_NAME user" -s /sbin/nologin $VERDACCIO_USER_NAME && \
- chmod -R +x /usr/local/lib/node_modules/verdaccio/bin/verdaccio $VERDACCIO_APPDIR/docker-bin && \
+ chmod -R +x $VERDACCIO_APPDIR/packages/verdaccio/bin $VERDACCIO_APPDIR/docker-bin && \
chown -R $VERDACCIO_USER_UID:root /verdaccio/storage && \
chmod -R g=u /verdaccio/storage /etc/passwd
@@ -82,4 +55,4 @@ VOLUME /verdaccio/storage
ENTRYPOINT ["uid_entrypoint"]
-CMD verdaccio --config /verdaccio/conf/config.yaml --listen $VERDACCIO_PROTOCOL://0.0.0.0:$VERDACCIO_PORT
+CMD $VERDACCIO_APPDIR/packages/verdaccio/bin/verdaccio --config /verdaccio/conf/config.yaml --listen $VERDACCIO_PROTOCOL://0.0.0.0:$VERDACCIO_PORT
diff --git a/abappm/README.md b/abappm/README.md
deleted file mode 100644
index 28f0831bf..000000000
--- a/abappm/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# abapPM
-
-Assets for Verdaccio
diff --git a/abappm/apm.ico b/abappm/apm.ico
deleted file mode 100644
index 1411d409e..000000000
Binary files a/abappm/apm.ico and /dev/null differ
diff --git a/abappm/apm_40x40.png b/abappm/apm_40x40.png
deleted file mode 100644
index 167d1c8a4..000000000
Binary files a/abappm/apm_40x40.png and /dev/null differ
diff --git a/abappm/apm_640x512.png b/abappm/apm_640x512.png
deleted file mode 100644
index d973dd7ca..000000000
Binary files a/abappm/apm_640x512.png and /dev/null differ
diff --git a/abappm/apm_banner.png b/abappm/apm_banner.png
deleted file mode 100644
index 269a18d3f..000000000
Binary files a/abappm/apm_banner.png and /dev/null differ
diff --git a/abappm/apm_banner_gray.png b/abappm/apm_banner_gray.png
deleted file mode 100644
index 7c7908d7c..000000000
Binary files a/abappm/apm_banner_gray.png and /dev/null differ
diff --git a/abappm/healthcheck.sh b/abappm/healthcheck.sh
deleted file mode 100644
index 5c2518056..000000000
--- a/abappm/healthcheck.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-if pgrep -f "/usr/bin/dumb-init" > /dev/null; then
- if pgrep -f "apm" > /dev/null; then
- exit 0
- else
- exit 1
- fi
-else
- exit 1
-fi
diff --git a/config.yaml b/config.yaml
deleted file mode 100644
index d92ec8460..000000000
--- a/config.yaml
+++ /dev/null
@@ -1,214 +0,0 @@
-#
-# This is the default configuration file. It allows all users to do anything,
-# please read carefully the documentation and best practices to
-# improve security.
-#
-# Do not configure host and port under `listen` in this file
-# as it will be ignored when using docker.
-# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
-#
-# Look here for more config file examples:
-# https://github.com/verdaccio/verdaccio/tree/5.x/conf
-#
-# Read about the best practices
-# https://verdaccio.org/docs/best
-
-# path to a directory with all packages
-storage: /verdaccio/storage/data
-
-# path to a directory with plugins to include
-plugins: /verdaccio/plugins
-
-# https://verdaccio.org/docs/webui
-web:
- enable: true
- title: apm - A Package Manager for ABAP
- logo: /verdaccio/abappm/apm_banner.png
- logoDark: /verdaccio/abappm/apm_banner_gray.png
- favicon: /verdaccio/abappm/apm.ico
- primaryColor: '#c0c0c0'
- darkMode: true
- gravatar: true
- # by default packages are ordercer ascendant (asc|desc)
- # sort_packages: asc
- # convert your UI to the dark side
- # darkMode: true
- # html_cache: true
- # by default all features are displayed
- # login: true
- pkgManagers:
- - apm
- showInfo: false
- showUplinks: false
- showSettings: false
- # In combination with darkMode you can force specific theme
- # showThemeSwitch: true
- # showFooter: true
- # showSearch: false
- # showRaw: true
- # showDownloadTarball: true
- # HTML tags injected after manifest
- # scriptsBodyAfter:
- # - ''
- # HTML tags injected before ends
- metaScripts:
- - ''
- - ''
- # - ''
- # - ''
- # HTML tags injected first child at