Compare commits
20 Commits
v3.0.0-nex
...
@openstapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7f512b7bd | ||
|
|
78d9690974 | ||
|
|
cbc59795b7 | ||
|
|
945ae039eb | ||
|
|
06f3120345 | ||
|
|
bebee6b4d0 | ||
| 2f59ab9707 | |||
|
|
23481d0d73 | ||
|
|
df37c6c185 | ||
| d3268b50c2 | |||
| b085850207 | |||
| c9240f289e | |||
|
|
2fe8275f2f | ||
|
|
9ec35e65f8 | ||
|
|
59e8e6e264 | ||
|
|
982b4feb3c | ||
| 107a7c5e9e | |||
| 16a039a16e | |||
| 11c9d742cd | |||
| 4e4c7b5cc9 |
5
.changeset/bright-dryers-act.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@openstapps/app': major
|
||||
---
|
||||
|
||||
Update to Angular 16.1
|
||||
@@ -5,7 +5,7 @@
|
||||
"fixed": [],
|
||||
"linked": [["@openstapps/*"]],
|
||||
"access": "restricted",
|
||||
"baseBranch": "master",
|
||||
"baseBranch": "develop",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": []
|
||||
}
|
||||
|
||||
68
.changeset/pre.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"mode": "pre",
|
||||
"tag": "next",
|
||||
"initialVersions": {
|
||||
"@openstapps/backend": "2.0.0",
|
||||
"@openstapps/database": "2.0.0",
|
||||
"@openstapps/proxy": "2.0.0",
|
||||
"@openstapps/backend-config": "2.0.0",
|
||||
"@openstapps/eslint-config": "2.0.0",
|
||||
"@openstapps/prettier-config": "2.0.0",
|
||||
"@openstapps/projectmanagement": "2.0.0",
|
||||
"@openstapps/tsconfig": "2.0.0",
|
||||
"@openstapps/minimal-connector": "2.0.0",
|
||||
"@openstapps/minimal-deployment": "2.0.0",
|
||||
"@openstapps/minimal-plugin": "2.0.0",
|
||||
"@openstapps/app": "2.0.0",
|
||||
"@openstapps/api": "2.0.0",
|
||||
"@openstapps/api-cli": "2.0.0",
|
||||
"@openstapps/api-plugin": "2.0.0",
|
||||
"@openstapps/collection-utils": "2.0.0",
|
||||
"@openstapps/core": "2.0.0",
|
||||
"@openstapps/core-tools": "2.0.0",
|
||||
"@openstapps/easy-ast": "2.0.0",
|
||||
"@openstapps/es-mapping-generator": "2.0.0",
|
||||
"@openstapps/gitlab-api": "2.0.0",
|
||||
"@openstapps/logger": "2.0.0",
|
||||
"@openstapps/app-builder-image": "3.0.0-next.3",
|
||||
"@openstapps/node-base": "3.0.0-next.3",
|
||||
"@openstapps/node-builder": "3.0.0-next.3"
|
||||
},
|
||||
"changesets": [
|
||||
"bright-dryers-act",
|
||||
"cool-jars-kiss",
|
||||
"cuddly-bobcats-roll",
|
||||
"dull-news-appear",
|
||||
"five-ears-wash",
|
||||
"fuzzy-walls-greet",
|
||||
"giant-crabs-cheer",
|
||||
"gorgeous-flowers-reflect",
|
||||
"healthy-steaks-shop",
|
||||
"honest-sheep-train",
|
||||
"late-zoos-breathe",
|
||||
"moody-parrots-develop",
|
||||
"neat-hats-trade",
|
||||
"new-pianos-joke",
|
||||
"pretty-timers-complain",
|
||||
"proud-wolves-end",
|
||||
"quick-houses-count",
|
||||
"rare-squids-bake",
|
||||
"serious-meals-sin",
|
||||
"silent-maps-float",
|
||||
"silly-news-punch",
|
||||
"smart-ghosts-shout",
|
||||
"soft-donuts-fail",
|
||||
"sour-coins-visit",
|
||||
"spicy-snails-sort",
|
||||
"stale-garlics-share",
|
||||
"strange-hounds-repair",
|
||||
"tall-ducks-dream",
|
||||
"tame-mayflies-hug",
|
||||
"tame-rings-dream",
|
||||
"tasty-islands-smell",
|
||||
"thick-weeks-compete",
|
||||
"thin-camels-give",
|
||||
"tidy-buses-reflect",
|
||||
"tough-hairs-provide"
|
||||
]
|
||||
}
|
||||
8
.changeset/pretty-timers-complain.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': major
|
||||
'@openstapps/node-base': major
|
||||
---
|
||||
|
||||
Move images to separate packages
|
||||
|
||||
Removed builder image due to migration to Kaniko
|
||||
5
.changeset/serious-meals-sin.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': patch
|
||||
---
|
||||
|
||||
Update release configs
|
||||
29
.changeset/silent-maps-float.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': patch
|
||||
'@openstapps/prettier-config': patch
|
||||
'@openstapps/es-mapping-generator': patch
|
||||
'@openstapps/backend-config': patch
|
||||
'@openstapps/eslint-config': patch
|
||||
'@openstapps/minimal-deployment': patch
|
||||
'@openstapps/minimal-connector': patch
|
||||
'@openstapps/collection-utils': patch
|
||||
'@openstapps/minimal-plugin': patch
|
||||
'@openstapps/tsconfig': patch
|
||||
'@openstapps/node-builder': patch
|
||||
'@openstapps/api-plugin': patch
|
||||
'@openstapps/core-tools': patch
|
||||
'@openstapps/gitlab-api': patch
|
||||
'@openstapps/app-builder-image': patch
|
||||
'@openstapps/easy-ast': patch
|
||||
'@openstapps/database': patch
|
||||
'@openstapps/node-base': patch
|
||||
'@openstapps/api-cli': patch
|
||||
'@openstapps/backend': patch
|
||||
'@openstapps/logger': patch
|
||||
'@openstapps/proxy': patch
|
||||
'@openstapps/core': patch
|
||||
'@openstapps/app': patch
|
||||
'@openstapps/api': patch
|
||||
---
|
||||
|
||||
Update to TypeScript 5.1.6
|
||||
5
.changeset/silly-news-punch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Migrate collection helpers to use @openstapps/collection-utils
|
||||
8
.changeset/smart-ghosts-shout.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Migrate to Ionic 7
|
||||
|
||||
- Migrate uses of `<ion-label>` with inputs to new syntax
|
||||
- Fix infinite loop in schedule date picker (`datetime.confirm()` to `datetime.cancel()`)
|
||||
6
.changeset/tasty-islands-smell.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Migrate unit tests to karma-coverage and junit reports.
|
||||
Fixes an issue where coverage reports would not be generated.
|
||||
5
.gitignore
vendored
@@ -19,6 +19,11 @@ www/
|
||||
coverage.xml
|
||||
report-junit.xml
|
||||
.deploy/
|
||||
.venv/
|
||||
|
||||
# NixOS flake
|
||||
result
|
||||
hsperfdata_root
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
@@ -7,13 +7,18 @@
|
||||
# ```
|
||||
# To your pipeline.
|
||||
# https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs
|
||||
|
||||
.limit_pipelines:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'
|
||||
when: on_success
|
||||
- when: never
|
||||
|
||||
include:
|
||||
- local: /backend/backend/.gitlab-ci.yml
|
||||
- local: /frontend/app/.gitlab-ci.yml
|
||||
- local: /.gitlab/schedules.gitlab-ci.yml
|
||||
- local: /.gitlab/publishing.gitlab-ci.yml
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
when: never
|
||||
|
||||
variables:
|
||||
TURBO_CACHE_BYPASS:
|
||||
@@ -25,7 +30,7 @@ variables:
|
||||
description: Bypass turbo cache
|
||||
|
||||
default:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:v18
|
||||
image: registry.gitlab.com/openstapps/openstapps/node-builder
|
||||
tags:
|
||||
- performance
|
||||
interruptible: true
|
||||
@@ -45,6 +50,7 @@ default:
|
||||
policy: pull
|
||||
|
||||
stages:
|
||||
- setup
|
||||
- build
|
||||
- test
|
||||
- audit
|
||||
@@ -57,12 +63,11 @@ build:
|
||||
# - pnpm i --prefer-offline
|
||||
# - pnpm build:full:skip || pnpm i -r --prefer-offline
|
||||
- pnpm install
|
||||
# TODO: something doesn't work with git here...
|
||||
# TODO: whats the benifit for CI? something doesn't work with git here...
|
||||
# "🦋 error Error: Failed to find where HEAD diverged from master. Does master exist?"
|
||||
# - pnpm changeset:status
|
||||
- pnpm build:full $TURBO_CACHE_BYPASS
|
||||
# pretty sure this is deprecated?
|
||||
# TODO: - .gitlab/ci/enableGitlabReviewToolbar.sh www/index.html "$CI_PROJECT_ID" "$CI_OPEN_MERGE_REQUESTS"
|
||||
- .gitlab/ci/enableGitlabReviewToolbar.sh frontend/app/www/index.html "$CI_PROJECT_ID" "$CI_OPEN_MERGE_REQUESTS"
|
||||
- cp frontend/app/www/index.html frontend/app/www/200.html
|
||||
- pnpm dlx surge -p frontend/app/www -d https://$CI_PROJECT_NAME-$DEPLOY_ID.surge.sh/
|
||||
cache:
|
||||
@@ -82,6 +87,7 @@ build:
|
||||
- if: $CI_COMMIT_BRANCH == 'develop'
|
||||
variables:
|
||||
DEPLOY_ID: staging
|
||||
- !reference [.limit_pipelines, rules]
|
||||
|
||||
stop review:
|
||||
stage: build
|
||||
@@ -95,6 +101,7 @@ stop review:
|
||||
rules: *deploy-rules
|
||||
|
||||
unit:
|
||||
image: registry.gitlab.com/openstapps/openstapps/app-builder
|
||||
stage: test
|
||||
needs: ['build']
|
||||
script:
|
||||
@@ -102,10 +109,13 @@ unit:
|
||||
# - pnpm i --prefer-offline
|
||||
# - pnpm test:skip || pnpm i -r --prefer-offline
|
||||
- pnpm install
|
||||
- cd node_modules/.pnpm/re2*/node_modules/re2
|
||||
- npm run install
|
||||
- cd $CI_PROJECT_DIR
|
||||
- pnpm test $TURBO_CACHE_BYPASS
|
||||
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
|
||||
artifacts:
|
||||
when: always
|
||||
when: on_failure
|
||||
paths:
|
||||
- report-junit.xml
|
||||
- coverage.xml
|
||||
@@ -116,13 +126,15 @@ unit:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
rules:
|
||||
- when: on_success
|
||||
- !reference [.limit_pipelines, rules]
|
||||
|
||||
audit:
|
||||
stage: audit
|
||||
allow_failure: true
|
||||
needs: []
|
||||
script:
|
||||
- pnpm audit --prod
|
||||
rules:
|
||||
- when: on_success
|
||||
allow_failure: true
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
allow_failure: false
|
||||
- !reference [.limit_pipelines, rules]
|
||||
|
||||
3
.gitlab/ci/enableGitlabReviewToolbar.sh
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
# Adds a preedefined script tag including the merge current request id to the angular web app index.html.
|
||||
# This enables the interactive gitlab review toolbar.
|
||||
@@ -9,7 +10,7 @@ if echo -n $3 | grep -Eq '[0-9]+$'; then
|
||||
fi
|
||||
|
||||
INDEX_PATH=$(dirname $1)
|
||||
SCRIPT_TAG="<script defer data-project-id=\"$2\" data-project-path=\"openstapps/app\" data-merge-request-id=\"$MERGE_REQUEST_ID\" data-mr-url=\"https://gitlab.com\" id=\"review-app-toolbar-script\" src=\"visual_review_toolbar.js\"></script>"
|
||||
SCRIPT_TAG="<script defer data-project-id=\"$2\" data-project-path=\"openstapps/openstapps\" data-merge-request-id=\"$MERGE_REQUEST_ID\" data-mr-url=\"https://gitlab.com\" id=\"review-app-toolbar-script\" src=\"visual_review_toolbar.js\"></script>"
|
||||
|
||||
curl https://gitlab.com/assets/webpack/visual_review_toolbar.js --output "$INDEX_PATH/visual_review_toolbar.js" --silent
|
||||
sed -i -e "\@</head>@i\\$SCRIPT_TAG" $1
|
||||
|
||||
0
.gitlab/ci/getRegistryBranch.sh
Normal file → Executable file
0
.gitlab/ci/getRegistryTag.sh
Normal file → Executable file
0
.gitlab/ci/install-for-turbo.sh
Normal file → Executable file
0
.gitlab/ci/pushAsLatestVersion.sh
Normal file → Executable file
0
.gitlab/ci/setup_turbo_env.sh
Normal file → Executable file
0
.gitlab/ci/testCIScripts.sh
Normal file → Executable file
@@ -1,61 +1,79 @@
|
||||
.limit_publish_pipelines:
|
||||
rules:
|
||||
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /^ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||
|
||||
deploy:
|
||||
stage: publish
|
||||
needs: ['build']
|
||||
needs: ['build', 'unit', 'integration', 'e2e', 'audit']
|
||||
script:
|
||||
- pnpm install
|
||||
- pnpm run deploy
|
||||
artifacts:
|
||||
paths:
|
||||
- ./.deploy
|
||||
- ./frontend/app/www
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
when: manual
|
||||
- if: $CI_COMMIT_TAG
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
publish images:
|
||||
publish image:
|
||||
stage: publish
|
||||
inherit:
|
||||
default:
|
||||
- tags
|
||||
needs: ['deploy']
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.9.0-debug
|
||||
name: gcr.io/kaniko-project/executor:v1.12.1-debug
|
||||
entrypoint: [""]
|
||||
variables:
|
||||
PUBLISH_TAG: next
|
||||
script:
|
||||
- /kaniko/executor
|
||||
--context "${CI_PROJECT_DIR}/${DEPLOY_DIR}"
|
||||
--dockerfile "${CI_PROJECT_DIR}/${DEPLOY_DIR}/Dockerfile"
|
||||
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${DOCKER_TAG}"
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
variables:
|
||||
DOCKER_TAG: $CI_COMMIT_TAG
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
variables:
|
||||
DOCKER_TAG: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
- >
|
||||
/kaniko/executor
|
||||
--context "${CI_PROJECT_DIR}/${DEPLOY_DIR}"
|
||||
--dockerfile "${CI_PROJECT_DIR}/${DEPLOY_DIR}/Dockerfile"
|
||||
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
|
||||
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${PUBLISH_TAG}"
|
||||
parallel:
|
||||
matrix:
|
||||
- DEPLOY_DIR: backend/database
|
||||
IMAGE_NAME: database
|
||||
- DEPLOY_DIR: .deploy/backend
|
||||
IMAGE_NAME: backend
|
||||
- DEPLOY_DIR: .deploy/proxy
|
||||
IMAGE_NAME: proxy
|
||||
- IMAGE_NAME: database
|
||||
DEPLOY_DIR: backend/database
|
||||
- IMAGE_NAME: backend
|
||||
DEPLOY_DIR: .deploy/backend
|
||||
- IMAGE_NAME: proxy
|
||||
DEPLOY_DIR: .deploy/proxy
|
||||
- IMAGE_NAME: api
|
||||
DEPLOY_DIR: .deploy/api-cli
|
||||
- IMAGE_NAME: minimal-connector
|
||||
DEPLOY_DIR: .deploy/minimal-connector
|
||||
- IMAGE_NAME: minimal-plugin
|
||||
DEPLOY_DIR: .deploy/minimal-plugin
|
||||
- IMAGE_NAME: app
|
||||
DEPLOY_DIR: frontend/app
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
variables:
|
||||
PUBLISH_TAG: latest
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
publish:
|
||||
publish packages:
|
||||
stage: publish
|
||||
needs: ['deploy']
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_DEPTH: 0
|
||||
PUBLISH_TAG: next
|
||||
script:
|
||||
- pnpm install --prefer-offline
|
||||
- pnpm install
|
||||
- pnpm build
|
||||
- pnpm changeset version $PUBLISH_TYPE
|
||||
- pnpm changeset publish
|
||||
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
|
||||
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
variables:
|
||||
PUBLISH_TYPE: --snapshot $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
PUBLISH_TAG: latest
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
pages:docs:
|
||||
publish docs:
|
||||
stage: publish
|
||||
needs: ['deploy']
|
||||
script:
|
||||
@@ -66,5 +84,5 @@ pages:docs:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: on_success
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
33
.gitlab/schedules.gitlab-ci.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
.limit_scheduled_pipelines:
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == "schedule"
|
||||
|
||||
base image:
|
||||
image: docker
|
||||
stage: setup
|
||||
tags:
|
||||
- gitlab-org-docker
|
||||
inherit:
|
||||
default:
|
||||
- interruptible
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- >
|
||||
docker login -u "${CI_REGISTRY_USER}" -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}" &&
|
||||
docker build
|
||||
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
|
||||
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest" "${CI_PROJECT_DIR}/${DEPLOY_DIR}" &&
|
||||
docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}"
|
||||
cache: {} # disable irrelevant cache for this job
|
||||
before_script: [] # do not run irrelevant before script for this job
|
||||
parallel:
|
||||
matrix:
|
||||
- IMAGE_NAME: node-base
|
||||
DEPLOY_DIR: images/node-base
|
||||
- IMAGE_NAME: node-builder
|
||||
DEPLOY_DIR: images/node-builder
|
||||
- IMAGE_NAME: app-builder
|
||||
DEPLOY_DIR: images/app-builder
|
||||
rules:
|
||||
- !reference [.limit_scheduled_pipelines, rules]
|
||||
@@ -33,6 +33,13 @@ const config = {
|
||||
'nyc',
|
||||
],
|
||||
versionGroups: [
|
||||
{
|
||||
label: 'Package version is controlled by changesets',
|
||||
dependencies: ['**'],
|
||||
dependencyTypes: ['workspace'],
|
||||
packages: ['**'],
|
||||
isIgnored: true,
|
||||
},
|
||||
{
|
||||
label: 'ES Mapping Generator Special Dependencies',
|
||||
dependencies: ['typescript', 'typedoc', 'ts-node', '@types/node', 'got'],
|
||||
@@ -46,12 +53,6 @@ const config = {
|
||||
packages: ['**'],
|
||||
pinVersion: 'workspace:*',
|
||||
},
|
||||
{
|
||||
label: 'App may have some dependency exceptions',
|
||||
dependencies: ['typescript', '@typescript-eslint/**', 'eslint**'],
|
||||
packages: ['@openstapps/app'],
|
||||
isIgnored: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
15
README.md
@@ -27,15 +27,22 @@ Refer to the [contribution guide](./CONTRIBUTING.md)
|
||||
|
||||
After having added all changes using `pnpm changeset`
|
||||
|
||||
```shell
|
||||
pnpm publish-packages
|
||||
```
|
||||
|
||||
Internally, this will run
|
||||
|
||||
```shell
|
||||
pnpm changeset version # bump versions
|
||||
pnpm syncpack:fix
|
||||
pnpm format:fix # changes to the package.json can cause issues
|
||||
pnpm install # update lockfile and rebuild packages
|
||||
pnpm build # make sure all packages are built
|
||||
pnpm publish -r # publish all packages not yet in the registry
|
||||
git add .
|
||||
git commit -m "v[VERSION]"
|
||||
git tag -a "v[VERSION]"
|
||||
git commit -m "refactor: update changelog"
|
||||
pnpm changeset tags
|
||||
git push --follow-tags
|
||||
# from here the pipeline will do the publishing
|
||||
```
|
||||
|
||||
## Remote caching
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
integration:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:v18
|
||||
image: registry.gitlab.com/openstapps/openstapps/node-builder
|
||||
stage: test
|
||||
needs: ['build']
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
WAIT_FOR_SERVICES_TIMEOUT: 1
|
||||
services:
|
||||
- name: registry.gitlab.com/openstapps/database:latest
|
||||
- name: registry.gitlab.com/openstapps/openstapps/database:latest
|
||||
alias: elasticsearch
|
||||
script:
|
||||
- pnpm --filter=@openstapps/backend install
|
||||
- pnpm test:integration:backend
|
||||
artifacts:
|
||||
when: always
|
||||
when: on_failure
|
||||
paths:
|
||||
- backend/backend/coverage/integration-report-junit.xml
|
||||
reports:
|
||||
junit:
|
||||
- backend/backend/coverage/integration-report-junit.xml
|
||||
rules:
|
||||
- when: on_success
|
||||
- !reference [.limit_pipelines, rules]
|
||||
|
||||
@@ -1,5 +1,165 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [23481d0d]
|
||||
- @openstapps/core-tools@3.0.0-next.4
|
||||
- @openstapps/logger@3.0.0-next.4
|
||||
- @openstapps/core@3.0.0-next.4
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Migrate config system to cosmiconfig
|
||||
|
||||
Configs are now written using type-checked JavaScript
|
||||
|
||||
```js
|
||||
// @ts-check
|
||||
|
||||
// This file is now type-safe just like TypeScript, but
|
||||
// without the compilation step
|
||||
|
||||
/** @type {import('@openstapps/package').Type} */
|
||||
const foo = {};
|
||||
```
|
||||
|
||||
You can write config files in JavaScript, JSON, or other
|
||||
cosmiconfig-supported formats.
|
||||
|
||||
The config files now are
|
||||
|
||||
- `backendrc.{js,json,...}`
|
||||
- `elasticsearchrc.{js,json,...}`
|
||||
- `prometheusrc.{js,json,...}`
|
||||
|
||||
You can also split them into multiple files,
|
||||
as well as using the `markdown.js` helper in
|
||||
`config/default/tools` to include markdown files
|
||||
as text (see `config/f-u/about-pages`)
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 0a7e6af1: Migrate es mapping types from es-mapping-generator to .d.ts next to generated mappings
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate integration tests from docker-compose solution to a shell script
|
||||
|
||||
`api-cli` no longer builds as a Docker container as a result.
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- @openstapps/core-tools@3.0.0-next.0
|
||||
- @openstapps/logger@3.0.0-next.0
|
||||
- @openstapps/core@3.0.0-next.0
|
||||
|
||||
## [1.0.0](https://gitlab.com/openstapps/backend/compare/v0.6.0...v1.0.0) (2023-05-08)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node:v18
|
||||
FROM registry.gitlab.com/openstapps/openstapps/node-base
|
||||
|
||||
USER root
|
||||
RUN apk add --update python3 py3-pip make g++ gcompat
|
||||
|
||||
619
backend/backend/LICENSE
Normal file
@@ -0,0 +1,619 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
"author": "André Bierlein <andre.mt.bierlein@gmail.com>",
|
||||
@@ -23,14 +24,14 @@
|
||||
"config",
|
||||
"Dockerfile",
|
||||
"README.md",
|
||||
"ROUTES.md"
|
||||
"ROUTES.md",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
"build:docker": "docker build -t openstapps:backend ../../.deploy/backend",
|
||||
"deploy": "pnpm --prod --filter=@openstapps/backend deploy ../../.deploy/backend",
|
||||
"dev": "tsup --watch --onSuccess \"pnpm run start\"",
|
||||
"docs": "openapi build-docs ./node_modules/@openstapps/core/lib/openapi.json -o docs/openapi/index.html",
|
||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "tsc --noEmit && eslint --ext .ts src/",
|
||||
@@ -93,14 +94,12 @@
|
||||
"mocha": "10.2.0",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"mocked-env": "1.3.5",
|
||||
"openapi": "1.0.1",
|
||||
"redoc-cli": "0.13.20",
|
||||
"sinon": "15.0.4",
|
||||
"sinon-express-mock": "2.2.1",
|
||||
"supertest": "6.3.3",
|
||||
"ts-node": "10.9.1",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
7
backend/database/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# @openstapps/database
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"name": "@openstapps/database",
|
||||
"version": "2.0.0",
|
||||
"private": true
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"files": [
|
||||
"config",
|
||||
"Dockerfile",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,107 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [23481d0d]
|
||||
- @openstapps/logger@3.0.0-next.4
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/logger@3.0.0-next.0
|
||||
|
||||
## [1.5.1](https://gitlab.com/openstapps/proxy/compare/v1.5.0...v1.5.1) (2023-01-16)
|
||||
|
||||
## [1.5.0](https://gitlab.com/openstapps/proxy/compare/v1.4.1...v1.5.0) (2022-11-29)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node
|
||||
FROM registry.gitlab.com/openstapps/openstapps/node-base
|
||||
|
||||
USER root
|
||||
|
||||
|
||||
619
backend/proxy/LICENSE
Normal file
@@ -0,0 +1,619 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -27,7 +27,8 @@
|
||||
".dockerignore",
|
||||
"nginx.conf",
|
||||
"nginx.conf.template",
|
||||
"README.md"
|
||||
"README.md",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
@@ -50,7 +51,7 @@
|
||||
"is-cidr": "4.0.2",
|
||||
"mustache": "4.2.0",
|
||||
"semver": "7.3.8",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/api-cli": "workspace:*",
|
||||
|
||||
75
configuration/backend-config/CHANGELOG.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -14,7 +14,7 @@
|
||||
"prettier": "@openstapps/prettier-config",
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"@openstapps/eslint-configt"
|
||||
"@openstapps/eslint-config"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,96 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Update rules
|
||||
|
||||
- `unicorn/no-array-reduce` is now off
|
||||
- `unicorn/no-non-null-assertion` is now off
|
||||
- Removed prettier rules (use prettier formatting instead)
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 64caebaf: Add license header enforcement rule (unfinished)
|
||||
|
||||
## [1.1.0](https://gitlab.com/openstapps/eslint-config/compare/v1.0.0...v1.1.0) (2022-06-27)
|
||||
|
||||
## [1.0.0](https://gitlab.com/openstapps/eslint-config/compare/v0.0.3...v1.0.0) (2022-05-05)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
@@ -12,13 +12,14 @@
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js",
|
||||
"CHANGELOG.md",
|
||||
"README.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/node": "18.15.3",
|
||||
"eslint": "8.43.0",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "5.60.1",
|
||||
|
||||
@@ -1,3 +1,87 @@
|
||||
# @openstapps/prettier-config
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
|
||||
## 1.0.0 (2023-01-13)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/prettier-config",
|
||||
"description": "StApps Prettier Config",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/prettier-config.git",
|
||||
@@ -12,6 +12,7 @@
|
||||
"main": "index.json",
|
||||
"files": [
|
||||
"index.json",
|
||||
"CHANGELOG.md",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
|
||||
@@ -1,105 +1,3 @@
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/node
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
default:
|
||||
tags:
|
||||
- performance
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- maintenance
|
||||
- audit
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
npm build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- lib
|
||||
|
||||
npm test:
|
||||
script:
|
||||
- npm run test
|
||||
stage: test
|
||||
|
||||
docker image builder:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder
|
||||
stage: build
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_IMAGES == "true"
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
||||
- docker build -t registry.gitlab.com/openstapps/projectmanagement/builder -f images/builder/Dockerfile .
|
||||
- docker push registry.gitlab.com/openstapps/projectmanagement/builder
|
||||
tags:
|
||||
- secrecy
|
||||
|
||||
docker image node:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder
|
||||
stage: build
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_IMAGES == "true"
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com/openstapps/projectmanagement/
|
||||
- docker build -t registry.gitlab.com/openstapps/projectmanagement/node -f images/node/Dockerfile images/node
|
||||
- docker push registry.gitlab.com/openstapps/projectmanagement/node
|
||||
tags:
|
||||
- secrecy
|
||||
|
||||
docker image cypress:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder
|
||||
stage: build
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_IMAGES == "true"
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- export CHROME_VERSION=$(curl -fsSL https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions | jq -r '.versions[0].version')
|
||||
- export FIREFOX_VERSION=$(curl -fsSL https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION')
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com/openstapps/projectmanagement/
|
||||
- docker build --build-arg CHROME_VERSION=$CHROME_VERSION --build-arg FIREFOX_VERSION=$FIREFOX_VERSION -t registry.gitlab.com/openstapps/projectmanagement/cypress -f images/cypress/Dockerfile images/cypress
|
||||
- docker push registry.gitlab.com/openstapps/projectmanagement/cypress
|
||||
tags:
|
||||
- secrecy
|
||||
|
||||
npm audit:
|
||||
allow_failure: true
|
||||
except:
|
||||
- schedules
|
||||
script:
|
||||
- npm audit
|
||||
stage: audit
|
||||
|
||||
scheduled npm audit:
|
||||
only:
|
||||
- schedules
|
||||
except:
|
||||
variables:
|
||||
- $MAINTENANCE_MODE
|
||||
- $RENOVATE
|
||||
script:
|
||||
- npm audit --production
|
||||
stage: audit
|
||||
|
||||
tidy:
|
||||
script:
|
||||
- node lib/cli tidy
|
||||
@@ -131,32 +29,6 @@ unlabel:
|
||||
tags:
|
||||
- secrecy
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
npm package:
|
||||
dependencies:
|
||||
- npm 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
|
||||
|
||||
renovate:
|
||||
image: renovate/renovate:slim
|
||||
services:
|
||||
|
||||
@@ -1,5 +1,154 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 11c9d742: Move images to separate packages
|
||||
|
||||
Removed builder image due to migration to Kaniko
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4e4c7b5c: Update release configs
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [23481d0d]
|
||||
- @openstapps/collection-utils@3.0.0-next.4
|
||||
- @openstapps/gitlab-api@3.0.0-next.4
|
||||
- @openstapps/logger@3.0.0-next.4
|
||||
|
||||
## 3.0.0-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 995cc89d: Update release configs
|
||||
|
||||
## 3.0.0-next.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 995cc89d: Update release configs
|
||||
|
||||
## 3.0.0-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 995cc89d: Update release configs
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate moment.js to date-fns
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 64caebaf: Moved project-docs to the [GitLab Wiki](https://gitlab.com/openstapps/openstapps/-/wikis/home) repo.
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/collection-utils@3.0.0-next.0
|
||||
- @openstapps/gitlab-api@3.0.0-next.0
|
||||
- @openstapps/logger@3.0.0-next.0
|
||||
|
||||
## [0.25.0](https://gitlab.com/openstapps/projectmanagement/compare/v0.24.0...v0.25.0) (2023-01-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
FROM docker/compose
|
||||
|
||||
ARG NODE_VERSION="14"
|
||||
|
||||
RUN apk update && apk add nodejs npm git jq curl
|
||||
|
||||
RUN export DOWNLOAD_VERSION=$(curl -fsSL --compressed https://unofficial-builds.nodejs.org/download/release/index.json | \
|
||||
jq --raw-output ".[]|select(.version | startswith(\"v$NODE_VERSION\"))|.version" | head -1) && \
|
||||
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/$DOWNLOAD_VERSION/node-$DOWNLOAD_VERSION-linux-x64-musl.tar.xz" && \
|
||||
tar -xJf "node-$DOWNLOAD_VERSION-linux-x64-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner && \
|
||||
ln -sf /usr/local/bin/node /usr/local/bin/nodejs
|
||||
|
||||
ADD . /opt/openstapps/projectmanagement
|
||||
|
||||
WORKDIR /opt/openstapps/projectmanagement
|
||||
|
||||
RUN npm ci && \
|
||||
npm run build && \
|
||||
chmod +x /opt/openstapps/projectmanagement/lib/cli.js && \
|
||||
ln -s /opt/openstapps/projectmanagement/lib/cli.js /usr/bin/openstapps-projectmanagement
|
||||
|
||||
CMD []
|
||||
@@ -1,101 +0,0 @@
|
||||
# WARNING: this file was autogenerated by generate-browser-image.js
|
||||
# using
|
||||
# yarn add:browser -- 14.19.0 --chrome=100.0.4896.88 --firefox=99.0.1 --edge
|
||||
#
|
||||
# build args added afterwards
|
||||
#
|
||||
FROM cypress/base:14.21.1
|
||||
|
||||
ARG CHROME_VERSION="unknown"
|
||||
ARG FIREFOX_VERSION="unknown"
|
||||
|
||||
USER root
|
||||
|
||||
RUN node --version
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-liberation \
|
||||
git \
|
||||
libcurl4 \
|
||||
libcurl3-gnutls \
|
||||
libcurl3-nss \
|
||||
xdg-utils \
|
||||
wget \
|
||||
curl \
|
||||
# firefox dependencies
|
||||
bzip2 \
|
||||
# add codecs needed for video playback in firefox
|
||||
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
||||
mplayer \
|
||||
# edge dependencies
|
||||
gnupg \
|
||||
dirmngr \
|
||||
# clean up
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
# install libappindicator3-1 - not included with Debian 11
|
||||
RUN wget --no-verbose -O /usr/src/libappindicator3-1_0.4.92-7_amd64.deb "http://ftp.us.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-7_amd64.deb" && \
|
||||
dpkg -i /usr/src/libappindicator3-1_0.4.92-7_amd64.deb ; \
|
||||
apt update && \
|
||||
apt --fix-broken install -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get clean && \
|
||||
rm -f /usr/src/libappindicator3-1_0.4.92-7_amd64.deb
|
||||
|
||||
# install Chrome browser
|
||||
RUN wget --no-verbose -O /usr/src/google-chrome-stable_current_amd64.deb "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb" && \
|
||||
dpkg -i /usr/src/google-chrome-stable_current_amd64.deb ; \
|
||||
apt update && \
|
||||
apt --fix-broken install -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get clean && \
|
||||
rm -f /usr/src/google-chrome-stable_current_amd64.deb
|
||||
|
||||
# "fake" dbus address to prevent errors
|
||||
# https://github.com/SeleniumHQ/docker-selenium/issues/87
|
||||
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
|
||||
|
||||
# install Firefox browser
|
||||
RUN wget --no-verbose -O /tmp/firefox.tar.bz2 "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" && \
|
||||
tar -C /opt -xjf /tmp/firefox.tar.bz2 && \
|
||||
rm /tmp/firefox.tar.bz2 && \
|
||||
ln -fs /opt/firefox/firefox /usr/bin/firefox
|
||||
|
||||
RUN echo "Downloading Latest Edge version..."
|
||||
|
||||
## Setup Edge
|
||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||
RUN install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
|
||||
RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
|
||||
RUN rm microsoft.gpg
|
||||
|
||||
## Install Edge
|
||||
RUN apt-get update && \
|
||||
apt-get install -y microsoft-edge-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
# Add a link to the browser that allows Cypress to find it
|
||||
RUN ln -s /usr/bin/microsoft-edge /usr/bin/edge
|
||||
|
||||
# versions of local tools
|
||||
RUN echo " node version: $(node -v) \n" \
|
||||
"npm version: $(npm -v) \n" \
|
||||
"yarn version: $(yarn -v) \n" \
|
||||
"debian version: $(cat /etc/debian_version) \n" \
|
||||
"Chrome version: $(google-chrome --version) \n" \
|
||||
"Firefox version: $(firefox --version) \n" \
|
||||
"Edge version: $(edge --version) \n" \
|
||||
"git version: $(git --version) \n" \
|
||||
"whoami: $(whoami) \n"
|
||||
|
||||
# a few environment variables to make NPM installs easier
|
||||
# good colors for most applications
|
||||
ENV TERM=xterm
|
||||
# avoid million NPM install messages
|
||||
ENV npm_config_loglevel=warn
|
||||
# allow installing when the main user is root
|
||||
ENV npm_config_unsafe_perm=true
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -25,7 +25,9 @@
|
||||
"images",
|
||||
"project-docs",
|
||||
"templates",
|
||||
"renovate.json"
|
||||
"renovate.json",
|
||||
"CHANGELOG.md",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
@@ -63,7 +65,7 @@
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"ts-node": "10.9.1",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
75
configuration/tsconfig/CHANGELOG.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# @openstapps/tsconfig
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/tsconfig",
|
||||
"description": "The tsconfig for the openstapps project",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"alwaysStrict": true,
|
||||
"charset": "utf8",
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true,
|
||||
"downlevelIteration": true,
|
||||
"inlineSourceMap": true,
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
@@ -21,9 +21,9 @@
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"outDir": "../../../lib/",
|
||||
"lib": ["ES2021", "DOM"],
|
||||
"lib": ["ES2022", "DOM"],
|
||||
"strict": true,
|
||||
"target": "ES2021"
|
||||
"target": "ES2022"
|
||||
},
|
||||
"ts-node": {
|
||||
"transpileOnly": true
|
||||
|
||||
@@ -1,54 +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
|
||||
|
||||
audit:
|
||||
allow_failure: true
|
||||
except:
|
||||
- schedules
|
||||
script:
|
||||
- npm audit
|
||||
stage: audit
|
||||
|
||||
scheduled-audit:
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- npm audit
|
||||
stage: audit
|
||||
|
||||
unit:
|
||||
stage: test
|
||||
script:
|
||||
- npm test
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
@@ -1,5 +1,130 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [23481d0d]
|
||||
- @openstapps/logger@3.0.0-next.4
|
||||
- @openstapps/core@3.0.0-next.4
|
||||
- @openstapps/api@3.0.0-next.4
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/api@3.0.0-next.0
|
||||
- @openstapps/logger@3.0.0-next.0
|
||||
- @openstapps/core@3.0.0-next.0
|
||||
|
||||
## [0.2.0](https://gitlab.com/openstapps/minimal-connector/compare/v0.1.0...v0.2.0) (2019-02-07)
|
||||
|
||||
## [0.1.0](https://gitlab.com/openstapps/minimal-connector/compare/v0.0.2...v0.1.0) (2019-01-30)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node
|
||||
FROM registry.gitlab.com/openstapps/openstapps/node-base
|
||||
|
||||
WORKDIR /minimal-connector
|
||||
ENTRYPOINT ["node", "lib/cli.js", "run", "--"]
|
||||
CMD [""]
|
||||
|
||||
# Add connector as last step to reuse layers effectively
|
||||
ADD . /minimal-connector
|
||||
ADD . /minimal-connector
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -18,11 +18,13 @@
|
||||
"files": [
|
||||
"app.js",
|
||||
"lib",
|
||||
"Dockerfile",
|
||||
"README.md",
|
||||
"Dockerfile"
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
"deploy": "pnpm --prod --filter=@openstapps/minimal-connector deploy ../../.deploy/minimal-connector",
|
||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
@@ -53,7 +55,7 @@
|
||||
"nock": "13.3.1",
|
||||
"ts-node": "10.9.1",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -1,38 +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
|
||||
@@ -1,16 +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
|
||||
7
examples/minimal-deployment/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# @openstapps/minimal-deployment
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
@@ -1 +1 @@
|
||||
nodes/
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
database:
|
||||
image: registry.gitlab.com/openstapps/database:master
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:2.0.0
|
||||
volumes:
|
||||
- ./database:/usr/share/elasticsearch/data
|
||||
expose:
|
||||
@@ -9,12 +9,12 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
image: registry.gitlab.com/openstapps/backend/default:core-0.31
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.0
|
||||
environment:
|
||||
ES_ADDR: "http://database:9200"
|
||||
NODE_CONFIG_ENV: "elasticsearch"
|
||||
ALLOW_NO_TRANSPORT: "true"
|
||||
expose:
|
||||
expose:
|
||||
- 3000
|
||||
ports:
|
||||
- 3000:3000
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
- database
|
||||
|
||||
api:
|
||||
image: registry.gitlab.com/openstapps/api/copy:core-0.23
|
||||
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.0
|
||||
links:
|
||||
- "backend"
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-deployment",
|
||||
"version": "2.0.0",
|
||||
"private": true
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"files": [
|
||||
"database",
|
||||
"systemd",
|
||||
"docker-compose.yml",
|
||||
"README.md",
|
||||
"start.sh"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/node
|
||||
|
||||
stages:
|
||||
- build
|
||||
- audit
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
npm 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 --audit-level=high
|
||||
stage: audit
|
||||
|
||||
docker image:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
|
||||
dependencies:
|
||||
- npm build
|
||||
stage: publish
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- export CORE_VERSION=$(openstapps-projectmanagement get-used-version @openstapps/core)
|
||||
- export VERSION=$(echo -n "$CI_BUILD_REF_NAME" | cut -c 2-)
|
||||
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE
|
||||
- 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_BUILD_TOKEN $CI_REGISTRY
|
||||
- docker build -t $IMAGETAG_LATEST -t $IMAGETAG_VERSION -t $IMAGETAG_CORE_VERSION .
|
||||
- docker push $IMAGETAG_BASE
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
except:
|
||||
- branches
|
||||
tags:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
stage: deploy
|
||||
134
examples/minimal-plugin/CHANGELOG.md
Normal file
@@ -0,0 +1,134 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [23481d0d]
|
||||
- @openstapps/api-plugin@3.0.0-next.4
|
||||
- @openstapps/core-tools@3.0.0-next.4
|
||||
- @openstapps/logger@3.0.0-next.4
|
||||
- @openstapps/core@3.0.0-next.4
|
||||
- @openstapps/api@3.0.0-next.4
|
||||
|
||||
## 3.0.0-next.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- @openstapps/core-tools@3.0.0-next.0
|
||||
- @openstapps/api-plugin@3.0.0-next.0
|
||||
- @openstapps/api@3.0.0-next.0
|
||||
- @openstapps/logger@3.0.0-next.0
|
||||
- @openstapps/core@3.0.0-next.0
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node
|
||||
FROM registry.gitlab.com/openstapps/openstapps/node-base
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["node", "lib/cli.js"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0-next.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -15,10 +15,12 @@
|
||||
"app.js",
|
||||
"lib",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"Dockerfile"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
"deploy": "pnpm --prod --filter=@openstapps/minimal-plugin deploy ../../.deploy/minimal-plugin",
|
||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
@@ -42,7 +44,7 @@
|
||||
"@types/express": "4.17.17",
|
||||
"@types/node": "18.15.3",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "4.9.5"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1689752456,
|
||||
"narHash": "sha256-VOChdECcEI8ixz8QY+YC4JaNEFwQd1V8bA0G4B28Ki0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7f256d7da238cb627ef189d56ed590739f42f13b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
73
flake.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
description = "A Nix-flake-based development environment for OpenStApps";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
buildToolsVersion = "30.0.3";
|
||||
overlays = [
|
||||
(final: prev: rec {
|
||||
nodejs = prev.nodejs-18_x;
|
||||
pnpm = prev.nodePackages.pnpm;
|
||||
chrome = prev.google-chrome;
|
||||
firefox = prev.firefox;
|
||||
webkit = prev.epiphany; # Safari-ish browser
|
||||
android = prev.androidenv.composeAndroidPackages {
|
||||
buildToolsVersions = [ "${buildToolsVersion}" ];
|
||||
platformVersions = [ "32" ];
|
||||
};
|
||||
cypress = prev.cypress.overrideAttrs(prev: {
|
||||
version = "12.17.1";
|
||||
});
|
||||
})
|
||||
];
|
||||
# TODO: aarch64-linux, x68_64-darwin, aarch64-darwin
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs {
|
||||
inherit overlays system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem ({ pkgs }:
|
||||
let
|
||||
python = (pkgs.python311.withPackages(ps: with ps; [ brotli fonttools ] ++ (with fonttools.optional-dependencies; [ ufo lxml unicode woff ])));
|
||||
in
|
||||
{
|
||||
default = (pkgs.buildFHSUserEnv {
|
||||
name = "StApps Dev";
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
nodejs
|
||||
pnpm
|
||||
python
|
||||
docker
|
||||
# tools
|
||||
curl
|
||||
jq
|
||||
# browsers
|
||||
firefox
|
||||
chrome
|
||||
webkit
|
||||
cypress
|
||||
# android
|
||||
jdk17
|
||||
android.androidsdk
|
||||
musl
|
||||
];
|
||||
runScript = "bash";
|
||||
profile = ''
|
||||
export CYPRESS_INSTALL_BINARY=0
|
||||
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress
|
||||
export ANDROID_SDK_ROOT=${pkgs.android.androidsdk}/libexec/android-sdk
|
||||
export ANDROID_JAVA_HOME=${pkgs.jdk.home}
|
||||
export DOCKER_HOST=unix:///run/user/1000/docker.sock
|
||||
{ dockerd-rootless & } 2>/dev/null
|
||||
'';
|
||||
}).env;
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
**
|
||||
!Gemfile
|
||||
4
frontend/app-release-template/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
app
|
||||
Gemfile.lock
|
||||
.vscode
|
||||
.DS_Store
|
||||
@@ -1,100 +0,0 @@
|
||||
image: docker:stable
|
||||
|
||||
stages:
|
||||
- image
|
||||
- deploy
|
||||
|
||||
docker image:
|
||||
stage: image
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
||||
- docker build -t registry.gitlab.com/openstapps/app-release-template .
|
||||
- docker push registry.gitlab.com/openstapps/app-release-template
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $BUILD_IMAGE == "true"'
|
||||
tags:
|
||||
- docker
|
||||
|
||||
web:
|
||||
image: registry.gitlab.com/openstapps/app-release-template
|
||||
stage: deploy
|
||||
script:
|
||||
- make web
|
||||
- >
|
||||
if [ "$RELEASE_TYPE" == "staging" ]; then
|
||||
# USE GITLAB PROTECTED & MASKED CI VARIABLES TO PROVIDE THE FOLLOWING DATA!
|
||||
# THUS $STAGING_TARGET_SSH_PRIVATE_KEY HAS TO BE BASE64 ENCODED
|
||||
# USE AN UNPRIVILIGED USER WITH ACCESS ONLY TO THIS DIRECTORY
|
||||
# example: $STAGING_SCP_TARGET = deployuser@staging.environment.com:/path/for/web/data
|
||||
sh static/scripts/ssh_deploy.sh web $STAGING_SCP_TARGET $STAGING_TARGET_SSH_PRIVATE_KEY
|
||||
fi
|
||||
|
||||
if [ "$RELEASE_TYPE" == "production" ]; then
|
||||
# USE GITLAB PROTECTED & MASKED CI VARIABLES TO PROVIDE THE FOLLOWING DATA!
|
||||
# THUS $PRODUCTION_TARGET_SSH_PRIVATE_KEY HAS TO BE BASE64 ENCODED
|
||||
# USE AN UNPRIVILIGED USER WITH ACCESS ONLY TO THIS DIRECTORY
|
||||
# example: $PRODUCTION_SCP_TARGET = deployuser@production.environment.com:/path/for/web/data
|
||||
sh static/scripts/ssh_deploy.sh web $PRODUCTION_SCP_TARGET $PRODUCTION_TARGET_SSH_PRIVATE_KEY
|
||||
fi
|
||||
artifacts:
|
||||
untracked: false
|
||||
paths:
|
||||
- www.zip
|
||||
tags:
|
||||
- secrecy
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "develop" && $RELEASE_TYPE == "staging"'
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'
|
||||
|
||||
ios:
|
||||
image: registry.gitlab.com/openstapps/app-release-template
|
||||
stage: deploy
|
||||
script:
|
||||
- >
|
||||
if [ "$RELEASE_TYPE" == "staging" ]; then
|
||||
make ios-beta;
|
||||
fi
|
||||
|
||||
if [ "$RELEASE_TYPE" == "production" ]; then
|
||||
make ios;
|
||||
fi
|
||||
artifacts:
|
||||
untracked: false
|
||||
tags:
|
||||
- macos
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'
|
||||
|
||||
android:
|
||||
image: registry.gitlab.com/openstapps/app-release-template
|
||||
stage: deploy
|
||||
script:
|
||||
- >
|
||||
if [ "$RELEASE_TYPE" == "staging" ]; then
|
||||
make android-beta;
|
||||
fi
|
||||
|
||||
if [ "$RELEASE_TYPE" == "production" ]; then
|
||||
make android;
|
||||
|
||||
# USE GITLAB PROTECTED & MASKED CI VARIABLES TO PROVIDE THE FOLLOWING DATA!
|
||||
# THUS $APK_TARGET_SSH_PRIVATE_KEY HAS TO BE BASE64 ENCODED
|
||||
# USE AN UNPRIVILIGED USER WITH ACCESS ONLY TO THIS DIRECTORY
|
||||
# example: $APK_SCP_TARGET = deployuser@your.apk.storage.com:/path/to/app.apk
|
||||
if [ -n "$APK_SCP_TARGET" ]; then
|
||||
sh static/scripts/ssh_deploy.sh apk $APK_SCP_TARGET $APK_TARGET_SSH_PRIVATE_KEY
|
||||
fi
|
||||
fi
|
||||
artifacts:
|
||||
untracked: false
|
||||
tags:
|
||||
- secrecy
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'
|
||||
@@ -1,21 +0,0 @@
|
||||
FROM registry.gitlab.com/openstapps/app
|
||||
|
||||
ENV LC_ALL=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
xmlstarlet \
|
||||
ruby-full \
|
||||
zip \
|
||||
openssh-client
|
||||
|
||||
RUN gem install bundler
|
||||
|
||||
COPY . /build
|
||||
WORKDIR /build
|
||||
|
||||
RUN bundler update
|
||||
@@ -1,4 +0,0 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "fastlane"
|
||||
gem "fastlane-plugin-versioning_android"
|
||||
@@ -1,53 +0,0 @@
|
||||
SHELL := /bin/bash
|
||||
APP_DIR := $(PWD)/app
|
||||
BRANCH ?= main
|
||||
START_TIME := $(date +%s)
|
||||
|
||||
clean:
|
||||
rm -rf app
|
||||
|
||||
clone: clean
|
||||
sh static/scripts/clone_app.sh ${BRANCH}
|
||||
|
||||
install: clone
|
||||
cd app && NG_CLI_ANALYTICS="false" npm ci --unsafe-perm
|
||||
|
||||
assets: install
|
||||
cp -rf customizable/assets/. app/src/assets/ && cp -rf customizable/assets-mobile/. app/resources/
|
||||
|
||||
configuration-web: assets
|
||||
sh static/scripts/ionic.sh
|
||||
|
||||
configuration-android: assets
|
||||
CONFIG_MODE=ANDROID sh static/scripts/ionic.sh
|
||||
|
||||
configuration-ios: assets
|
||||
CONFIG_MODE=IOS sh static/scripts/ionic.sh
|
||||
|
||||
web-build: configuration-web
|
||||
cd app && ionic build --prod
|
||||
|
||||
web: web-build
|
||||
mkdir -p app/www/.well-known && source app.conf && sh static/scripts/universal_link_files.sh
|
||||
cd app/www && zip -r ../../www.zip .
|
||||
echo "Web application artifact for version ${VERSION} is archived in www.zip"
|
||||
|
||||
prepare-android: configuration-android
|
||||
source app.conf && cd app && rm -rf android www && ionic capacitor add android && npm run resources:android && ionic capacitor build android --no-open --prod && cd .. && sh static/scripts/android.sh
|
||||
cp -rf static/fastlane-android/. app/android/fastlane/ && cp -rf app.conf app/android/.env
|
||||
|
||||
android: prepare-android
|
||||
cd app/android && bundler exec fastlane android release
|
||||
|
||||
android-beta: prepare-android
|
||||
cd app/android && bundler exec fastlane android beta
|
||||
|
||||
prepare-ios: configuration-ios
|
||||
source app.conf && cd app && rm -rf ios www && ionic capacitor add ios && npm run resources:ios && ionic capacitor build ios --no-open --prod && cd .. && sh static/scripts/ios.sh
|
||||
cp -rf static/fastlane-ios/. app/ios/App/fastlane/ && cp -rf app.conf app/ios/App/fastlane/.env
|
||||
|
||||
ios: prepare-ios
|
||||
cd app/ios/App && bundler exec fastlane ios release
|
||||
|
||||
ios-beta: prepare-ios
|
||||
cd app/ios/App && bundler exec fastlane ios beta
|
||||
@@ -1,33 +0,0 @@
|
||||
# App Release Template (ART)
|
||||
|
||||
This project can be used to generate mobile device apps (Android / iOS) and the standalone Angular web app. Beware that this is only the app/frontend part and your need a fully functioning backend deployment first.
|
||||
|
||||
## Requirements
|
||||
|
||||
* A fully functioning and publicly accessible [backend](https://gitlab.com/openstapps/backend) deployment
|
||||
* An active Apple App Store Developer Account and/or Google Playstore Developer Account
|
||||
* Docker (Android and Angular builds)
|
||||
* MacOS Device with latest Xcode, fastlane and xmlstarlet, node v14 and npm package @ionic/cli (iOS builds only)
|
||||
|
||||
## Docker
|
||||
|
||||
Use weelkly updated image from this repo
|
||||
|
||||
```bash
|
||||
docker pull registry.gitlab.com/openstapps/app-release-template:latest
|
||||
```
|
||||
|
||||
Or build your own image from Dockerfile within this project
|
||||
|
||||
```bash
|
||||
docker build -t openstapps-art .
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
0. If neccessary make adjustments to your app / profiles / entitlements in your corresponding developer/store portal
|
||||
1. Overwrite assets in customizable directory with your own ones (keeping the same size and file format)
|
||||
2. Edit app.conf.sample to your liking and rename it to app.conf (needs info you can find in your corresponding developer/store portal)
|
||||
3. Use docker to run `make web` and `make android` (i.e. `docker run -it -v $(pwd):/build --rm openstapps-art:latest make web`)
|
||||
4. On a macOS device run `make ios` (make sure you have all required certificates / profiles set up in Xcode)
|
||||
5. Gitlab CI runs need to be provided with SCP targets and Base64 encoded SSH private keys via env variables for web and (optionally) apk deployments
|
||||
@@ -1,38 +0,0 @@
|
||||
# Edit the following entires and save the file without .sample extension
|
||||
|
||||
APP_NAME="Open StApps" # Full app name
|
||||
APP_DISPLAY_NAME="StApps" # App name on mobile device homescreen (Not much space)
|
||||
BACKEND_URL="https://your.backend.server.tld" # Publicly available backend url
|
||||
BACKEND_VERSION="2.0.0" # Minimum backend version the app will request
|
||||
APP_LINK_HOST="your.deep.link.host.tld" # Your host used for universal (deep) links
|
||||
APP_URL_SCHEME="de.anyschool.app" # Custom url scheme for native app versions
|
||||
|
||||
|
||||
# iOS specific configuration
|
||||
|
||||
LOCATION_USAGE_DESCRIPTION="Ortungsdienste werden für die Kartenansichten und bessere Suchergebnisse benötigt"
|
||||
CALENDAR_USAGE_DESCRIPTION="Zugriff auf Kalender wird für die Synchronisierung deiner Uni Termine benötigt"
|
||||
IOS_BUNDLE_IDENTIFIER="com.anyschool.app.ios" # The bundle identifier of your ios app
|
||||
APPLE_ID="example@domain.tld" # Your Apple Developer email address
|
||||
ITC_TEAM_ID="123412345" # App Store Connect Team ID
|
||||
TEAM_ID="ABCDEV1234" # Developer Team ID
|
||||
APPLE_API_KEY_ID="123ACAB456" # Your API key id
|
||||
APPLE_API_KEY_ISSUER_ID="1234578-1234-1234-1234-12345678901" # Your API key issuer id
|
||||
|
||||
# Provide the following environment variable in a secure fashion.
|
||||
# When used in CI protect and mask the variable.
|
||||
# Don't change the following line!
|
||||
APPLE_API_KEY_CONTENT="${APPLE_API_KEY_CONTENT:-"unset"}" # Base64 encoded contents of Apple API key file (.p8 file)
|
||||
|
||||
|
||||
# Android specific configuration
|
||||
|
||||
ANDROID_PACKAGE_NAME="de.anyschool.app.android" # Your Google Playconsole app package name
|
||||
|
||||
# Provide the following environment variables in a secure fashion.
|
||||
# When used in CI protect and mask the variables.
|
||||
# Don't change the following lines!
|
||||
ANDROID_API_KEY_CONTENT="${ANDROID_API_KEY_CONTENT:-"unset"}" # Base64 encoded contents of your API key file (.json file)
|
||||
ANDROID_KEYSTORE_PASSWORD="${ANDROID_KEYSTORE_PASSWORD:-"unset"}" # Passwort to your keyfile
|
||||
ANDROID_KEYSTORE_KEY_ALIAS="${ANDROID_KEYSTORE_KEY_ALIAS:-"unset"}" # Name/Alias of the key used for signing within the keyfile
|
||||
ANDROID_KEYSTORE_KEY_PASSWORD="${ANDROID_KEYSTORE_KEY_PASSWORD:-"unset"}" # Passwort to the this very key
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 18 KiB |
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
class="ionicon"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="person.svg"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Person</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2586"
|
||||
inkscape:window-height="1500"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.3037281"
|
||||
inkscape:cx="242.86595"
|
||||
inkscape:cy="256.12612"
|
||||
inkscape:window-x="72"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg6" />
|
||||
<title
|
||||
id="title2">Person</title>
|
||||
<path
|
||||
d="M 339.45865,63.310754 C 318.2673,40.646066 288.66909,28.164845 256,28.164845 c -32.84333,0 -62.53954,12.405707 -83.63288,34.930157 -21.32204,22.772565 -31.71081,53.722108 -29.27151,87.142008 4.83502,65.93364 55.48301,119.56945 112.90439,119.56945 57.42138,0 107.98226,-53.62502 112.89351,-119.54788 2.47196,-33.11784 -7.98215,-64.00266 -29.43486,-86.947826 z M 447.65871,511.44807 H 64.341296 A 33.758067,33.441473 0 0 1 37.988224,499.4415 C 30.909921,491.05955 28.056819,479.61394 30.169421,468.03888 39.360327,417.53147 68.043793,375.10394 113.12715,345.31946 153.17946,318.87913 203.91457,304.32669 256,304.32669 c 52.08543,0 102.82054,14.56322 142.87285,40.99277 45.08335,29.7737 73.76682,72.20122 82.95773,122.70863 2.1126,11.57507 -0.74051,23.02068 -7.81881,31.40263 a 33.758067,33.441473 0 0 1 -26.35306,12.01735 z"
|
||||
id="path4"
|
||||
style="fill:#4d8cf8;fill-opacity:1;stroke-width:1.08385158"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,7 +0,0 @@
|
||||
:root {
|
||||
/*
|
||||
Use this section to overwrite theme variables
|
||||
A color scheme can be tested and generated at:
|
||||
https://ionicframework.com/docs/theming/color-generator
|
||||
*/
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "@openstapps/app-release-template",
|
||||
"version": "2.0.0",
|
||||
"private": true
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Replace this with your valid playstore keystore file used for signing your binaries and remove '.sample' from file name
|
||||
@@ -1,2 +0,0 @@
|
||||
#json_key_file("../../playstore_api_key.json") # Don't Change
|
||||
package_name ENV["ANDROID_PACKAGE_NAME"] || "de.anyschool.app.droid" # Don't Change
|
||||
@@ -1,99 +0,0 @@
|
||||
# This file contains the fastlane.tools configuration for Android
|
||||
# You can find the documentation at https://docs.fastlane.tools
|
||||
#
|
||||
# For a list of all available actions, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/actions
|
||||
#
|
||||
# For a list of all available plugins, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/plugins/available-plugins
|
||||
#
|
||||
|
||||
# Uncomment the line if you want fastlane to automatically update itself
|
||||
# update_fastlane
|
||||
|
||||
require 'json'
|
||||
require 'base64'
|
||||
require 'pathname'
|
||||
|
||||
default_platform(:android)
|
||||
|
||||
current_version_code = 1
|
||||
playstore_track = "internal"
|
||||
package_json = JSON.parse(File.read('../../package.json'))
|
||||
keystorePath = Pathname.getwd.parent + "../../playstore.keystore"
|
||||
|
||||
platform :android do
|
||||
|
||||
lane :fetch_version_code do
|
||||
current_version_code = google_play_track_version_codes(
|
||||
package_name: ENV['ANDROID_PACKAGE_NAME'],
|
||||
track: playstore_track,
|
||||
json_key_data: ENV['ANDROID_API_KEY_CONTENT']
|
||||
).max
|
||||
end
|
||||
|
||||
lane :fetch_highest_version_code do
|
||||
version_code_candidates = [1]
|
||||
tracks = ['production', 'beta', 'internal']
|
||||
tracks.each do |t|
|
||||
version_code_candidates += google_play_track_version_codes(
|
||||
package_name: ENV['ANDROID_PACKAGE_NAME'],
|
||||
track: t,
|
||||
json_key_data: Base64.decode64(ENV['ANDROID_API_KEY_CONTENT'])
|
||||
)
|
||||
end
|
||||
current_version_code = version_code_candidates.compact.max
|
||||
puts "Version code chosen for build lane: %d" % [current_version_code + 1]
|
||||
end
|
||||
|
||||
lane :build do
|
||||
fetch_highest_version_code
|
||||
android_set_version_name(
|
||||
version_name: package_json["version"],
|
||||
)
|
||||
android_set_version_code(
|
||||
version_code: current_version_code + 1,
|
||||
)
|
||||
gradle(
|
||||
task: "clean assemble",
|
||||
build_type: "Release",
|
||||
print_command: false,
|
||||
properties: {
|
||||
"android.injected.signing.store.file" => keystorePath.to_s,
|
||||
"android.injected.signing.store.password" => ENV['ANDROID_KEYSTORE_PASSWORD'],
|
||||
"android.injected.signing.key.alias" => ENV['ANDROID_KEYSTORE_KEY_ALIAS'],
|
||||
"android.injected.signing.key.password" => ENV['ANDROID_KEYSTORE_KEY_PASSWORD']
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new beta build to open beta testing track"
|
||||
lane :beta do
|
||||
playstore_track = "beta"
|
||||
|
||||
build
|
||||
upload_to_play_store(
|
||||
track: playstore_track,
|
||||
json_key_data: Base64.decode64(ENV['ANDROID_API_KEY_CONTENT']),
|
||||
skip_upload_metadata: true,
|
||||
skip_upload_images: true,
|
||||
skip_upload_screenshots: true
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new version to the Google Play"
|
||||
lane :release do
|
||||
playstore_track = "production"
|
||||
|
||||
build
|
||||
upload_to_play_store(
|
||||
track: playstore_track,
|
||||
json_key_data: Base64.decode64(ENV['ANDROID_API_KEY_CONTENT']),
|
||||
skip_upload_metadata: true,
|
||||
skip_upload_images: true,
|
||||
skip_upload_screenshots: true
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -1,112 +0,0 @@
|
||||
# This file contains the fastlane.tools configuration for iOS
|
||||
# You can find the documentation at https://docs.fastlane.tools
|
||||
#
|
||||
# For a list of all available actions, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/actions
|
||||
#
|
||||
# For a list of all available plugins, check out
|
||||
#
|
||||
# https://docs.fastlane.tools/plugins/available-plugins
|
||||
#
|
||||
|
||||
# Uncomment the line if you want fastlane to automatically update itself
|
||||
# update_fastlane
|
||||
|
||||
require 'json'
|
||||
require 'base64'
|
||||
|
||||
default_platform(:ios)
|
||||
|
||||
current_build_number = 1
|
||||
package_json = JSON.parse(File.read('../../../package.json'))
|
||||
|
||||
api_key = app_store_connect_api_key(
|
||||
key_id: ENV['APPLE_API_KEY_ID'],
|
||||
issuer_id: ENV['APPLE_API_KEY_ISSUER_ID'],
|
||||
key_content: "#{Base64.decode64(ENV['APPLE_API_KEY_CONTENT'])}".gsub('\n', '\\n'),
|
||||
in_house: false
|
||||
)
|
||||
|
||||
platform :ios do
|
||||
|
||||
lane :fetch_highest_build_number do
|
||||
build_number_candidates = [1]
|
||||
build_number_candidates << latest_testflight_build_number(
|
||||
version: package_json['version'],
|
||||
initial_build_number: 1,
|
||||
app_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
|
||||
api_key: api_key
|
||||
)
|
||||
build_number_candidates << app_store_build_number(
|
||||
version: package_json['version'],
|
||||
initial_build_number: 1,
|
||||
app_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
|
||||
api_key: api_key
|
||||
)
|
||||
current_build_number = build_number_candidates.max
|
||||
end
|
||||
|
||||
lane :configure do
|
||||
set_info_plist_value(
|
||||
path: "App/Info.plist",
|
||||
key: "NSLocationAlwaysAndWhenInUseUsageDescription",
|
||||
value: ENV['LOCATION_USAGE_DESCRIPTION']
|
||||
)
|
||||
set_info_plist_value(
|
||||
path: "App/Info.plist",
|
||||
key: "NSLocationWhenInUseUsageDescription",
|
||||
value: ENV['LOCATION_USAGE_DESCRIPTION']
|
||||
)
|
||||
set_info_plist_value(
|
||||
path: "App/Info.plist",
|
||||
key: "NSCalendarsUsageDescription",
|
||||
value: ENV['CALENDAR_USAGE_DESCRIPTION']
|
||||
)
|
||||
update_url_schemes(
|
||||
path: "App/Info.plist",
|
||||
url_schemes: [ENV['APP_URL_SCHEME']]
|
||||
)
|
||||
update_code_signing_settings(
|
||||
use_automatic_signing: true,
|
||||
path: "App.xcodeproj",
|
||||
team_id: ENV['TEAM_ID'],
|
||||
bundle_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
|
||||
entitlements_file_path: "App/App.entitlements"
|
||||
)
|
||||
increment_version_number(
|
||||
version_number: package_json['version'],
|
||||
xcodeproj: "App.xcodeproj"
|
||||
)
|
||||
fetch_highest_build_number
|
||||
increment_build_number(
|
||||
build_number: current_build_number + 1,
|
||||
xcodeproj: "App.xcodeproj"
|
||||
)
|
||||
end
|
||||
|
||||
lane :build do
|
||||
build_app(workspace: "App.xcworkspace", scheme: "App")
|
||||
end
|
||||
|
||||
desc "Submit a new version to iOS App Store"
|
||||
lane :release do
|
||||
configure
|
||||
build
|
||||
upload_to_app_store(
|
||||
skip_metadata: true,
|
||||
skip_screenshots: true,
|
||||
api_key: api_key
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new version to Testflight"
|
||||
lane :beta do
|
||||
configure
|
||||
build
|
||||
upload_to_testflight(
|
||||
skip_submission: true,
|
||||
api_key: api_key
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. $PWD/app.conf
|
||||
|
||||
DEFAULT_APP_URL_SCHEME="de.anyschool.app"
|
||||
APP_URL_SCHEME="${APP_URL_SCHEME:-$DEFAULT_APP_URL_SCHEME}"
|
||||
|
||||
ANDROID_MANIFEST_PATH="app/android/app/src/main/AndroidManifest.xml"
|
||||
ANDROID_STRINGS_PATH="app/android/app/src/main/res/values/strings.xml"
|
||||
|
||||
|
||||
git -C app checkout -- android/build.gradle
|
||||
git -C app checkout -- android/gradle/wrapper/gradle-wrapper.properties
|
||||
git -C app checkout -- android/app/src/main/AndroidManifest.xml
|
||||
git -C app checkout -- android/app/src/main/res/values/styles.xml
|
||||
|
||||
# AndroidManifest.xml
|
||||
xmlstarlet edit --pf --inplace \
|
||||
--update "/manifest/@package" --value "$ANDROID_PACKAGE_NAME" \
|
||||
$ANDROID_MANIFEST_PATH
|
||||
|
||||
xmlstarlet edit --pf --inplace \
|
||||
--update "/manifest/application/activity/@android:name" --value "$ANDROID_PACKAGE_NAME".MainActivity \
|
||||
$ANDROID_MANIFEST_PATH
|
||||
|
||||
# strings.xml
|
||||
xmlstarlet edit --pf --inplace \
|
||||
--update "/resources/string[@name='package_name']" --value "$ANDROID_PACKAGE_NAME" \
|
||||
$ANDROID_STRINGS_PATH
|
||||
|
||||
xmlstarlet edit --pf --inplace \
|
||||
--update "/resources/string[@name='custom_url_scheme']" --value "$APP_URL_SCHEME" \
|
||||
$ANDROID_STRINGS_PATH
|
||||
|
||||
xmlstarlet edit --inplace \
|
||||
--delete "/resources/string[@name='app_host']" \
|
||||
--append "/resources/string[@name='custom_url_scheme']" --type elem -n string --value "$APP_LINK_HOST" \
|
||||
--insert "/resources/string[not(@name)]" --type attr -n name --value "app_host" \
|
||||
$ANDROID_STRINGS_PATH
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# get semantical versioning string linke 2.0.0 (if $1 is v2.0.0) or $1
|
||||
DEFAULT_VERSION="0.0.0"
|
||||
APP_VERSION="${APP_VERSION:-$DEFAULT_VERSION}"
|
||||
|
||||
if echo -n $1 | grep -Eq 'v[0-9]+\.[0-9]+\.[0-9]+'; then
|
||||
APP_VERSION=$(echo -n "$1" | cut -c 2-);
|
||||
else
|
||||
APP_VERSION=$1;
|
||||
fi
|
||||
|
||||
if [ "$APP_VERSION" = "0.0.0" ]; then
|
||||
echo "Unsupported app version was set!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
git clone --depth 1 --branch $APP_VERSION https://gitlab.com/openstapps/app.git app
|
||||
@@ -1,59 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. $PWD/app.conf
|
||||
|
||||
DEFAULT_APP_ID="de.anyschool.app"
|
||||
DEFAULT_CONFIG_MODE="WEB"
|
||||
|
||||
APP_ID="${APP_ID:-$DEFAULT_APP_ID}"
|
||||
APP_VERSION=$(jq '.version' app/package.json)
|
||||
CONFIG_MODE="${CONFIG_MODE:-$DEFAULT_CONFIG_MODE}"
|
||||
|
||||
if [ "$CONFIG_MODE" = 'ANDROID' ]; then
|
||||
APP_ID="$ANDROID_PACKAGE_NAME"
|
||||
fi
|
||||
|
||||
if [ "$CONFIG_MODE" = 'IOS' ]; then
|
||||
APP_ID="$IOS_BUNDLE_IDENTIFIER"
|
||||
fi
|
||||
|
||||
# ionic config
|
||||
cat app/ionic.config.json | jq '.name = $newName' --arg newName "$APP_NAME" > tmp.$$.json && mv tmp.$$.json app/ionic.config.json
|
||||
sed -i -e 's@<title>StApps<\/title>@<title>'"$APP_DISPLAY_NAME"'<\/title>@g' app/src/index.html
|
||||
|
||||
ROOT_THEME_DEFINITONS=$(cat app/src/theme/variables.scss | grep -o :root | wc -l)
|
||||
|
||||
if [ $ROOT_THEME_DEFINITONS -gt 1 ]; then
|
||||
#update
|
||||
echo "SCSS theme has already been set"
|
||||
else
|
||||
#insert
|
||||
cat customizable/theme/variables.scss >> app/src/theme/variables.scss
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# capacitor config
|
||||
awk "/appName:.*,/ && !done { gsub(/appName:.*,/, \"appName: '$APP_NAME',\"); done=1}; 1" app/capacitor.config.ts > tmp.$$.json && mv tmp.$$.json app/capacitor.config.ts
|
||||
awk "/appId:.*,/ && !done { gsub(/appId:.*,/, \"appId: '$APP_ID',\"); done=1}; 1" app/capacitor.config.ts > tmp.$$.json && mv tmp.$$.json app/capacitor.config.ts
|
||||
|
||||
# cordova config
|
||||
xmlstarlet edit -L --update "/widget/@id" --value "$APP_ID" app/config.xml
|
||||
xmlstarlet edit -L --update "/widget/@version" --value "$APP_VERSION" app/config.xml
|
||||
xmlstarlet edit -L -N x="http://www.w3.org/ns/widgets" --update "//x:name" --value "$APP_NAME" app/config.xml
|
||||
|
||||
SHORT_EXISTS=$(xmlstarlet sel -N x='http://www.w3.org/ns/widgets' -T -t -v '//x:name[@short]' app/config.xml)
|
||||
|
||||
if [ -z "${SHORT_EXISTS:-}" ]; then
|
||||
#insert
|
||||
xmlstarlet edit -L -N x="http://www.w3.org/ns/widgets" -s "//x:name" -t attr -n "short" -v "$APP_DISPLAY_NAME" app/config.xml
|
||||
else
|
||||
#update
|
||||
xmlstarlet edit -L -N x="http://www.w3.org/ns/widgets" --update "//x:name[@short]" -v "$APP_DISPLAY_NAME" app/config.xml
|
||||
fi
|
||||
|
||||
# environment config
|
||||
awk "/backend_url:.*,/ && !done { gsub(/backend_url:.*,/, \"backend_url: '$BACKEND_URL',\"); done=1}; 1" app/src/environments/environment.production.ts > tmp.$$.json && mv tmp.$$.json app/src/environments/environment.production.ts
|
||||
awk "/backend_version:.*,/ && !done { gsub(/backend_version:.*,/, \"backend_version: '$BACKEND_VERSION',\"); done=1}; 1" app/src/environments/environment.production.ts > tmp.$$.json && mv tmp.$$.json app/src/environments/environment.production.ts
|
||||
awk "/app_host:.*,/ && !done { gsub(/app_host:.*,/, \"app_host: '$APP_LINK_HOST',\"); done=1}; 1" app/src/environments/environment.production.ts > tmp.$$.json && mv tmp.$$.json app/src/environments/environment.production.ts
|
||||
awk "/custom_url_scheme:.*,/ && !done { gsub(/custom_url_scheme:.*,/, \"custom_url_scheme: '$APP_URL_SCHEME',\"); done=1}; 1" app/src/environments/environment.production.ts > tmp.$$.json && mv tmp.$$.json app/src/environments/environment.production.ts
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. $PWD/app.conf
|
||||
|
||||
ENTITLEMENTS_FILE="app/ios/App/App/App.entitlements"
|
||||
INFOPLIST_FILE="app/ios/App/App/Info.plist"
|
||||
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :com.apple.developer.associated-domains string applinks:$APP_LINK_HOST" $ENTITLEMENTS_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.associated-domains array" $ENTITLEMENTS_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.associated-domains:0 string applinks:$APP_LINK_HOST" $ENTITLEMENTS_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :BGTaskSchedulerPermittedIdentifiers string com.transistorsoft.fetch" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :BGTaskSchedulerPermittedIdentifiers array" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :BGTaskSchedulerPermittedIdentifiers:0 string com.transistorsoft.fetch" $INFOPLIST_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :UISupportedInterfaceOrientations~iphone array" $INFOPLIST_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :UISupportedInterfaceOrientations array" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations array" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations:0 string \"UIInterfaceOrientationPortrait\"" $INFOPLIST_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :UISupportedInterfaceOrientations~ipad array" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations~ipad array" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations~ipad:0 string \"UIInterfaceOrientationPortrait\"" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations~ipad:1 string \"UIInterfaceOrientationPortraitUpsideDown\"" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations~ipad:2 string \"UIInterfaceOrientationLandscapeLeft\"" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UISupportedInterfaceOrientations~ipad:3 string \"UIInterfaceOrientationLandscapeRight\"" $INFOPLIST_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :UIViewControllerBasedStatusBarAppearance bool" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UIViewControllerBasedStatusBarAppearance bool" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Set :UIViewControllerBasedStatusBarAppearance NO" $INFOPLIST_FILE
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Delete :UIStatusBarStyle string" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Add :UIStatusBarStyle string" $INFOPLIST_FILE
|
||||
/usr/libexec/PlistBuddy -c "Set :UIStatusBarStyle UIStatusBarStyleLightContent" $INFOPLIST_FILE
|
||||
|
||||
|
||||
git -C app checkout -- ios/App/App/AppDelegate.swift
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
SSH_DEPLOY_TARGET=$2
|
||||
SSH_DEPLOY_TARGET="${SSH_DEPLOY_TARGET:-"missingtarget"}"
|
||||
|
||||
SSH_PRIVATE_KEY=$3
|
||||
SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY:-"missingkey"}"
|
||||
|
||||
GOTO_FAIL=false
|
||||
|
||||
if [ "$SSH_DEPLOY_TARGET" = "missingtarget" ]; then
|
||||
echo "SSH target for web deployment job is unset!"
|
||||
GOTO_FAIL=true
|
||||
fi
|
||||
|
||||
if [ "$SSH_PRIVATE_KEY" = "missingkey" ]; then
|
||||
echo "SSH key for web deployment job is unset!"
|
||||
GOTO_FAIL=true
|
||||
fi
|
||||
|
||||
if [ "$GOTO_FAIL" = true ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
TARGET_COMPONENTS=$(echo "$SSH_DEPLOY_TARGET" | tr '@' "\n")
|
||||
TARGET_COMPONENTS=$(echo "$TARGET_COMPONENTS" | tr ':' "\n")
|
||||
|
||||
SSH_DEPLOY_TARGET_USER=$(echo "$TARGET_COMPONENTS" | head -n 1 | tail -n 1)
|
||||
SSH_DEPLOY_TARGET_HOST=$(echo "$TARGET_COMPONENTS" | head -n 2 | tail -n 1)
|
||||
SSH_DEPLOY_TARGET_PATH=$(echo "$TARGET_COMPONENTS" | head -n 3 | tail -n 1)
|
||||
|
||||
SSH_DEPLOY_TARGET_USER="${SSH_DEPLOY_TARGET_USER:-"missinguser"}"
|
||||
SSH_DEPLOY_TARGET_HOST="${SSH_DEPLOY_TARGET_HOST:-"missinghost"}"
|
||||
SSH_DEPLOY_TARGET_PATH="${SSH_DEPLOY_TARGET_PATH:-"missingpath"}"
|
||||
|
||||
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
|
||||
## We're using tr to fix line endings which makes ed25519 keys work
|
||||
## without extra base64 encoding.
|
||||
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
|
||||
##
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
eval `ssh-agent -s`
|
||||
echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add -
|
||||
|
||||
## Use ssh-keyscan to scan the keys of your private server.
|
||||
## You can copy and repeat that command if you have more than
|
||||
## one server to connect to.
|
||||
ssh-keyscan $SSH_DEPLOY_TARGET_HOST >> ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
web() {
|
||||
scp www.zip "$SSH_DEPLOY_TARGET"
|
||||
ssh "$SSH_DEPLOY_TARGET_USER@$SSH_DEPLOY_TARGET_HOST" "cd $SSH_DEPLOY_TARGET_PATH && unzip -o www.zip && rm -f www.zip"
|
||||
}
|
||||
|
||||
apk() {
|
||||
scp app/android/app/build/outputs/apk/release/app-release.apk "$SSH_DEPLOY_TARGET"
|
||||
}
|
||||
|
||||
if declare -f "$1" > /dev/null
|
||||
then
|
||||
"$@"
|
||||
else
|
||||
echo "'$1' is not a known function name"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. $PWD/app.conf
|
||||
|
||||
# iOS universal link file generation
|
||||
if [ -z "$TEAM_ID" ] && [ -z "$IOS_BUNDLE_IDENTIFIER" ]
|
||||
then
|
||||
echo "Unable to find Apple Team ID and bundle identifier. Skipping apple-app-site-association generation..."
|
||||
else
|
||||
file_content=$(cat <<EOF
|
||||
{
|
||||
"applinks": {
|
||||
"details": [
|
||||
{
|
||||
"appIDs": [ "${TEAM_ID}.${IOS_BUNDLE_IDENTIFIER}"],
|
||||
"components": [
|
||||
{
|
||||
"/": "/*",
|
||||
"comment": "Match all links"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
echo $file_content > $PWD/app/www/.well-known/apple-app-site-association
|
||||
fi
|
||||
|
||||
|
||||
# Google Play/Android universal link file generation
|
||||
KEYTOOL_INFO=$(keytool -list -v -keystore ./playstore.keystore -alias $ANDROID_KEYSTORE_KEY_ALIAS -storepass $ANDROID_KEYSTORE_PASSWORD -keypass $ANDROID_KEYSTORE_KEY_PASSWORD || true)
|
||||
CERT_FINGERPRINT=$(echo $KEYTOOL_INFO | grep -Po '(?:[a-fA-F0-9]{2}:){31}[a-fA-F0-9]{2}')
|
||||
|
||||
if [ -z "$CERT_FINGERPRINT" ]
|
||||
then
|
||||
echo "Unable to retrieve Android sigining SHA256 fingerprint. Skipping assetlinks.json generation..."
|
||||
else
|
||||
file_content=$(cat <<EOF
|
||||
[
|
||||
{
|
||||
"relation": [
|
||||
"delegate_permission/common.handle_all_urls"
|
||||
],
|
||||
"target": {
|
||||
"namespace": "android_app",
|
||||
"package_name": "${ANDROID_PACKAGE_NAME}",
|
||||
"sha256_cert_fingerprints": [
|
||||
"${CERT_FINGERPRINT}"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
EOF
|
||||
)
|
||||
echo $file_content > $PWD/app/www/.well-known/assetlinks.json
|
||||
fi
|
||||
@@ -9,4 +9,6 @@
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
not kaios 2.5
|
||||
not op_mini all
|
||||
not IE 9-11
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -33,6 +33,7 @@
|
||||
"unicorn/prefer-object-from-entries": "off",
|
||||
"unicorn/prefer-node-protocol": "off",
|
||||
"unicorn/no-process-exit": "off",
|
||||
"unicorn/prefer-event-target": "off",
|
||||
"unicorn/prevent-abbreviations": [
|
||||
"warn",
|
||||
{
|
||||
@@ -53,6 +54,7 @@
|
||||
"jsdoc/require-param-type": "off",
|
||||
"jsdoc/require-returns-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ e2e:
|
||||
- pnpm --filter=@openstapps/app exec cypress install
|
||||
- pnpm test:integration:app
|
||||
artifacts:
|
||||
when: always
|
||||
when: on_failure
|
||||
paths:
|
||||
- frontend/app/cypress/videos
|
||||
- frontend/app/cypress/screenshots
|
||||
@@ -19,4 +19,4 @@ e2e:
|
||||
- BROWSER: chrome
|
||||
- BROWSER: firefox
|
||||
rules:
|
||||
- when: on_success
|
||||
- !reference [.limit_pipelines, rules]
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- www
|
||||
except:
|
||||
- schedules
|
||||
|
||||
scheduled-build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
only:
|
||||
- schedules
|
||||
|
||||
unit:
|
||||
stage: test
|
||||
script:
|
||||
- npm run check-icons
|
||||
- npm run test -- --watch=false --no-progress --code-coverage
|
||||
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
|
||||
artifacts:
|
||||
paths:
|
||||
- coverage
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage/cobertura-coverage.xml
|
||||
@@ -1,11 +0,0 @@
|
||||
# Ignore all files/folders by default
|
||||
# See https://stackoverflow.com/a/29932318
|
||||
/*
|
||||
# Except these files/folders
|
||||
!docs
|
||||
!lib
|
||||
!LICENSE
|
||||
!package.json
|
||||
!package-lock.json
|
||||
!README.md
|
||||
!src
|
||||
@@ -23,4 +23,5 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
],
|
||||
ignorePath: ['.prettierignore', '../../.gitignore'],
|
||||
};
|
||||
|
||||