refactor: app deployment

This commit is contained in:
2023-06-05 10:54:18 +02:00
parent b21833de40
commit 3b8a344d73
104 changed files with 583 additions and 13494 deletions

View File

@@ -1,8 +1,14 @@
FROM registry.gitlab.com/openstapps/projectmanagement/node
FROM openstapps:workspace as pruned
ADD . /app
WORKDIR /app
USER root
RUN pnpm --filter @openstapps/api-cli --prod deploy /pruned
ENTRYPOINT ["node", "lib/cli.js"]
FROM registry.gitlab.com/openstapps/projectmanagement/node:v18
USER node
ENV NODE_ENV=production
COPY --chown=node:node --from=pruned pruned .
ENTRYPOINT ["node", "app.js"]
CMD ["--help"]

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api-cli",
"description": "CLI client for @openstapps/api",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",
@@ -18,25 +18,26 @@
"bin": {
"openstapps-api": "app.js"
},
"files": [
"app.js",
"lib",
"README.md"
],
"scripts": {
"build": "tsup",
"build": "tsup-node",
"build:docker": "docker build -t openstapps:api-cli .",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
"lint": "tsc --noEmit && eslint --ext .ts src/",
"lint:fix": "eslint --fix --ext .ts src/",
"test": "c8 mocha --exit"
},
"devDependencies": {
"dependencies": {
"@openstapps/api": "workspace:*",
"@openstapps/core": "workspace:*",
"@openstapps/core-tools": "workspace:*",
"@openstapps/eslint-config": "workspace:*",
"@openstapps/logger": "workspace:*",
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/chai-spies": "1.0.3",
"@types/cli-progress": "3.11.0",
"@types/express": "4.17.17",
"@types/fs-extra": "9.0.13",
@@ -44,22 +45,26 @@
"@types/mocha": "10.0.1",
"@types/node": "18.15.3",
"@types/wait-on": "5.3.1",
"cli-progress": "3.12.0",
"commander": "10.0.0",
"fs-extra": "10.1.0",
"wait-on": "6.0.1"
},
"devDependencies": {
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/chai-spies": "1.0.3",
"c8": "7.14.0",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"chai-spies": "1.0.0",
"cli-progress": "3.12.0",
"commander": "10.0.0",
"fs-extra": "10.1.0",
"mocha": "10.2.0",
"nock": "13.3.1",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typescript": "4.9.5",
"wait-on": "6.0.1"
},
"peerDependencies": {
"@openstapps/core": "workspace:*"
"typescript": "4.9.5"
},
"tsup": {
"entry": [

View File

@@ -17,7 +17,7 @@ import {Logger} from '@openstapps/logger';
import {Command} from 'commander';
import {readFileSync} from 'fs';
import path from 'path';
import {URL} from 'url';
import {fileURLToPath, URL} from 'url';
import waitOn from 'wait-on';
import {HttpClient} from '@openstapps/api';
import {copy} from './copy.js';
@@ -29,7 +29,9 @@ process.on('unhandledRejection', async error => {
});
// eslint-disable-next-line unicorn/prefer-module
const packageJson = JSON.parse(readFileSync(path.join(__dirname, '..', 'package.json')).toString());
const packageJson = JSON.parse(
readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json')).toString(),
);
const client = new HttpClient();
const commander = new Command();

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api-plugin",
"description": "Node.js library to interact with the StApps backend service",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",
@@ -17,8 +17,12 @@
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib",
"README.md"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -57,7 +61,7 @@
"nock": "13.3.1",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"peerDependencies": {

View File

@@ -1,124 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
default:
tags:
- performance
before_script:
- npm ci
stages:
- build
- test
- audit
- publish
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
package:
dependencies:
- build
tags:
- secrecy
stage: publish
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib
audit:
stage: audit
script:
- npm audit
allow_failure: true
except:
- schedules
scheduled-audit:
stage: audit
script:
- npm audit --audit-level=high
only:
- schedules
unit:
stage: test
script:
- npm test
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
artifacts:
paths:
- public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
docker image:
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
dependencies:
- build
stage: publish
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- export VERSION=$(node -p "require('./package.json').version")
- export CORE_VERSION=$(openstapps-projectmanagement get-used-version @openstapps/core)
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE/cli
- export IMAGETAG_CORE_VERSION=$IMAGETAG_BASE:core-$CORE_VERSION
- export IMAGETAG_VERSION=$IMAGETAG_BASE:$VERSION
- export IMAGETAG_LATEST=$IMAGETAG_BASE:latest
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $IMAGETAG_LATEST -t $IMAGETAG_VERSION -t $IMAGETAG_CORE_VERSION .
- docker push $IMAGETAG_BASE
tags:
- secrecy
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
branch image:
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
stage: publish
dependencies:
- build
artifacts:
untracked: true
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE/cli
- export IMAGETAG_BRANCH=$IMAGETAG_BASE:$CI_COMMIT_REF_SLUG
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $IMAGETAG_BRANCH .
- docker push $IMAGETAG_BASE
except:
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
only:
- branches
when: manual
tags:
- secrecy

View File

@@ -1,32 +0,0 @@
## Summary
(Summarize the bug encountered concisely)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
## What is the current bug behavior?
(What actually happens)
## What is the expected correct behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~meeting

View File

@@ -1,13 +0,0 @@
## Description
(Describe the feature that you're requesting concisely)
## Explanation
(Explain why the feature is necessary)
## Dependencies, issues to be resolved beforehand
(List issues or dependencies that need to be resolved before this feature can be implemented)
/label ~meeting

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api",
"description": "Node.js library to interact with the StApps backend service",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",
@@ -17,8 +17,12 @@
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib",
"README.md"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -40,7 +44,6 @@
"@types/chai-spies": "1.0.3",
"@types/mocha": "10.0.1",
"@types/traverse": "0.6.32",
"undici": "5.22.1",
"c8": "7.14.0",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
@@ -51,8 +54,9 @@
"traverse": "0.6.7",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typescript": "4.9.5"
"typedoc": "0.24.8",
"typescript": "4.9.5",
"undici": "5.22.1"
},
"peerDependencies": {
"@openstapps/core": "workspace:*"

View File

@@ -1,11 +1,14 @@
{
"name": "@openstapps/collection-utils",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"main": "lib/index.js",
"files": [
"lib"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -25,7 +28,7 @@
"mocha": "10.2.0",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {

View File

@@ -1,98 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Schema generation data
Diagram-*.svg
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
#DynamoDB Local files
.dynamodb/
########## end of https://github.com/github/gitignore/blob/master/Node.gitignore
# ignore ide files
.idea
.vscode
# ignore lib directory
lib/
# ignore docs directory
docs/
# ignore openapi resources
openapi/

View File

@@ -1,87 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
before_script:
- npm ci
stages:
- build
- test
- audit
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
test:
stage: test
script:
- npm test
audit:
stage: audit
script:
- npm audit
allow_failure: true
except:
- schedules
scheduled-audit:
stage: audit
script:
- npm audit --audit-level=high
only:
- schedules
openapi:
dependencies:
- build
stage: test
script:
- npm install @openstapps/core
- node lib/cli.js openapi node_modules/@openstapps/core/lib openapi
- NUMBER_OF_LINES=$(cat openapi/openapi.json | wc -l)
- if [ "$NUMBER_OF_LINES" -lt 100 ]; then exit 1; fi
artifacts:
paths:
- openapi/openapi.json
package:
dependencies:
- build
tags:
- secrecy
stage: deploy
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib
uml:
dependencies:
- build
stage: test
services:
- name: registry.gitlab.com/openstapps/core-tools:latest
alias: plantuml
script:
- node lib/cli.js plantuml test/model http://plantuml:8080 --showProperties --showOptionalProperties --showInheritedProperties --showEnumValues --showAssociations --showInheritance --excludeExternals
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public

View File

@@ -1,32 +0,0 @@
## Summary
(Summarize the bug encountered concisely)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
## What is the current bug behavior?
(What actually happens)
## What is the expected correct behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~meeting

View File

@@ -1,13 +0,0 @@
## Description
(Describe the feature that you're requesting concisely)
## Explanation
(Explain why the feature is necessary)
## Dependencies, issues to be resolved beforehand
(List issues or dependencies that need to be resolved before this feature can be implemented)
/label ~meeting

View File

@@ -1,12 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!resources
!src

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/core-tools",
"description": "Tools to convert and validate StAppsCore",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core-tools.git",
@@ -25,8 +25,14 @@
"bin": {
"openstapps-core-tools": "app.js"
},
"files": [
"app.js",
"lib",
"README.md",
"Dockerfile"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -48,7 +54,7 @@
"del": "6.1.1",
"flatted": "3.2.7",
"fs-extra": "10.1.0",
"glob": "10.2.6",
"glob": "10.2.7",
"got": "12.6.0",
"humanize-string": "3.0.0",
"json-schema": "0.4.0",
@@ -61,7 +67,6 @@
},
"devDependencies": {
"@openstapps/eslint-config": "workspace:*",
"@openstapps/nyc-config": "workspace:*",
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
@@ -77,7 +82,7 @@
"nock": "13.3.1",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {

View File

@@ -1,95 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
#DynamoDB Local files
.dynamodb/
########## end of https://github.com/github/gitignore/blob/master/Node.gitignore
# ignore ide files
.idea
.vscode
# ignore lib
lib
# ignore docs
docs
# report directory
report

View File

@@ -1,135 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
before_script:
- npm install
stages:
- build
- review
- test
- audit
- deploy
- publish
build:
tags:
- performance
stage: build
script:
- npm run build
artifacts:
paths:
- lib
expire_in: 1 week
build-ts-3.8.3:
tags:
- performance
stage: build
script:
- npm uninstall typescript
- npm install typescript@3.8.3
- npm run build
docs_review:
dependencies:
- build
stage: review
script:
- npm run documentation
- ./node_modules/.bin/surge -p ./docs -d https://$CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh/
when: manual
environment:
name: review/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_NAME
url: https://$CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh/
on_stop: stop_review
except:
- master
- develop
tags:
- secrecy
stop_review:
stage: review
variables:
GIT_STRATEGY: none
script:
- ./node_modules/.bin/surge teardown $CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh
when: manual
environment:
name: review/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_NAME
action: stop
tags:
- secrecy
audit:
stage: audit
script:
- npm audit
allow_failure: true
except:
- schedules
scheduled-audit:
stage: audit
script:
- npm audit --audit-level=high
only:
- schedules
test:
dependencies:
- build
stage: test
script:
- npm test
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
artifacts:
paths:
- report
- coverage
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
mapping:
tags:
- performance
dependencies:
- build
stage: test
services:
- name: registry.gitlab.com/openstapps/database:latest
alias: elasticsearch
script:
- npm run mappings-integration
artifacts:
paths:
- lib
package:
dependencies:
- build
tags:
- secrecy
stage: publish
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public

View File

@@ -1,12 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!src
!test/resources/

View File

@@ -1,5 +0,0 @@
lib
coverage
report
docs
.nyc-output

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/core",
"description": "StAppsCore - Generalized model of data",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core.git",
@@ -25,8 +25,13 @@
],
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"files": [
"lib",
"test/resources",
"README.md"
],
"scripts": {
"build": "tsup --dts && pnpm run mappings && pnpm run schema",
"build": "tsup-node --dts && pnpm run mappings && pnpm run schema",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -66,7 +71,7 @@
"surge": "0.23.1",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {

View File

@@ -1,15 +1,19 @@
{
"name": "@openstapps/easy-ast",
"description": "Tool to easily handle TypeScript AST",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core-tools.git",
"author": "Thea Schöbl <dev@theaninova.de>",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"files": [
"lib",
"README.md"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -20,7 +24,7 @@
"dependencies": {
"@openstapps/collection-utils": "workspace:*",
"@openstapps/logger": "workspace:*",
"glob": "10.2.6",
"glob": "10.2.7",
"typescript": "4.9.5"
},
"devDependencies": {
@@ -35,7 +39,7 @@
"mocha": "10.2.0",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7"
"typedoc": "0.24.8"
},
"tsup": {
"entry": [

View File

@@ -1,71 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
before_script:
- npm install
stages:
- build
- test
- audit
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
test:
tags:
- docker
stage: test
script:
- npm test
audit:
stage: audit
script:
- npm audit
allow_failure: true
except:
- schedules
scheduled-audit:
stage: audit
script:
- npm audit --audit-level=high
only:
- schedules
package:
dependencies:
- build
tags:
- secrecy
stage: deploy
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public

View File

@@ -1,12 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!resources
!src

View File

@@ -1 +0,0 @@
FROM plantuml/plantuml-server:tomcat

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/es-mapping-generator",
"description": "Tool to convert TypeScript Interfaces to Elasticsearch Mappings",
"version": "2.1.0",
"version": "3.0.0",
"type": "commonjs",
"license": "GPL-3.0-only",
"author": "Thea Schöbl <dev@theaninova.de>",
@@ -10,6 +10,11 @@
"bin": {
"openstapps-es-mapping-generator": "app.js"
},
"files": [
"app.js",
"lib",
"README.md"
],
"scripts": {
"build": "rimraf lib && tsc",
"format": "prettier . -c --ignore-path ../../.gitignore",

View File

@@ -1,65 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
before_script:
- npm install
stages:
- build
- test
- audit
- deploy
- publish
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
audit:
allow_failure: true
except:
- schedules
script:
- npm audit
stage: audit
scheduled-audit:
only:
- schedules
script:
- npm audit
stage: audit
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public
package:
dependencies:
- build
tags:
- secrecy
stage: publish
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib

View File

@@ -1,32 +0,0 @@
## Summary
(Summarize the bug encountered concisely)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
## What is the current bug behavior?
(What actually happens)
## What is the expected correct behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~meeting

View File

@@ -1,11 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!src

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/gitlab-api",
"description": "Wraps common GitLab API calls in a TypeScript class.",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/gitlab-api.git",
@@ -14,8 +14,13 @@
"bin": {
"openstapps-gitlab-api": "app.js"
},
"files": [
"app.js",
"lib",
"README.md"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/api.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -34,7 +39,7 @@
"@types/node": "18.15.3",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {

View File

@@ -1,76 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
before_script:
- npm ci
stages:
- build
- test
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
test:
variables:
FORCE_COLOR: '1' # see https://github.com/chalk/chalk/issues/203
stage: test
script:
- npm test
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
audit:
stage: test
script:
- npm audit
except:
- schedules
allow_failure: true
scheduled-audit:
stage: test
script:
- npm audit
only:
- schedules
package:
dependencies:
- build
tags:
- secrecy
stage: deploy
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
- npm publish
only:
- /^v[0-9]+.[0-9]+.[0-9]+$/
artifacts:
paths:
- lib
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public

View File

@@ -1,11 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!src

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/logger",
"description": "A cli logger with colors, log-levels and the possibility to use a transport system for errors",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/logger.git",
@@ -13,8 +13,12 @@
],
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"files": [
"lib",
"README.md"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -44,7 +48,7 @@
"mocha": "10.2.0",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {