From 22470d6160b450515966e7e38c37c45085f8ceb2 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:31:20 +0100 Subject: [PATCH 1/6] Version pinning --- package.json | 54 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 9a98b15..3830f41 100644 --- a/package.json +++ b/package.json @@ -44,37 +44,37 @@ ], "license": "CC-BY-NC-SA-4.0", "dependencies": { - "@odit/class-validator-jsonschema": "^2.1.1", + "@odit/class-validator-jsonschema": "2.1.1", "class-transformer": "0.3.1", - "class-validator": "^0.13.1", - "consola": "^2.15.3", - "cors": "^2.8.5", - "dotenv": "^8.2.0", - "express": "^4.17.1", - "handlebars": "^4.7.6", - "i18next": "^19.8.7", - "i18next-fs-backend": "^1.0.8", - "nodemailer": "^6.5.0", - "reflect-metadata": "^0.1.13", + "class-validator": "0.13.1", + "consola": "2.15.3", + "cors": "2.8.5", + "dotenv": "8.2.0", + "express": "4.17.1", + "handlebars": "4.7.6", + "i18next": "19.8.7", + "i18next-fs-backend": "1.0.8", + "nodemailer": "6.5.0", + "reflect-metadata": "0.1.13", "routing-controllers": "0.9.0-alpha.6", "routing-controllers-openapi": "2.2.0" }, "devDependencies": { - "@odit/license-exporter": "^0.0.10", - "@types/express": "^4.17.11", - "@types/jest": "^26.0.20", - "@types/node": "^14.14.22", - "@types/nodemailer": "^6.4.0", - "axios": "^0.21.1", - "cp-cli": "^2.0.0", - "jest": "^26.6.3", - "nodemon": "^2.0.7", - "release-it": "^14.2.2", - "rimraf": "^3.0.2", - "start-server-and-test": "^1.12.0", - "ts-jest": "^26.5.2", - "ts-node": "^9.1.1", - "typescript": "^4.1.3" + "@odit/license-exporter": "0.0.10", + "@types/express": "4.17.11", + "@types/jest": "26.0.20", + "@types/node": "14.14.22", + "@types/nodemailer": "6.4.0", + "axios": "0.21.1", + "cp-cli": "2.0.0", + "jest": "26.6.3", + "nodemon": "2.0.7", + "release-it": "14.2.2", + "rimraf": "3.0.2", + "start-server-and-test": "1.12.0", + "ts-jest": "26.5.2", + "ts-node": "9.1.1", + "typescript": "4.1.3" }, "release-it": { "git": { @@ -89,4 +89,4 @@ "publish": false } } -} +} \ No newline at end of file -- 2.47.2 From acb013e8ae86f868aced40dbc2a68f8165627145 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:31:31 +0100 Subject: [PATCH 2/6] Shut up pnpm warnings --- .npmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..fa4e095 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +strict-peer-dependencies=false \ No newline at end of file -- 2.47.2 From af173dcec822f12d8233b717304ad82b7fac14db Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:32:55 +0100 Subject: [PATCH 3/6] Bumped docker node --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41b7e99..70b6eb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Typescript Build -FROM registry.odit.services/hub/library/node:14.15.1-alpine3.12 +FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 WORKDIR /app COPY package.json ./ RUN npm i -g pnpm @@ -8,7 +8,7 @@ COPY tsconfig.json ./ COPY src ./src RUN pnpm run build # final image -FROM registry.odit.services/hub/library/node:14.15.1-alpine3.12 +FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 COPY package.json ./ RUN npm i -g pnpm RUN pnpm i --prod -- 2.47.2 From f422f989c7d5c2fead70e37fc314b734034916f7 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:35:51 +0100 Subject: [PATCH 4/6] Now building w/ kaniko --- .drone.yml | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7efbdd9..e982f17 100644 --- a/.drone.yml +++ b/.drone.yml @@ -54,18 +54,22 @@ steps: - git clone $DRONE_REMOTE_URL . - git checkout dev - name: build dev - image: plugins/docker - depends_on: [clone] + image: registry.odit.services/library/drone-kaniko settings: username: from_secret: docker_username password: from_secret: docker_password - repo: registry.odit.services/lfk/mailer + build_args: + - NPM_REGISTRY_DOMAIN: + from_secret: npmjs_domain + - NPM_REGISTRY_TOKEN: + from_secret: npmjs_token + repo: lfk/mailer tags: - dev + cache: true registry: registry.odit.services - mtu: 1000 - name: run changelog export depends_on: ["clone"] image: node:latest @@ -100,7 +104,6 @@ steps: skip_verify: true ssh_key: from_secret: git_ssh - trigger: branch: - dev @@ -123,18 +126,22 @@ steps: - git merge main - git checkout main - name: build latest - depends_on: ["clone"] - image: plugins/docker + image: registry.odit.services/library/drone-kaniko settings: username: from_secret: docker_username password: from_secret: docker_password - repo: registry.odit.services/lfk/mailer + build_args: + - NPM_REGISTRY_DOMAIN: + from_secret: npmjs_domain + - NPM_REGISTRY_TOKEN: + from_secret: npmjs_token + repo: lfk/mailer tags: - latest + cache: true registry: registry.odit.services - mtu: 1000 - name: push merge to repo depends_on: ["clone"] image: appleboy/drone-git-push @@ -144,7 +151,6 @@ steps: remote: git@git.odit.services:lfk/mailer.git ssh_key: from_secret: git_ssh - trigger: branch: - main @@ -158,18 +164,22 @@ name: build:tags steps: - name: build $DRONE_TAG - image: plugins/docker - depends_on: [clone] + image: registry.odit.services/library/drone-kaniko settings: username: from_secret: docker_username password: from_secret: docker_password - repo: registry.odit.services/lfk/mailer + build_args: + - NPM_REGISTRY_DOMAIN: + from_secret: npmjs_domain + - NPM_REGISTRY_TOKEN: + from_secret: npmjs_token + repo: lfk/mailer tags: - - '${DRONE_TAG}' + - "${DRONE_TAG}" + cache: true registry: registry.odit.services - mtu: 1000 trigger: event: - - tag \ No newline at end of file + - tag -- 2.47.2 From c48a2ed01e65dc20c562d80099ca7448a8725446 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:36:23 +0100 Subject: [PATCH 5/6] Fresh licenses 4 yall --- licenses.md | 67 ++++++++++++++++++----------------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/licenses.md b/licenses.md index 65efca2..30fc94b 100644 --- a/licenses.md +++ b/licenses.md @@ -244,7 +244,7 @@ SOFTWARE. # i18next-fs-backend **Author**: undefined **Repo**: git@github.com:i18next/i18next-fs-backend.git -**License**: MIT +**License**: undefined **Description**: i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem. ## License Text @@ -492,27 +492,27 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **License**: MIT **Description**: TypeScript definitions for Nodemailer ## License Text - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE # axios @@ -604,7 +604,7 @@ SOFTWARE. **Author**: [object Object] **Repo**: https://github.com/remy/nodemon.git **License**: MIT -**Description**: Simple monitor script for use during development of a Node.js app. +**Description**: Simple monitor script for use during development of a node.js app. ## License Text MIT License @@ -687,27 +687,6 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. **License**: MIT **Description**: Starts server, waits for URL, then runs test command; when the tests end, shuts down server ## License Text -MIT License - -Copyright (c) 2022 bahmutov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. # ts-jest -- 2.47.2 From 0692b72955974c2fdee6441d4e7838d41dde8ed6 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 1 Feb 2023 13:37:48 +0100 Subject: [PATCH 6/6] Bumped used ci node images --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index e982f17..9bdffb0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,7 @@ get: --- kind: pipeline type: kubernetes -name: tests:node_latest +name: tests:node clone: disable: true steps: @@ -32,7 +32,7 @@ steps: - git clone $DRONE_REMOTE_URL . - git checkout $DRONE_SOURCE_BRANCH - name: run tests - image: node:latest + image: registry.odit.services/hub/library/node:19.0.1-alpine3.16 commands: - yarn - yarn test:ci @@ -72,7 +72,7 @@ steps: registry: registry.odit.services - name: run changelog export depends_on: ["clone"] - image: node:latest + image: registry.odit.services/hub/library/node:19.0.1-alpine3.16 commands: - npx auto-changelog --commit-limit false -p -u --hide-credit - name: push new changelog to repo @@ -88,7 +88,7 @@ steps: from_secret: git_ssh - name: run full license export depends_on: ["clone"] - image: node:14.15.1-alpine3.12 + image: registry.odit.services/hub/library/node:19.0.1-alpine3.16 commands: - yarn - yarn licenses:export -- 2.47.2